blob: b19c75084ccfcdb76866fe181e36f7425900875d [file] [log] [blame]
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +00001/* Copyright (C) 2002-2004 RealVNC Ltd. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
19// -=- CViewOptions.h
20
21// Definition of the CViewOptions class, responsible for storing the
22// current & requested VNCviewer options.
23
24#ifndef __RFB_WIN32_CVIEW_OPTIONS_H__
25#define __RFB_WIN32_CVIEW_OPTIONS_H__
26
27#include <rfb/util.h>
28
29namespace rfb {
30
31 namespace win32 {
32
33 //
34 // -=- Options structure. Each viewer option has a corresponding
35 // entry in CViewOptions. The viewer options are set by calling
36 // CView::applyOptions(...)
37 // The CViewOptions structure automatically picks up the default
38 // value of each option from the Configuration system
39 // The readFromFile and writeFromFile methods can be used to load
40 // and save VNC configuration files. readFromFile is backwards
41 // compatible with 3.3 releases, while writeToFile is not.
42
43 class CViewOptions {
44 public:
45 CViewOptions();
46 CViewOptions(const CViewOptions& o) {operator=(o);}
47 CViewOptions& operator=(const CViewOptions& o);
48 void readFromFile(const char* filename_);
49 void writeToFile(const char* filename_);
50 void writeDefaults();
51 bool useLocalCursor;
52 bool useDesktopResize;
53 bool fullScreen;
54 bool fullColour;
55 int lowColourLevel;
56 int preferredEncoding;
57 bool autoSelect;
58 bool shared;
59 bool sendPtrEvents;
60 bool sendKeyEvents;
Peter Åstrand57dcc452005-01-28 14:52:50 +000061 bool sendSysKeys;
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000062 bool clientCutText;
63 bool serverCutText;
64 bool emulate3;
65 int pointerEventInterval;
66 bool protocol3_3;
67 bool acceptBell;
68 CharArray userName;
69 void setUserName(const char* user);
70 CharArray password;
71 void setPassword(const char* pwd);
72 CharArray configFileName;
73 void setConfigFileName(const char* cfn);
74 CharArray host;
75 void setHost(const char* h);
76 CharArray monitor;
77 void setMonitor(const char* m);
78 unsigned int menuKey;
79 void setMenuKey(const char* keyName);
80 char* menuKeyName();
Peter Åstrand365427a2004-12-29 10:59:03 +000081
82 bool customCompressLevel;
83 int compressLevel;
Peter Åstrand0b870262004-12-28 15:55:46 +000084 bool noJpeg;
Peter Åstrand365427a2004-12-29 10:59:03 +000085 int qualityLevel;
86
Peter Åstrand3e3c75e2005-01-03 13:32:28 +000087 CharArray passwordFile;
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000088 };
89
90
91 };
92
93};
94
95#endif