46 const
char *title, const
char *msg, const
TGPicture *icon,
52 PMsgBox(title, msg, icon, buttons, ret_code, text_align);
73 const char *title,
const char *msg,
EMsgBoxIcon icon,
83 if (!icon_pic)
Error(
"TGMsgBox",
"mb_stop_s.xpm not found");
88 if (!icon_pic)
Error(
"TGMsgBox",
"mb_question_s.xpm not found");
93 if (!icon_pic)
Error(
"TGMsgBox",
"mb_exclamation_s.xpm not found");
98 if (!icon_pic)
Error(
"TGMsgBox",
"mb_asterisk_s.xpm not found");
107 PMsgBox(title, msg, icon_pic, buttons, ret_code, text_align);
145 if (buttons &
kMBNo) {
152 if (buttons &
kMBOk) {
257 char *tmpMsg, *nextLine;
259 int len = strlen(msg) + 1;
260 tmpMsg =
new char[len];
264 strlcpy(nextLine, msg, len);
265 while ((nextLine = strchr(line,
'\n'))) {
386 gVirtualX->LookupString(event, input,
sizeof(input), keysym);
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual UInt_t GetDefaultHeight() const
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
virtual Bool_t HandleKey(Event_t *event)
Handle enter and escape keys (used as Ok and Cancel for now).
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message dialog box event.
virtual void CloseWindow()
Close dialog box.
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
TGMsgBox(const TGMsgBox &)
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
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.
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
const Mask_t kKeyPressMask
virtual UInt_t GetDefaultWidth() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual UInt_t GetDefaultWidth() const
TGVerticalFrame * fLabelFrame
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual ~TGMsgBox()
Destroy message dialog box.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
TGHorizontalFrame * fIconFrame
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
TGHorizontalFrame * fButtonFrame
void SetTextJustify(Int_t tmode)
Set text justification.
virtual void Add(TObject *obj)
Short_t Max(Short_t a, Short_t b)
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
virtual void DeleteWindow()
Delete window.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
int main(int argc, char **argv)