196 Int_t x,
y,
l, t,
r,
b,
gl,
gr, sep,
max_ascent,
max_descent;
228 gr =
gl +
tw + (sep << 1);
345 if (
b && (
b->IsDown() !=
down)) {
373 if (
button->fGroup ==
this) {
397 Connect(
button,
"Clicked()" ,
"TGButtonGroup",
this,
"ReleaseButtons()");
398 Connect(
button,
"Pressed()" ,
"TGButtonGroup",
this,
"ButtonPressed()");
399 Connect(
button,
"Released()",
"TGButtonGroup",
this,
"ButtonReleased()");
400 Connect(
button,
"Clicked()" ,
"TGButtonGroup",
this,
"ButtonClicked()");
472 Error(
"ButtonPressed",
"gTQSender not a TGButton");
568 Error(
"SetTitle",
"title cannot be 0, try \"\"");
585 Error(
"SetTitle",
"title cannot be 0, try \"\"");
632 parFont.Form(
"ufont->GetFontStruct()");
638 parGC.Form(
"uGC->GetGC()");
645 out <<
"\n // buttongroup frame\n";
647 out <<
" TGButtonGroup *" <<
GetName() <<
" = new TGButtonGroup(" <<
fParent->GetName()
668 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
671 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
679 f->fFrame->SavePrimitive(out,
option);
680 if (
f->fFrame->InheritsFrom(
"TGButton"))
683 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
684 f->fLayout->SavePrimitive(out,
option);
690 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);\n";
693 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);\n";
696 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);\n";
703 out <<
" " <<
GetName() <<
"->SetState(kFALSE);\n";
705 out <<
" " <<
GetName() <<
"->Show();\n";
723 parFont.Form(
"ufont->GetFontStruct()");
729 parGC.Form(
"uGC->GetGC()");
736 out <<
"\n // horizontal buttongroup frame\n";
738 out <<
" TGHButtonGroup *" <<
GetName() <<
" = new TGHButtonGroup(" <<
fParent->GetName() <<
", \""
747 out <<
"," <<
parGC <<
");\n";
753 out <<
"," <<
parGC <<
"," <<
parFont <<
", ucolor);\n";
756 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
760 f->fFrame->SavePrimitive(out,
option);
761 if (
f->fFrame->InheritsFrom(
"TGButton")) {
762 out <<
" " <<
GetName() <<
"->SetLayoutHints(";
763 f->fLayout->SavePrimitive(out,
"nocoma");
764 out <<
"," <<
f->fFrame->GetName() <<
");\n";
766 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
767 f->fLayout->SavePrimitive(out,
option);
773 out <<
" " <<
GetName() <<
"->SetState(kFALSE);\n";
776 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);\n";
779 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);\n";
782 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);\n";
786 out <<
" " <<
GetName() <<
"->Show();\n";
804 parFont.Form(
"ufont->GetFontStruct()");
810 parGC.Form(
"uGC->GetGC()");
817 out <<
"\n // vertical buttongroup frame\n";
819 out <<
" TGVButtonGroup *" <<
GetName() <<
" = new TGVButtonGroup(" <<
fParent->GetName()
827 out <<
"," <<
parGC <<
");\n";
833 out <<
"," <<
parGC <<
"," <<
parFont <<
", ucolor);\n";
836 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
840 f->fFrame->SavePrimitive(out,
option);
841 if (
f->fFrame->InheritsFrom(
"TGButton"))
843 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
844 f->fLayout->SavePrimitive(out,
option);
849 out <<
" " <<
GetName() <<
"->SetState(kFALSE);\n";
852 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);\n";
855 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);\n";
858 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);\n";
863 out <<
" " <<
GetName() <<
"->Show();\n";
Handle_t GContext_t
Graphics context handle.
ULong_t Pixel_t
Pixel value.
Handle_t FontStruct_t
Pointer to font structure.
int Int_t
Signed integer 4 bytes (int)
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
R__EXTERN void * gTQSender
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
virtual TGLayoutManager * GetLayoutManager() const
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
void Layout() override
Layout the elements of the composite frame.
TList * fList
container of frame elements
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
static TGLayoutHints * fgDefaultHints
Encapsulate fonts used in the GUI system.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
UInt_t fOptions
frame options
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
UInt_t fHeight
frame height
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
void UnmapWindow() override
unmap window
static const TGGC & GetShadowGC()
Get shadow color graphics context.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
void MapRaised() override
map raised
Encapsulate a graphics context used in the low level graphics.
A composite frame with a border and a title.
TGString * fText
title text
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Int_t fTitlePos
OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",...
FontStruct_t fFontStruct
title fontstruct
GContext_t fNormGC
title graphics context
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
This class describes layout hints used by the layout classes.
This layout managers does not make use of TGLayoutHints.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
const char * GetString() const
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
ROOT GUI Window base class.
const TGWindow * fParent
Parent window.
virtual void SetWindowName(const char *name=nullptr)
Set window name.
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj) override
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * FindObject(const char *keyname) const override
Check if a (key,value) pair exists with keyname as name of the key.
TObject * Remove(TObject *key) override
Remove the (key,value) pair with key from the map.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
Mother of all ROOT objects.
Class used by TMap to store (key,value) pairs.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
virtual void ChangedBy(const char *method)
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...