1 /** @file
2 * @brief Whiteboard connection dialog
3 */
4 /* Authors:
5 * David Yip <yipdw@rose-hulman.edu>
6 * Jason Segal
7 * Jonas Collaros
8 * Stephen Montgomery
9 * Brandi Soggs
10 * Matthew Weinstock (original C/Gtk version)
11 *
12 * Copyright (c) 2004-2005 Authors
13 * Released under GNU GPL, read the file 'COPYING' for more information
14 */
16 #ifndef __WHITEBOARD_CONNECT_DIALOG_H__
17 #define __WHITEBOARD_CONNECT_DIALOG_H__
19 #include "verbs.h"
20 #include "dialog.h"
22 #include <vector>
24 struct SPDesktop;
26 namespace Inkscape {
28 namespace Whiteboard {
30 class SessionManager;
32 }
34 namespace UI {
36 namespace Dialog {
38 class WhiteboardConnectDialog : public Dialog {
39 public:
40 WhiteboardConnectDialog() : Dialog("/dialogs/whiteboard_connect", SP_VERB_DIALOG_WHITEBOARD_CONNECT)
41 {
43 }
45 static WhiteboardConnectDialog* create();
47 virtual ~WhiteboardConnectDialog()
48 {
50 }
51 };
53 class WhiteboardConnectDialogImpl : public WhiteboardConnectDialog {
54 public:
55 WhiteboardConnectDialogImpl();
56 ~WhiteboardConnectDialogImpl();
57 void present();
58 void setSessionManager();
60 private:
62 // GTK+ widgets
63 std::vector<Gtk::Label*> registerlabels;
64 std::vector<Gtk::Entry*> registerentries;
66 Gtk::Table _layout,_checkboxes;
67 Gtk::HBox _buttons;
69 Gtk::Entry _server;
70 Gtk::Entry _username;
71 Gtk::Entry _password;
72 Gtk::Entry _port;
74 Gtk::Label _labels[4],_blank;
76 Gtk::CheckButton _usessl,_register;
78 Gtk::Button _ok, _cancel;
80 // Construction and callbacks
81 void _construct();
82 void _respCallback(int resp);
84 void _registerCallback();
85 void _useSSLClickedCallback();
87 // SessionManager and SPDesktop pointers
88 ::SPDesktop* _desktop;
89 Whiteboard::SessionManager* _sm;
90 };
93 }
95 }
97 }
99 #endif