Warning, file /include/root/TStructViewerGUI.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TStructViewerGUI
0013 #define ROOT_TStructViewerGUI
0014
0015 #include <TGFrame.h>
0016 #include <TGLEmbeddedViewer.h>
0017 #include <TGToolTip.h>
0018 #include <TGLabel.h>
0019 #include <TGNumberEntry.h>
0020 #include <TGeoVolume.h>
0021 #include <TExMap.h>
0022
0023 class TGeoMedium;
0024 class TStructViewer;
0025 class TGeoVolume;
0026 class TStructNode;
0027 class TCanvas;
0028 class TGCheckButton;
0029 class TGTextButton;
0030 class TGRadioButton;
0031 class TStructNodeEditor;
0032 class TStructNodeProperty;
0033 class TGLPhysicalShape;
0034 class TString;
0035 class TGTextEntry;
0036
0037 class TStructViewerGUI : public TGMainFrame {
0038
0039 private:
0040 TStructViewer *fParent;
0041 TGeoVolume *fTopVolume;
0042 TStructNode *fNodePtr;
0043 UInt_t fMaxSlices;
0044 UInt_t fMouseX;
0045 UInt_t fMouseY;
0046 TStructNode *fSelectedObject;
0047 TList fUndoList;
0048 TList fRedoList;
0049 TList fVisibleObjects;
0050 Float_t fMaxRatio;
0051 TList *fColors;
0052 static TGeoMedium *fgMedium;
0053 TExMap fVolumes;
0054 static UInt_t fgCounter;
0055
0056
0057 TCanvas *fCanvas;
0058 TGLEmbeddedViewer *fGLViewer;
0059 TGToolTip *fToolTip;
0060 TGCheckButton *fShowLinksCheckButton;
0061 TGLabel *fNodeNameLabel;
0062 TGLabel *fNodeTypelabel;
0063 TGLabel *fMembersCountLabel;
0064 TGLabel *fAllMembersCountLabel;
0065 TGLabel *fSizeLabel;
0066 TGLabel *fTotalSizeLabel;
0067 TGLabel *fLevelLabel;
0068 TGTextButton *fUndoButton;
0069 TGTextButton *fRedoButton;
0070 TGRadioButton *fScaleBySizeButton;
0071 TGRadioButton *fScaleByMembersButton;
0072 TGTextEntry *fPointerTextEntry;
0073 TGTextEntry *fPointerTypeTextEntry;
0074 TStructNodeEditor *fEditor;
0075 TGNumberEntry *fBoxHeightEntry;
0076 TGCheckButton *fAutoRefesh;
0077 TGNumberEntry *fLevelDistanceEntry;
0078
0079 private:
0080 void CalculatePosistion(TStructNode* parent);
0081 void CheckMaxObjects(TStructNode* parent);
0082 void Divide(TList* list, Float_t x1, Float_t x2, Float_t y1, Float_t y2);
0083 void DrawNode(TStructNode* node);
0084 void DrawLink(TStructNode* parent);
0085 void DrawVolumes(TStructNode* visObj);
0086 TStructNodeProperty* FindNodeProperty(TStructNode* node);
0087 void Scale(TStructNode* parent);
0088 void UnCheckMaxObjects();
0089 void UpdateLabels( TStructNode* node );
0090
0091 public:
0092 TStructViewerGUI(TStructViewer* parent, TStructNode* nodePtr, TList* colors, const TGWindow *p = nullptr,
0093 UInt_t w = 800, UInt_t h = 600);
0094 ~TStructViewerGUI() override;
0095
0096 void AutoRefreshButtonSlot(Bool_t on);
0097 void BoxHeightValueSetSlot(Long_t h);
0098 void CloseWindow() override;
0099 void ColorSelectedSlot(Pixel_t pixel);
0100 void DoubleClickedSlot();
0101 void Draw(Option_t* option = "") override;
0102 TCanvas *GetCanvas();
0103 Int_t GetColor(TStructNode* node);
0104 TStructNodeProperty* GetDefaultColor();
0105 Bool_t GetLinksVisibility() const;
0106 TStructNode *GetNodePtr() const;
0107 void GLWidgetProcessedEventSlot(Event_t* event);
0108 void LevelDistValueSetSlot(Long_t dist);
0109 void MouseOverSlot(TGLPhysicalShape* shape);
0110 void RedoButtonSlot();
0111 void ResetButtonSlot();
0112 void ScaleByChangedSlot();
0113 void SetLinksVisibility(Bool_t val);
0114 void SetNodePtr(TStructNode* val);
0115 void SetPointerButtonSlot();
0116 void ShowLinksToggled(Bool_t on);
0117 void UndoButtonSlot();
0118 void Update(Bool_t resetCamera = false);
0119 void UpdateButtonSlot();
0120
0121 ClassDefOverride(TStructViewerGUI, 0);
0122 };
0123
0124 #endif