Initial options dialog (read-only) loosly based on the Unix vncviewer.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4416 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h
new file mode 100644
index 0000000..cb18bcd
--- /dev/null
+++ b/vncviewer/OptionsDialog.h
@@ -0,0 +1,106 @@
+/* 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 <FL/Fl_Window.H>
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Check_Button.H>
+#include <FL/Fl_Round_Button.H>
+#include <FL/Fl_Int_Input.H>
+
+class OptionsDialog : public Fl_Window {
+protected:
+  OptionsDialog();
+  ~OptionsDialog();
+
+public:
+  static void showDialog(void);
+
+  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 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 handleVencrypt(Fl_Widget *widget, void *data);
+  static void handleX509(Fl_Widget *widget, void *data);
+
+  static void handleCancel(Fl_Widget *widget, void *data);
+  static void handleOK(Fl_Widget *widget, void *data);
+
+protected:
+  /* 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_Check_Button *vencryptCheckbox;
+
+  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 *acceptClipboardCheckbox;
+  Fl_Check_Button *sendClipboardCheckbox;
+  Fl_Check_Button *sendPrimaryCheckbox;
+
+  /* Misc. */
+  Fl_Check_Button *sharedCheckbox;
+  Fl_Check_Button *fullScreenCheckbox;
+  Fl_Check_Button *localCursorCheckbox;
+  Fl_Check_Button *dotCursorCheckbox;
+};
+
+#endif