1 /* === S Y N F I G ========================================================= */
2 /*! \file metadatatreestore.h
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
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.
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.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_STUDIO_METADATATREESTORE_H
26 #define __SYNFIG_STUDIO_METADATATREESTORE_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/treestore.h>
31 #include <synfigapp/canvasinterface.h>
32 #include <gdkmm/pixbuf.h>
33 #include <synfigapp/action.h>
35 /* === M A C R O S ========================================================= */
37 /* === T Y P E D E F S ===================================================== */
39 /* === C L A S S E S & S T R U C T S ======================================= */
41 namespace synfigapp { class CanvasInterface; }
45 class MetaDataTreeStore : virtual public Gtk::TreeStore
48 -- ** -- P U B L I C T Y P E S ---------------------------------------------
53 class Model : public Gtk::TreeModel::ColumnRecord
57 Gtk::TreeModelColumn<Glib::ustring> key;
58 Gtk::TreeModelColumn<Glib::ustring> data;
68 -- ** -- P U B L I C D A T A ------------------------------------------------
76 -- ** -- P R I V A T E D A T A ---------------------------------------------
81 etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_;
84 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
90 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
95 void meta_data_changed(synfig::String key);
98 -- ** -- P U B L I C M E T H O D S -----------------------------------------
103 ~MetaDataTreeStore();
105 etl::loose_handle<synfigapp::CanvasInterface> get_canvas_interface() { return canvas_interface_; }
106 etl::loose_handle<const synfigapp::CanvasInterface> get_canvas_interface()const { return canvas_interface_; }
107 synfig::Canvas::Handle get_canvas()const { return canvas_interface_->get_canvas(); }
108 synfig::Canvas::Handle get_canvas() { return canvas_interface_->get_canvas(); }
112 void refresh() { rebuild(); }
115 -- ** -- P R O T E C T E D M E T H O D S -----------------------------------
119 MetaDataTreeStore(etl::loose_handle<synfigapp::CanvasInterface>);
120 void get_value_vfunc (const Gtk::TreeModel::iterator& iter, int column, Glib::ValueBase& value)const;
121 void set_value_impl(const Gtk::TreeModel::iterator& iter, int column, const Glib::ValueBase& value);
125 static Glib::RefPtr<MetaDataTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface>);
127 }; // END of class MetaDataTreeStore
129 }; // END of namespace studio
131 /* === E N D =============================================================== */