You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CViewOptions.h 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* 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. // -=- CViewOptions.h
  19. // Definition of the CViewOptions class, responsible for storing the
  20. // current & requested VNCviewer options.
  21. #ifndef __RFB_WIN32_CVIEW_OPTIONS_H__
  22. #define __RFB_WIN32_CVIEW_OPTIONS_H__
  23. #include <rfb/util.h>
  24. namespace rfb {
  25. namespace win32 {
  26. //
  27. // -=- Options structure. Each viewer option has a corresponding
  28. // entry in CViewOptions. The viewer options are set by calling
  29. // CView::applyOptions(...)
  30. // The CViewOptions structure automatically picks up the default
  31. // value of each option from the Configuration system
  32. // The readFromFile and writeFromFile methods can be used to load
  33. // and save VNC configuration files. readFromFile is backwards
  34. // compatible with 3.3 releases, while writeToFile is not.
  35. class CViewOptions {
  36. public:
  37. CViewOptions();
  38. CViewOptions(const CViewOptions& o) {operator=(o);}
  39. CViewOptions& operator=(const CViewOptions& o);
  40. void readFromFile(const char* filename_);
  41. void writeToFile(const char* filename_);
  42. void writeDefaults();
  43. bool useLocalCursor;
  44. bool useDesktopResize;
  45. bool fullScreen;
  46. bool fullColour;
  47. int lowColourLevel;
  48. int preferredEncoding;
  49. bool autoSelect;
  50. bool shared;
  51. bool sendPtrEvents;
  52. bool sendKeyEvents;
  53. bool clientCutText;
  54. bool serverCutText;
  55. bool emulate3;
  56. int pointerEventInterval;
  57. bool protocol3_3;
  58. bool acceptBell;
  59. CharArray userName;
  60. void setUserName(const char* user);
  61. CharArray password;
  62. void setPassword(const char* pwd);
  63. CharArray configFileName;
  64. void setConfigFileName(const char* cfn);
  65. CharArray host;
  66. void setHost(const char* h);
  67. CharArray monitor;
  68. void setMonitor(const char* m);
  69. unsigned int menuKey;
  70. void setMenuKey(const char* keyName);
  71. char* menuKeyName();
  72. bool customCompressLevel;
  73. int compressLevel;
  74. bool noJpeg;
  75. int qualityLevel;
  76. CharArray passwordFile;
  77. };
  78. };
  79. };
  80. #endif