00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FXMESSAGEBOX_H
00025 #define FXMESSAGEBOX_H
00026
00027 #ifndef FXDIALOGBOX_H
00028 #include "FXDialogBox.h"
00029 #endif
00030
00031 namespace FX {
00032
00033
00034
00035 enum {
00036 MBOX_OK = 0x10000000,
00037 MBOX_OK_CANCEL = 0x20000000,
00038 MBOX_YES_NO = 0x30000000,
00039 MBOX_YES_NO_CANCEL = 0x40000000,
00040 MBOX_QUIT_CANCEL = 0x50000000,
00041 MBOX_QUIT_SAVE_CANCEL = 0x60000000,
00042 MBOX_SKIP_SKIPALL_CANCEL = 0x70000000,
00043 MBOX_SAVE_CANCEL_DONTSAVE = 0x80000000
00044 };
00045
00046
00047
00048 enum {
00049 MBOX_CLICKED_YES = 1,
00050 MBOX_CLICKED_NO = 2,
00051 MBOX_CLICKED_OK = 3,
00052 MBOX_CLICKED_CANCEL = 4,
00053 MBOX_CLICKED_QUIT = 5,
00054 MBOX_CLICKED_SAVE = 6,
00055 MBOX_CLICKED_SKIP = 7,
00056 MBOX_CLICKED_SKIPALL = 8
00057 };
00058
00059
00071 class FXAPI FXMessageBox : public FXDialogBox {
00072 FXDECLARE(FXMessageBox)
00073 protected:
00074 FXMessageBox(){}
00075 private:
00076 FXMessageBox(const FXMessageBox&);
00077 FXMessageBox &operator=(const FXMessageBox&);
00078 void initialize(const FXString& text,FXIcon* ic,FXuint whichbuttons);
00079 public:
00080 long onCmdClicked(FXObject*,FXSelector,void*);
00081 long onCmdCancel(FXObject*,FXSelector,void*);
00082 public:
00083 enum{
00084 ID_CLICKED_YES=FXDialogBox::ID_LAST,
00085 ID_CLICKED_NO,
00086 ID_CLICKED_OK,
00087 ID_CLICKED_CANCEL,
00088 ID_CLICKED_QUIT,
00089 ID_CLICKED_SAVE,
00090 ID_CLICKED_SKIP,
00091 ID_CLICKED_SKIPALL,
00092 ID_LAST
00093 };
00094 public:
00095
00097 FXDEPRECATEDEXT FXMessageBox(FXWindow* owner,const FXString& caption,const FXString& text,FXIcon* ic=NULL,FXuint opts=0,FXint x=0,FXint y=0);
00098
00100 FXDEPRECATEDEXT FXMessageBox(FXApp* app,const FXString& caption,const FXString& text,FXIcon* ic=NULL,FXuint opts=0,FXint x=0,FXint y=0);
00101
00106 static FXDEPRECATEDEXT FXuint error(FXWindow* owner,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00107
00111 static FXDEPRECATEDEXT FXuint error(FXApp* app,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00112
00117 static FXDEPRECATEDEXT FXuint warning(FXWindow* owner,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00118
00122 static FXDEPRECATEDEXT FXuint warning(FXApp* app,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00123
00128 static FXDEPRECATEDEXT FXuint question(FXWindow* owner,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00129
00133 static FXDEPRECATEDEXT FXuint question(FXApp* app,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00134
00139 static FXDEPRECATEDEXT FXuint information(FXWindow* owner,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00140
00144 static FXDEPRECATEDEXT FXuint information(FXApp* app,FXuint opts,const char* caption,const char* message,...) FX_PRINTF(4,5);
00145
00146 };
00147
00148 }
00149
00150 #endif