-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRdpPropertyDialog.h
166 lines (132 loc) · 5.04 KB
/
RdpPropertyDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// $Id: RdpPropertyDialog.h 590 2010-10-23 22:42:11Z felfert $
//
// Copyright (C) 2006 The OpenNX Team
// Author: Fritz Elfert
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
#ifndef _RDPPROPERTYDIALOG_H_
#define _RDPPROPERTYDIALOG_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "RdpPropertyDialog.cpp"
#endif
/*!
* Includes
*/
////@begin includes
#include "RdpPropertyDialog_symbols.h"
#include "wx/xrc/xmlres.h"
#include "wx/valgen.h"
#include "wx/valtext.h"
#include "wx/statline.h"
////@end includes
/*!
* Forward declarations
*/
class MyXmlConfig;
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG_SETTINGS_RDP 10065
#define SYMBOL_RDPPROPERTYDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_RDPPROPERTYDIALOG_TITLE _("RDP Session Settings - OpenNX")
#define SYMBOL_RDPPROPERTYDIALOG_IDNAME ID_DIALOG_SETTINGS_RDP
#define SYMBOL_RDPPROPERTYDIALOG_SIZE wxSize(200, 150)
#define SYMBOL_RDPPROPERTYDIALOG_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* RdpPropertyDialog class declaration
*/
class RdpPropertyDialog: public wxDialog
{
DECLARE_CLASS( RdpPropertyDialog )
DECLARE_EVENT_TABLE()
public:
/// Constructors
RdpPropertyDialog( );
RdpPropertyDialog( wxWindow* parent, wxWindowID id = SYMBOL_RDPPROPERTYDIALOG_IDNAME, const wxString& caption = SYMBOL_RDPPROPERTYDIALOG_TITLE, const wxPoint& pos = SYMBOL_RDPPROPERTYDIALOG_POSITION, const wxSize& size = SYMBOL_RDPPROPERTYDIALOG_SIZE, long style = SYMBOL_RDPPROPERTYDIALOG_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_RDPPROPERTYDIALOG_IDNAME, const wxString& caption = SYMBOL_RDPPROPERTYDIALOG_TITLE, const wxPoint& pos = SYMBOL_RDPPROPERTYDIALOG_POSITION, const wxSize& size = SYMBOL_RDPPROPERTYDIALOG_SIZE, long style = SYMBOL_RDPPROPERTYDIALOG_STYLE );
void SetConfig(MyXmlConfig *);
void UpdateDialogConstraints();
#ifdef __WXMSW__
bool TransferDataToWindow();
bool TransferDataFromWindow();
#endif
private:
/// Creates the controls and sizers
void CreateControls();
void OnContextHelp(wxCommandEvent &);
////@begin RdpPropertyDialog event handler declarations
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBUTTON_RDP_WINLOGON
void OnRadiobuttonRdpWinlogonSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBUTTON_RDP_NXAUTH
void OnRadiobuttonRdpNxauthSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBUTTON_RDP_AUTOLOGIN
void OnRadiobuttonRdpAutologinSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBUTTON_RDP_DESKTOP
void OnRadiobuttonRdpDesktopSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBUTTON_RDP_RUNAPP
void OnRadiobuttonRdpRunappSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event );
////@end RdpPropertyDialog event handler declarations
public:
////@begin RdpPropertyDialog member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end RdpPropertyDialog member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
private:
////@begin RdpPropertyDialog member variables
wxRadioButton* m_pCtrlAutologin;
wxTextCtrl* m_pCtrlUsername;
wxTextCtrl* m_pCtrlPassword;
wxCheckBox* m_pCtrlRememberPassword;
wxCheckBox* m_pCtrlRootless;
wxRadioButton* m_pCtrlRunApplication;
wxTextCtrl* m_pCtrlApplicationString;
private:
wxString m_sHostname;
wxString m_sUsername;
wxString m_sPassword;
wxString m_sRunCommand;
bool m_bAutoLogin;
bool m_bRememberPassword;
bool m_bRootless;
bool m_bShowWinLogon;
bool m_bUseNxAuth;
bool m_bRunDesktop;
bool m_bRunApplication;
wxString m_sRdpDomain;
////@end RdpPropertyDialog member variables
MyXmlConfig *m_pCfg;
bool m_bStorePasswords;
};
#endif
// _RDPPROPERTYDIALOG_H_