Warning, file /include/root/TGToolBar.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_TGToolBar
0013 #define ROOT_TGToolBar
0014
0015
0016 #include "TGFrame.h"
0017
0018 class TGButton;
0019 class TGPictureButton;
0020 class TList;
0021 class TMap;
0022
0023 struct ToolBarData_t {
0024 const char *fPixmap;
0025 const char *fTipText;
0026 Bool_t fStayDown;
0027 Int_t fId;
0028 TGButton *fButton;
0029 };
0030
0031
0032
0033 class TGToolBar : public TGCompositeFrame {
0034
0035 protected:
0036 TList *fPictures;
0037 TList *fTrash;
0038 TMap *fMapOfButtons;
0039
0040 private:
0041 TGToolBar(const TGToolBar&) = delete;
0042 TGToolBar& operator=(const TGToolBar&) = delete;
0043
0044 public:
0045 TGToolBar(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
0046 UInt_t options = kHorizontalFrame,
0047 Pixel_t back = GetDefaultFrameBackground());
0048 ~TGToolBar() override;
0049
0050 virtual TGButton *AddButton(const TGWindow *w, ToolBarData_t *button, Int_t spacing = 0);
0051 virtual TGButton *AddButton(const TGWindow *w, TGPictureButton *button, Int_t spacing = 0);
0052
0053 virtual void ChangeIcon(ToolBarData_t *button, const char *new_icon);
0054 void Cleanup() override;
0055 virtual TGButton *GetButton(Int_t id) const;
0056 virtual Longptr_t GetId(TGButton *button) const;
0057 virtual void SetId(TGButton *button, Longptr_t id);
0058
0059 virtual void ButtonPressed();
0060 virtual void ButtonReleased();
0061 virtual void ButtonClicked();
0062
0063 virtual void Pressed(Int_t id) { Emit("Pressed(Int_t)",id); }
0064 virtual void Released(Int_t id) { Emit("Released(Int_t)",id);}
0065 virtual void Clicked(Int_t id) { Emit("Clicked(Int_t)",id); }
0066
0067 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0068
0069 ClassDefOverride(TGToolBar,0)
0070 };
0071
0072 #endif