Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / stable / src / gtkmm / dialog_soundselect.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dialog_soundselect.h
3 **      \brief Sound Select Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **      Copyright (c) 2008 David Roden
10 **
11 **      This package is free software; you can redistribute it and/or
12 **      modify it under the terms of the GNU General Public License as
13 **      published by the Free Software Foundation; either version 2 of
14 **      the License, or (at your option) any later version.
15 **
16 **      This package is distributed in the hope that it will be useful,
17 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
18 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 **      General Public License for more details.
20 **      \endlegal
21 */
22 /* ========================================================================= */
23
24 /* === S T A R T =========================================================== */
25
26 #ifndef __SYNFIG_DIALOG_SOUNDSELECT_H
27 #define __SYNFIG_DIALOG_SOUNDSELECT_H
28
29 /* === H E A D E R S ======================================================= */
30 #include "dockdialog.h"
31 #include "widget_filename.h"
32 #include "widget_time.h"
33
34 #include <synfigapp/canvasinterface.h>
35
36 /* === M A C R O S ========================================================= */
37
38 /* === T Y P E D E F S ===================================================== */
39
40 /* === C L A S S E S & S T R U C T S ======================================= */
41
42 namespace studio {
43
44 struct AudioBaseInfo
45 {
46         std::string             file;
47         synfig::Time            offset;
48 };
49
50 class Dialog_SoundSelect : public Gtk::Dialog
51 {
52         Widget_Filename         soundfile;
53         Widget_Time                     offset;
54         Gtk::Button                     *okbutton;
55
56         etl::handle<synfigapp::CanvasInterface> canvas_interface;
57
58         sigc::signal<void,const std::string &>  signal_file_changed_;
59         sigc::signal<void,const synfig::Time &> signal_offset_changed_;
60
61         void on_file();
62         void on_offset();
63         void on_ok();
64
65 public:
66         Dialog_SoundSelect(Gtk::Window &parent,etl::handle<synfigapp::CanvasInterface> ci );
67         ~Dialog_SoundSelect();
68
69         //float get_global_fps() const { return globalfps; }
70         void set_global_fps(float f);
71
72         synfig::Time get_offset() const { return offset.get_value(); }
73         void set_offset(const synfig::Time &t) {offset.set_value(t); }
74
75         std::string get_file() const { return soundfile.get_value(); }
76         void set_file(const std::string &f) {soundfile.set_value(f); }
77
78         sigc::signal<void,const std::string &> &signal_file_changed() { return signal_file_changed_; }
79         sigc::signal<void,const synfig::Time &> &signal_offset_changed() { return signal_offset_changed_; }
80 };
81
82 }; // END of namespace studio
83
84 /* === E N D =============================================================== */
85
86 #endif