ALBA
albaGUIMDIChild.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIMDIChild
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 __albaGUIMDIChild_H__
17#define __albaGUIMDIChild_H__
18//----------------------------------------------------------------------------
19// Include:
20//----------------------------------------------------------------------------
21#include <wx/laywin.h>
22#include <wx/mdi.h>
23
24//#define MAX_CUSTOM_ID 20 //todo: SIL. 7-4-2005: ---- what is this ?
25
26#include "albaEvent.h"
27//----------------------------------------------------------------------------
28// forward references;
29//----------------------------------------------------------------------------
30class albaView;
31
37class ALBA_EXPORT albaGUIMDIChild: public wxMDIChildFrame
38{
39public:
41 albaGUIMDIChild(wxMDIParentFrame* parent, albaView *view);
45 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
46
48 static void OnQuit () {m_Quitting=true;};
49
53 void SetAllowCloseWindow(bool allow_close) {m_AllowCloseFlag = allow_close;};
54
56 void EnableResize(bool enable = true);
57
58protected:
60 void OnSize(wxSizeEvent &event);
61
63 void OnSelect(wxCommandEvent &event);
64
66 void OnCloseWindow (wxCloseEvent& event);
67
69 void OnActivate (wxActivateEvent& event);
70
72 void OnMaximize(wxMaximizeEvent &event);
73
74 wxWindow *m_Win;
77 static bool m_Quitting;
80
82 DECLARE_EVENT_TABLE()
83};
84#endif
Class Name: albaGUIMDIChild.
void EnableResize(bool enable=true)
Enable/disable resizing of the view.
void OnSelect(wxCommandEvent &event)
Send the event to select the owned view.
void OnMaximize(wxMaximizeEvent &event)
Used to maximize view in remote application.
static bool m_Quitting
wxWindow * m_Win
void SetAllowCloseWindow(bool allow_close)
Allow to set the flag to avoid closing the view.
void OnActivate(wxActivateEvent &event)
Send the event to select the owned view.
void SetListener(albaObserver *Listener)
Set the listener object, i.e.
virtual ~albaGUIMDIChild()
destructor.
void OnCloseWindow(wxCloseEvent &event)
Send the event to destroy the owned view.
albaGUIMDIChild(wxMDIParentFrame *parent, albaView *view)
constructor.
static void OnQuit()
Set the quitting flag.
void OnSize(wxSizeEvent &event)
Adjust the child size.
albaView * m_View
albaObserver * m_Listener
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaView is the base class for Views in alba.
Definition: albaView.h:79