Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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;
19 class TStructNodeProperty;
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 
42  TStructNodeProperty* FindNodeProperty(TStructNode* node);
43  TStructNodeProperty* GetDefaultProperty();
44  void Init();
45 
46 public:
47  TStructNodeEditor(TList* colors, const TGWindow *p = 0, Int_t width = 140, Int_t height = 30,
48  UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
49  ~TStructNodeEditor();
50 
51  void ApplyButtonSlot();
52  void AutoRefreshButtonSlot(Bool_t on);
53  void ColorSelectedSlot(Pixel_t color);
54  void DefaultButtonSlot();
55  void MaxLevelsValueSetSlot(Long_t);
56  void MaxObjectsValueSetSlot(Long_t);
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