113 fDrawBorder = !title.IsNull();
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;
206 UInt_t rr = 5 + (sep << 1) + tw;
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;
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;
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;
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;
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 UInt_t GetOptions() const
static const TGGC & GetDefaultGC()
Return default graphics context in use.
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 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.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual TList * GetList() const
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.
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".
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
static TGLayoutHints * fgDefaultHints
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * GetString() const
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 TGLayoutManager * GetLayoutManager() const
virtual void UnmapWindow()
virtual void ChangedBy(const char *method)
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
double norm(double *x, double *p)
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 void SetWindowName(const char *name=0)
Set window name.
const char * Data() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".