my log
[synfig.git] / synfig-studio / trunk / src / gtkmm / dialog_soundselect.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file template.cpp
3 **      \brief Template File
4 **
5 **      $Id: dialog_soundselect.cpp,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 /* === H E A D E R S ======================================================= */
23
24 #ifdef USING_PCH
25 #       include "pch.h"
26 #else
27 #ifdef HAVE_CONFIG_H
28 #       include <config.h>
29 #endif
30
31 #include "dialog_soundselect.h"
32 #include <gtkmm/table.h>
33
34 #endif
35
36 /* === U S I N G =========================================================== */
37
38 using namespace std;
39 using namespace etl;
40 using namespace synfig;
41
42 /* === M A C R O S ========================================================= */
43
44 /* === G L O B A L S ======================================================= */
45
46 /* === P R O C E D U R E S ================================================= */
47
48 /* === M E T H O D S ======================================================= */
49
50 /* === E N T R Y P O I N T ================================================= */
51
52 studio::Dialog_SoundSelect::Dialog_SoundSelect(Gtk::Window &parent, etl::handle<synfigapp::CanvasInterface> ci)
53 :Dialog(_("Sound Select")),
54 okbutton(_("Ok")),
55 canvas_interface(ci)
56 {
57         Gtk::Table *table = manage(new Gtk::Table);
58
59         table->attach(soundfile,0,1,0,1);
60         table->attach(offset,1,2,0,1);
61         table->attach(okbutton,0,2,1,2);
62         
63         table->show_all();
64         get_vbox()->pack_start(*table);
65         
66         offset.set_value(0);
67         
68         okbutton.signal_clicked().connect(sigc::mem_fun(*this,&Dialog_SoundSelect::on_ok));
69 }
70
71 studio::Dialog_SoundSelect::~Dialog_SoundSelect()
72 {
73 }
74
75 void studio::Dialog_SoundSelect::on_file()
76 {
77         signal_file_changed_(soundfile.get_value());
78 }
79
80 void studio::Dialog_SoundSelect::on_offset()
81 {
82         signal_offset_changed_(offset.get_value());
83 }
84
85 void studio::Dialog_SoundSelect::on_ok()
86 {
87         hide();
88                 
89         //signal_finish_(a);
90         signal_file_changed_(soundfile.get_value());
91         signal_offset_changed_(offset.get_value());
92 }
93
94 void studio::Dialog_SoundSelect::set_global_fps(float f)
95 {
96         offset.set_fps(f);
97 }