TGVButtonGroup
class description - source file - inheritance tree
public:
TGVButtonGroup(TGWindow* parent, const TString& title, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), ULong_t back = GetDefaultFrameBackground())
TGVButtonGroup(const TGVButtonGroup&)
virtual ~TGVButtonGroup()
static TClass* Class()
virtual TClass* IsA() const
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
The TGButtonGroup widget organizes TGButton widgets in a group.
A button group widget makes it easier to deal with groups of buttons.
A button in a button group is associated with a unique identifier.
The button group emits a Clicked() signal with this identifier when
the button is clicked. Thus, a button group is an ideal solution
when you have several similar buttons and want to connect all their
Clicked() signals, for example, to one slot.
An exclusive button group switches off all toggle buttons except
the one that was clicked. A button group is by default non-exclusive.
All radio buttons that are inserted, will be mutually exclusive even
if the button group is non-exclusive.
There are two ways of using a button group:
The button group is a parent widget of a number of buttons,
i.e. the button group is the parent argument in the button
constructor. The buttons are assigned identifiers 1, 2, 3 etc.
/ in the order they are created or you can specify button id in
the button constructor. A TGButtonGroup can display a frame and
a title because it inherits from TGGroupFrame.
Example:
// vertical frame without border and title
TGVButtonGroup *bg = new TGVButtonGroup(main_frame);
// create text button with id=1
TGTextButton *button1 = new TGTextButton(bg,"some text");
// create another text button with id=2
TGTextButton *button2 = new TGTextButton(bg,"another text");
// map all buttons
bg->Show();
NOTE: there is no need to call AddFrame() since the buttons are
automatically added with a default layout hint to their parent,
i.e. the buttongroup. To override the default layout hints use the
SetLayoutHints() method.
ButtonGroup Signals:
Pressed(Int_t id) --> is emitted when a button in the group is
pressed down. The id argument is the
button's identifier.
Released(Int_t id) --> is emitted when a button in the group is
released. The id argument is the button's
identifier.
Clicked(Int_t id) --> is emitted when a button in the group is
clicked. The id argument is the button's
identifier.
The TGHButtonGroup widget organizes TGButton widgets in a group
with one horizontal row. TGHButtonGroup is a convenience class that
offers a thin layer on top of TGButtonGroup. It inherits from
TGButtonGroup.
The TGVButtonGroup widget organizes TGButton widgets in a group
with one vertical column. TGVButtonGroup is a convenience class that
offers a thin layer on top of TGButtonGroup. It inherits from
TGButtonGroup.
Inline Functions
TGVButtonGroup TGVButtonGroup(TGWindow* parent, const TString& title, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), ULong_t back = GetDefaultFrameBackground())
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TGVButtonGroup TGVButtonGroup(const TGVButtonGroup&)
void ~TGVButtonGroup()
Author: Valeriy Onuchin & Fons Rademakers 16/10/2000
Last update: root/gui:$Name: $:$Id: TGButtonGroup.cxx,v 1.13 2003/05/12 16:44:08 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Top of the page
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.