1 /* === S Y N F I G ========================================================= */
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
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.
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.
21 ** === N O T E S ===========================================================
23 ** ========================================================================= */
25 /* === S T A R T =========================================================== */
27 #ifndef __SYNFIG_COMPVIEW_H
28 #define __SYNFIG_COMPVIEW_H
30 /* === H E A D E R S ======================================================= */
32 #include <gtkmm/window.h>
33 #include <gtkmm/image.h>
34 #include <gtkmm/tooltips.h>
35 #include <gtkmm/table.h>
36 #include <gtkmm/button.h>
37 #include <gtkmm/menu.h>
38 #include <gtkmm/optionmenu.h>
39 #include <gtkmm/notebook.h>
40 #include <gtkmm/treeview.h>
41 #include <gtkmm/box.h>
45 #include "dialogsettings.h"
47 /* === M A C R O S ========================================================= */
49 /* === T Y P E D E F S ===================================================== */
51 /* === C L A S S E S & S T R U C T S ======================================= */
53 namespace synfig
{ class Canvas
; };
60 class CompView
: public Gtk::Window
62 DialogSettings dialog_settings
;
64 Gtk::Tooltips tooltips
;
66 Gtk::OptionMenu
*instance_selector
;
67 Gtk::Notebook
*notebook
;
69 Gtk::TreeView
*canvas_tree
;
70 Gtk::TreeView
*action_tree
;
72 Gtk::Menu instance_list_menu
;
75 etl::loose_handle
<studio::Instance
> selected_instance
;
77 void set_selected_instance_(etl::handle
<studio::Instance
> x
);
86 etl::loose_handle
<studio::Instance
> get_selected_instance() { return selected_instance
; }
88 etl::loose_handle
<synfig::Canvas
> get_selected_canvas();
90 etl::loose_handle
<studio::CanvasView
> get_selected_canvas_view();
92 void set_selected_instance(etl::loose_handle
<studio::Instance
> x
);
94 void set_selected_instance_signal(etl::handle
<studio::Instance
> x
);
96 void new_instance(etl::handle
<studio::Instance
> x
);
98 void delete_instance(etl::handle
<studio::Instance
> x
);
100 void refresh_instances();
106 Gtk::Widget
* create_canvas_tree();
107 Gtk::Widget
* create_action_tree();
108 Gtk::Widget
* create_instance_selector();
110 void on_row_activate(const Gtk::TreeModel::Path
&path
, Gtk::TreeViewColumn
*);
111 bool on_tree_event(GdkEvent
*event
);
113 bool on_action_event(GdkEvent
*event
);
117 void menu_new_canvas();
121 void on_action_toggle(const Glib::ustring
& path
);
126 /* === E N D =============================================================== */