00001
00002
00003 #include <wx/wx.h>
00004 #include <wx/image.h>
00005
00006 #ifndef PROGRESSDIALOG_H
00007 #define PROGRESSDIALOG_H
00008
00009
00010
00011
00012 #include "../Observer.h"
00013
00014 class ProgressDialog
00015 : public wxDialog, public Observer
00016 {
00017 public:
00018 enum {
00019 ID_BUTTON_ABORT = 1
00020 };
00021
00022
00023
00024
00025 ProgressDialog(wxWindow* parent,
00026 int id,
00027 const wxString& title,
00028 const wxPoint& pos=wxDefaultPosition,
00029 const wxSize& size=wxDefaultSize,
00030 long style=wxDEFAULT_DIALOG_STYLE);
00031
00032
00033 virtual void Update();
00034
00035 void RefreshAndYield();
00036
00037 void OnAbort(wxCommandEvent& event);
00038
00039 bool IsAborted() const;
00040
00041 private:
00042
00043 void set_properties();
00044 void do_layout();
00045
00046
00047 DECLARE_EVENT_TABLE();
00048 protected:
00049
00050 wxStaticText* mpMainLabel;
00051 wxStaticText* mpRotor;
00052 wxButton* mpAbortButton;
00053
00054
00055 int mRotorState;
00056 wxLongLong mPreviousTime;
00057 bool mAbortPressed;
00058 };
00059
00060
00061 #endif // PROGRESSDIALOG_H