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