1 /* === S I N F G =========================================================== */
2 /*! \file widget_sound.h
3 ** \brief Widget Sound Header
5 ** $Id: widget_sound.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
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.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SINFG_WIDGET_SOUND_H
25 #define __SINFG_WIDGET_SOUND_H
27 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/drawingarea.h>
32 #include "widget_timeslider.h"
34 /* === M A C R O S ========================================================= */
36 /* === T Y P E D E F S ===================================================== */
38 /* === C L A S S E S & S T R U C T S ======================================= */
45 /* What can widget sound do?
47 1. Just draw the sound
48 2. Scroll time and draw the sound
49 3. Play, stop, and scrub the sound... (full interaction...)
50 4. Provide hooks for scrubbing to work... (and possibly play and stop in the future)
52 Going with 4 for now...
54 class Widget_Sound : public Widget_Timeslider
56 etl::handle<AudioProfile> audioprof;
58 //event override interface
59 virtual bool on_expose_event(GdkEventExpose *heh = 0);
61 //for scrubbing... (click is start, drag is scrub, and release is stop...)
62 virtual bool on_motion_notify_event(GdkEventMotion* event);
63 virtual bool on_button_press_event(GdkEventButton *event);
64 virtual bool on_button_release_event(GdkEventButton *event);
66 //Might want a signal setup for scrubbing... and here it is
67 sigc::signal1<void,double> signal_start_scrubbing_;
68 sigc::signal1<void,double> signal_scrub_;
69 sigc::signal0<void> signal_stop_scrubbing_;
76 bool set_profile(etl::handle<AudioProfile> p);
77 etl::handle<AudioProfile> get_profile() const;
79 //for signal interface
80 sigc::signal1<void,double> & signal_start_scrubbing() {return signal_start_scrubbing_;}
81 sigc::signal1<void,double> & signal_scrub() {return signal_scrub_;}
82 sigc::signal0<void> & signal_stop_scrubbing() {return signal_stop_scrubbing_;}
84 public: //get set interface
85 void set_position(double t);
86 double get_position() const;
94 }; // END of namespace studio
96 /* === E N D =============================================================== */