#ifndef ROOT_TGButtonGroup
#define ROOT_TGButtonGroup
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TMap
#include "TMap.h"
#endif
class TGButton;
class TGButtonGroup : public TGGroupFrame {
friend class TGButton;
private:
TGButtonGroup(const TGButtonGroup&);
TGButtonGroup& operator=(const TGButtonGroup&);
protected:
Bool_t fState;
Bool_t fExclGroup;
Bool_t fRadioExcl;
Bool_t fDrawBorder;
TMap *fMapOfButtons;
void Init();
virtual void DoRedraw();
public:
TGButtonGroup(const TGWindow *parent = 0,
const TString &title = "",
UInt_t options = kChildFrame | kVerticalFrame,
GContext_t norm = GetDefaultGC()(),
FontStruct_t font = GetDefaultFontStruct(),
Pixel_t back = GetDefaultFrameBackground());
TGButtonGroup(const TGWindow *parent,
UInt_t r, UInt_t c, Int_t s = 0, Int_t h = 0 ,
const TString &title = "",
GContext_t norm = GetDefaultGC()(),
FontStruct_t font = GetDefaultFontStruct(),
Pixel_t back = GetDefaultFrameBackground());
virtual ~TGButtonGroup();
virtual void Pressed(Int_t id) { Emit("Pressed(Int_t)",id); }
virtual void Released(Int_t id) { Emit("Released(Int_t)",id);}
virtual void Clicked(Int_t id) { Emit("Clicked(Int_t)",id); }
virtual void ButtonPressed();
virtual void ButtonReleased();
virtual void ButtonClicked();
virtual void ReleaseButtons();
Bool_t IsEnabled() const { return fState; }
Bool_t IsExclusive() const { return fExclGroup; }
Bool_t IsRadioButtonExclusive() const { return fRadioExcl; }
Bool_t IsBorderDrawn() const { return fDrawBorder; }
Int_t GetCount() const { return fMapOfButtons->GetSize(); }
Int_t GetId(TGButton *button) const;
virtual void SetExclusive(Bool_t flag = kTRUE);
virtual void SetRadioButtonExclusive(Bool_t flag = kTRUE);
virtual void SetState(Bool_t state = kTRUE);
virtual void SetBorderDrawn(Bool_t enable = kTRUE);
virtual void SetButton(Int_t id, Bool_t down = kTRUE);
virtual void SetTitle(TGString *title);
virtual void SetTitle(const char *title);
virtual Int_t Insert(TGButton *button, int id = -1);
virtual void Remove(TGButton *button);
virtual TGButton *Find(Int_t id) const;
virtual TGButton *GetButton(Int_t id) const { return Find(id); }
virtual void Show();
virtual void Hide();
virtual void DrawBorder();
virtual void SetLayoutHints(TGLayoutHints *l, TGButton *button = 0);
virtual void SavePrimitive(ostream &out, Option_t *option = "");
ClassDef(TGButtonGroup,0)
};
class TGVButtonGroup : public TGButtonGroup {
public:
TGVButtonGroup(const TGWindow *parent,
const TString &title = "",
GContext_t norm = GetDefaultGC()(),
FontStruct_t font = GetDefaultFontStruct(),
Pixel_t back = GetDefaultFrameBackground()) :
TGButtonGroup(parent, title, kChildFrame | kVerticalFrame,
norm, font, back) { }
virtual ~TGVButtonGroup() { }
virtual void SavePrimitive(ostream &out, Option_t *option = "");
ClassDef(TGVButtonGroup,0)
};
class TGHButtonGroup : public TGButtonGroup {
public:
TGHButtonGroup(const TGWindow *parent,
const TString &title = "",
GContext_t norm = GetDefaultGC()(),
FontStruct_t font = GetDefaultFontStruct(),
Pixel_t back = GetDefaultFrameBackground()) :
TGButtonGroup(parent, title, kChildFrame | kHorizontalFrame,
norm, font, back) { }
virtual ~TGHButtonGroup() { }
virtual void SavePrimitive(ostream &out, Option_t *option = "");
ClassDef(TGHButtonGroup,0)
};
#endif
Last change: Wed Jun 25 08:39:28 2008
Last generated: 2008-06-25 08:39
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.