initial version
[synfig.git] / synfig-studio / trunk / src / gtkmm / dialog_soundselect.h
1 /* === S I N F 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 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SINFG_DIALOG_SOUNDSELECT_H
25 #define __SINFG_DIALOG_SOUNDSELECT_H
26
27 /* === H E A D E R S ======================================================= */
28 #include "dockdialog.h"
29 #include "widget_filename.h"
30 #include "widget_time.h"
31
32 #include <sinfgapp/canvasinterface.h>
33
34 /* === M A C R O S ========================================================= */
35
36 /* === T Y P E D E F S ===================================================== */
37
38 /* === C L A S S E S & S T R U C T S ======================================= */
39
40 namespace studio {
41
42 struct AudioBaseInfo
43 {
44         std::string             file;
45         sinfg::Time             offset;
46 };
47         
48 class Dialog_SoundSelect : public Gtk::Dialog
49 {
50         Widget_Filename         soundfile;
51         Widget_Time                     offset;
52         Gtk::Button                     okbutton;
53         
54         etl::handle<sinfgapp::CanvasInterface> canvas_interface;
55         
56         sigc::signal<void,const std::string &>  signal_file_changed_;
57         sigc::signal<void,const sinfg::Time &>  signal_offset_changed_;
58         
59         void on_file();
60         void on_offset();
61         void on_ok();
62         
63 public:
64         Dialog_SoundSelect(Gtk::Window &parent,etl::handle<sinfgapp::CanvasInterface> ci );
65         ~Dialog_SoundSelect();
66
67         //float get_global_fps() const { return globalfps; }
68         void set_global_fps(float f);
69
70         sinfg::Time get_offset() const { return offset.get_value(); }
71         void set_offset(const sinfg::Time &t) {offset.set_value(t); }
72         
73         std::string get_file() const { return soundfile.get_value(); }
74         void set_file(const std::string &f) {soundfile.set_value(f); }
75         
76         sigc::signal<void,const std::string &> &signal_file_changed() { return signal_file_changed_; }
77         sigc::signal<void,const sinfg::Time &> &signal_offset_changed() { return signal_offset_changed_; }
78 };
79         
80 }; // END of namespace studio
81
82 /* === E N D =============================================================== */
83
84 #endif