168 while ((item = (
TGButton*)next())) {
196 Int_t x,
y,
l, t,
r,
b, gl,
gr, sep, max_ascent, max_descent;
202 t = (max_ascent + max_descent + 2) >> 1;
215 UInt_t rr = 5 + (sep << 1) + tw;
228 gr = gl + tw + (sep << 1);
328 while ((item = (
TGButton*)next())) {
345 if (
b && (
b->IsDown() != down)) {
373 if (
button->fGroup ==
this) {
383 static Int_t seq_no = -2;
386 if (
id < -1) bid = seq_no--;
387 else if (
id == -1) bid =
GetCount()+1;
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()");
429 while ((item = (
TGButton*)next())) {
472 Error(
"ButtonPressed",
"gTQSender not a TGButton");
532 while ((item = (
TGButton*)next())) {
568 Error(
"SetTitle",
"title cannot be 0, try \"\"");
572 if (strcmp(
fText->GetString(), title->GetString())) {
585 Error(
"SetTitle",
"title cannot be 0, try \"\"");
589 if (strcmp(
fText->GetString(), title)) {
632 parFont.
Form(
"ufont->GetFontStruct()");
638 parGC.
Form(
"uGC->GetGC()");
645 out <<
"\n // buttongroup frame\n";
647 out <<
" TGButtonGroup *" <<
GetName() <<
" = new TGButtonGroup(" <<
fParent->GetName()
662 out <<
"," <<
GetOptionString() <<
", " << parGC <<
"," << parFont <<
");\n";
665 out <<
"," <<
GetOptionString() <<
"," << parGC <<
"," << parFont <<
", ucolor);\n";
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";
750 out <<
"," << parGC <<
"," << parFont <<
");\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";
830 out <<
"," << parGC <<
"," << parFont <<
");\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.
bool Bool_t
Boolean (0=false, 1=true) (bool).
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
const char Option_t
Option string (const char).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
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
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
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.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save the used font as a C++ statement(s) on output stream out.
UInt_t fOptions
frame options
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
TGFrame(const TGFrame &)=delete
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.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save graphics context info as a C++ statement(s) on output stream out.
TGString * fText
title text
static const TGGC & GetDefaultGC()
Return default graphics context in use.
TGGroupFrame(const TGGroupFrame &)=delete
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...
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 ...
Mother of all ROOT objects.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Class used by TMap to store (key,value) pairs.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
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...
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.