290 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
441 gval.
fTile =
gClient->GetResourcePool()->GetCheckeredPixmap();
904 Error(
"TGPictureButton",
"pixmap not found for button %d",
id);
933 Error(
"TGPictureButton",
"pixmap not found for button\n%s",
960 if (!pic || !pic[0]) {
961 if (p)
Error(
"TGPictureButton",
"pixmap not found for button");
995 Error(
"SetPicture",
"pixmap not found for button %d\n%s",
1066 if (img)
delete img;
1073 img2->
Merge(img,
"overlay");
1145 Error(
"TGCheckButton",
"checked_t.xpm not found");
1147 Error(
"TGCheckButton",
"unchecked_t.xpm not found");
1149 Error(
"TGCheckButton",
"checked_dis_t.xpm not found");
1151 Error(
"TGCheckButton",
"unchecked_dis_t.xpm not found");
1290 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
1509 Error(
"TGRadioButton",
"rbutton_*.xpm not found");
1656 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
1835 if (option && strstr(option,
"keep_names"))
1836 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
1839 out <<
" " <<
GetName() <<
"->SetState(kButtonDown);" << std::endl;
1842 out <<
" " <<
GetName() <<
"->SetState(kButtonDisabled);" << std::endl;
1845 out <<
" " <<
GetName() <<
"->SetState(kButtonEngaged);" << std::endl;
1849 out <<
" " <<
GetName() <<
"->ChangeBackground(ucolor);" << std::endl;
1856 out <<
GetName() <<
"->SetToolTipText(" << quote
1857 << tiptext << quote <<
");" << std::endl;
1861 << quote <<
");" << std::endl;
1874 if (outext.
First(
'\n') >= 0)
1880 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
1881 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
1887 parFont.
Form(
"ufont->GetFontStruct()");
1893 parGC.
Form(
"uGC->GetGC()");
1899 out <<
" TGTextButton *";
1901 <<
"," << quote << outext.
Data() << quote;
1907 out <<
");" << std::endl;
1909 out <<
"," <<
fWidgetId <<
");" << std::endl;
1912 out <<
"," <<
fWidgetId <<
"," << parGC <<
");" << std::endl;
1915 out <<
"," <<
fWidgetId <<
"," << parGC <<
"," << parFont <<
");" << std::endl;
1921 out <<
" " <<
GetName() <<
"->SetTextJustify(" <<
fTMode <<
");" << std::endl;
1927 <<
");" << std::endl;
1938 Error(
"SavePrimitive()",
"pixmap not found for picture button %d ",
fWidgetId);
1945 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
1951 parGC.
Form(
"uGC->GetGC()");
1959 out <<
" TGPictureButton *";
1962 <<
",gClient->GetPicture(" << quote
1963 << picname << quote <<
")";
1968 out <<
");" << std::endl;
1970 out <<
"," <<
fWidgetId <<
");" << std::endl;
1973 out <<
"," <<
fWidgetId <<
"," << parGC.
Data() <<
");" << std::endl;
1977 <<
");" << std::endl;
1993 if (outext.
First(
'\n') >= 0)
1996 out <<
" TGCheckButton *";
1998 <<
"," << quote << outext.
Data() << quote;
2003 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
2004 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
2010 parFont.
Form(
"ufont->GetFontStruct()");
2016 parGC.
Form(
"uGC->GetGC()");
2024 out <<
");" << std::endl;
2026 out <<
"," <<
fWidgetId <<
");" << std::endl;
2029 out <<
"," <<
fWidgetId <<
"," << parGC <<
");" << std::endl;
2032 out <<
"," <<
fWidgetId <<
"," << parGC <<
"," << parFont <<
");" << std::endl;
2041 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kTRUE);" << std::endl;
2043 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kFALSE);" << std::endl;
2045 out <<
" " <<
GetName() <<
"->SetTextJustify(" <<
fTMode <<
");" << std::endl;
2061 if (outext.
First(
'\n') >= 0)
2064 out <<
" TGRadioButton *";
2066 <<
"," << quote << outext.
Data() << quote;
2071 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
2072 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
2078 parFont.
Form(
"ufont->GetFontStruct()");
2084 parGC.
Form(
"uGC->GetGC()");
2092 out <<
");" << std::endl;
2094 out <<
"," <<
fWidgetId <<
");" << std::endl;
2097 out <<
"," <<
fWidgetId <<
"," << parGC <<
");" << std::endl;
2100 out <<
"," <<
fWidgetId <<
"," << parGC <<
"," << parFont <<
");" << std::endl;
2109 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kTRUE);" << std::endl;
2111 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kFALSE);" << std::endl;
2113 out <<
" " <<
GetName() <<
"->SetTextJustify(" <<
fTMode <<
");" << std::endl;
2148 UInt_t lwidth = 0, lheight = 0;
2149 UInt_t twidth = 0, theight = 0;
2163 while (entry != 0) {
2169 if(twidth > lwidth) {
2172 if(theight > lheight) {
2209 fPopMenu->
Connect(
"Activated(Int_t)",
"TGSplitButton",
this,
"HandleMenu(Int_t)");
2291 Int_t max_ascent, max_descent;
2294 fTHeight = max_ascent + max_descent;
2314 Bool_t inTB = (
event->fX >= 0) && (event->
fY >= 0) &&
2532 Int_t n_entries = 0;
2542 if (n_entries <= 1) {
2543 Info(
"TGSplitButton",
"Only one entry in the menu.");
2549 0, 0, ax, ay, wdummy);
2691 if (
e->GetLabel()) {
2692 hot =
e->GetLabel()->GetHotChar();
2740 if (
width > bwidth) {
2743 longlabeltip =
kTRUE;
2745 Info(
"TGSplitbutton",
"Length of new label to long, label truncated.");
2808 if ((gc) && !global) {
2851 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"SetMBState(=kButtonUp)");
2852 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"MBReleased()");
2862 Connect(
"Clicked()",
"TGSplitButton",
this, str);
2870 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"SetState(=kButtonUp)");
2871 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"Released()");
2890 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
3037 gVirtualX->LookupString(event, tmp,
sizeof(tmp), keysym);
3045 if (!hot || (hot != keysym))
continue;
3136 UInt_t dummya = 0, dummyb = 0;
3174 Connect(
"Clicked()",
"TGSplitButton",
this,
const Mask_t kWABitGravity
const Mask_t kGCBackground
const Mask_t kGCForeground
const Mask_t kKeyLockMask
const Mask_t kButtonPressMask
const Mask_t kKeyMod1Mask
const Mask_t kGCFillStyle
const Mask_t kWAWinGravity
const Mask_t kAnyModifier
const Mask_t kButton1Mask
const Mask_t kPointerMotionMask
const Mask_t kKeyShiftMask
const Mask_t kKeyMod2Mask
const Mask_t kButton3Mask
const Mask_t kLeaveWindowMask
const Mask_t kButton2Mask
const Mask_t kButtonReleaseMask
const Mask_t kGCGraphicsExposures
const Mask_t kEnterWindowMask
static RooMathCoreReg dummy
include TDocParser_001 C image html pict1_TDocParser_001 png width
float type_of_call hi(const int &, const int &)
R__EXTERN TSystem * gSystem
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
Execute string "cmd" via the interpreter.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
const TGResourcePool * GetResourcePool() const
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
TGGCPool * GetGCPool() const
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
TGPicturePool * GetPicturePool() const
TGFontPool * GetFontPool() const
void FreePicture(const TGPicture *pic)
Free picture resource.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
FontStruct_t GetFontStruct() const
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
TGTextLayout * ComputeTextLayout(const char *string, Int_t numChars, Int_t wrapLength, Int_t justify, Int_t flags, UInt_t *width, UInt_t *height) const
Computes the amount of screen space needed to display a multi-line, justified string of text.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual void SetSize(const TGDimension &s)
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual void DoRedraw()
Redraw the frame.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
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().
static Pixel_t fgDefaultFrameBackground
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
void SetFont(FontH_t v)
Set font.
Pixel_t GetForeground() const
void SetForeground(Pixel_t v)
Set foreground color.
const GCValues_t * GetAttributes() const
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
const char * GetName() const
Returns name of object.
void Draw(Option_t *="")
Default Draw method for all objects.
Pixmap_t GetPicture() const
Cursor_t GetGrabCursor() const
TGGCPool * GetGCPool() const
const char * GetString() const
void Init()
Common initialization used by the different ctors.
virtual void Layout()
layout text button
virtual Bool_t HandleKey(Event_t *event)
Handle key event. This function will be called when the hotkey is hit.
TGTextButton(const TGTextButton &)
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a text button widget as a C++ statement(s) on output stream out.
virtual void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetText(TGHotString *new_label)
Set new button text.
static const TGFont * fgDefaultFont
virtual ~TGTextButton()
Delete a text button widget.
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
virtual void DoRedraw()
Draw the text button.
virtual void SetFont(FontStruct_t font, Bool_t global=kFALSE)
Changes text font.
virtual TGDimension GetDefaultSize() const
returns default size
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
void DrawText(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
Use the information in the TGTextLayout object to display a multi-line, justified string of text.
void UnderlineChar(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t underline) const
Use the information in the TGTextLayout object to display an underline below an individual character.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void RequestFocus()
request focus
virtual Int_t MustCleanup() const
const TGWindow * GetParent() const
An abstract interface to image processing library.
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=0)
static TImage * Create()
Create an image.
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual Pixmap_t GetPixmap()
virtual void FillRectangle(const char *=0, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
virtual Pixmap_t GetMask()
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
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.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
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.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
TString & Insert(Ssiz_t pos, const char *s)
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
int main(int argc, char **argv)
static constexpr double s
Short_t Max(Short_t a, Short_t b)
Bool_t fGraphicsExposures