//------------------------------------------------------------------------------ // gui_Led class -- // (C) Piero Giubilato 2008-2010, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gui_Led.h" // [Author] "Piero Giubilato" // [Version] "1.0" // [Modified by] "Piero Giubilato" // [Last revision] "23 Apr 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gui_Led class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #if !defined gui_Led_H #define gui_Led_H // Root components #include #include // Application components #include "gui_Const.h" #include "gui_Object.h" #include "gso_Button.h" // This class provides a functional layer to TGTextButton class gui_Led: public gui_Object { private: // Main interface elements gso_Button* button; // The gso button itself // Button status bool button_Status; // Button mechanical status // Private functions void Init(const char* label, UInt_t left, UInt_t top, UInt_t width, UInt_t height, UInt_t foreColor, UInt_t backColor); // Special private memebers gui_Led(const gui_Led&) {} const gui_Led& operator=(const gui_Led&) {return *this;} public: // Parameters enum ks {ks_Off, ks_On}; static const UInt_t kc_Red = 0x401500; static const UInt_t kc_Orange = 0x403005; static const UInt_t kc_Green = 0x204010; static const UInt_t kc_Blue = 0x102040; // Special member functions gui_Led(UInt_t left, UInt_t top, UInt_t width = 28, UInt_t height = 28, UInt_t foreColor = 0, UInt_t backColor = kc_Green); gui_Led(gui_Object* parent, UInt_t left, UInt_t top, UInt_t width = 28, UInt_t height = 28, UInt_t foreColor = 0, UInt_t backColor = kc_Green); ~gui_Led(); // Slots for gui calls, MUST be public void btn_Do(); // gui_Object overloaded methods (standard interface) void ReDraw(); const gso_Button* Root() const; void MoveResize(UInt_t left, UInt_t top, UInt_t width, UInt_t height); void LowerWindow() const {button->LowerWindow();}; void RaiseWindow() const {button->RaiseWindow();}; void color_Set(UInt_t foreColor, UInt_t backColor); // gui_Button specific methods UInt_t Status(); void Status(UInt_t value); // Cint preprocessor token ClassDef(gui_Led, 1) }; // End of Overloading check #endif