12 #ifndef ROOT_TStructViewerGUI
13 #define ROOT_TStructViewerGUI
31 class TStructNodeEditor;
32 class TStructNodeProperty;
33 class TGLPhysicalShape;
37 class TStructViewerGUI :
public TGMainFrame {
40 TStructViewer *fParent;
41 TGeoVolume *fTopVolume;
42 TStructNode *fNodePtr;
46 TStructNode *fSelectedObject;
49 TList fVisibleObjects;
52 static TGeoMedium *fgMedium;
54 static UInt_t fgCounter;
58 TGLEmbeddedViewer *fGLViewer;
60 TGCheckButton *fShowLinksCheckButton;
61 TGLabel *fNodeNameLabel;
62 TGLabel *fNodeTypelabel;
63 TGLabel *fMembersCountLabel;
64 TGLabel *fAllMembersCountLabel;
66 TGLabel *fTotalSizeLabel;
68 TGTextButton *fUndoButton;
69 TGTextButton *fRedoButton;
70 TGRadioButton *fScaleBySizeButton;
71 TGRadioButton *fScaleByMembersButton;
72 TGTextEntry *fPointerTextEntry;
73 TGTextEntry *fPointerTypeTextEntry;
74 TStructNodeEditor *fEditor;
75 TGNumberEntry *fBoxHeightEntry;
76 TGCheckButton *fAutoRefesh;
77 TGNumberEntry *fLevelDistanceEntry;
80 void CalculatePosistion(TStructNode* parent);
81 void CheckMaxObjects(TStructNode* parent);
82 void Divide(TList* list, Float_t x1, Float_t x2, Float_t y1, Float_t y2);
83 void DrawNode(TStructNode* node);
84 void DrawLink(TStructNode* parent);
85 void DrawVolumes(TStructNode* visObj);
86 TStructNodeProperty* FindNodeProperty(TStructNode* node);
87 void Scale(TStructNode* parent);
88 void UnCheckMaxObjects();
89 void UpdateLabels( TStructNode* node );
92 TStructViewerGUI(TStructViewer* parent, TStructNode* nodePtr, TList* colors,
const TGWindow *p = NULL,
93 UInt_t w = 800, UInt_t h = 600);
96 void AutoRefreshButtonSlot(Bool_t on);
97 void BoxHeightValueSetSlot(Long_t h);
99 void ColorSelectedSlot(Pixel_t pixel);
100 void DoubleClickedSlot();
101 void Draw(Option_t* option =
"");
102 TCanvas *GetCanvas();
103 Int_t GetColor(TStructNode* node);
104 TStructNodeProperty* GetDefaultColor();
105 Bool_t GetLinksVisibility()
const;
106 TStructNode *GetNodePtr()
const;
107 void GLWidgetProcessedEventSlot(Event_t* event);
108 void LevelDistValueSetSlot(Long_t dist);
109 void MouseOverSlot(TGLPhysicalShape* shape);
110 void RedoButtonSlot();
111 void ResetButtonSlot();
112 void ScaleByChangedSlot();
113 void SetLinksVisibility(Bool_t val);
114 void SetNodePtr(TStructNode* val);
115 void SetPointerButtonSlot();
116 void ShowLinksToggled(Bool_t on);
117 void UndoButtonSlot();
118 void Update(Bool_t resetCamera =
false);
119 void UpdateButtonSlot();
121 ClassDef(TStructViewerGUI, 0);