Warning, file /include/root/TGLSAViewer.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_TGLSAViewer
0013 #define ROOT_TGLSAViewer
0014
0015 #include "TGLViewer.h"
0016 #include "TString.h"
0017
0018 class TGLSAFrame;
0019 class TGLFormat;
0020 class TGWindow;
0021 class TGFrame;
0022 class TGCompositeFrame;
0023 class TGPopupMenu;
0024 class TGButton;
0025
0026 class TGedEditor;
0027 class TGLEventHandler;
0028 class TGMenuBar;
0029
0030
0031
0032
0033
0034
0035
0036
0037 class TGLSAViewer : public TGLViewer
0038 {
0039 public:
0040 enum EGLSACommands {
0041 kGLHelpAbout, kGLHelpViewer,
0042 kGLPerspYOZ, kGLPerspXOZ, kGLPerspXOY,
0043 kGLXOY, kGLXOZ, kGLZOY, kGLZOX,
0044 kGLXnOY, kGLXnOZ, kGLZnOY, kGLZnOX,
0045 kGLOrthoRotate, kGLOrthoDolly,
0046 kGLSaveEPS, kGLSavePDF, kGLSavePNG, kGLSaveGIF, kGLSaveAnimGIF,
0047 kGLSaveJPG, kGLSaveAS, kGLCloseViewer, kGLQuitROOT,
0048 kGLEditObject, kGLHideMenus };
0049
0050 private:
0051
0052 TGLSAFrame *fFrame;
0053 TGLFormat *fFormat;
0054 TGPopupMenu *fFileMenu;
0055 TGPopupMenu *fFileSaveMenu;
0056 TGPopupMenu *fCameraMenu;
0057 TGPopupMenu *fHelpMenu;
0058
0059
0060 TGCompositeFrame *fLeftVerticalFrame;
0061
0062 TGCompositeFrame *fRightVerticalFrame;
0063
0064 TString fDirName;
0065 Int_t fTypeIdx;
0066 Bool_t fOverwrite;
0067 TGMenuBar *fMenuBar;
0068 TGButton *fMenuBut;
0069 Bool_t fHideMenuBar;
0070 TTimer *fMenuHidingTimer;
0071 Bool_t fMenuHidingShowMenu;
0072
0073 Bool_t fDeleteMenuBar;
0074
0075 static Long_t fgMenuHidingTimeout;
0076
0077 void ResetMenuHidingTimer(Bool_t show_menu);
0078
0079
0080 static const Int_t fgInitX;
0081 static const Int_t fgInitY;
0082 static const Int_t fgInitW;
0083 static const Int_t fgInitH;
0084
0085 static const char *fgHelpText1;
0086 static const char *fgHelpText2;
0087
0088 void CreateMenus();
0089 void CreateFrames();
0090
0091
0092 TGLSAViewer(const TGLSAViewer &);
0093 TGLSAViewer & operator = (const TGLSAViewer &);
0094
0095 public:
0096 TGLSAViewer(TVirtualPad* pad, TGLFormat* format=nullptr);
0097 TGLSAViewer(const TGWindow* parent, TVirtualPad *pad, TGedEditor *ged=nullptr,
0098 TGLFormat* format=nullptr);
0099 ~TGLSAViewer() override;
0100
0101 void CreateGLWidget() override;
0102 void DestroyGLWidget() override;
0103
0104 const char* GetName() const override { return "GLViewer"; }
0105
0106 void SelectionChanged() override;
0107
0108 void Show();
0109 void Close();
0110 void DeleteMenuBar();
0111 void DisableCloseMenuEntries();
0112 void EnableMenuBarHiding();
0113 void DisableMenuBarHiding();
0114 void MenuHidingTimeout();
0115
0116 void HandleMenuBarHiding(Event_t* ev);
0117
0118
0119 Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t);
0120
0121 TGCompositeFrame* GetFrame() const;
0122 TGCompositeFrame* GetLeftVerticalFrame() const { return fLeftVerticalFrame; }
0123
0124 TGLFormat* GetFormat() const { return fFormat; }
0125
0126 void ToggleEditObject();
0127 void ToggleOrthoRotate();
0128 void ToggleOrthoDolly();
0129
0130 static void SetMenuHidingTimeout(Long_t timeout);
0131
0132 ClassDefOverride(TGLSAViewer, 0);
0133 };
0134
0135 #endif
0136