1 /* === S Y N F I G ========================================================= */
2 /*! \file adjust_window.h
3 ** \brief Adjustment Window Header
5 ** $Id: adjust_window.h,v 1.1.1.1 2005/01/07 03:34:35 darco Exp $
8 ** Copyright (c) 2004 Adrian Bentley
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.
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.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_TEMPLATE_H
26 #define __SYNFIG_TEMPLATE_H
28 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/adjustment.h>
31 /* === M A C R O S ========================================================= */
33 /* === T Y P E D E F S ===================================================== */
35 /* === C L A S S E S & S T R U C T S ======================================= */
39 /* Sets up an adjustment that controls/communicates with another adjustment
40 (could be expanded to multiple children)
42 The current value and pagesize define the lower and upper bounds of the
45 NEED TO REPLACE FUNCTIONALITY IN:
48 on_time_changed - possibly....
50 time_zoom_in - possibly...
51 time_zoom_out - possibly...
56 disp_audio's use of time_adjustment
57 children_tree's use of time_adjustment
58 layer_tree's use of time_adjustment
60 class Adjust_Window : public Gtk::Adjustment
62 Gtk::Adjustment *adj_child;
64 sigc::connection childchanged; //we only care about the non-value parts of the child
66 virtual void on_changed(); //value+pagesize corresponds to child upper
67 virtual void on_value_changed(); //value corresponds to child lower
69 protected: //update interface
70 virtual void update_child();
71 virtual void update_fromchild();
74 Adjust_Window(double value, double lower, double upper,
75 double step_increment=1, double page_increment=10, double page_size=0,
76 Gtk::Adjustment *adj = 0);
78 virtual ~Adjust_Window();
80 public: //child interface
81 Gtk::Adjustment *get_child_adjustment();
82 const Gtk::Adjustment *get_child_adjustment() const;
83 void set_child_adjustment(Gtk::Adjustment *child);
85 public: //Sub value interface
86 double get_sub_lower() const;
87 double get_sub_upper() const;
90 }; // END of namespace studio
92 /* === E N D =============================================================== */