source: eviacam/trunk/fuentes/src/wviacam.h @ 567

Last change on this file since 567 was 567, checked in by mabarracus, 4 years ago

updated sources to version 2.0.3

File size: 6.4 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// Name:        wviacam.h
3// Purpose: 
4// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
5// Modified by:
6// Created:     
7// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
8//
9//  This program is free software: you can redistribute it and/or modify
10//  it under the terms of the GNU General Public License as published by
11//  the Free Software Foundation, either version 3 of the License, or
12//  (at your option) any later version.
13//
14//  This program is distributed in the hope that it will be useful,
15//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//  GNU General Public License for more details.
18//
19//  You should have received a copy of the GNU General Public License
20//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21/////////////////////////////////////////////////////////////////////////////
22
23#ifndef WVIACAM_H_
24#define WVIACAM_H_
25
26
27/*!
28 * Includes
29 */
30
31////@begin includes
32#include "wx/frame.h"
33#include "wx/toolbar.h"
34#include "wx/statusbr.h"
35////@end includes
36
37#include <wx/taskbar.h>
38#include "config.h"
39
40/*!
41 * Forward declarations
42 */
43
44////@begin forward declarations
45class wxStatusBar;
46////@end forward declarations
47
48class CCamWindow;
49class wxHtmlHelpController;
50
51/*!
52 * Control identifiers
53 */
54
55////@begin control identifiers
56#define ID_WVIACAM 10000
57#define ID_MENUITEM_ENABLE 10011
58#define ID_MENUITEM_EXIT 10001
59#define ID_MENU_WIZARD 10094
60#define ID_MENU_OPTIONS 10003
61#define ID_MENU_HELP_CONTENTS 10040
62#define ID_MENU_CHECKUPDATES 10127
63#define ID_MENU_ABOUT 10028
64#define ID_TOOLBAR 10042
65#define ID_TOOL_ENABLE 10043
66#define ID_TOOL_DISABLE 10044
67#define ID_TOOL_CLICKWIN 10046
68#define ID_TOOL_KEYBOARD 10048
69#define ID_TOOL_OPTIONS 10045
70#define ID_TOOL_HELP 10047
71#define ID_STATUSBAR 10002
72#define SYMBOL_WVIACAM_STYLE wxDEFAULT_FRAME_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE|wxMINIMIZE_BOX|wxCLOSE_BOX
73#define SYMBOL_WVIACAM_TITLE wxEmptyString
74#define SYMBOL_WVIACAM_IDNAME ID_WVIACAM
75#define SYMBOL_WVIACAM_SIZE wxSize(300, 300)
76#define SYMBOL_WVIACAM_POSITION wxPoint(100, 200)
77////@end control identifiers
78#undef SYMBOL_WVIACAM_TITLE
79#define SYMBOL_WVIACAM_TITLE _T("Enable Viacam")
80
81/*!
82 * WViacam class declaration
83 */
84
85class WViacam: public wxFrame
86{   
87    DECLARE_CLASS( WViacam )
88    DECLARE_EVENT_TABLE()
89
90public:
91    /// Constructors
92    WViacam();
93
94    WViacam( wxWindow* parent, wxWindowID id = SYMBOL_WVIACAM_IDNAME, const wxString& caption = SYMBOL_WVIACAM_TITLE, const wxPoint& pos = SYMBOL_WVIACAM_POSITION, const wxSize& size = SYMBOL_WVIACAM_SIZE, long style = SYMBOL_WVIACAM_STYLE );
95
96    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WVIACAM_IDNAME, const wxString& caption = SYMBOL_WVIACAM_TITLE, const wxPoint& pos = SYMBOL_WVIACAM_POSITION, const wxSize& size = SYMBOL_WVIACAM_SIZE, long style = SYMBOL_WVIACAM_STYLE );
97
98    /// Destructor
99    ~WViacam();
100
101
102    /// Initialises member variables
103    void Init();
104
105    /// Creates the controls and sizers
106    void CreateControls();
107
108    CCamWindow* GetCamWindow() { return m_pCamWindow; }
109//    void SetController (CViacamController* pController) { m_pController= pController; }
110
111        virtual bool Show(bool show);
112
113        //
114        // Custom events
115        //
116
117        // Update FPS meter
118        enum EFPSCondition { GOOD, FAIR, POOR };
119        void SetFPS (long value, EFPSCondition cond);
120        void OnSetFPS( wxCommandEvent &event );
121private:
122       
123////@begin WViacam event handler declarations
124
125    /// wxEVT_CLOSE_WINDOW event handler for ID_WVIACAM
126    void OnCloseWindow( wxCloseEvent& event );
127
128    /// wxEVT_ICONIZE event handler for ID_WVIACAM
129    void OnIconize( wxIconizeEvent& event );
130
131    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENUITEM_ENABLE
132    void OnMenuitemEnableClick( wxCommandEvent& event );
133
134    /// wxEVT_UPDATE_UI event handler for ID_MENUITEM_ENABLE
135    void OnMenuitemEnableUpdate( wxUpdateUIEvent& event );
136
137    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENUITEM_EXIT
138    void OnMenuitemExitClick( wxCommandEvent& event );
139
140    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_WIZARD
141    void OnMenuWizardClick( wxCommandEvent& event );
142
143    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_OPTIONS
144    void OnMenuOptionsClick( wxCommandEvent& event );
145
146    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_HELP_CONTENTS
147    void OnToolHelpClick( wxCommandEvent& event );
148
149#if defined(ENABLE_UPDATES_CHECK)
150    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_CHECKUPDATES
151    void OnMenuCheckupdatesClick( wxCommandEvent& event );
152
153#endif
154    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_ABOUT
155    void OnMenuAboutClick( wxCommandEvent& event );
156
157    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL_ENABLE
158    void OnToolEnableClick( wxCommandEvent& event );
159
160    /// wxEVT_UPDATE_UI event handler for ID_TOOL_ENABLE
161    void OnToolEnableUpdate( wxUpdateUIEvent& event );
162
163    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL_DISABLE
164    void OnToolDisableClick( wxCommandEvent& event );
165
166    /// wxEVT_UPDATE_UI event handler for ID_TOOL_DISABLE
167    void OnToolDisableUpdate( wxUpdateUIEvent& event );
168
169    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL_CLICKWIN
170    void OnToolClickwinClick( wxCommandEvent& event );
171
172    /// wxEVT_UPDATE_UI event handler for ID_TOOL_CLICKWIN
173    void OnToolClickwinUpdate( wxUpdateUIEvent& event );
174
175    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL_KEYBOARD
176    void OnToolKeyboardClick( wxCommandEvent& event );
177
178    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL_OPTIONS
179    void OnToolOptionsClick( wxCommandEvent& event );
180
181////@end WViacam event handler declarations
182
183////@begin WViacam member function declarations
184
185    /// Retrieves bitmap resources
186    wxBitmap GetBitmapResource( const wxString& name );
187
188    /// Retrieves icon resources
189    wxIcon GetIconResource( const wxString& name );
190////@end WViacam member function declarations
191
192    /// Should we show tooltips?
193    static bool ShowToolTips();
194
195       
196
197        void OnTaskBarIconLeftUp ( wxTaskBarIconEvent& event );
198
199////@begin WViacam member variables
200    wxToolBar* m_toolBar;
201    wxStatusBar* m_statusBar;
202////@end WViacam member variables       
203
204        CCamWindow* m_pCamWindow;
205        wxTaskBarIcon* m_taskBarIcon;
206        wxHtmlHelpController* m_helpController;
207
208        long m_prevFPS;
209        bool m_updateToolbar;
210};
211
212#endif
213    // _WVIACAM_H_
Note: See TracBrowser for help on using the repository browser.