1 /* === S Y N F I G ========================================================= */
2 /*! \file layerparamtreestore.h
3 ** \brief Template Header
5 ** $Id: layerparamtreestore.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_LAYERPARAMTREESTORE_H
25 #define __SYNFIG_STUDIO_LAYERPARAMTREESTORE_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>
34 #include <synfig/paramdesc.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 ======================================= */
46 class LayerParamTreeStore : public CanvasTreeStore
49 -- ** -- P U B L I C T Y P E S ---------------------------------------------
53 typedef std::list<synfig::Layer::Handle> LayerList;
56 -- ** -- P U B L I C D A T A ------------------------------------------------
61 //! TreeModel for the layer parameters
62 class Model : public CanvasTreeStore::Model
66 Gtk::TreeModelColumn<synfig::ParamDesc> param_desc;
68 Gtk::TreeModelColumn<bool> is_inconsistent;
69 Gtk::TreeModelColumn<bool> is_toplevel;
83 -- ** -- P R I V A T E D A T A ---------------------------------------------
90 LayerTree* layer_tree;
94 sigc::connection queue_connection;
96 std::list<sigc::connection> changed_connection_list;
98 sigc::signal<void> signal_changed_;
101 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
107 virtual void get_value_vfunc (const Gtk::TreeModel::iterator& iter, int column, Glib::ValueBase& value)const;
108 virtual void set_value_impl (const Gtk::TreeModel::iterator& row, int column, const Glib::ValueBase& value);
109 virtual void set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc);
112 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
117 void on_value_node_child_added(synfig::ValueNode::Handle value_node,synfig::ValueNode::Handle child);
118 void on_value_node_child_removed(synfig::ValueNode::Handle value_node,synfig::ValueNode::Handle child);
120 void on_value_node_added(synfig::ValueNode::Handle value_node);
121 void on_value_node_deleted(synfig::ValueNode::Handle value_node);
122 virtual void on_value_node_changed(synfig::ValueNode::Handle value_node);
123 void on_value_node_replaced(synfig::ValueNode::Handle replaced_value_node,synfig::ValueNode::Handle new_value_node);
124 void on_layer_param_changed(synfig::Layer::Handle handle,synfig::String param_name);
127 -- ** -- P U B L I C M E T H O D S -----------------------------------------
132 LayerParamTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_,
133 LayerTree* layer_tree);
134 ~LayerParamTreeStore();
140 void queue_refresh();
142 void queue_rebuild();
144 void refresh_row(Gtk::TreeModel::Row &row);
146 sigc::signal<void>& signal_changed() { return signal_changed_; }
148 void changed() { signal_changed_(); }
151 -- ** -- S T A T I C P U B L I C M E T H O D S ---------------------------
156 static Glib::RefPtr<LayerParamTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_, LayerTree*layer_tree);
157 }; // END of class LayerParamTreeStore
159 }; // END of namespace studio
161 /* === E N D =============================================================== */