49 const char *title,
const char *msg,
const TGPicture *icon,
55 PMsgBox(title, msg, icon, buttons, ret_code, text_align);
76 const char *title,
const char *msg,
EMsgBoxIcon icon,
86 if (!icon_pic)
Error(
"TGMsgBox",
"mb_stop_s.xpm not found");
91 if (!icon_pic)
Error(
"TGMsgBox",
"mb_question_s.xpm not found");
96 if (!icon_pic)
Error(
"TGMsgBox",
"mb_exclamation_s.xpm not found");
101 if (!icon_pic)
Error(
"TGMsgBox",
"mb_asterisk_s.xpm not found");
110 PMsgBox(title, msg, icon_pic, buttons, ret_code, text_align);
148 if (buttons &
kMBNo) {
155 if (buttons &
kMBOk) {
260 char *tmpMsg, *nextLine;
262 int len = strlen(msg) + 1;
263 tmpMsg =
new char[
len];
267 strlcpy(nextLine, msg,
len);
268 while ((nextLine = strchr(
line,
'\n'))) {
const Mask_t kKeyPressMask
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 input
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 GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetMWMHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
UInt_t GetDefaultWidth() const override
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
virtual UInt_t GetDefaultWidth() const
virtual void DeleteWindow()
Delete window.
void MapRaised() override
map raised
A composite frame that layout their children in horizontal way.
TGHotString is a string with a "hot" character underlined.
This class handles GUI icons.
This class handles GUI labels.
void SetTextJustify(Int_t tmode)
Set text justification.
This class describes layout hints used by the layout classes.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
Bool_t HandleKey(Event_t *event) override
Handle keyboard events.
TGButton * fNoAll
buttons in dialog box
TGLayoutHints * fL5
layout hints
TList * fMsgList
text (list of TGLabels)
TGHorizontalFrame * fIconFrame
frame containing icon and text
void PMsgBox(const char *title, const char *msg, const TGPicture *icon, Int_t buttons, Int_t *ret_code, Int_t text_align)
Protected, common message dialog box initialization.
TGVerticalFrame * fLabelFrame
frame containing text
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process message dialog box event.
TGMsgBox(const TGMsgBox &)=delete
Bool_t HandleKey(Event_t *event) override
Handle enter and escape keys (used as Ok and Cancel for now).
TGHorizontalFrame * fButtonFrame
frame containing buttons
TGButton * fDismiss
buttons in dialog box
~TGMsgBox() override
Destroy message dialog box.
TGButton * fCancel
buttons in dialog box
Int_t * fRetCode
address to store return code
void CloseWindow() override
Close dialog box.
TGButton * fApply
buttons in dialog box
TGClient * fClient
Connection to display server.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Yield an action as soon as it is clicked.
Defines transient windows that typically are used for dialogs windows.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
R__ALWAYS_INLINE Bool_t IsZombie() const
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
EGEventType fType
of event (see EGEventType)