ALBA
albaGUIWizard.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIWizard
5 Authors: Matteo Giacomoni, Gianluigi Crimi
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaGUIWizard_H__
17#define __albaGUIWizard_H__
18//----------------------------------------------------------------------------
19// Include:
20//----------------------------------------------------------------------------
21#include "albaDefines.h"
22#include "wx/wizard.h"
23#include "albaEvent.h"
24#include "albaObserver.h"
25#include "albaGUI.h"
26//----------------------------------------------------------------------------
27// Const:
28//----------------------------------------------------------------------------
29
35class ALBA_EXPORT albaGUIWizard : public wxWizard, public albaObserver
36{
37public:
39 albaGUIWizard (const wxString& title, bool testMode = false);
41 virtual ~albaGUIWizard ();
43 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
45 void OnEvent(albaEventBase *alba_event);
46
48 bool Run();
49
51 void SetFirstPage(wxWizardPageSimple *firstPage);
52
54 wxWizardPageSimple* GetFirstPage(){return m_FirstPage;};
55
57 void EnableChangePageOn(){m_EnableChangePage=true;};
59 void EnableChangePageOff(){m_EnableChangePage=false;};
60
62 bool GetEnableChangePage(){return m_EnableChangePage;};
63
66 {
67 ALBA_WIZARD_CHANGE_PAGE = MINID,
70 };
71
73
74private:
75
76 wxWizardPageSimple *m_FirstPage;
77
78 bool m_EnableChangePage;
79
80 bool m_TestMode;
81
83 void OnCloseWindow(wxCloseEvent &event) {OnCloseWindow(event);};
85 void OnClose(wxCommandEvent &event) {wxDialog::Close();};
87 void OnWizardPageChanging(wxWizardEvent& event);
89 void OnWizardPageChange(wxWizardEvent& event);
90
92 DECLARE_EVENT_TABLE()
93};
94#endif
MINID
Definition: albaDecl.h:420
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
Class Name: albaGUIWizard.
Definition: albaGUIWizard.h:36
bool Run()
Call wxWizard::RunWizard.
void EnableChangePageOff()
Disable the changing of the page.
Definition: albaGUIWizard.h:59
virtual ~albaGUIWizard()
destructor.
ID_MESSAGES
Message Ids.
Definition: albaGUIWizard.h:66
@ ALBA_WIZARD_CHANGED_PAGE
Definition: albaGUIWizard.h:68
albaGUIWizard(const wxString &title, bool testMode=false)
constructor.
bool GetEnableChangePage()
Return the enable changing of the page.
Definition: albaGUIWizard.h:62
wxWizardPageSimple * GetFirstPage()
Return the first page of the wizard.
Definition: albaGUIWizard.h:54
void OnEvent(albaEventBase *alba_event)
Precess events coming from other objects.
void EnableChangePageOn()
Enable the changing of the page.
Definition: albaGUIWizard.h:57
void SetFirstPage(wxWizardPageSimple *firstPage)
Set the first page of the wizard.
albaObserver * m_Listener
Definition: albaGUIWizard.h:72
void SetListener(albaObserver *Listener)
Set the Listener that will receive event-notification.
Definition: albaGUIWizard.h:43
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36