1 /* === S Y N F I G ========================================================= */
2 /*! \file childrentreestore.h
3 ** \brief Template Header
5 ** $Id: childrentreestore.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_CHILDRENTREESTORE_H
25 #define __SYNFIG_STUDIO_CHILDRENTREESTORE_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/treestore.h>
30 #include <synfigapp/canvasinterface.h>
31 #include "canvastreestore.h"
32 #include <synfig/value.h>
33 #include <synfig/valuenode.h>
36 /* === M A C R O S ========================================================= */
38 /* === T Y P E D E F S ===================================================== */
40 /* === C L A S S E S & S T R U C T S ======================================= */
44 class ChildrenTreeStore : public CanvasTreeStore
47 -- ** -- P U B L I C T Y P E S ---------------------------------------------
53 -- ** -- P U B L I C D A T A ------------------------------------------------
58 //! TreeModel for the layers
62 -- ** -- P R I V A T E D A T A ---------------------------------------------
67 Gtk::TreeModel::Row value_node_row;
68 Gtk::TreeModel::Row canvas_row;
70 std::set<synfig::ValueNode::Handle> changed_set_;
72 std::set<synfig::ValueNode::Handle> replaced_set_;
75 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
80 sigc::connection changed_connection;
81 bool execute_changed_queued()const { return !changed_set_.empty() || !replaced_set_.empty(); }
82 bool execute_changed_value_nodes();
83 void clear_changed_queue() { changed_set_.clear(); replaced_set_.clear(); }
86 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
91 void on_value_node_added(synfig::ValueNode::Handle value_node);
92 void on_value_node_deleted(synfig::ValueNode::Handle value_node);
93 void on_value_node_changed(synfig::ValueNode::Handle value_node);
94 void on_value_node_replaced(synfig::ValueNode::Handle replaced_value_node,synfig::ValueNode::Handle new_value_node);
95 void on_canvas_added(synfig::Canvas::Handle canvas);
96 void on_canvas_removed(synfig::Canvas::Handle canvas);
98 void set_value_impl(const Gtk::TreeModel::iterator& iter, int column, const Glib::ValueBase& value);
101 -- ** -- P U B L I C M E T H O D S -----------------------------------------
106 ChildrenTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
107 ~ChildrenTreeStore();
113 void rebuild_value_nodes();
115 void refresh_value_nodes();
117 void rebuild_canvases();
119 void refresh_canvases();
121 void refresh_row(Gtk::TreeModel::Row &row, bool do_children=false);
123 Gtk::TreeModel::Row get_canvas_row()const { return canvas_row; }
125 Gtk::TreeModel::Row get_value_node_row()const { return value_node_row; }
128 -- ** -- S T A T I C P U B L I C M E T H O D S ---------------------------
133 static Glib::RefPtr<ChildrenTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
134 }; // END of class ChildrenTreeStore
136 }; // END of namespace studio
138 /* === E N D =============================================================== */