113 fDrawBorder = !title.IsNull();
187 Int_t x,
y,
l,
t,
r, b, gl,
gr,
sep, max_ascent, max_descent;
193 t = (max_ascent + max_descent + 2) >> 1;
206 UInt_t rr = 5 + (sep << 1) + tw;
219 gr = gl + tw + (sep << 1);
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()");
455 Error(
"ButtonPressed",
"gTQSender not a TGButton");
551 Error(
"SetTitle",
"title cannot be 0, try \"\"");
568 Error(
"SetTitle",
"title cannot be 0, try \"\"");
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;
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;
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;
750 out <<
" " <<
GetName() <<
"->SetLayoutHints(";
753 out <<
");"<< std::endl;
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;
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;
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;
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
static const TGGC & GetDefaultGC()
Return default graphics context in use.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
R__EXTERN void * gTQSender
static const TGGC & GetHilightGC()
Get highlight color graphics context.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
virtual TList * GetList() const
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
virtual void Layout()
Layout the elements of the composite frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
const char * Data() const
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
void Init(TClassEdit::TInterpreterLookupHelper *helper)
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
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 SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
TObject * Remove(TObject *key)
Remove the (key,value) pair with key from the map.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
static TGLayoutHints * fgDefaultHints
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Class used by TMap to store (key,value) pairs.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Mother of all ROOT objects.
virtual void UnmapWindow()
virtual void ChangedBy(const char *method)
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
const char * GetString() const
double norm(double *x, double *p)
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void DestroyWindow()
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
virtual TGLayoutManager * GetLayoutManager() const
virtual void SetWindowName(const char *name=0)
Set window name.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".