Logo ROOT   6.18/05
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
17class TList;
18class TStructNode;
20class TGNumberEntry;
21class TGLabel;
22class TGTextEntry;
23class TGColorSelect;
24class TGCheckButton;
25
27
28protected:
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
46public:
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
ULong_t Pixel_t
Definition: GuiTypes.h:39
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:326
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
@ kChildFrame
Definition: TGFrame.h:57
Color * colors
Definition: X3DBuffer.c:21
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
A doubly linked list.
Definition: TList.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
TGColorSelect * fColorSelect
void MaxLevelsValueSetSlot(Long_t)
Emmited when user changes maximum number of levels.
~TStructNodeEditor()
Destructor of node editor.
TStructNodeProperty * GetDefaultProperty()
Returns property with default color.
void SetModel(TObject *obj)
Pick up the used node attributes.
void MaxObjectsValueSetSlot(Long_t)
Emmited when user changes maximum number of objects.
void DefaultButtonSlot()
Slot for Defaulf button. Sets color of class to default.
void Update()
Signal emmited when color or other property like number of level is changed without camera reset.
TGNumberEntry * fMaxLevelsNumberEntry
void AutoRefreshButtonSlot(Bool_t on)
Activated when user chage condition.
TStructNode * fNode
void ColorSelectedSlot(Pixel_t color)
Slot connected to the fill area color.
TGNumberEntry * fMaxObjectsNumberEntry
TStructNodeProperty * fSelectedPropert
TGCheckButton * fAutoRefesh
TGTextEntry * fNameEntry
TGTextButton * fApplyButton
TGTextButton * fDefaultButton
TStructNodeProperty * FindNodeProperty(TStructNode *node)
Retruns property associated to the class of given node "node".
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.
void Init()
Enables button and fields.
void ApplyButtonSlot()
ApplyButton Slot. Activated when user press Apply button. Sets properties of a node.