3
* $Id: iwidgetsrenderer.h 3526 2011-03-16 19:56:19Z carlos $
6
* Copyright 2008-10 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
15
#include <api/ievento.h>
16
#include <api/math/geometria.h>
18
//----------------------------------------------------------------------------------------------------
19
// Forward declarations
23
class IImpresorOverlay;
24
class IWidgetsManager;
33
class vtkGinkgoImageViewer;
34
class vtkWorldPointPicker;
35
class WidgetRepresentation;
38
// End Forward declarations
43
/* Clase que solicita al modelo de widgets que redibuje sus widgets */
44
class EXTAPI IWidgetsRenderer : public GNC::GCS::Eventos::IPublicadorEventos {
46
typedef GNC::GCS::Contexto3D TContexto;
49
IImpresorOverlay* m_pIOverlay;
55
/* Metodo que indica al manager que es preciso hacer un render() */
56
void Modificar(bool modificar)
58
m_Modificado = modificar;
61
inline bool EstaModificado()
66
//----------------------------------------------------------------------------------------------------
67
//region "Interfaz de impresión de overlays"
71
void SetIOverlay(IImpresorOverlay* pOverlay);
73
void ImprimirOverlay(GNC::GCS::Widgets::IWidget* w, GNC::GCS::Contexto3D* c, GNC::GCS::Vector& boundingBox);
75
void ImprimirOverlay(GNC::GCS::Widgets::IWidgetBuilder* wb, GNC::GCS::Contexto3D* c, GNC::GCS::Vector& boundingBox);
77
//----------------------------------------------------------------------------------------------------
78
//region "Interfaz de configuracion de vistas/slices"
82
/* Propaga la notificación de activación de este renderer hacia el manager */
85
/* Establece el id de sub-vista activo. Los widgets se asocian a un VID. */
86
void SetVID(long vid, bool render);
88
/* Obtiene el id de sub-vista activo. Los widgets se asocian a un VID. */
89
inline long GetVID(void)
96
/* Propaga la notificación de activación de este renderer hacia las clases base */
97
virtual void OnActivar();
101
//----------------------------------------------------------------------------------------------------
102
//region "Interfaz de configuracion del manager"
105
void SetManager(GNC::GCS::IWidgetsManager* pManager);
107
void SetRepresentation(WidgetRepresentation* pWidget);
109
virtual void WSetCurrent() = 0;
112
GNC::GCS::IWidgetsManager* m_pManager;
116
//----------------------------------------------------------------------------------------------------
117
//region "Interfaz de transformacion de coordenadas"
119
virtual void DisplayToWorld(double displayPos[3], double worldPos[4]) = 0;
120
virtual void WorldToDisplay(double worldPos[4], double displayPos[3]) = 0;
126
virtual void PostRender(bool inmediato = false) = 0;
129
vtkGinkgoImageViewer* m_pImageViewer;
130
vtkWorldPointPicker* m_pPicker;
131
WidgetRepresentation* m_pRepresentation;