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 FXPROGRESSDIALOG_H
00025 #define FXPROGRESSDIALOG_H
00026
00027 #ifndef FXDIALOGBOX_H
00028 #include "FXDialogBox.h"
00029 #endif
00030
00031 namespace FX {
00032
00033
00034 enum {
00035 PROGRESSDIALOG_NOCANCEL = 0,
00036 PROGRESSDIALOG_CANCEL = 0x01000000,
00037 PROGRESSDIALOG_NORMAL = (DECOR_TITLE|DECOR_BORDER)
00038 };
00039
00040
00041 class FXHorizontalSeparator;
00042 class FXProgressBar;
00043 class FXButton;
00044 class FXLabel;
00045
00051 class FXAPI FXProgressDialog : public FXDialogBox {
00052 FXDECLARE(FXProgressDialog)
00053 protected:
00054 FXProgressBar *progress;
00055 FXLabel *message;
00056 FXHorizontalSeparator *separator;
00057 FXButton *cancel;
00058 FXbool cancelled;
00059 protected:
00060 FXProgressDialog();
00061 private:
00062 FXProgressDialog(const FXProgressDialog&);
00063 FXProgressDialog &operator=(const FXProgressDialog&);
00064 public:
00065 long onCmdSetValue(FXObject*,FXSelector,void*);
00066 long onCmdSetIntValue(FXObject*,FXSelector,void*);
00067 long onCmdGetIntValue(FXObject*,FXSelector,void*);
00068 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00069 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00070 long onCmdCancel(FXObject*,FXSelector,void*);
00071 public:
00072
00074 FXProgressDialog(FXWindow* owner,const FXString& caption,const FXString& label,FXuint opts=PROGRESSDIALOG_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00075
00077 void setMessage(const FXString& msg);
00078
00080 FXString getMessage() const;
00081
00083 void setBarStyle(FXuint style);
00084
00086 FXuint getBarStyle() const;
00087
00089 void setProgress(FXuint value);
00090
00092 FXuint getProgress() const;
00093
00095 void setTotal(FXuint value);
00096
00098 FXuint getTotal() const;
00099
00101 void increment(FXuint value);
00102
00104 FXbool isCancelled() const { return cancelled; }
00105
00107 void setCancelled(FXbool flg){ cancelled=flg; }
00108
00110 virtual ~FXProgressDialog();
00111 };
00112
00113 }
00114
00115 #endif