3
* $Id: wprogreso.h 5047 2012-07-25 13:14:57Z 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/iwidgets.h>
16
#include <api/ievento.h>
17
#include <api/observers/ieventsobserver.h>
21
#include "openglhelper.h"
28
typedef enum ModoProgreso {
33
// Este widget se asocia a un renderer concreto.
34
class WProgreso : public GNC::GCS::Widgets::IWidget, public GNC::GCS::IEventsObserver {
36
//----------------------------------------------------------------------------------------------------
37
//region "Constructor y destructor"
40
WProgreso(GNC::GCS::IWidgetsRenderer* pRenderer, IWidgetsManager* pManager, long vid, const char* nombre, long gid);
44
virtual void TickAnimation(double freq);
47
//----------------------------------------------------------------------------------------------------
48
//region "Interfaz especifica"
50
void SetModo(ModoProgreso modo);
53
ModoProgreso m_ModoActivo;
56
//----------------------------------------------------------------------------------------------------
57
//region "Interfaz generica"
58
virtual void Modificar(bool modificar);
60
virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
62
virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
64
virtual bool HitTest(float x, float y, float umbralCuadrado);
66
virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
68
virtual void Render(GNC::GCS::Contexto3D* c);
73
//----------------------------------------------------------------------------------------------------
74
//region "Estado interno"
76
GNC::GCS::Vector m_PosicionCursor;
77
GNC::GCS::Vector m_Posicion;
81
virtual void RecalcularEstaticas(void* renderer);
84
//----------------------------------------------------------------------------------------------------
85
//region Interfaz de eventos ginkgo
87
virtual void ProcesarEvento(GNC::GCS::Events::IEvent* /*evento*/) {}