3
* $Id: ventanaprincipal.h 4571 2012-01-19 09:08:09Z tovar $
3
* $Id: ventanaprincipal.h $
4
4
* Ginkgo CADx Project
6
* Copyright 2008-10 MetaEmotion S.L. All rights reserved.
6
* Copyright 2008-12 MetaEmotion S.L. All rights reserved.
7
7
* http://ginkgo-cadx.com
9
9
* This file is licensed under LGPL v3 license.
16
#include <api/internal.h>
17
#include "ventanaprincipalbase.h"
16
19
#include <wx/event.h>
17
20
#include <wx/aui/aui.h>
18
#include "ventanaprincipalbase.h"
21
#include <wx/statbmp.h>
22
#include <wx/bmpbuttn.h>
20
24
#include <api/globals.h>
22
#include <api/icontroladormodulo.h>
23
#include <api/iherramienta.h>
24
#include <api/icontroladoreventos.h>
25
#include <main/controllers/controladorvistas.h>
26
#include <main/controllers/controladorextensiones.h>
26
#include <api/toolsystem/itool.h>
27
#include <api/observers/ieventsobserver.h>
28
#include <api/observers/iviewsobserver.h>
29
#include <api/observers/iextensionsobserver.h>
31
class PanelHistorial2;
35
class wxHtmlEasyPrinting;
36
39
class wxWindowDisabler;
37
40
class wxScrolledWindow;
40
44
const wxEventType wxEVT_PROGRESO = wxNewEventType();
94
98
wx__DECLARE_EVT0(wxEVT_PROGRESO, EventoProgresoFunctionHandler(func))
97
class EXTAPI VentanaPrincipal : public VentanaPrincipalBase, public GNC::GCS::IObservadorExtensiones, public GNC::GCS::IObservadorVistas, public GNC::GCS::IObservador {
101
class EXTAPI VentanaPrincipal : public VentanaPrincipalBase, public GNC::GCS::IExtensionsObserver, public GNC::GCS::IObservadorVistas, public GNC::GCS::IEventsObserver {
100
104
/* Constructor */
138
142
/* Evento de salir de la aplicacion */
139
143
virtual void OnSalir(wxCommandEvent& event);
141
virtual void OnDropDownAcquire(wxAuiToolBarEvent& event);
142
virtual void OnDropDownPacs(wxAuiToolBarEvent& event);
144
145
/* Evento de lanzamiento de ventana "Acerca De" */
145
146
virtual void OnAcercaDe(wxCommandEvent& event);
150
151
/* Evento de lanzamiento de ventana "Online support" */
151
152
virtual void OnOnlineSupport(wxCommandEvent& event);
155
virtual void OnOpenTestCard(wxCommandEvent& event);
153
/* Launch event window "Extensions Support" */
154
virtual void OnExtensionsSupport(wxCommandEvent& event);
156
157
/* Evento de lanzamiento de la comprobacion de actualizaciones */
157
158
virtual void OnCheckForUpdates(wxCommandEvent& event);
160
void OnShowStartupPage(wxCommandEvent& event);
161
void ShowStartupPage();
163
/* Evento de apertura de estudio */
164
virtual void OnPACSAcquisition(wxCommandEvent& event);
166
/*Evento de apertura de fichero*/
167
virtual void OnAbrirFichero(wxCommandEvent& event);
169
/*Evento de open disc*/
170
virtual void OnOpenRemovableUnit(wxCommandEvent& event);
173
/*Evento de apertura de directorio*/
174
virtual void OnAbrirDirectorio(wxCommandEvent& event);
177
161
void MacOpenFile(const wxString &fileName);
180
/* Evento de importacion de estudio */
181
virtual void OnImportar(wxCommandEvent& event);
183
/* Evento de guardado de un estudio */
184
virtual void OnGuardar(wxCommandEvent& event);
186
/* Evento de exportado de un estudio */
187
virtual void OnExportar(wxCommandEvent& event);
189
virtual void OnDicomDirExport(wxCommandEvent& event);
191
/* Evento de exportado de un subir al pacs */
192
virtual void OnSubirPACS(wxCommandEvent& event);
194
/* Evento de actualizacion de elemento de menu de guardar */
195
virtual void OnUpdateGuardar(wxUpdateUIEvent& event);
197
/* Evento de actualizacion de elemento de menu de subir al pacs */
198
virtual void OnUpdateExportar(wxUpdateUIEvent& event);
200
/* Evento de actualizacion de elemento de menu de exportar */
201
virtual void OnUpdateSubirPACS(wxUpdateUIEvent& event);
203
164
/* Evento de configuracion */
204
165
virtual void OnConfiguracion(wxCommandEvent& event);
212
173
/* Evento de aplicacion de herramientas*/
213
174
virtual void OnAplicarHerramienta(wxCommandEvent& event);
214
175
virtual void OnUpdateUIHerramienta(wxUpdateUIEvent& event);
215
virtual int InsertToolsFromFamily(wxMenu* pParent, GNC::GCS::IHerramienta::TFamiliasHerramientas family);
176
virtual void InsertToolsFromFamily(wxMenu* pParent, GNC::GCS::ITool::TToolFamily family);
217
178
/* Eventos de teclado */
218
179
virtual void OnKeyDown(wxKeyEvent& event);
237
198
void OnMenuPrimerPlanoPestaniaActiva(wxCommandEvent& event);
239
/*Eventos de impresion*/
240
void OnMenuImprimir(wxCommandEvent& event);
241
void OnMenuImprimirUpdateUI(wxUpdateUIEvent& event);
243
200
/*Eventos de vista*/
244
201
void OnPantallaCompleta(wxCommandEvent& event);
203
wxWindow* GetRootWindow();
246
205
/*reorganizacion de pestañas*/
248
207
//toggle entre enc
208
void ShowStartUp(bool show);
249
209
void EncajarDesencajar(GNC::GCS::IVista* pVista);
250
210
void OnMosaicoHorizontal(wxCommandEvent& event);
251
211
void OnMosaicoVertical(wxCommandEvent& event);
252
212
void OnMosaicoRestaurar(wxCommandEvent& event);
253
void OnMosaicoGrid2Col(wxCommandEvent& event);
254
void OnMosaicoGrid3Col(wxCommandEvent& event);
256
void AddToGrid(int numColumnas);
257
213
void ReplegarPestanias();
271
227
event.Skip(false);
273
virtual void OnBarraHerramientasEraseBackground( wxEraseEvent& event )
277
virtual void OnPanelHerramientasEraseBackground( wxEraseEvent& event )
281
virtual void OnPanelHerramientasOpcionesEraseBackground( wxEraseEvent& event )
285
230
virtual void OnPanelActualizacionEraseBackground( wxEraseEvent& event )
287
232
event.Skip(false);
310
255
bool CerrarVista(GNC::GCS::IVista* pVista);
311
256
bool CerrarVista(wxWindow* window);
312
void DestruirPanelGrid(GNC::GUI::PanelGrid* pPanelGrid);
313
257
void PasarAPrimerPlano(wxWindow* window);
315
259
void OnNotebookPageChanging(wxAuiNotebookEvent& event);
359
303
AUI_NAMESPACE wxAuiNotebook* GetAUINoteBook();
360
GNC::GUI::PanelHistorial2* GetPanelHistorial();
364
//region "Realización de la interfaz IObservadorExtensiones"
366
virtual void OnModuloCargado(GNC::GCS::IControladorModulo* pCM);
367
virtual void OnModuloDescargado(GNC::GCS::IControladorModulo* pCM);
368
virtual void OnModuloActivado(GNC::GCS::IControladorModulo* pCM);
369
virtual void OnModuloDesactivado(GNC::GCS::IControladorModulo* pCM);
307
//------------------------------------------------------------------------------
308
//region "IExtensionsObserver realization"
310
/** The module is loaded **/
311
virtual void OnModuleLoaded(GNC::GCS::IModuleController* pMC);
312
/** The module is unloaded **/
313
virtual void OnModuleUnloaded(GNC::GCS::IModuleController* pMC);
315
/** The module is activated **/
316
virtual void OnModuleActivated(GNC::GCS::IModuleController* pMC);
317
/** The module is deactivated **/
318
virtual void OnModuleDeactivated(GNC::GCS::IModuleController* pMC);
407
GNC::GUI::PanelHistorial2* m_pHistorial;
409
354
wxMenu* m_pMenuModulo;
410
AUI_NAMESPACE wxAuiToolBar* m_pBarraComun;
413
ssize_t m_NumBackgroundRunning;
414
ssize_t m_NumBackgroundCount;
416
wxCriticalSection m_BackgroundCriticalSection;
418
ssize_t m_NumComandosRunning;
419
ssize_t m_NumComandosCount;
420
wxCriticalSection m_ComandosCriticalSection;
423
356
// Variable que controla la coherencia de confirmación entre cerrado de la aplicacion y cerrado de tabs para
424
357
// no informar varias veces de lo mismo.
425
358
bool m_TratandoDeCerrar;
427
360
wxMenuBar* m_pMenuBar;
428
wxPrintData* m_pPrintData;
430
362
DECLARE_EVENT_TABLE()
431
friend class GNC::GCS::ControladorVistas;
363
//friend class GNC::GCS::ControladorVistas;