AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONPainterInterfaceHelper Class Reference

Helper class to ease building a GUI with button groups... More...

#include <AliMUONPainterInterfaceHelper.h>

Inheritance diagram for AliMUONPainterInterfaceHelper:

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

AliMUONPainterInterfaceHelper::AliMUONPainterInterfaceHelper ( )

ctor

Definition at line 53 of file AliMUONPainterInterfaceHelper.cxx.

AliMUONPainterInterfaceHelper::~AliMUONPainterInterfaceHelper ( )
virtual

dtor

Definition at line 59 of file AliMUONPainterInterfaceHelper.cxx.

Member Function Documentation

void AliMUONPainterInterfaceHelper::AddCheckButton ( TGButtonGroup &  bg,
const TString &  name,
void *  userData = 0x0,
Bool_t  select = kFALSE 
)
static

Add a check button to a group

Definition at line 83 of file AliMUONPainterInterfaceHelper.cxx.

Referenced by AliMUONPainterMatrixFrame::CreateButtons().

void AliMUONPainterInterfaceHelper::AddRadioButton ( TGButtonGroup &  bg,
const TString &  name,
void *  userData = 0x0,
Bool_t  select = kFALSE 
)
static
static Int_t AliMUONPainterInterfaceHelper::ButtonStartingId ( )
inlinestatic
void AliMUONPainterInterfaceHelper::ClearButtons ( TGButtonGroup &  bg)
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().

void AliMUONPainterInterfaceHelper::Copy ( const TGButtonGroup &  src,
TGButtonGroup &  dest 
)
static
void AliMUONPainterInterfaceHelper::Dump ( const TGButtonGroup &  bg)
static

Printout

Definition at line 146 of file AliMUONPainterInterfaceHelper.cxx.

Referenced by FindButtonByName().

TGButton * AliMUONPainterInterfaceHelper::FindButtonByName ( const TGButtonGroup &  bg,
const TString &  name 
)
static

Find a button by name

Definition at line 170 of file AliMUONPainterInterfaceHelper.cxx.

Referenced by AliMUONPainterPlotSelector::UpdateTypeButton().

TGButton * AliMUONPainterInterfaceHelper::FindButtonByUserData ( const TGButtonGroup &  bg,
const void *  userData 
)
static
TGButton * AliMUONPainterInterfaceHelper::FindDownButton ( const TGButtonGroup &  bg)
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().

void AliMUONPainterInterfaceHelper::RemoveButton ( TGButtonGroup &  bg,
const TGButton *  button 
)
static

Remove a button

Definition at line 324 of file AliMUONPainterInterfaceHelper.cxx.

Referenced by AliMUONPainterPlotSelector::DataSourceWasUnregistered().

void AliMUONPainterInterfaceHelper::Select ( TGButtonGroup &  bg,
const TString &  buttonName,
Bool_t  emit = kFALSE 
)
static
void AliMUONPainterInterfaceHelper::SetBackgroundColor ( const char *  resourceBaseName,
TGWindow &  window 
)
static
void AliMUONPainterInterfaceHelper::SetState ( TGButtonGroup &  bg,
Bool_t  state 
)
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().

void AliMUONPainterInterfaceHelper::Unselect ( TGButtonGroup &  bg,
const TString &  buttonName,
Bool_t  emit = kFALSE 
)
static

The documentation for this class was generated from the following files: