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
|
/* Copyright 2011 Pierre Ossman <ossman@cendio.se> for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software 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 General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef __OPTIONSDIALOG_H__
#define __OPTIONSDIALOG_H__
#include <map>
#include <FL/Fl_Window.H>
class Fl_Widget;
class Fl_Group;
class Fl_Check_Button;
class Fl_Round_Button;
class Fl_Input;
class Fl_Int_Input;
class Fl_Choice;
class MonitorArrangement;
typedef void (OptionsCallback)(void*);
class OptionsDialog : public Fl_Window {
protected:
OptionsDialog();
~OptionsDialog();
public:
static void showDialog(void);
static void addCallback(OptionsCallback *cb, void *data = NULL);
static void removeCallback(OptionsCallback *cb);
void show(void);
protected:
void loadOptions(void);
void storeOptions(void);
void createCompressionPage(int tx, int ty, int tw, int th);
void createSecurityPage(int tx, int ty, int tw, int th);
void createInputPage(int tx, int ty, int tw, int th);
void createScreenPage(int tx, int ty, int tw, int th);
void createMiscPage(int tx, int ty, int tw, int th);
static void handleAutoselect(Fl_Widget *widget, void *data);
static void handleCompression(Fl_Widget *widget, void *data);
static void handleJpeg(Fl_Widget *widget, void *data);
static void handleX509(Fl_Widget *widget, void *data);
static void handleDesktopSize(Fl_Widget *widget, void *data);
static void handleClipboard(Fl_Widget *widget, void *data);
static void handleFullScreenMode(Fl_Widget *widget, void *data);
static void handleCancel(Fl_Widget *widget, void *data);
static void handleOK(Fl_Widget *widget, void *data);
protected:
static std::map<OptionsCallback*, void*> callbacks;
/* Compression */
Fl_Check_Button *autoselectCheckbox;
Fl_Group *encodingGroup;
Fl_Round_Button *tightButton;
Fl_Round_Button *zrleButton;
Fl_Round_Button *hextileButton;
Fl_Round_Button *rawButton;
Fl_Group *colorlevelGroup;
Fl_Round_Button *fullcolorCheckbox;
Fl_Round_Button *mediumcolorCheckbox;
Fl_Round_Button *lowcolorCheckbox;
Fl_Round_Button *verylowcolorCheckbox;
Fl_Check_Button *compressionCheckbox;
Fl_Check_Button *jpegCheckbox;
Fl_Int_Input *compressionInput;
Fl_Int_Input *jpegInput;
/* Security */
Fl_Group *encryptionGroup;
Fl_Check_Button *encNoneCheckbox;
Fl_Check_Button *encTLSCheckbox;
Fl_Check_Button *encX509Checkbox;
Fl_Input *caInput;
Fl_Input *crlInput;
Fl_Group *authenticationGroup;
Fl_Check_Button *authNoneCheckbox;
Fl_Check_Button *authVncCheckbox;
Fl_Check_Button *authPlainCheckbox;
/* Input */
Fl_Check_Button *viewOnlyCheckbox;
Fl_Check_Button *emulateMBCheckbox;
Fl_Check_Button *acceptClipboardCheckbox;
#if !defined(WIN32) && !defined(__APPLE__)
Fl_Check_Button *setPrimaryCheckbox;
#endif
Fl_Check_Button *sendClipboardCheckbox;
#if !defined(WIN32) && !defined(__APPLE__)
Fl_Check_Button *sendPrimaryCheckbox;
#endif
Fl_Check_Button *systemKeysCheckbox;
Fl_Choice *menuKeyChoice;
/* Screen */
Fl_Check_Button *desktopSizeCheckbox;
Fl_Int_Input *desktopWidthInput;
Fl_Int_Input *desktopHeightInput;
Fl_Check_Button *remoteResizeCheckbox;
Fl_Check_Button *fullScreenCheckbox;
Fl_Round_Button *currentMonitorButton;
Fl_Round_Button *allMonitorsButton;
Fl_Round_Button *selectedMonitorsButton;
MonitorArrangement *monitorArrangement;
/* Misc. */
Fl_Check_Button *sharedCheckbox;
Fl_Check_Button *reconnectCheckbox;
Fl_Check_Button *dotCursorCheckbox;
};
#endif
|