00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FXPROGRESSDIALOG_H
00022 #define FXPROGRESSDIALOG_H
00023
00024 #ifndef FXDIALOGBOX_H
00025 #include "FXDialogBox.h"
00026 #endif
00027
00028 namespace FX {
00029
00030
00031 enum {
00032 PROGRESSDIALOG_NOCANCEL = 0,
00033 PROGRESSDIALOG_CANCEL = 0x02000000,
00034 PROGRESSDIALOG_NORMAL = (DECOR_TITLE|DECOR_BORDER)
00035 };
00036
00037
00038 class FXHorizontalSeparator;
00039 class FXProgressBar;
00040 class FXButton;
00041 class FXLabel;
00042
00050 class FXAPI FXProgressDialog : public FXDialogBox {
00051 FXDECLARE(FXProgressDialog)
00052 protected:
00053 FXProgressBar *progress;
00054 FXLabel *message;
00055 FXHorizontalSeparator *separator;
00056 FXButton *cancel;
00057 FXbool cancelled;
00058 protected:
00059 FXProgressDialog();
00060 private:
00061 FXProgressDialog(const FXProgressDialog&);
00062 FXProgressDialog &operator=(const FXProgressDialog&);
00063 public:
00064 long onCmdSetValue(FXObject*,FXSelector,void*);
00065 long onCmdSetIntValue(FXObject*,FXSelector,void*);
00066 long onCmdGetIntValue(FXObject*,FXSelector,void*);
00067 long onCmdSetLongValue(FXObject*,FXSelector,void*);
00068 long onCmdGetLongValue(FXObject*,FXSelector,void*);
00069 long onCmdSetIntRange(FXObject*,FXSelector,void*);
00070 long onCmdGetIntRange(FXObject*,FXSelector,void*);
00071 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00072 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00073 long onCmdCancel(FXObject*,FXSelector,void*);
00074 public:
00075
00077 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);
00078
00080 void setMessage(const FXString& msg);
00081
00083 FXString getMessage() const;
00084
00086 void setBarStyle(FXuint style);
00087
00089 FXuint getBarStyle() const;
00090
00092 void setProgress(FXuint value);
00093
00095 FXuint getProgress() const;
00096
00098 void setTotal(FXuint value);
00099
00101 FXuint getTotal() const;
00102
00104 void increment(FXuint value);
00105
00107 FXbool isCancelled() const;
00108
00110 void setCancelled(FXbool flg);
00111
00113 virtual ~FXProgressDialog();
00114 };
00115
00116 }
00117
00118 #endif