//------------------------------------------------------------------------------ // gui_Group class; wrapper for the TGGroupFrame class -- // (C) Piero Giubilato, 2007, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gui_Group.cpp" // [Author] "Devis Contarato, Piero Giubilato" // [Version] "0.1" // [Modified by] "Devis Contarato" // [Last revision] "25 Jul 2008" // [Language] "C++" // [Compiler] "Visual C++ 8.x 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Class for frame surrounding a group of objects" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ /* // Standard libraries #include // Root objects #include #include // Application components #include "gui_Group.h" #include "gui_Const.h" #include "global.h" // CINT Preprocessor class import definition ClassImp(gui_Group) //______________________________________________________________________________ gui_Group::gui_Group( const char* caption, UInt_t left, UInt_t top, UInt_t width, UInt_t height) { // gui_Group // // Implements a frame that can be populated with both gui_Objects // and root native objects. // 'caption' is the title of the group. // Debug dbg_Print("gui_Group::gui_Group: standard constructor", DBG_LVL_ZERO); // Sets the frame group_Place(caption, left, top, width, height); } //______________________________________________________________________________ void gui_Group::group_Place(const char* caption, UInt_t left, UInt_t top, UInt_t width, UInt_t height) { // Creates a layer over a root text control dbg_Print("gui_Group::group_Place: setting up group", DBG_LVL_ZERO); // Initializes the root widget group = new TGGroupFrame(container(), caption); // Renders the widget into the frame and adds it to the window container()->AddFrame(group, new TGLayoutHints(kLHintsNormal, 0, 0, 0, 0)); moveResize(left, top, width, height); } //______________________________________________________________________________ void gui_Group::moveResize(UInt_t left, UInt_t top, UInt_t width, UInt_t height) { // Moves and resizes the button group->MoveResize(left, top, width, height); // Stores the new datas obj_Left = left; obj_Top = top; obj_Width = width; obj_Height = height; // Paint update(); } //______________________________________________________________________________ gui_Group::~gui_Group() { // Standard destructor dbg_Print("gui_Group::~gui_Group: destructor called", DBG_LVL_ZERO); // Delete the window group->DeleteWindow(); // Deletes all the widgets } //______________________________________________________________________________ void gui_Group::group_Refresh() { // Refresh group->MapSubwindows(); } //______________________________________________________________________________ const TGGroupFrame* gui_Group::root() const { // Returns the pointer to the embedded root object return group; } //______________________________________________________________________________ void gui_Group::color_Set(UInt_t foreColor, UInt_t backColor) { // Moves and resizes the button group->SetForegroundColor(foreColor); group->SetBackgroundColor(backColor); // Stores the new datas obj_foreColor = foreColor; obj_backColor = backColor; // Refresh the graphical container update(); } */