~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/widgets/wprogreso.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-10-24 21:28:17 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131024212817-ej1skb9og09d3ht6
Tags: 3.5.0.1137.31+dfsg-1
New upstream release [October 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  
3
 
 *  $Id: wprogreso.h 5047 2012-07-25 13:14:57Z carlos $
4
 
 *  Ginkgo CADx Project
5
 
 *
6
 
 *  Copyright 2008-10 MetaEmotion S.L. All rights reserved.
7
 
 *  http://ginkgo-cadx.com
8
 
 *
9
 
 *  This file is licensed under LGPL v3 license.
10
 
 *  See License.txt for details
11
 
 *
12
 
 *
13
 
 */
14
 
#pragma once
15
 
#include <api/iwidgets.h>
16
 
#include <api/ievento.h>
17
 
#include <api/observers/ieventsobserver.h>
18
 
#include <vector>
19
 
#include <list>
20
 
#include <set>
21
 
#include "openglhelper.h"
22
 
 
23
 
 
24
 
namespace GNC {
25
 
        namespace GCS {
26
 
 
27
 
                namespace Widgets {
28
 
                        typedef enum ModoProgreso {
29
 
                                MP_Definido,
30
 
                                MP_Indefinido
31
 
                        } ModoProgreso;
32
 
 
33
 
                        // Este widget se asocia a un renderer concreto.
34
 
                        class WProgreso : public GNC::GCS::Widgets::IWidget, public GNC::GCS::IEventsObserver {
35
 
 
36
 
                        //----------------------------------------------------------------------------------------------------
37
 
                        //region "Constructor y destructor"
38
 
                        public:
39
 
 
40
 
                                WProgreso(GNC::GCS::IWidgetsRenderer* pRenderer, IWidgetsManager* pManager, long vid, const char* nombre, long gid);
41
 
 
42
 
                                ~WProgreso();
43
 
 
44
 
                                virtual void TickAnimation(double freq);
45
 
                        //endregion
46
 
 
47
 
                        //----------------------------------------------------------------------------------------------------
48
 
                        //region "Interfaz especifica"
49
 
                        public:
50
 
                                void SetModo(ModoProgreso modo);
51
 
 
52
 
                        protected:
53
 
                                ModoProgreso m_ModoActivo;
54
 
                        //endregion
55
 
 
56
 
                        //----------------------------------------------------------------------------------------------------
57
 
                        //region "Interfaz generica"
58
 
                                virtual void Modificar(bool modificar);
59
 
 
60
 
                                virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
61
 
 
62
 
                                virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
63
 
 
64
 
                                virtual bool HitTest(float x, float y, float umbralCuadrado);
65
 
 
66
 
                                virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
67
 
 
68
 
                                virtual void Render(GNC::GCS::Contexto3D* c);
69
 
 
70
 
 
71
 
                        //endregion
72
 
 
73
 
                        //----------------------------------------------------------------------------------------------------
74
 
                        //region "Estado interno"
75
 
                        private:
76
 
                                GNC::GCS::Vector  m_PosicionCursor;
77
 
                                GNC::GCS::Vector  m_Posicion;
78
 
                                double            m_Progreso;
79
 
 
80
 
                        public:
81
 
                                virtual void RecalcularEstaticas(void* renderer);
82
 
                        //endregion
83
 
 
84
 
                        //----------------------------------------------------------------------------------------------------
85
 
                        //region Interfaz de eventos ginkgo
86
 
                        public:
87
 
                                virtual void ProcesarEvento(GNC::GCS::Events::IEvent* /*evento*/) {}
88
 
                        //endregion
89
 
 
90
 
                        };
91
 
                }
92
 
        }
93
 
}