1 /** @file
2 * @brief Whiteboard session playback control dialog
3 */
4 /* Authors:
5 * David Yip <yipdw@rose-hulman.edu>
6 *
7 * Copyright (c) 2005 Authors
8 * Released under GNU GPL, read the file 'COPYING' for more information
9 */
11 #ifndef __SESSION_PLAYBACK_DIALOG_H__
12 #define __SESSION_PLAYBACK_DIALOG_H__
14 #include "verbs.h"
15 #include "dialog.h"
17 #include "gtkmm/toolbutton.h"
18 #include "gtkmm/toolbar.h"
19 #include "gtkmm/expander.h"
21 #include "ui/widget/icon-widget.h"
23 struct SPDesktop;
25 namespace Inkscape {
27 namespace Whiteboard {
29 class SessionManager;
30 class SessionFilePlayer;
32 }
34 namespace UI {
36 namespace Dialog {
38 class SessionPlaybackDialog : public Dialog {
39 public:
40 SessionPlaybackDialog() : Dialog("/dialogs/session_playback", SP_VERB_DIALOG_WHITEBOARD_SESSIONPLAYBACK)
41 {
43 }
45 static SessionPlaybackDialog* create();
47 virtual ~SessionPlaybackDialog()
48 {
50 }
51 private:
52 SessionPlaybackDialog(SessionPlaybackDialog const& dlg); // no copy
53 void operator=(SessionPlaybackDialog const& dlg); // no assign
54 };
56 class SessionPlaybackDialogImpl : public SessionPlaybackDialog {
57 public:
58 SessionPlaybackDialogImpl();
59 ~SessionPlaybackDialogImpl();
61 private:
62 // GTK+ widgets
63 Gtk::HBox _filebox;
64 Gtk::HBox _filebuttons;
65 Gtk::HBox _toolbarbox;
66 Gtk::HBox _delaybox;
68 Gtk::Entry _openfile;
70 Gtk::Label _labels[2];
71 Gtk::ToolButton _controls[5];
73 Gtk::Button _close, _open, _setdelay;
75 Gtk::Tooltips _tooltips;
76 Gtk::Toolbar _playbackcontrols;
77 Gtk::Adjustment _delay;
78 Gtk::SpinButton _delayentry;
80 Gtk::Frame _filemanager;
81 Gtk::VBox _fm;
83 Gtk::Frame _playback;
85 Gtk::Expander _currentmsgbox;
86 Glib::RefPtr<Gtk::TextBuffer> _currentmsgbuffer;
87 Gtk::TextView _currentmsgview;
88 Gtk::ScrolledWindow _currentmsgscroller;
90 // Construction and callback
91 void _construct();
92 void _respCallback(int resp);
94 // SessionManager and SPDesktop pointers
95 ::SPDesktop* _desktop;
96 Whiteboard::SessionManager* _sm;
97 Whiteboard::SessionFilePlayer* _sfp;
99 // button values
100 static unsigned short const CLOSE_FILE = 0;
101 static unsigned short const OPEN_FILE = 1;
102 static unsigned short const RESET_DELAY = 2;
104 static unsigned short const TOOLBAR_BASE = 10;
105 static unsigned short const REWIND = TOOLBAR_BASE + 0;
106 static unsigned short const STEP_REWIND = TOOLBAR_BASE + 1;
107 static unsigned short const PAUSE = TOOLBAR_BASE + 2;
108 static unsigned short const STEP_PLAY = TOOLBAR_BASE + 3;
109 static unsigned short const PLAY = TOOLBAR_BASE + 4;
112 // noncopyable
113 SessionPlaybackDialogImpl(SessionPlaybackDialogImpl const& dlg); // no copy
114 void operator=(SessionPlaybackDialogImpl const& dlg); // no assign
115 };
117 }
119 }
121 }
123 #endif
125 /*
126 Local Variables:
127 mode:c++
128 c-file-style:"stroustrup"
129 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
130 indent-tabs-mode:nil
131 fill-column:99
132 End:
133 */
134 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :