1 /*! ========================================================================
3 ** Template Header File
4 ** $Id: compview.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
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.
18 ** === N O T E S ===========================================================
20 ** ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_COMPVIEW_H
25 #define __SYNFIG_COMPVIEW_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/window.h>
30 #include <gtkmm/image.h>
31 #include <gtkmm/tooltips.h>
32 #include <gtkmm/table.h>
33 #include <gtkmm/button.h>
34 #include <gtkmm/menu.h>
35 #include <gtkmm/optionmenu.h>
36 #include <gtkmm/notebook.h>
37 #include <gtkmm/treeview.h>
38 #include <gtkmm/box.h>
42 #include "dialogsettings.h"
44 /* === M A C R O S ========================================================= */
46 /* === T Y P E D E F S ===================================================== */
48 /* === C L A S S E S & S T R U C T S ======================================= */
50 namespace synfig { class Canvas; };
57 class CompView : public Gtk::Window
59 DialogSettings dialog_settings;
61 Gtk::Tooltips tooltips;
63 Gtk::OptionMenu *instance_selector;
64 Gtk::Notebook *notebook;
66 Gtk::TreeView *canvas_tree;
67 Gtk::TreeView *action_tree;
69 Gtk::Menu instance_list_menu;
72 etl::loose_handle<studio::Instance> selected_instance;
74 void set_selected_instance_(etl::handle<studio::Instance> x);
83 etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
85 etl::loose_handle<synfig::Canvas> get_selected_canvas();
87 etl::loose_handle<studio::CanvasView> get_selected_canvas_view();
89 void set_selected_instance(etl::loose_handle<studio::Instance> x);
91 void set_selected_instance_signal(etl::handle<studio::Instance> x);
93 void new_instance(etl::handle<studio::Instance> x);
95 void delete_instance(etl::handle<studio::Instance> x);
97 void refresh_instances();
103 Gtk::Widget* create_canvas_tree();
104 Gtk::Widget* create_action_tree();
105 Gtk::Widget* create_instance_selector();
107 void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *);
108 bool on_tree_event(GdkEvent *event);
110 bool on_action_event(GdkEvent *event);
114 void menu_new_canvas();
118 void on_action_toggle(const Glib::ustring& path);
123 /* === E N D =============================================================== */