//------------------------------------------------------------------------------ // gui_Button class -- // (C) Piero Giubilato 2008, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gui_Button.h" // [Author] "Piero Giubilato" // [Version] "0.7" // [Modified by] "Piero Giubilato" // [Last revision] "20 Aug 2008" // [Language] "C++" // [Compiler] "Visual C++ 8.x 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gui_Button class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #if !defined gui_Button_H #define gui_Button_H // Root components #include #include #include // Application components #include "gui_Const.h" #include "gui_Object.h" // This class provides a functional layer to TGTextButton class gui_Button: public gui_Object { private: // Main interface elements TGTextButton* button; // The root button itself UInt_t button_Mode; // Button mechanical action // Button status bool button_Status; // Button mechanical status bool button_Default; // Button mechanical default // Private functions void Init(const char* label, UInt_t left, UInt_t top, UInt_t width, UInt_t height); // Special private memebers gui_Button(const gui_Button&) {} const gui_Button& operator=(const gui_Button&) {return *this;} public: // Parameters enum km { km_Button, km_Latch }; // Special member functions gui_Button(const char* label, UInt_t left, UInt_t top, UInt_t width, UInt_t height, UInt_t behaviour); ~gui_Button(); // Slots for gui calls, MUST be public void btn_Do(); // gui_Object overloaded methods (standard interface) const TGTextButton* Root() const; void MoveResize(UInt_t left, UInt_t top, UInt_t width, UInt_t height); void color_Set(UInt_t foreColor, UInt_t backColor); const TString Text() const; void Text(const char* text); bool fontBold() const; void fontBold(bool bold); // gui_Button specific methods UInt_t btn_Mode() const; UInt_t btn_Mode(UInt_t value); bool btn_Status(); bool btn_Status(bool value); bool btn_Default() const; bool btn_Default(bool value); // Cint preprocessor token ClassDef(gui_Button, 1) }; // End of Overloading check #endif