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 Robert B. Quattlebaum Jr.
8 ** This software and associated documentation
9 ** are CONFIDENTIAL and PROPRIETARY property of
10 ** the above-mentioned copyright holder.
12 ** You may not copy, print, publish, or in any
13 ** other way distribute this software without
14 ** a prior written agreement with
15 ** the copyright holder.
17 ** === N O T E S ===========================================================
19 ** ========================================================================= */
21 /* === S T A R T =========================================================== */
23 #ifndef __SYNFIG_COMPVIEW_H
24 #define __SYNFIG_COMPVIEW_H
26 /* === H E A D E R S ======================================================= */
28 #include <gtkmm/window.h>
29 #include <gtkmm/image.h>
30 #include <gtkmm/tooltips.h>
31 #include <gtkmm/table.h>
32 #include <gtkmm/button.h>
33 #include <gtkmm/menu.h>
34 #include <gtkmm/optionmenu.h>
35 #include <gtkmm/notebook.h>
36 #include <gtkmm/treeview.h>
37 #include <gtkmm/box.h>
41 #include "dialogsettings.h"
43 /* === M A C R O S ========================================================= */
45 /* === T Y P E D E F S ===================================================== */
47 /* === C L A S S E S & S T R U C T S ======================================= */
49 namespace synfig { class Canvas; };
56 class CompView : public Gtk::Window
58 DialogSettings dialog_settings;
60 Gtk::Tooltips tooltips;
62 Gtk::OptionMenu *instance_selector;
63 Gtk::Notebook *notebook;
65 Gtk::TreeView *canvas_tree;
66 Gtk::TreeView *action_tree;
68 Gtk::Menu instance_list_menu;
71 etl::loose_handle<studio::Instance> selected_instance;
73 void set_selected_instance_(etl::handle<studio::Instance> x);
82 etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
84 etl::loose_handle<synfig::Canvas> get_selected_canvas();
86 etl::loose_handle<studio::CanvasView> get_selected_canvas_view();
88 void set_selected_instance(etl::loose_handle<studio::Instance> x);
90 void set_selected_instance_signal(etl::handle<studio::Instance> x);
92 void new_instance(etl::handle<studio::Instance> x);
94 void delete_instance(etl::handle<studio::Instance> x);
96 void refresh_instances();
102 Gtk::Widget* create_canvas_tree();
103 Gtk::Widget* create_action_tree();
104 Gtk::Widget* create_instance_selector();
106 void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *);
107 bool on_tree_event(GdkEvent *event);
109 bool on_action_event(GdkEvent *event);
113 void menu_new_canvas();
117 void on_action_toggle(const Glib::ustring& path);
122 /* === E N D =============================================================== */