Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TStructNodeEditor.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gviz3d:$Id$
0002 // Author: Tomasz Sosnicki   18/09/09
0003 
0004 /*************************************************************************
0005 * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
0006 * All rights reserved.                                                  *
0007 *                                                                       *
0008 * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010 *************************************************************************/
0011 
0012 #ifndef ROOT_TStructNodeEditor
0013 #define ROOT_TStructNodeEditor
0014 
0015 #include <TGedFrame.h>
0016 
0017 class TList;
0018 class TStructNode;
0019 class TStructNodeProperty;
0020 class TGNumberEntry;
0021 class TGLabel;
0022 class TGTextEntry;
0023 class TGColorSelect;
0024 class TGCheckButton;
0025 
0026 class TStructNodeEditor : public TGedFrame {
0027 
0028 protected:
0029    TList               *fColors;                // Pointer to list with class colors
0030    TStructNode         *fNode;                  // Pointer to node which is edited
0031    TGNumberEntry       *fMaxObjectsNumberEntry; // Sets maximum number of nodes on scene
0032    TGNumberEntry       *fMaxLevelsNumberEntry;  // Sets maximum number of visible levels on scene
0033    TGLabel             *fTypeName;              // Label with name of type
0034    TGLabel             *fNodeNameLabel;         // Label with name of node
0035    TGTextEntry         *fNameEntry;             // Text entry with name of property
0036    TGColorSelect       *fColorSelect;           // Control to selec a color
0037    TStructNodeProperty *fSelectedPropert;       // Pointer to property associated with node
0038    TGTextButton        *fDefaultButton;         // Resets color to default
0039    TGTextButton        *fApplyButton;           // Apply changes button
0040    TGCheckButton       *fAutoRefesh;           // Condition for auto update
0041 
0042    TStructNodeProperty* FindNodeProperty(TStructNode* node);
0043    TStructNodeProperty* GetDefaultProperty();
0044    void                 Init();
0045 
0046 public:
0047    TStructNodeEditor(TList* colors, const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30,
0048       UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
0049    ~TStructNodeEditor() override;
0050 
0051    void  ApplyButtonSlot();
0052    void  AutoRefreshButtonSlot(Bool_t on);
0053    void  ColorSelectedSlot(Pixel_t color);
0054    void  DefaultButtonSlot();
0055    void  MaxLevelsValueSetSlot(Long_t);
0056    void  MaxObjectsValueSetSlot(Long_t);
0057    void  SetModel(TObject* obj) override;
0058    void  Update(Bool_t resetCamera);
0059    void  Update() override;
0060 
0061    ClassDefOverride(TStructNodeEditor, 0); // GUI fo editing TStructNode
0062 };
0063 #endif // ROOT_TStructNodeEditor
0064