|
|
1.1 ! root 1: /* ! 2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. ! 3: ! 4: Governed by the TrueCrypt License 2.4 the full text of which is contained ! 5: in the file License.txt included in TrueCrypt binary and source code ! 6: distribution packages. ! 7: */ ! 8: ! 9: #ifndef TC_HEADER_Main_Forms_WizardFrame ! 10: #define TC_HEADER_Main_Forms_WizardFrame ! 11: ! 12: #include "Forms.h" ! 13: #include "Main/Main.h" ! 14: ! 15: namespace TrueCrypt ! 16: { ! 17: class WizardFrame : public WizardFrameBase ! 18: { ! 19: public: ! 20: WizardFrame (wxWindow* parent); ! 21: virtual ~WizardFrame (); ! 22: ! 23: protected: ! 24: typedef int WizardStep; ! 25: ! 26: void ClearHistory (); ! 27: virtual WizardPage *GetPage (WizardStep step) = 0; ! 28: WizardPage *GetCurrentPage () const { return CurrentPage; } ! 29: WizardStep GetCurrentStep () const { return CurrentStep; } ! 30: wxPanel *GetPageParent () const { return MainPanel; } ! 31: bool IsWorkInProgress() const { return WorkInProgress; } ! 32: virtual void OnCancelButtonClick (wxCommandEvent& event) { Close(); } ! 33: virtual void OnClose (wxCloseEvent& event); ! 34: virtual void OnHelpButtonClick (wxCommandEvent& event); ! 35: virtual WizardStep ProcessPageChangeRequest (bool forward) = 0; ! 36: void SetCancelButtonText (const wxString &text); ! 37: void SetImage (const wxBitmap &bitmap); ! 38: void SetMaxStaticTextWidth (size_t charCount); ! 39: void SetStep (WizardStep newStep); ! 40: void SetWorkInProgress (bool state); ! 41: ! 42: private: ! 43: void OnNextButtonClick (wxCommandEvent& event); ! 44: void OnPageUpdated (EventArgs &args) { UpdateControls(); } ! 45: void OnPreviousButtonClick (wxCommandEvent& event); ! 46: void SetStep (WizardStep newStep, bool forward); ! 47: void UpdateControls (); ! 48: ! 49: WizardPage *CurrentPage; ! 50: WizardStep CurrentStep; ! 51: int MaxStaticTextWidth; ! 52: list <WizardStep> StepHistory; ! 53: bool WorkInProgress; ! 54: }; ! 55: } ! 56: ! 57: #endif // TC_HEADER_Main_Forms_WizardFrame
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.