160 while ((item = (
TGButton*)next())) {
188 Int_t x,
y,
l, t,
r,
b, gl,
gr,
sep, max_ascent, max_descent;
194 t = (max_ascent + max_descent + 2) >> 1;
220 gr = gl + tw + (
sep << 1);
320 while ((item = (
TGButton*)next())) {
337 if (
b && (
b->IsDown() != down)) {
365 if (button->
fGroup ==
this) {
367 return GetId(button);
375 static Int_t seq_no = -2;
378 if (
id < -1) bid = seq_no--;
379 else if (
id == -1) bid =
GetCount()+1;
389 Connect(button,
"Clicked()" ,
"TGButtonGroup",
this,
"ReleaseButtons()");
390 Connect(button,
"Pressed()" ,
"TGButtonGroup",
this,
"ButtonPressed()");
391 Connect(button,
"Released()",
"TGButtonGroup",
this,
"ButtonReleased()");
392 Connect(button,
"Clicked()" ,
"TGButtonGroup",
this,
"ButtonClicked()");
421 while ((item = (
TGButton*)next())) {
456 Error(
"ButtonPressed",
"gTQSender not a TGButton");
516 while ((item = (
TGButton*)next())) {
552 Error(
"SetTitle",
"title cannot be 0, try \"\"");
569 Error(
"SetTitle",
"title cannot be 0, try \"\"");
609 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
612 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
618 parFont.
Form(
"ufont->GetFontStruct()");
624 parGC.
Form(
"uGC->GetGC()");
630 out << std::endl <<
" // buttongroup frame" << std::endl;
632 out <<
" TGButtonGroup *";
640 out <<
");" << std::endl;
653 if (option && strstr(option,
"keep_names"))
654 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
657 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
661 out <<
");"<< std::endl;
666 f->fFrame->SavePrimitive(out,option);
667 if (
f->fFrame->InheritsFrom(
"TGButton"))
continue;
669 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
670 f->fLayout->SavePrimitive(out, option);
671 out <<
");"<< std::endl;
676 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);" << std::endl;
679 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);" << std::endl;
682 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);" << std::endl;
686 <<
"," <<
GetHeight() <<
");" << std::endl;
689 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
691 out <<
" " <<
GetName() <<
"->Show();" << std::endl;
704 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
705 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
711 parFont.
Form(
"ufont->GetFontStruct()");
717 parGC.
Form(
"uGC->GetGC()");
723 out << std::endl <<
" // horizontal buttongroup frame" << std::endl;
725 out <<
" TGHButtonGroup *";
733 out <<
");" << std::endl;
735 out <<
"," << parGC.
Data() <<
");" << std::endl;
738 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
741 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
",ucolor);" << std::endl;
743 if (option && strstr(option,
"keep_names"))
744 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
749 f->fFrame->SavePrimitive(out,option);
750 if (
f->fFrame->InheritsFrom(
"TGButton")){
751 out <<
" " <<
GetName() <<
"->SetLayoutHints(";
752 f->fLayout->SavePrimitive(out,
"nocoma");
753 out <<
"," <<
f->fFrame->GetName();
754 out <<
");"<< std::endl;
757 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
758 f->fLayout->SavePrimitive(out, option);
759 out <<
");"<< std::endl;
764 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
767 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);" << std::endl;
770 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);" << std::endl;
773 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);" << std::endl;
778 out <<
" " <<
GetName() <<
"->Show();" << std::endl;
791 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
792 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
798 parFont.
Form(
"ufont->GetFontStruct()");
804 parGC.
Form(
"uGC->GetGC()");
810 out << std::endl <<
" // vertical buttongroup frame" << std::endl;
812 out <<
" TGVButtonGroup *";
819 out <<
");" << std::endl;
821 out <<
"," << parGC.
Data() <<
");" << std::endl;
824 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
827 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
",ucolor);" << std::endl;
829 if (option && strstr(option,
"keep_names"))
830 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
835 f->fFrame->SavePrimitive(out,option);
836 if (
f->fFrame->InheritsFrom(
"TGButton"))
continue;
838 out <<
" " <<
GetName() <<
"->AddFrame(" <<
f->fFrame->GetName();
839 f->fLayout->SavePrimitive(out, option);
840 out <<
");"<< std::endl;
845 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
848 out <<
" " <<
GetName() <<
"->SetExclusive(kTRUE);" << std::endl;
851 out <<
" " <<
GetName() <<
"->SetRadioButtonExclusive(kTRUE);" << std::endl;
854 out <<
" " <<
GetName() <<
"->SetBorderDrawn(kFALSE);" << std::endl;
857 <<
"," <<
GetHeight() <<
");"<< std::endl;
859 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.
virtual void MapRaised()
map raised
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()
unmap window
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()
destroy window
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