source: eviacam/trunk/fuentes/src/checkupdates_ui.h @ 29

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

added eviacam content

File size: 4.0 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// Name:        checkupdates_gui.h
3// Purpose:     Check updates dialog
4// Author:      César Mauri Loba
5// Created:     12/10/2012 20:15:41
6// Copyright:   (C) 2008-14 Cesar Mauri from CREA Sistemes Informatics
7//
8//  This program is free software: you can redistribute it and/or modify
9//  it under the terms of the GNU General Public License as published by
10//  the Free Software Foundation, either version 3 of the License, or
11//  (at your option) any later version.
12//
13//  This program is distributed in the hope that it will be useful,
14//  but WITHOUT ANY WARRANTY; without even the implied warranty of
15//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16//  GNU General Public License for more details.
17//
18//  You should have received a copy of the GNU General Public License
19//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20/////////////////////////////////////////////////////////////////////////////
21
22#ifndef _CHECKUPDATES_GUI_H_
23#define _CHECKUPDATES_GUI_H_
24
25
26/*!
27 * Includes
28 */
29
30////@begin includes
31#include "wx/hyperlink.h"
32////@end includes
33#include <wx/timer.h>
34#include <wx/dialog.h>
35#include <wx/stattext.h>
36
37
38/*!
39 * Forward declarations
40 */
41
42////@begin forward declarations
43class wxHyperlinkCtrl;
44////@end forward declarations
45namespace eviacam {
46        class CheckUpdates;
47}
48
49
50
51/*!
52 * Control identifiers
53 */
54
55////@begin control identifiers
56#define ID_CHECKFORUPDATES 10128
57#define ID_HYPERLINKCTRL_WEBSITE 10129
58#define ID_BUTTON_CHECKUPDATE_CLOSE 10130
59#define SYMBOL_CHECKUPDATESUI_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
60#define SYMBOL_CHECKUPDATESUI_TITLE _("Check for updates")
61#define SYMBOL_CHECKUPDATESUI_IDNAME ID_CHECKFORUPDATES
62#define SYMBOL_CHECKUPDATESUI_SIZE wxDefaultSize
63#define SYMBOL_CHECKUPDATESUI_POSITION wxDefaultPosition
64////@end control identifiers
65
66
67/*!
68 * CheckUpdatesUI class declaration
69 */
70
71class CheckUpdatesUI: public wxDialog
72{   
73    DECLARE_DYNAMIC_CLASS( CheckUpdatesUI )
74    DECLARE_EVENT_TABLE()
75
76public:
77    /// Constructors
78    CheckUpdatesUI();
79    CheckUpdatesUI( wxWindow* parent, wxWindowID id = SYMBOL_CHECKUPDATESUI_IDNAME, const wxString& caption = SYMBOL_CHECKUPDATESUI_TITLE, const wxPoint& pos = SYMBOL_CHECKUPDATESUI_POSITION, const wxSize& size = SYMBOL_CHECKUPDATESUI_SIZE, long style = SYMBOL_CHECKUPDATESUI_STYLE );
80
81    /// Creation
82    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CHECKUPDATESUI_IDNAME, const wxString& caption = SYMBOL_CHECKUPDATESUI_TITLE, const wxPoint& pos = SYMBOL_CHECKUPDATESUI_POSITION, const wxSize& size = SYMBOL_CHECKUPDATESUI_SIZE, long style = SYMBOL_CHECKUPDATESUI_STYLE );
83
84        void StartProgress();
85        void StopProgress();
86        void SetResults(const wxString& txt1, const wxString& txt2, bool showLink);
87
88    /// Destructor
89    ~CheckUpdatesUI();
90
91private:
92    /// Initialises member variables
93    void Init();
94
95    /// Creates the controls and sizers
96    void CreateControls();
97
98////@begin CheckUpdatesUI event handler declarations
99
100    /// wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL_WEBSITE
101    void OnHyperlinkctrlWebsiteHyperlinkClicked( wxHyperlinkEvent& event );
102
103    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_CHECKUPDATE_CLOSE
104    void OnButtonCheckupdateCloseClick( wxCommandEvent& event );
105
106////@end CheckUpdatesUI event handler declarations
107
108    void OnTimer(wxTimerEvent& event);
109
110
111////@begin CheckUpdatesUI member function declarations
112
113    /// Retrieves bitmap resources
114    wxBitmap GetBitmapResource( const wxString& name );
115
116    /// Retrieves icon resources
117    wxIcon GetIconResource( const wxString& name );
118////@end CheckUpdatesUI member function declarations
119
120    /// Should we show tooltips?
121    static bool ShowToolTips();
122
123////@begin CheckUpdatesUI member variables
124    wxStaticText* m_msg1;
125    wxStaticText* m_msg2;
126    wxHyperlinkCtrl* m_link;
127////@end CheckUpdatesUI member variables
128    wxTimer m_timer;
129};
130
131#endif
132    // _CHECKUPDATES_GUI_H_
Note: See TracBrowser for help on using the repository browser.