ALBA
albaGUIMDIFrame.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIMDIFrame
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 __albaGUIMDIFrame_H__
17#define __albaGUIMDIFrame_H__
18//----------------------------------------------------------------------------
19// Include:
20//----------------------------------------------------------------------------
21#include <wx/laywin.h>
22#include <wx/mdi.h>
23#include <vector>
24
25#include "albaGUIDockManager.h"
26#include "albaServiceClient.h"
27
28
29//----------------------------------------------------------------------------
30// forward reference
31//----------------------------------------------------------------------------
32class albaObserver;
33class vtkProcessObject;
34class vtkViewport;
35class vtkObject;
36class albaGUIMDIFrameCallback;
37//class albaGUIDockSettings;
38class albaGUI;
39
45class ALBA_EXPORT albaGUIMDIFrame: public wxMDIParentFrame, public albaServiceClient
46{
47 public:
49 albaGUIMDIFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style=0);
52
54 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
55
57 albaGUIDockManager& GetDockManager() {return m_DockManager;};
58
60 void OnQuit();
61
64 void AddDockPane(wxWindow *window, wxPaneInfo& pane_info, const wxString &menu = _("&View"), const wxString &subMenu = wxEmptyString);
65
67 void RemoveDockPane(wxString pane_name);
68
70 void ShowDockPane(wxString pane_name, bool show = true);
72 void ShowDockPane(wxWindow *window, bool show = true);
73
75 bool DockPaneIsShown(wxString pane_name);
77 bool DockPaneIsShown(wxWindow *window);
78
80 void Busy();
81
83 void Ready();
84
87
90
92 void ProgressBarSetVal(int progress);
93
96
98 void ProgressBarSetText(wxString *msg);
99
102
104 void RenderEnd();
105
106//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
107#ifdef ALBA_USE_VTK
108//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
109
111 void BindToProgressBar(vtkObject* vtkobj);
112
114 void BindToProgressBar(vtkProcessObject* filter);
115
117 void BindToProgressBar(vtkViewport* ren);
118
120 void OnSize(wxSizeEvent& event);
121
122protected:
123 albaGUIMDIFrameCallback *m_StartCallback;
124 albaGUIMDIFrameCallback *m_EndCallback; ;
125 albaGUIMDIFrameCallback *m_ProgressCallback;
126
127//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
128#endif //ALBA_USE_VTK
129//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
130protected:
131
133 void OnMenu(wxCommandEvent& e);
134
136 void OnMenuOp(wxCommandEvent& e);
137
139 void OnMenuView(wxCommandEvent& e);
140
142 void OnUpdateUI(wxUpdateUIEvent& e);
143
145 void OnCloseWindow(wxCloseEvent& event);
146
148 void OnSashDrag(wxSashEvent& event);
149
151 void OnLayout(wxCommandEvent& event);
152
154 void OnIdle(wxIdleEvent& event);
155
157 void FreeMemorySizeOnIdle(wxIdleEvent& event);
158
160 void OnDropFile(wxDropFilesEvent &event);
161
164
167
169 void OnMenuWizard(wxCommandEvent& e);
170
171
173
174 // added members to handle the progress bar
175 bool *m_Busy;
176 wxPanel *m_BusyPanel;
177 wxStaticText *m_BusyLabel;
178 wxGauge *m_Gauge;
179 std::vector<int> m_PBCalls;
181
184
185 // AUI Layout Manager - //SIL. 23-may-2006 :
187
189 DECLARE_EVENT_TABLE()
190};
191#endif
class name: albaGUIDockManager Represent a frame manager for gui dock elements.
Class Name: albaGUIMDIFrame.
bool DockPaneIsShown(wxString pane_name)
tell if a given Dockable Pane is shown – the Paneis specified by name
void AddDockPane(wxWindow *window, wxPaneInfo &pane_info, const wxString &menu=_("&View"), const wxString &subMenu=wxEmptyString)
add a new Dockable Pane containing the given Window.
void OnCloseWindow(wxCloseEvent &event)
Send the MENU_FILE_QUIT event.
void ProgressBarSetText(wxString *msg)
Set the progress text for the progress bar.
void ShowDockPane(wxWindow *window, bool show=true)
Show/Hide a Dockable Pane – the Pane is specified by content.
albaGUIMDIFrame(const wxString &title, const wxPoint &pos, const wxSize &size, long style=0)
constructor.
wxPanel * m_BusyPanel
albaObserver * m_Listener
void FreeMemorySizeOnIdle(wxIdleEvent &event)
Update the memory status on the status bas , with information that needs to walk the heap (bad perfor...
void OnDropFile(wxDropFilesEvent &event)
Send an event to open the msf or zip file.
void OnUpdateUI(wxUpdateUIEvent &e)
Send the UI event.
albaGUIDockManager m_DockManager
void Ready()
End the progress.
void LayoutWindow()
Redraw widgets on interface.
void OnSashDrag(wxSashEvent &event)
Redraw sash panels.
void OnMenuOp(wxCommandEvent &e)
Send the 'Operations' men event.
void OnMenuView(wxCommandEvent &e)
Send the 'Views' men event.
void OnMenu(wxCommandEvent &e)
Send the men event.
void ProgressBarHide()
Hide the progress bar.
void OnIdle(wxIdleEvent &event)
Update the memory status on the status bas.
void ProgressBarSetVal(int progress)
Set the progress value for the progress bar.
int m_MemoryLimitAlert
Used to alert the user when memory decrease under this limit value.
void RenderStart()
Start rendering progress.
bool DockPaneIsShown(wxWindow *window)
tell if a given Dockable Pane is shown – the Pane is specified by content
~albaGUIMDIFrame()
destructor.
void OnLayout(wxCommandEvent &event)
Call LayoutWindow method.
albaGUIDockManager & GetDockManager()
Retrieve the Docking Manager.
void CreateStatusbar()
Create the status bar on main application frame.
void RenderEnd()
End rendering progress.
void SetListener(albaObserver *Listener)
Set the listener object, i.e.
void ShowDockPane(wxString pane_name, bool show=true)
Show/Hide a Dockable Pane – the Pane is specified by name.
void OnQuit()
must be called @ shutdown
void ProgressBarShow()
Show the progress bar.
void Busy()
Show the 'Busy' text on the status bar.
wxStaticText * m_BusyLabel
int ProgressBarGetStatus()
Get the progress bar status.
void RemoveDockPane(wxString pane_name)
remove a Dockable Pane - the contained window is not destroyed
std::vector< int > m_PBCalls
void OnMenuWizard(wxCommandEvent &e)
Send the 'Wizard' men event.
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
class name: wxPaneInfo This class define properties of a pane.