1 /* === S Y N F I G ========================================================= */
6 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
8 ** This package is free software; you can redistribute it and/or
9 ** modify it under the terms of the GNU General Public License as
10 ** published by the Free Software Foundation; either version 2 of
11 ** the License, or (at your option) any later version.
13 ** This package is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ** General Public License for more details.
19 ** === N O T E S ===========================================================
21 ** ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_COMPVIEW_H
26 #define __SYNFIG_COMPVIEW_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/window.h>
31 #include <gtkmm/image.h>
32 #include <gtkmm/tooltips.h>
33 #include <gtkmm/table.h>
34 #include <gtkmm/button.h>
35 #include <gtkmm/menu.h>
36 #include <gtkmm/optionmenu.h>
37 #include <gtkmm/notebook.h>
38 #include <gtkmm/treeview.h>
39 #include <gtkmm/box.h>
43 #include "dialogsettings.h"
45 /* === M A C R O S ========================================================= */
47 /* === T Y P E D E F S ===================================================== */
49 /* === C L A S S E S & S T R U C T S ======================================= */
51 namespace synfig { class Canvas; };
58 class CompView : public Gtk::Window
60 DialogSettings dialog_settings;
62 Gtk::Tooltips tooltips;
64 Gtk::OptionMenu *instance_selector;
65 Gtk::Notebook *notebook;
67 Gtk::TreeView *canvas_tree;
68 Gtk::TreeView *action_tree;
70 Gtk::Menu instance_list_menu;
73 etl::loose_handle<studio::Instance> selected_instance;
75 void set_selected_instance_(etl::handle<studio::Instance> x);
84 etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
86 etl::loose_handle<synfig::Canvas> get_selected_canvas();
88 etl::loose_handle<studio::CanvasView> get_selected_canvas_view();
90 void set_selected_instance(etl::loose_handle<studio::Instance> x);
92 void set_selected_instance_signal(etl::handle<studio::Instance> x);
94 void new_instance(etl::handle<studio::Instance> x);
96 void delete_instance(etl::handle<studio::Instance> x);
98 void refresh_instances();
104 Gtk::Widget* create_canvas_tree();
105 Gtk::Widget* create_action_tree();
106 Gtk::Widget* create_instance_selector();
108 void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *);
109 bool on_tree_event(GdkEvent *event);
111 bool on_action_event(GdkEvent *event);
115 void menu_new_canvas();
119 void on_action_toggle(const Glib::ustring& path);
124 /* === E N D =============================================================== */