Warning, file /include/root/TGLOverlayButton.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_TGLOverlayButton
0013 #define ROOT_TGLOverlayButton
0014
0015 #include "TGLOverlay.h"
0016 #include "TGLFontManager.h"
0017 #include "TGLViewerBase.h"
0018 #include "TQObject.h"
0019
0020 class TString;
0021
0022 class TGLOverlayButton : public TGLOverlayElement,
0023 public TQObject
0024 {
0025
0026 private:
0027 TGLOverlayButton(const TGLOverlayButton&) = delete;
0028 TGLOverlayButton& operator=(const TGLOverlayButton&) = delete;
0029
0030 protected:
0031
0032 TString fText;
0033 Int_t fActiveID;
0034 Pixel_t fBackColor;
0035 Pixel_t fTextColor;
0036 Float_t fNormAlpha;
0037 Float_t fHighAlpha;
0038
0039 Float_t fPosX;
0040 Float_t fPosY;
0041 Float_t fWidth;
0042 Float_t fHeight;
0043
0044 mutable TGLFont fFont;
0045
0046 public:
0047 TGLOverlayButton(TGLViewerBase *parent, const char *text, Float_t posx,
0048 Float_t posy, Float_t width, Float_t height);
0049 ~TGLOverlayButton() override { }
0050
0051 Bool_t MouseEnter(TGLOvlSelectRecord& selRec) override;
0052 Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Event_t* event) override;
0053 void MouseLeave() override;
0054
0055 void Render(TGLRnrCtx& rnrCtx) override;
0056 virtual void ResetState() { fActiveID = -1; }
0057
0058 virtual const char *GetText() const { return fText.Data(); }
0059 virtual Pixel_t GetBackColor() const { return fBackColor; }
0060 virtual Pixel_t GetTextColor() const { return fTextColor; }
0061 virtual void SetText(const char *text) { fText = text; }
0062 virtual void SetPosition(Float_t x, Float_t y) { fPosX = x; fPosY = y; }
0063 virtual void SetSize(Float_t w, Float_t h) { fWidth = w; fHeight = h; }
0064 virtual void SetAlphaValues(Float_t norm, Float_t high) { fNormAlpha = norm; fHighAlpha = high; }
0065 virtual void SetBackColor(Pixel_t col) { fBackColor = col; }
0066 virtual void SetTextColor(Pixel_t col) { fTextColor = col; }
0067
0068 virtual void Clicked(TGLViewerBase *viewer);
0069
0070 ClassDefOverride(TGLOverlayButton, 0);
0071 };
0072
0073 #endif
0074