Warning, file /include/root/TRootGuiBuilder.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_TRootGuiBuilder
0013 #define ROOT_TRootGuiBuilder
0014
0015
0016 #include "TGFrame.h"
0017 #include "TGuiBuilder.h"
0018
0019 enum EGuiBuilderMenuIds {
0020 kGUIBLD_FILE_NEW,
0021 kGUIBLD_FILE_CLOSE,
0022 kGUIBLD_FILE_EXIT,
0023 kGUIBLD_FILE_START,
0024 kGUIBLD_FILE_STOP,
0025 kGUIBLD_FILE_SAVE,
0026
0027 kGUIBLD_EDIT_PREF,
0028
0029 kGUIBLD_WINDOW_HOR,
0030 kGUIBLD_WINDOW_VERT,
0031 kGUIBLD_WINDOW_CASCADE,
0032 kGUIBLD_WINDOW_OPAQUE,
0033 kGUIBLD_WINDOW_ARRANGE,
0034
0035 kGUIBLD_HELP_CONTENTS,
0036 kGUIBLD_HELP_ABOUT,
0037 kGUIBLD_HELP_BUG,
0038
0039 kGUIBLD_FILE_OPEN
0040 };
0041
0042
0043 class TGShutter;
0044 class TGMdiMainFrame;
0045 class TGDockableFrame;
0046 class TGMdiMenuBar;
0047 class TGPopupMenu;
0048 class TGStatusBar;
0049 class TGuiBldDragManager;
0050 class TGToolBar;
0051 class TGMdiFrame;
0052 class TGuiBldEditor;
0053 class TGButton;
0054 class TGPictureButton;
0055 class TImage;
0056 class TTimer;
0057
0058
0059 class TRootGuiBuilder : public TGuiBuilder, public TGMainFrame {
0060
0061 friend class TGuiBldDragManager;
0062
0063 private:
0064 TGuiBldDragManager *fManager;
0065 TGButton *fActionButton;
0066 TGToolBar *fToolBar;
0067 TGShutter *fShutter;
0068 TGMdiMainFrame *fMain;
0069 TGDockableFrame *fToolDock;
0070 TGDockableFrame *fShutterDock;
0071 TGMdiMenuBar *fMenuBar;
0072 TGPopupMenu *fMenuFile;
0073 TGPopupMenu *fMenuWindow;
0074 TGPopupMenu *fMenuEdit;
0075 TGPopupMenu *fMenuHelp;
0076 TGStatusBar *fStatusBar;
0077 TGFrame *fSelected;
0078 TGMdiFrame *fEditable;
0079 TGuiBldEditor *fEditor;
0080 const TGPicture *fIconPic;
0081 TGPictureButton *fStartButton;
0082 Int_t fClosing;
0083
0084 static TGGC *fgBgnd;
0085 static TGGC *fgBgndPopup;
0086 static TGGC *fgBgndPopupHlght;
0087
0088 void InitMenu();
0089 void EnableLassoButtons(Bool_t on = kTRUE);
0090 void EnableSelectedButtons(Bool_t on = kTRUE);
0091 void EnableEditButtons(Bool_t on = kTRUE);
0092 void BindKeys();
0093 TGButton *FindActionButton(const char *name, const char *section);
0094
0095 public:
0096 TRootGuiBuilder(const TGWindow *p = nullptr);
0097 ~TRootGuiBuilder() override;
0098
0099 void AddAction(TGuiBldAction *act, const char *sect) override;
0100 virtual void AddMacro(const char *macro, TImage *img);
0101 void AddSection(const char *sect) override;
0102 TGFrame *ExecuteAction() override;
0103 virtual void HandleButtons();
0104 void Show() override { MapRaised(); }
0105 void Hide() override;
0106 virtual void ChangeSelected(TGFrame *f);
0107 virtual void Update();
0108 virtual Bool_t IsSelectMode() const;
0109 virtual Bool_t IsGrabButtonDown() const;
0110 virtual Bool_t OpenProject(Event_t *event = nullptr);
0111 virtual Bool_t SaveProject(Event_t *event = nullptr);
0112 virtual Bool_t NewProject(TString type = "");
0113 Bool_t HandleKey(Event_t *event) override;
0114 virtual void HandleMenu(Int_t id);
0115 void CloseWindow() override;
0116 virtual void MaybeCloseWindow();
0117 virtual void HandleWindowClosed(Int_t id);
0118 virtual void UpdateStatusBar(const char *text = nullptr);
0119 virtual void EraseStatusBar();
0120 virtual void SwitchToolbarButton();
0121
0122 TGMdiFrame *FindEditableMdiFrame(const TGWindow *win);
0123 TGuiBldEditor *GetEditor() const { return fEditor; }
0124 TGDockableFrame *GetToolDock() const { return fToolDock; }
0125 TGMdiMainFrame *GetMdiMain() const { return fMain; }
0126 TGMdiFrame *GetEditable() const { return fEditable; }
0127 TGuiBldDragManager *GetManager() const { return fManager; }
0128
0129 static ULong_t GetBgnd();
0130 static TGGC *GetBgndGC();
0131
0132 static ULong_t GetPopupBgnd();
0133 static TGGC *GetPopupBgndGC();
0134
0135 static ULong_t GetPopupHlght();
0136 static TGGC *GetPopupHlghtGC();
0137
0138 static void PropagateBgndColor(TGFrame *frame, Pixel_t color);
0139
0140 static TGFrame *HSplitter();
0141 static TGFrame *VSplitter();
0142 static TGPopupMenu *CreatePopup();
0143 static TGFrame *BuildListTree();
0144 static TGFrame *BuildCanvas();
0145 static TGFrame *BuildShutter();
0146 static TGFrame *BuildTextEdit();
0147 static TGFrame *BuildTab();
0148 static TGFrame *BuildListBox();
0149 static TGFrame *BuildComboBox();
0150 static TGFrame *BuildH3DLine();
0151 static TGFrame *BuildV3DLine();
0152 static TGFrame *BuildHScrollBar();
0153 static TGFrame *BuildVScrollBar();
0154 static TGFrame *BuildHProgressBar();
0155 static TGFrame *BuildVProgressBar();
0156
0157
0158 ClassDefOverride(TRootGuiBuilder,0)
0159 };
0160
0161
0162 #endif