blob: e45612c3c9ee5e53bf444f5bf235b3b902df1112 [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;
61 bool clientCutText;
62 bool serverCutText;
63 bool emulate3;
64 int pointerEventInterval;
65 bool protocol3_3;
66 bool acceptBell;
67 CharArray userName;
68 void setUserName(const char* user);
69 CharArray password;
70 void setPassword(const char* pwd);
71 CharArray configFileName;
72 void setConfigFileName(const char* cfn);
73 CharArray host;
74 void setHost(const char* h);
75 CharArray monitor;
76 void setMonitor(const char* m);
77 unsigned int menuKey;
78 void setMenuKey(const char* keyName);
79 char* menuKeyName();
Peter Åstrand365427a2004-12-29 10:59:03 +000080
81 bool customCompressLevel;
82 int compressLevel;
Peter Åstrand0b870262004-12-28 15:55:46 +000083 bool noJpeg;
Peter Åstrand365427a2004-12-29 10:59:03 +000084 int qualityLevel;
85
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000086 };
87
88
89 };
90
91};
92
93#endif