1 /**
2 * Whiteboard session playback control dialog
3 *
4 * Authors:
5 * David Yip <yipdw@rose-hulman.edu>
6 *
7 * Copyright (c) 2005 Authors
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
12 #ifndef __SESSION_PLAYBACK_DIALOG_H__
13 #define __SESSION_PLAYBACK_DIALOG_H__
15 #include "verbs.h"
16 #include "dialog.h"
18 #include "gtkmm/toolbutton.h"
19 #include "gtkmm/toolbar.h"
20 #include "gtkmm/expander.h"
22 #include "ui/widget/icon-widget.h"
24 struct SPDesktop;
26 namespace Inkscape {
28 namespace Whiteboard {
30 class SessionManager;
31 class SessionFilePlayer;
33 }
35 namespace UI {
37 namespace Dialog {
39 class SessionPlaybackDialog : public Dialog {
40 public:
41 SessionPlaybackDialog() : Dialog("dialogs.session_playback", SP_VERB_DIALOG_WHITEBOARD_SESSIONPLAYBACK)
42 {
44 }
46 static SessionPlaybackDialog* create();
48 virtual ~SessionPlaybackDialog()
49 {
51 }
52 private:
53 SessionPlaybackDialog(SessionPlaybackDialog const& dlg); // no copy
54 void operator=(SessionPlaybackDialog const& dlg); // no assign
55 };
57 class SessionPlaybackDialogImpl : public SessionPlaybackDialog {
58 public:
59 SessionPlaybackDialogImpl();
60 ~SessionPlaybackDialogImpl();
62 private:
63 // GTK+ widgets
64 Gtk::HBox _filebox;
65 Gtk::HBox _filebuttons;
66 Gtk::HBox _toolbarbox;
67 Gtk::HBox _delaybox;
69 Gtk::Entry _openfile;
71 Gtk::Label _labels[2];
72 Gtk::ToolButton _controls[5];
74 Gtk::Button _close, _open, _setdelay;
76 Gtk::Tooltips _tooltips;
77 Gtk::Toolbar _playbackcontrols;
78 Gtk::Adjustment _delay;
79 Gtk::SpinButton _delayentry;
81 Gtk::Frame _filemanager;
82 Gtk::VBox _fm;
84 Gtk::Frame _playback;
86 Gtk::Expander _currentmsgbox;
87 Glib::RefPtr<Gtk::TextBuffer> _currentmsgbuffer;
88 Gtk::TextView _currentmsgview;
89 Gtk::ScrolledWindow _currentmsgscroller;
91 // Construction and callback
92 void _construct();
93 void _respCallback(int resp);
95 // SessionManager and SPDesktop pointers
96 ::SPDesktop* _desktop;
97 Whiteboard::SessionManager* _sm;
98 Whiteboard::SessionFilePlayer* _sfp;
100 // button values
101 static unsigned short const CLOSE_FILE = 0;
102 static unsigned short const OPEN_FILE = 1;
103 static unsigned short const RESET_DELAY = 2;
105 static unsigned short const TOOLBAR_BASE = 10;
106 static unsigned short const REWIND = TOOLBAR_BASE + 0;
107 static unsigned short const STEP_REWIND = TOOLBAR_BASE + 1;
108 static unsigned short const PAUSE = TOOLBAR_BASE + 2;
109 static unsigned short const STEP_PLAY = TOOLBAR_BASE + 3;
110 static unsigned short const PLAY = TOOLBAR_BASE + 4;
113 // noncopyable
114 SessionPlaybackDialogImpl(SessionPlaybackDialogImpl const& dlg); // no copy
115 void operator=(SessionPlaybackDialogImpl const& dlg); // no assign
116 };
118 }
120 }
122 }
124 #endif