~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/ui/dialog/whiteboard-sharewithuser.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Whiteboard share with user 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
 */
 
12
 
 
13
#ifndef __WHITEBOARD_SHAREWITHUSER_DIALOG_H__
 
14
#define __WHITEBOARD_SHAREWITHUSER_DIALOG_H__
 
15
 
 
16
#include <gtkmm/liststore.h>
 
17
#include <gtkmm/treeview.h>
 
18
#include <gtkmm/scrolledwindow.h>
 
19
 
 
20
#include "verbs.h"
 
21
#include "ui/dialog/dialog.h"
 
22
#include "jabber_whiteboard/session-file-selector.h"
 
23
 
 
24
 
 
25
struct SPDesktop;
 
26
 
 
27
namespace Inkscape {
 
28
    namespace Whiteboard {
 
29
        class SessionManager;
 
30
    }
 
31
    namespace UI {
 
32
        namespace Dialog {
 
33
 
 
34
class WhiteboardShareWithUserDialog : public Dialog {
 
35
public:
 
36
        WhiteboardShareWithUserDialog() : Dialog("dialogs.whiteboard_sharewithuser", SP_VERB_DIALOG_WHITEBOARD_SHAREWITHUSER)
 
37
        {
 
38
 
 
39
        }
 
40
 
 
41
        static WhiteboardShareWithUserDialog* create();
 
42
 
 
43
        virtual ~WhiteboardShareWithUserDialog()
 
44
        {
 
45
 
 
46
        }
 
47
};
 
48
 
 
49
class WhiteboardShareWithUserDialogImpl : public WhiteboardShareWithUserDialog {
 
50
public:
 
51
        WhiteboardShareWithUserDialogImpl();
 
52
        ~WhiteboardShareWithUserDialogImpl();
 
53
        void setSessionManager();
 
54
 
 
55
private:
 
56
        // Response flags
 
57
        static unsigned int const SHARE = 0;
 
58
        static unsigned int const CANCEL = 2;
 
59
 
 
60
        // GTK+ widgets
 
61
        Gtk::HBox _connecttojidbox;
 
62
        Gtk::HBox _buddylistbox;
 
63
        Gtk::HBox _buttons;
 
64
 
 
65
        Whiteboard::SessionFileSelectorBox _sfsbox;
 
66
 
 
67
        Gtk::Entry _jid;
 
68
 
 
69
        // more or less shamelessly stolen from gtkmm tutorial book
 
70
        Glib::RefPtr< Gtk::ListStore > _buddylistdata;
 
71
        Gtk::TreeView _buddylist;
 
72
        class BuddyListModel : public Gtk::TreeModel::ColumnRecord {
 
73
        public:
 
74
                BuddyListModel()
 
75
                {
 
76
                        add(jid);
 
77
                }
 
78
 
 
79
                Gtk::TreeModelColumn< std::string > jid;
 
80
        };
 
81
        BuddyListModel _blm;
 
82
 
 
83
        Gtk::Label _labels[2];  
 
84
        Gtk::ScrolledWindow _listwindow;
 
85
 
 
86
        Gtk::Button _share, _cancel;
 
87
 
 
88
        // Construction and callback
 
89
        void _construct();
 
90
        void _respCallback(int resp);
 
91
        void _listCallback();
 
92
 
 
93
        // Buddy list management
 
94
        void _fillBuddyList();
 
95
        void _insertBuddy(std::string const& jid);
 
96
        void _eraseBuddy(std::string const& jid);
 
97
 
 
98
        // SessionManager and SPDesktop pointers
 
99
        ::SPDesktop* _desktop;
 
100
        Whiteboard::SessionManager* _sm;
 
101
};
 
102
 
 
103
 
 
104
}
 
105
 
 
106
}
 
107
 
 
108
}
 
109
 
 
110
#endif