1 /* === S Y N F I G ========================================================= */
2 /*! \file childrentree.h
3 ** \brief Template Header
5 ** $Id: childrentree.h,v 1.1.1.1 2005/01/07 03:34:36 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 __SYNFIG_STUDIO_CHILDRENTREE_H
25 #define __SYNFIG_STUDIO_CHILDRENTREE_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/treeview.h>
30 #include <gtkmm/treestore.h>
31 #include <gtkmm/tooltips.h>
32 #include <gtkmm/table.h>
33 #include <gtkmm/box.h>
34 #include <gtkmm/adjustment.h>
35 #include <gtkmm/scale.h>
36 #include <gtkmm/button.h>
38 #include <synfigapp/canvasinterface.h>
39 #include <synfigapp/value_desc.h>
40 #include "childrentreestore.h"
41 #include <synfig/valuenode_animated.h>
43 #include "widget_value.h"
45 /* === M A C R O S ========================================================= */
47 /* === T Y P E D E F S ===================================================== */
49 /* === C L A S S E S & S T R U C T S ======================================= */
53 class CellRenderer_TimeTrack;
54 class CellRenderer_ValueBase;
56 class ChildrenTree : public Gtk::Table
59 -- ** -- P U B L I C T Y P E S ---------------------------------------------
64 typedef studio::ColumnID ColumnID;
67 -- ** -- P U B L I C D A T A ------------------------------------------------
72 ChildrenTreeStore::Model model;
75 -- ** -- P R I V A T E D A T A ---------------------------------------------
80 Gtk::Tooltips tooltips_;
82 Gtk::TreePath last_tooltip_path;
84 Gtk::TreeView tree_view;
88 Glib::RefPtr<ChildrenTreeStore> children_tree_store_;
90 CellRenderer_TimeTrack *cellrenderer_time_track;
92 Gtk::TreeView::Column* column_time_track;
94 CellRenderer_ValueBase *cellrenderer_value;
96 sigc::signal<void,synfigapp::ValueDesc,synfig::ValueBase> signal_edited_value_;
98 sigc::signal<bool, int, Gtk::TreeRow, ColumnID> signal_user_click_;
100 sigc::signal<void,synfigapp::ValueDesc,synfig::Waypoint, int> signal_waypoint_clicked_;
102 Gtk::Button *button_raise;
103 Gtk::Button *button_lower;
104 Gtk::Button *button_duplicate;
105 Gtk::Button *button_delete;
107 Widget_ValueBase blend_method_widget;
110 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
116 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
121 void on_edited_value(const Glib::ustring&path_string,synfig::ValueBase value);
123 void on_waypoint_clicked(const Glib::ustring &, synfig::Waypoint,int button);
125 bool on_tree_event(GdkEvent *event);
127 void on_selection_changed();
129 void on_dirty_preview();
131 void on_raise_pressed();
133 void on_lower_pressed();
135 void on_duplicate_pressed();
137 void on_delete_pressed();
140 -- ** -- P U B L I C M E T H O D S -----------------------------------------
145 Gtk::HBox& get_hbox() { return *hbox; }
147 Gtk::TreeView& get_tree_view() { return tree_view; }
149 Glib::RefPtr<Gtk::TreeSelection> get_selection() { return tree_view.get_selection(); }
150 Glib::SignalProxy1< bool,GdkEvent* > signal_event () { return tree_view.signal_event(); }
155 void set_model(Glib::RefPtr<ChildrenTreeStore> children_tree_store_);
157 void set_time_adjustment(Gtk::Adjustment &adjustment);
159 void set_show_timetrack(bool x=true);
161 //! Signal called with a value has been edited.
162 sigc::signal<void,synfigapp::ValueDesc,synfig::ValueBase>& signal_edited_value() { return signal_edited_value_; }
164 sigc::signal<bool,int, Gtk::TreeRow, ColumnID>& signal_user_click() { return signal_user_click_; }
166 sigc::signal<void,synfigapp::ValueDesc,synfig::Waypoint, int>& signal_waypoint_clicked() { return signal_waypoint_clicked_; }
168 etl::handle<synfigapp::SelectionManager> get_selection_manager() { return children_tree_store_->canvas_interface()->get_selection_manager(); }
170 }; // END of ChildrenTree
172 }; // END of namespace studio
174 /* === E N D =============================================================== */