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