source: synfigstudio/trunk/fuentes/src/gui/adjust_window.h @ 481

Last change on this file since 481 was 481, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 2.9 KB
RevLine 
[481]1/* === S Y N F I G ========================================================= */
2/*!     \file adjust_window.h
3**      \brief Adjustment Window Header
4**
5**      $Id$
6**
7**      \legal
8**      Copyright (c) 2004 Adrian Bentley
9**
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.
14**
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.
19**      \endlegal
20*/
21/* ========================================================================= */
22
23/* === S T A R T =========================================================== */
24
25#ifndef __SYNFIG_TEMPLATE_H
26#define __SYNFIG_TEMPLATE_H
27
28/* === H E A D E R S ======================================================= */
29#include <gtkmm/adjustment.h>
30
31/* === M A C R O S ========================================================= */
32
33/* === T Y P E D E F S ===================================================== */
34
35/* === C L A S S E S & S T R U C T S ======================================= */
36
37namespace studio {
38
39/* Sets up an adjustment that controls/communicates with another adjustment
40        (could be expanded to multiple children)
41
42        The current value and pagesize define the lower and upper bounds of the
43        child adjustment.
44
45        NEED TO REPLACE FUNCTIONALITY IN:
46        refresh_rend_desc
47        refresh_time_window
48        on_time_changed - possibly....
49
50        time_zoom_in - possibly...
51        time_zoom_out - possibly...
52
53        play - possibly...
54
55        THINGS TO CHECK:
56        disp_audio's use of time_adjustment
57        children_tree's use of time_adjustment
58        layer_tree's use of time_adjustment
59*/
60class Adjust_Window : public Gtk::Adjustment
61{
62        Glib::RefPtr<Gtk::Adjustment> adj_child;
63
64        sigc::connection childchanged; //we only care about the non-value parts of the child
65
66        virtual void on_changed(); //value+pagesize corresponds to child upper
67        virtual void on_value_changed(); //value corresponds to child lower
68
69protected: //update interface
70        virtual void update_child();
71        virtual void update_fromchild();
72
73public: //structors
74        Adjust_Window(double value, double lower, double upper,
75                                  double step_increment=1, double page_increment=10, double page_size=0,
76                                  const Glib::RefPtr<Gtk::Adjustment> &adj = Glib::RefPtr<Gtk::Adjustment>());
77
78        virtual ~Adjust_Window();
79
80public: //child interface
81        Glib::RefPtr<Gtk::Adjustment> get_child_adjustment();
82        Glib::RefPtr<const Gtk::Adjustment> get_child_adjustment() const;
83        void set_child_adjustment(const Glib::RefPtr<Gtk::Adjustment> &child);
84
85public: //Sub value interface
86        double get_sub_lower() const;
87        double get_sub_upper() const;
88};
89
90}; // END of namespace studio
91
92/* === E N D =============================================================== */
93
94#endif
Note: See TracBrowser for help on using the repository browser.