1 /**
2 * Whiteboard connection establishment dialog
3 *
4 * Authors:
5 * David Yip <yipdw@rose-hulman.edu>
6 * Jason Segal, Jonas Collaros, Stephen Montgomery, Brandi Soggs, Matthew Weinstock (original C/Gtk version)
7 *
8 * Copyright (c) 2004-2005 Authors
9 *
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 */
13 #ifndef __WHITEBOARD_CONNECT_DIALOG_H__
14 #define __WHITEBOARD_CONNECT_DIALOG_H__
16 #include "verbs.h"
17 #include "dialog.h"
19 #include <vector>
21 struct SPDesktop;
23 namespace Inkscape {
25 namespace Whiteboard {
27 class SessionManager;
29 }
31 namespace UI {
33 namespace Dialog {
35 class WhiteboardConnectDialog : public Dialog {
36 public:
37 WhiteboardConnectDialog() : Dialog("dialogs.whiteboard_connect", SP_VERB_DIALOG_WHITEBOARD_CONNECT)
38 {
40 }
42 static WhiteboardConnectDialog* create();
44 virtual ~WhiteboardConnectDialog()
45 {
47 }
48 };
50 class WhiteboardConnectDialogImpl : public WhiteboardConnectDialog {
51 public:
52 WhiteboardConnectDialogImpl();
53 ~WhiteboardConnectDialogImpl();
54 void present();
55 void setSessionManager();
57 private:
59 // GTK+ widgets
60 std::vector<Gtk::Label*> registerlabels;
61 std::vector<Gtk::Entry*> registerentries;
63 Gtk::Table _layout,_checkboxes;
64 Gtk::HBox _buttons;
66 Gtk::Entry _server;
67 Gtk::Entry _username;
68 Gtk::Entry _password;
69 Gtk::Entry _port;
71 Gtk::Label _labels[4],_blank;
73 Gtk::CheckButton _usessl,_register;
75 Gtk::Button _ok, _cancel;
77 // Construction and callbacks
78 void _construct();
79 void _respCallback(int resp);
81 void _registerCallback();
82 void _useSSLClickedCallback();
84 // SessionManager and SPDesktop pointers
85 ::SPDesktop* _desktop;
86 Whiteboard::SessionManager* _sm;
87 };
90 }
92 }
94 }
96 #endif