ALBA
albaGUIFrame.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIFrame
5 Authors: Silvano Imboden
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 __albaGUIFrame_H__
17#define __albaGUIFrame_H__
18//----------------------------------------------------------------------------
19// Include:
20//----------------------------------------------------------------------------
21#include <wx/laywin.h>
22
23//----------------------------------------------------------------------------
24// forward reference
25//----------------------------------------------------------------------------
26class albaObserver;
27
35class ALBA_EXPORT albaGUIFrame: public wxFrame
36{
37public:
39 albaGUIFrame (const wxString& title, const wxPoint& pos, const wxSize& size);
42
44 void SetListener (albaObserver *Listener) {m_Listener = Listener;};
45
47 void Put (wxWindow* w);
48
50 void Update () {LayoutWindow();};
51
52protected:
54 void OnMenu(wxCommandEvent& e);
55
57 void OnMenuOp(wxCommandEvent& e);
58
60 void OnUpdateUI(wxUpdateUIEvent& e);
61
63 void OnCloseWindow(wxCloseEvent& event);
64
66 void OnSize(wxSizeEvent& event);
67
69 void OnSashDrag(wxSashEvent& event);
70
72 void OnLayout(wxCommandEvent& event);
73
76
79
81 wxWindow *m_ClientWin;
82
84DECLARE_EVENT_TABLE()
85};
86#endif
Class Name: albaGUIFrame.
Definition: albaGUIFrame.h:36
~albaGUIFrame()
destructor.
void Put(wxWindow *w)
Set the window shown on the Client Area, (hide the previous contents).
void SetListener(albaObserver *Listener)
Set the Listener that will receive event-notification.
Definition: albaGUIFrame.h:44
void OnLayout(wxCommandEvent &event)
Call LayoutWindow() method.
void OnCloseWindow(wxCloseEvent &event)
Send an event with the men 'Quit' item's id.
wxWindow * m_ClientWin
Definition: albaGUIFrame.h:81
void OnMenu(wxCommandEvent &e)
Send an event with the men item's id.
void OnSize(wxSizeEvent &event)
Redraw the frame.
void LayoutWindow()
Redraw method.
void OnSashDrag(wxSashEvent &event)
Redraw the frame's sash panel.
albaObserver * m_Listener
Definition: albaGUIFrame.h:80
void OnMenuOp(wxCommandEvent &e)
Send an event with the men operation's id.
albaGUIFrame(const wxString &title, const wxPoint &pos, const wxSize &size)
constructor.
void Update()
Redraw the frame.
Definition: albaGUIFrame.h:50
void CreateStatusbar()
Create the status bar into the main frame.
void OnUpdateUI(wxUpdateUIEvent &e)
Send an event with the UI item's id.
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36