Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / synfigstudio_0_61_06 / src / gtkmm / canvasproperties.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file canvasproperties.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
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.
14 **
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.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === S T A R T =========================================================== */
24
25 #ifndef __SYNFIG_GTKMM_CANVASPROPERTIES_H
26 #define __SYNFIG_GTKMM_CANVASPROPERTIES_H
27
28 /* === H E A D E R S ======================================================= */
29
30 #include <ETL/handle>
31
32 #include <gtkmm/dialog.h>
33 #include <gtkmm/tooltips.h>
34 #include <gtkmm/table.h>
35 #include <gtkmm/entry.h>
36 #include <gtkmm/tooltips.h>
37
38 #include "renddesc.h"
39
40 /* === M A C R O S ========================================================= */
41
42 /* === T Y P E D E F S ===================================================== */
43
44 /* === C L A S S E S & S T R U C T S ======================================= */
45
46 namespace Gtk { class TreeView; };
47 namespace synfigapp { class CanvasInterface; };
48
49 namespace studio
50 {
51 class CanvasProperties  :  public Gtk::Dialog
52 {
53         Gtk::Tooltips tooltips;
54
55         etl::handle<synfigapp::CanvasInterface> canvas_interface_;
56         Widget_RendDesc widget_rend_desc;
57         Gtk::Entry entry_id;
58         Gtk::Entry entry_name;
59         Gtk::Entry entry_description;
60
61         bool dirty_rend_desc;
62
63         Gtk::TreeView* meta_data_tree_view;
64         void on_button_meta_data_add();
65         void on_button_meta_data_delete();
66
67 public:
68         CanvasProperties(Gtk::Window& parent,etl::handle<synfigapp::CanvasInterface> canvas_interface);
69         ~CanvasProperties();
70
71         void refresh();
72         void update_title();
73 private:
74         void on_rend_desc_changed();
75
76         Gtk::Widget& create_meta_data_view();
77
78         void on_ok_pressed();
79         void on_apply_pressed();
80         void on_cancel_pressed();
81 }; // END of class CanvasProperties
82
83 }; // END of namespace studio
84
85 /* === E N D =============================================================== */
86
87 #endif