1 /* === S Y N F I G ========================================================= */
2 /*! \file layergrouptree.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_LAYERGROUPTREE_H
26 #define __SYNFIG_STUDIO_LAYERGROUPTREE_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/treeview.h>
31 #include <gtkmm/treestore.h>
32 #include <synfigapp/canvasinterface.h>
33 #include <synfigapp/value_desc.h>
34 #include "layergrouptreestore.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 ======================================= */
42 namespace synfig { class Layer; }
46 class LayerGroupTree : public Gtk::TreeView
49 -- ** -- P U B L I C T Y P E S ---------------------------------------------
54 typedef std::list<synfig::Layer::Handle> LayerList;
57 -- ** -- P U B L I C D A T A ------------------------------------------------
62 LayerGroupTreeStore::Model model;
65 -- ** -- P R I V A T E D A T A ---------------------------------------------
70 Glib::RefPtr<LayerGroupTreeStore> layer_group_tree_store_;
72 Gtk::CellRendererText *cell_renderer_description;
77 sigc::signal<void,etl::handle<synfig::Layer> > signal_popup_layer_menu_;
79 // sigc::signal<void,LayerList> signal_select_layers_;
80 Gtk::TreeView::Column* label_column;
83 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
89 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
94 bool on_event(GdkEvent *event);
97 -- ** -- P U B L I C M E T H O D S -----------------------------------------
104 void set_cursor(const Gtk::TreeModel::Path& path, bool start_editing=false);
106 Glib::RefPtr<LayerGroupTreeStore> get_model() { return layer_group_tree_store_; }
108 sigc::signal<void,etl::handle<synfig::Layer> >& signal_popup_layer_menu() { return signal_popup_layer_menu_; }
110 // sigc::signal<void,LayerList>& signal_select_layers() { return signal_select_layers_; }
112 void set_model(Glib::RefPtr<LayerGroupTreeStore> layer_group_tree_store_);
114 void set_editable(bool x=true);
116 bool get_editable()const { return editable_; }
118 std::list<synfig::String> get_selected_groups()const;
120 LayerList get_selected_layers()const;
121 }; // END of LayerGroupTree
123 }; // END of namespace studio
125 /* === E N D =============================================================== */