- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# layerparamtreestore.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00022 /* ========================================================================= */
    00023
    00024 /* === S T A R T =========================================================== */
    00025
    00026 #ifndef __SYNFIG_STUDIO_LAYERPARAMTREESTORE_H
    00027 #define __SYNFIG_STUDIO_LAYERPARAMTREESTORE_H
    00028
    00029 /* === H E A D E R S ======================================================= */
    00030
    00031 #include <gtkmm/treestore.h>
    00032 #include <synfigapp/canvasinterface.h>
    00033 #include "canvastreestore.h"
    00034 #include <synfig/value.h>
    00035 #include <synfig/valuenode.h>
    00036 #include <synfig/paramdesc.h>
    00037
    00038 /* === M A C R O S ========================================================= */
    00039
    00040 /* === T Y P E D E F S ===================================================== */
    00041
    00042 /* === C L A S S E S & S T R U C T S ======================================= */
    00043
    00044 namespace studio {
    00045
    00046 class LayerTree;
    00047
    00048 class LayerParamTreeStore : public CanvasTreeStore
    00049 {
    00050     /*
    00051  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
    00052     */
    00053
    00054 public:
    00055     typedef std::list<synfig::Layer::Handle> LayerList;
    00056
    00057     /*
    00058  -- ** -- P U B L I C  D A T A ------------------------------------------------
    00059     */
    00060
    00061 public:
    00062
    00064     class Model : public CanvasTreeStore::Model
    00065     {
    00066     public:
    00067
    00068         Gtk::TreeModelColumn<synfig::ParamDesc> param_desc;
    00069
    00070         Gtk::TreeModelColumn<bool>  is_inconsistent;
    00071         Gtk::TreeModelColumn<bool>  is_toplevel;
    00072
    00073         Model()
    00074         {
    00075             add(param_desc);
    00076             add(is_inconsistent);
    00077             add(is_toplevel);
    00078         }
    00079     };
    00080
    00081     Model model;
    00082
    00083
    00084     /*
    00085  -- ** -- P R I V A T E   D A T A ---------------------------------------------
    00086     */
    00087
    00088 private:
    00089
    00090     int queued;
    00091
    00092     LayerTree* layer_tree;
    00093
    00094     LayerList layer_list;
    00095
    00096     sigc::connection queue_connection;
    00097
    00098     std::list<sigc::connection> changed_connection_list;
    00099
    00100     sigc::signal<void> signal_changed_;
    00101
    00102     /*
    00103  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
    00104     */
    00105
    00106 private:
    00107
    00108 protected:
    00109     virtual void  get_value_vfunc (const Gtk::TreeModel::iterator& iter, int column, Glib::ValueBase& value)const;
    00110     virtual void set_value_impl (const Gtk::TreeModel::iterator& row, int column, const Glib::ValueBase& value);
    00111     virtual void set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc);
    00112
    00113     /*
    00114  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
    00115     */
    00116
    00117 private:
    00118
    00119     void on_value_node_child_added(synfig::ValueNode::Handle value_node,synfig::ValueNode::Handle child);
    00120     void on_value_node_child_removed(synfig::ValueNode::Handle value_node,synfig::ValueNode::Handle child);
    00121
    00122     void on_value_node_added(synfig::ValueNode::Handle value_node);
    00123     void on_value_node_deleted(synfig::ValueNode::Handle value_node);
    00124     virtual void on_value_node_changed(synfig::ValueNode::Handle value_node);
    00125     virtual void on_value_node_renamed(synfig::ValueNode::Handle value_node);
    00126     void on_value_node_replaced(synfig::ValueNode::Handle replaced_value_node,synfig::ValueNode::Handle new_value_node);
    00127     void on_layer_param_changed(synfig::Layer::Handle handle,synfig::String param_name);
    00128
    00129     /*
    00130  -- ** -- P U B L I C   M E T H O D S -----------------------------------------
    00131     */
    00132
    00133 public:
    00134
    00135     LayerParamTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_,
    00136         LayerTree* layer_tree);
    00137     ~LayerParamTreeStore();
    00138
    00139     void rebuild();
    00140
    00141     void refresh();
    00142
    00143     void queue_refresh();
    00144
    00145     void queue_rebuild();
    00146
    00147     void refresh_row(Gtk::TreeModel::Row &row);
    00148
    00149     sigc::signal<void>& signal_changed() { return signal_changed_; }
    00150
    00151     void changed() { signal_changed_(); }
    00152
    00153     /*
    00154  -- ** -- S T A T I C   P U B L I C   M E T H O D S ---------------------------
    00155     */
    00156
    00157 public:
    00158
    00159     static Glib::RefPtr<LayerParamTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_, LayerTree*layer_tree);
    00160 }; // END of class LayerParamTreeStore
    00161
    00162 }; // END of namespace studio
    00163
    00164 /* === E N D =============================================================== */
    00165
    00166 #endif