initial version
[synfig.git] / synfig-studio / trunk / src / gtkmm / widget_curves.h
1 /* === S I N F G =========================================================== */
2 /*!     \file widget_curves.h
3 **      \brief Template Header
4 **
5 **      $Id: widget_curves.h,v 1.1.1.1 2005/01/07 03:34:37 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_STUDIO_WIDGET_CURVES_H
25 #define __SINFG_STUDIO_WIDGET_CURVES_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <gtkmm/box.h>
30 #include <gtkmm/table.h>
31 #include <gtkmm/spinbutton.h>
32 #include <gtkmm/adjustment.h>
33 #include <gtkmm/drawingarea.h>
34 #include <gtkmm/layout.h>
35 #include <sinfg/color.h>
36 #include <sinfgapp/value_desc.h>
37 #include <list>
38
39 /* === M A C R O S ========================================================= */
40
41 /* === T Y P E D E F S ===================================================== */
42
43 /* === C L A S S E S & S T R U C T S ======================================= */
44
45 namespace studio {
46
47 class Widget_Curves : public Gtk::DrawingArea
48 {
49         struct Channel;
50         struct CurveStruct;
51
52         Gtk::Adjustment* time_adjustment_;
53         Gtk::Adjustment* range_adjustment_;
54                 
55         std::list<CurveStruct> curve_list_;
56         
57 public:
58
59         Widget_Curves();
60         ~Widget_Curves();
61
62         void set_value_descs(std::list<sinfgapp::ValueDesc> value_descs);
63         void clear();
64         void refresh();
65
66         Gtk::Adjustment& get_range_adjustment() { return *range_adjustment_; }
67         Gtk::Adjustment& get_time_adjustment() { return *time_adjustment_; }
68         void set_time_adjustment(Gtk::Adjustment&);
69
70 private:
71         bool redraw(GdkEventExpose*bleh);
72         bool on_event(GdkEvent *event);
73
74 }; // END of class Widget_Curves
75         
76 }; // END of namespace studio
77
78 /* === E N D =============================================================== */
79
80 #endif