Logo ROOT   6.08/07
Reference Guide
TStructNodeEditor.h
Go to the documentation of this file.
1 // @(#)root/gviz3d:$Id$
2 // Author: Tomasz Sosnicki 18/09/09
3 
4 /*************************************************************************
5 * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11 
12 #ifndef ROOT_TStructNodeEditor
13 #define ROOT_TStructNodeEditor
14 
15 #include <TGedFrame.h>
16 
17 class TList;
18 class TStructNode;
20 class TGNumberEntry;
21 class TGLabel;
22 class TGTextEntry;
23 class TGColorSelect;
24 class TGCheckButton;
25 
26 class TStructNodeEditor : public TGedFrame {
27 
28 protected:
29  TList *fColors; // Pointer to list with class colors
30  TStructNode *fNode; // Pointer to node which is edited
31  TGNumberEntry *fMaxObjectsNumberEntry; // Sets maximum number of nodes on scene
32  TGNumberEntry *fMaxLevelsNumberEntry; // Sets maximum number of visible levels on scene
33  TGLabel *fTypeName; // Label with name of type
34  TGLabel *fNodeNameLabel; // Label with name of node
35  TGTextEntry *fNameEntry; // Text entry with name of property
36  TGColorSelect *fColorSelect; // Control to selec a color
37  TStructNodeProperty *fSelectedPropert; // Pointer to property associated with node
38  TGTextButton *fDefaultButton; // Resets color to default
39  TGTextButton *fApplyButton; // Apply changes button
40  TGCheckButton *fAutoRefesh; // Condition for auto update
41 
44  void Init();
45 
46 public:
47  TStructNodeEditor(TList* colors, const TGWindow *p = 0, Int_t width = 140, Int_t height = 30,
50 
51  void ApplyButtonSlot();
53  void ColorSelectedSlot(Pixel_t color);
54  void DefaultButtonSlot();
57  void SetModel(TObject* obj);
58  void Update(Bool_t resetCamera);
59  void Update();
60 
61  ClassDef(TStructNodeEditor, 0); // GUI fo editing TStructNode
62 };
63 #endif // ROOT_TStructNodeEditor
64 
TGNumberEntry * fMaxLevelsNumberEntry
TStructNodeProperty * FindNodeProperty(TStructNode *node)
Retruns property associated to the class of given node "node".
void MaxLevelsValueSetSlot(Long_t)
Emmited when user changes maximum number of levels.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void MaxObjectsValueSetSlot(Long_t)
Emmited when user changes maximum number of objects.
TGTextButton * fApplyButton
TStructNodeProperty * GetDefaultProperty()
Returns property with default color.
TGTextEntry * fNameEntry
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGTextButton * fDefaultButton
TGNumberEntry * fMaxObjectsNumberEntry
A doubly linked list.
Definition: TList.h:47
~TStructNodeEditor()
Destructor of node editor.
TStructNodeProperty * fSelectedPropert
TStructNode * fNode
TGCheckButton * fAutoRefesh
unsigned int UInt_t
Definition: RtypesCore.h:42
TStructNodeEditor(TList *colors, const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of node attributes GUI.
long Long_t
Definition: RtypesCore.h:50
Color * colors
Definition: X3DBuffer.c:19
void ColorSelectedSlot(Pixel_t color)
Slot connected to the fill area color.
void Update()
Signal emmited when color or other property like number of level is changed without camera reset...
void AutoRefreshButtonSlot(Bool_t on)
Activated when user chage condition.
TGColorSelect * fColorSelect
Mother of all ROOT objects.
Definition: TObject.h:37
void ApplyButtonSlot()
ApplyButton Slot. Activated when user press Apply button. Sets properties of a node.
void DefaultButtonSlot()
Slot for Defaulf button. Sets color of class to default.
void Init()
Enables button and fields.
void SetModel(TObject *obj)
Pick up the used node attributes.