198 bg->Insert(
this,
id);
332 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
480 gval.fForeground =
gClient->GetResourcePool()->GetFrameHiliteColor();
481 gval.fBackground =
gClient->GetResourcePool()->GetFrameBgndColor();
483 gval.fTile =
gClient->GetResourcePool()->GetCheckeredPixmap();
579 wattr.fBitGravity = 5;
580 wattr.fWinGravity = 1;
695 wattr.fWinGravity = 1;
699 wattr.fBitGravity = 1;
703 wattr.fBitGravity = 2;
706 wattr.fBitGravity = 3;
710 wattr.fBitGravity = 4;
713 wattr.fBitGravity = 5;
717 wattr.fBitGravity = 6;
720 wattr.fBitGravity = 7;
724 wattr.fBitGravity = 8;
727 wattr.fBitGravity = 9;
730 wattr.fBitGravity = 5;
791 gc->SetForeground(
hi);
795 gc->SetForeground(
sh);
922 gc->SetForeground(color);
946 Error(
"TGPictureButton",
"pixmap not found or the file format is not supported for button %d",
id);
975 Error(
"TGPictureButton",
"pixmap not found or the file format is not supported for button\n%s",
1003 if (
p)
Error(
"TGPictureButton",
"pixmap not found or the file format is not supported for button");
1037 Error(
"SetPicture",
"pixmap not found or the file format is not supported for button %d\n%s",
1112 img2->FillRectangle(back.
Data(), 0, 0,
fPic->GetWidth(),
fPic->GetHeight());
1113 img->SetImage(
fPic->GetPicture(),
fPic->GetMask());
1187 Error(
"TGCheckButton",
"checked_t.xpm not found or the file format is not supported.");
1189 Error(
"TGCheckButton",
"unchecked_t.xpm not found or the file format is not supported.");
1191 Error(
"TGCheckButton",
"checked_dis_t.xpm not found or the file format is not supported.");
1193 Error(
"TGCheckButton",
"unchecked_dis_t.xpm not found or the file format is not supported.");
1332 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
1468 gc->SetForeground(
hi);
1472 gc->SetForeground(
sh);
1551 Error(
"TGRadioButton",
"rbutton_*.xpm not found or the file format is not supported.");
1698 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
1834 gc->SetForeground(
hi);
1838 gc->SetForeground(
sh);
1876 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
1879 out <<
" " <<
GetName() <<
"->SetState(kButtonDown);\n";
1881 out <<
" " <<
GetName() <<
"->SetState(kButtonDisabled);\n";
1883 out <<
" " <<
GetName() <<
"->SetState(kButtonEngaged);\n";
1887 out <<
" " <<
GetName() <<
"->ChangeBackground(ucolor);\n";
1891 out <<
" " <<
GetName() <<
"->SetToolTipText(\""
1916 parFont.Form(
"ufont->GetFontStruct()");
1922 parGC.Form(
"uGC->GetGC()");
1926 out <<
" TGTextButton *" <<
GetName() <<
" = new TGTextButton(" <<
fParent->GetName()
1927 <<
", \"" <<
outext.ReplaceSpecialCppChars() <<
"\"";
1947 out <<
" " <<
GetName() <<
"->SetTextJustify(" <<
fTMode <<
");\n";
1963 Error(
"SavePrimitive",
"pixmap not found or the file format is not supported for picture button %d ",
fWidgetId);
1976 parGC.Form(
"uGC->GetGC()");
1983 out <<
" TGPictureButton *" <<
GetName() <<
" = new TGPictureButton(" <<
fParent->GetName()
1984 <<
", gClient->GetPicture(\"" <<
picname.ReplaceSpecialCppChars() <<
"\")";
2012 out <<
" TGCheckButton *" <<
GetName() <<
" = new TGCheckButton(" <<
fParent->GetName()
2013 <<
", \"" <<
outext.ReplaceSpecialCppChars() <<
"\"";
2025 parFont.Form(
"ufont->GetFontStruct()");
2031 parGC.Form(
"uGC->GetGC()");
2056 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kTRUE);\n";
2058 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kFALSE);\n";
2060 out <<
" " <<
GetName() <<
"->SetTextJustify(" <<
fTMode <<
");\n";
2075 out <<
" TGRadioButton *" <<
GetName() <<
" = new TGRadioButton(" <<
fParent->GetName() <<
", \""
2076 <<
outext.ReplaceSpecialCppChars() <<
"\"";
2088 parFont.Form(
"ufont->GetFontStruct()");
2094 parGC.Form(
"uGC->GetGC()");
2119 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kTRUE);\n";
2121 out <<
" " <<
GetName() <<
"->SetDisabledAndSelected(kFALSE);\n";
2123 out <<
" " <<
GetName() <<
"->SetTextJustify(" <<
fTMode <<
");\n";
2173 while (
entry != 0) {
2219 fPopMenu->
Connect(
"Activated(Int_t)",
"TGSplitButton",
this,
"HandleMenu(Int_t)");
2260 wattr.fBitGravity = 5;
2261 wattr.fWinGravity = 1;
2553 Info(
"TGSplitButton",
"Only one entry in the menu.");
2616 gc->SetForeground(
hi);
2620 gc->SetForeground(
sh);
2701 if (
e->GetLabel()) {
2702 hot =
e->GetLabel()->GetHotChar();
2755 Info(
"TGSplitbutton",
"Length of new label to long, label truncated.");
2861 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"SetMBState(=kButtonUp)");
2862 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"MBReleased()");
2870 str +=
entry->GetEntryId();
2872 Connect(
"Clicked()",
"TGSplitButton",
this, str);
2880 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"SetState(=kButtonUp)");
2881 fPopMenu->
Connect(
"PoppedDown()",
"TGSplitButton",
this,
"Released()");
2900 Bool_t in = (
event->fX >= 0) && (event->
fY >= 0) &&
3054 if (
ce->GetLabel())
hot =
ce->GetLabel()->GetHotChar();
3184 Connect(
"Clicked()",
"TGSplitButton",
this,
const Mask_t kWABitGravity
const Mask_t kGCBackground
const Mask_t kGCForeground
Handle_t Pixmap_t
Pixmap handle.
const Mask_t kKeyLockMask
const Mask_t kButtonPressMask
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
const Mask_t kKeyMod1Mask
typically the Alt key
const Mask_t kGCFillStyle
Handle_t Window_t
Window handle.
const Mask_t kWAWinGravity
const Mask_t kAnyModifier
Handle_t GContext_t
Graphics context handle.
const Mask_t kButton1Mask
const Mask_t kPointerMotionMask
const Mask_t kKeyShiftMask
const Mask_t kKeyMod2Mask
typically mod on numeric keys
const Mask_t kButton3Mask
const Mask_t kLeaveWindowMask
const Mask_t kButton2Mask
const Mask_t kButtonReleaseMask
const Mask_t kGCGraphicsExposures
const Mask_t kEnterWindowMask
ULong_t Pixel_t
Pixel value.
Handle_t FontStruct_t
Pointer to font structure.
int Int_t
Signed integer 4 bytes (int)
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t gval
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Option_t Option_t TPoint TPoint const char text
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.
Encapsulate fonts used in the GUI system.
FontStruct_t GetFontStruct() const
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.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
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.
UInt_t fOptions
frame options
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
UInt_t fHeight
frame height
Int_t fBorderWidth
frame border width
void DoRedraw() override
Redraw the frame.
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().
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
Encapsulate a graphics context used in the low level graphics.
TGHotString is a string with a "hot" character underlined.
Defines top level windows that interact with the system Window Manager.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
const char * GetString() const
Yield an action as soon as it is clicked.
void Init()
Common initialization used by the different ctors.
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
void Layout() override
layout text button
Bool_t HandleKey(Event_t *event) override
Handle key event. This function will be called when the hotkey is hit.
TClass * IsA() const override
virtual void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetText(TGHotString *new_label)
Set new button text.
TGTextButton(const TGTextButton &)=delete
static const TGFont * fgDefaultFont
TGDimension GetDefaultSize() const override
returns default size
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a text button widget as a C++ statement(s) on output stream out.
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
virtual void SetFont(FontStruct_t font, Bool_t global=kFALSE)
Changes text font.
~TGTextButton() override
Delete a text button widget.
void DoRedraw() override
Draw the text button.
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.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void RequestFocus()
request focus
const TGWindow * fParent
Parent window.
virtual void SetWindowName(const char *name=nullptr)
Set window name.
const TGWindow * GetParent() const
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
An abstract interface to image processing library.
static TImage * Create()
Create an image.
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=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
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.
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
Window_t fWindow
window reported event is relative to
UInt_t fState
key or button mask
Graphics context structure.
Point structure (maps to the X11 XPoint structure)
Attributes that can be used when creating or changing a window.