159 while ((item = (
TGButton*)next())) {
187 Int_t x,
y,
l, t,
r,
b, gl,
gr,
sep, max_ascent, max_descent;
193 t = (max_ascent + max_descent + 2) >> 1;
219 gr = gl + tw + (
sep << 1);
319 while ((item = (
TGButton*)next())) {
336 if (
b && (
b->IsDown() != down)) {
364 if (button->
fGroup ==
this) {
366 return GetId(button);
374 static Int_t seq_no = -2;
377 if (
id < -1) bid = seq_no--;
378 else if (
id == -1) bid =
GetCount()+1;
388 Connect(button,
"Clicked()" ,
"TGButtonGroup",
this,
"ReleaseButtons()");
389 Connect(button,
"Pressed()" ,
"TGButtonGroup",
this,
"ButtonPressed()");
390 Connect(button,
"Released()",
"TGButtonGroup",
this,
"ButtonReleased()");
391 Connect(button,
"Clicked()" ,
"TGButtonGroup",
this,
"ButtonClicked()");
420 while ((item = (
TGButton*)next())) {
455 Error(
"ButtonPressed",
"gTQSender not a TGButton");
515 while ((item = (
TGButton*)next())) {
551 Error(
"SetTitle",
"title cannot be 0, try \"\"");
568 Error(
"SetTitle",
"title cannot be 0, try \"\"");
608 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
611 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
617 parFont.
Form(
"ufont->GetFontStruct()");
623 parGC.
Form(
"uGC->GetGC()");
629 out << std::endl <<
" // buttongroup frame" << std::endl;
631 out <<
" TGButtonGroup *";
639 out <<
");" << std::endl;
652 if (option && strstr(option,
"keep_names"))
653 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
656 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
660 out <<
");"<< std::endl;
665 f->fFrame->SavePrimitive(out,option);
666 if (
f->fFrame->InheritsFrom(
"TGButton"))
continue;
668 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
669 f->fLayout->SavePrimitive(out, option);
670 out <<
");"<< std::endl;
675 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);" << std::endl;
678 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);" << std::endl;
681 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);" << std::endl;
685 <<
"," <<
GetHeight() <<
");" << std::endl;
688 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
690 out <<
" " <<
GetName() <<
"->Show();" << std::endl;
703 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
704 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
710 parFont.
Form(
"ufont->GetFontStruct()");
716 parGC.
Form(
"uGC->GetGC()");
722 out << std::endl <<
" // horizontal buttongroup frame" << std::endl;
724 out <<
" TGHButtonGroup *";
732 out <<
");" << std::endl;
734 out <<
"," << parGC.
Data() <<
");" << std::endl;
737 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
740 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
",ucolor);" << std::endl;
742 if (option && strstr(option,
"keep_names"))
743 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
748 f->fFrame->SavePrimitive(out,option);
749 if (
f->fFrame->InheritsFrom(
"TGButton")){
750 out <<
" " <<
GetName() <<
"->SetLayoutHints(";
751 f->fLayout->SavePrimitive(out,
"nocoma");
752 out <<
"," <<
f->fFrame->GetName();
753 out <<
");"<< std::endl;
756 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
757 f->fLayout->SavePrimitive(out, option);
758 out <<
");"<< std::endl;
763 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
766 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);" << std::endl;
769 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);" << std::endl;
772 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);" << std::endl;
777 out <<
" " <<
GetName() <<
"->Show();" << std::endl;
790 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
791 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
797 parFont.
Form(
"ufont->GetFontStruct()");
803 parGC.
Form(
"uGC->GetGC()");
809 out << std::endl <<
" // vertical buttongroup frame" << std::endl;
811 out <<
" TGVButtonGroup *";
818 out <<
");" << std::endl;
820 out <<
"," << parGC.
Data() <<
");" << std::endl;
823 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
826 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
",ucolor);" << std::endl;
828 if (option && strstr(option,
"keep_names"))
829 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
834 f->fFrame->SavePrimitive(out,option);
835 if (
f->fFrame->InheritsFrom(
"TGButton"))
continue;
837 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
838 f->fLayout->SavePrimitive(out, option);
839 out <<
");"<< std::endl;
844 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
847 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);" << std::endl;
850 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);" << std::endl;
853 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);" << std::endl;
856 <<
"," <<
GetHeight() <<
");"<< std::endl;
858 out <<
" " <<
GetName() <<
"->Show();" << std::endl;
R__EXTERN void * gTQSender
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 TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual TGLayoutManager * GetLayoutManager() const
virtual void Layout()
Layout the elements of the composite frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
static TGLayoutHints * fgDefaultHints
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
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().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
virtual void UnmapWindow()
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
static const TGGC & GetDefaultGC()
Return default graphics context in use.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
const char * GetString() const
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void DestroyWindow()
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
TObject * Remove(TObject *key)
Remove the (key,value) pair with key from the map.
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".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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)
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
static constexpr double s