00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGMsgBox
00013 #define ROOT_TGMsgBox
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TGFrame
00025 #include "TGFrame.h"
00026 #endif
00027 #ifndef ROOT_TGString
00028 #include "TGString.h"
00029 #endif
00030 #ifndef ROOT_TGPicture
00031 #include "TGPicture.h"
00032 #endif
00033 #ifndef ROOT_TGWidget
00034 #include "TGWidget.h"
00035 #endif
00036
00037
00038
00039
00040 enum EMsgBoxIcon {
00041 kMBIconStop,
00042 kMBIconQuestion,
00043 kMBIconExclamation,
00044 kMBIconAsterisk
00045 };
00046
00047
00048
00049 enum EMsgBoxButton {
00050 kMBYes = BIT(0),
00051 kMBNo = BIT(1),
00052 kMBOk = BIT(2),
00053 kMBApply = BIT(3),
00054 kMBRetry = BIT(4),
00055 kMBIgnore = BIT(5),
00056 kMBCancel = BIT(6),
00057 kMBClose = BIT(7),
00058 kMBDismiss = BIT(8),
00059 kMBYesAll = BIT(9),
00060 kMBNoAll = BIT(10),
00061 kMBAppend = BIT(11),
00062 kMBNewer = BIT(12)
00063 };
00064
00065
00066 class TGButton;
00067 class TGIcon;
00068 class TGLabel;
00069
00070
00071 class TGMsgBox : public TGTransientFrame {
00072
00073 protected:
00074 TGButton *fYes, *fNo, *fOK, *fApply;
00075 TGButton *fRetry, *fIgnore, *fCancel;
00076 TGButton *fClose, *fYesAll, *fNoAll;
00077 TGButton *fNewer, *fAppend, *fDismiss;
00078 TGIcon *fIcon;
00079 TGHorizontalFrame *fButtonFrame;
00080 TGHorizontalFrame *fIconFrame;
00081 TGVerticalFrame *fLabelFrame;
00082 TGLayoutHints *fL1, *fL2, *fL3, *fL4, *fL5;
00083 TList *fMsgList;
00084 Int_t *fRetCode;
00085
00086 void PMsgBox(const char *title, const char *msg, const TGPicture *icon,
00087 Int_t buttons, Int_t *ret_code, Int_t text_align);
00088
00089 private:
00090 TGMsgBox(const TGMsgBox&);
00091 TGMsgBox& operator=(const TGMsgBox&);
00092
00093 public:
00094 TGMsgBox(const TGWindow *p = 0, const TGWindow *main = 0,
00095 const char *title = 0, const char *msg = 0, const TGPicture *icon = 0,
00096 Int_t buttons = kMBDismiss, Int_t *ret_code = 0,
00097 UInt_t options = kVerticalFrame,
00098 Int_t text_align = kTextCenterX | kTextCenterY);
00099 TGMsgBox(const TGWindow *p, const TGWindow *main,
00100 const char *title, const char *msg, EMsgBoxIcon icon,
00101 Int_t buttons = kMBDismiss, Int_t *ret_code = 0,
00102 UInt_t options = kVerticalFrame,
00103 Int_t text_align = kTextCenterX | kTextCenterY);
00104 virtual ~TGMsgBox();
00105
00106 virtual void CloseWindow();
00107 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00108
00109 ClassDef(TGMsgBox,0)
00110 };
00111
00112 #endif