![]() |
AliRoot Core
v5-06-30 (35d6c57)
|
Helper class to ease building a GUI with button groups... More...
#include <AliMUONPainterInterfaceHelper.h>
Public Member Functions | |
AliMUONPainterInterfaceHelper () | |
virtual | ~AliMUONPainterInterfaceHelper () |
Static Public Member Functions | |
static void | AddRadioButton (TGButtonGroup &bg, const TString &name, void *userData=0x0, Bool_t select=kFALSE) |
static void | AddCheckButton (TGButtonGroup &bg, const TString &name, void *userData=0x0, Bool_t select=kFALSE) |
static Int_t | ButtonStartingId () |
Id of first button in a group. More... | |
static void | ClearButtons (TGButtonGroup &bg) |
static void | Copy (const TGButtonGroup &src, TGButtonGroup &dest) |
static void | Dump (const TGButtonGroup &bg) |
static TGButton * | FindButtonByName (const TGButtonGroup &bg, const TString &name) |
static TGButton * | FindButtonByUserData (const TGButtonGroup &bg, const void *userData) |
static TGButton * | FindDownButton (const TGButtonGroup &bg) |
static void | SetBackgroundColor (const char *resourceBaseName, TGWindow &window) |
static void | SetState (TGButtonGroup &bg, Bool_t state) |
static void | Select (TGButtonGroup &bg, const TString &buttonName, Bool_t emit=kFALSE) |
static void | Unselect (TGButtonGroup &bg, const TString &buttonName, Bool_t emit=kFALSE) |
static void | RemoveButton (TGButtonGroup &bg, const TGButton *button) |
Helper class to ease building a GUI with button groups...
Helper class to work with TGButtonGroup
This class only works if the buttons in the TGButtonGroup have contiguous ids, and if those ids start at ButtonStartingId(). Not bullet-proof, I admit, but this is the only way I've found with the current TGButtonGroup implementation which does not allow to loop easily on all buttons.
Definition at line 24 of file AliMUONPainterInterfaceHelper.h.
AliMUONPainterInterfaceHelper::AliMUONPainterInterfaceHelper | ( | ) |
ctor
Definition at line 53 of file AliMUONPainterInterfaceHelper.cxx.
|
virtual |
dtor
Definition at line 59 of file AliMUONPainterInterfaceHelper.cxx.
|
static |
Add a check button to a group
Definition at line 83 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterMatrixFrame::CreateButtons().
|
static |
Add a radio button to a group
Definition at line 66 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONAttPainterSelectorFrame::AliMUONAttPainterSelectorFrame(), AliMUONPainterPlotSelector::AliMUONPainterPlotSelector(), AliMUONPainterMatrixFrame::CreateButtons(), AliMUONPainterPlotSelector::CreateDimensionButtons(), AliMUONPainterPlotSelector::CreateTypeButtons(), and AliMUONPainterPlotSelector::DataSourceWasRegistered().
|
inlinestatic |
Id of first button in a group.
Definition at line 41 of file AliMUONPainterInterfaceHelper.h.
Referenced by AddCheckButton(), AddRadioButton(), Copy(), Dump(), FindButtonByName(), FindButtonByUserData(), FindDownButton(), RemoveButton(), Select(), SetState(), and Unselect().
|
static |
Remove all buttons from group. Bear in mind that you're thus disconnecting the group from any signals it might have. So you must re-connect them after a call to this method, if you want to.
Definition at line 100 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterMatrixFrame::Clear(), Copy(), AliMUONPainterPlotSelector::CreateTypeButtons(), and RemoveButton().
|
static |
Copy a button group into another one
Definition at line 124 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::BackupDimensionButtons(), RemoveButton(), and AliMUONPainterPlotSelector::RestoreDimensionButtons().
|
static |
Printout
Definition at line 146 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by FindButtonByName().
|
static |
Find a button by name
Definition at line 170 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::UpdateTypeButton().
|
static |
Find a button by userData
Definition at line 196 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::DataSourceWasUnregistered(), AliMUONPainterPlotSelector::UpdateDimensionButton(), and AliMUONPainterPlotSelector::UpdateSourceButton().
|
static |
Find which button is down (in a radio group)
Definition at line 214 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::DataSourceWasUnregistered(), and AliMUONPainterPlotSelector::RestoreDimensionButtons().
|
static |
Remove a button
Definition at line 324 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::DataSourceWasUnregistered().
|
static |
Select which button should be on
Definition at line 274 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::DimensionButtonWasClicked(), AliMUONAttPainterSelectorFrame::Update(), AliMUONPainterPlotSelector::UpdateDimensionButton(), AliMUONPainterMatrixFrame::UpdateInterface(), AliMUONPainterPlotSelector::UpdateSourceButton(), and AliMUONPainterPlotSelector::UpdateTypeButton().
|
static |
Set the background color of the window
Definition at line 232 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterMasterFrame::AliMUONPainterMasterFrame(), and AliMUONPainterMatrixFrame::AliMUONPainterMatrixFrame().
|
static |
should not be needed with root > 5.16/00 as there's a TGButtonGroup::SetState method now...
Definition at line 249 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::DimensionButtonWasClicked(), AliMUONPainterPlotSelector::SourceButtonWasClicked(), and AliMUONPainterPlotSelector::UpdateTypeButton().
|
static |
Unselect a given button
Definition at line 299 of file AliMUONPainterInterfaceHelper.cxx.
Referenced by AliMUONPainterPlotSelector::ResetDimensionButtonMap(), AliMUONAttPainterSelectorFrame::Update(), AliMUONPainterPlotSelector::Update(), AliMUONPainterPlotSelector::UpdateDimensionButton(), AliMUONPainterMatrixFrame::UpdateInterface(), and AliMUONPainterPlotSelector::UpdateTypeButton().