- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# compview.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00025 /* === S T A R T =========================================================== */
    00026
    00027 #ifndef __SYNFIG_COMPVIEW_H
    00028 #define __SYNFIG_COMPVIEW_H
    00029
    00030 /* === H E A D E R S ======================================================= */
    00031
    00032 #include <gtkmm/window.h>
    00033 #include <gtkmm/image.h>
    00034 #include <gtkmm/tooltips.h>
    00035 #include <gtkmm/table.h>
    00036 #include <gtkmm/button.h>
    00037 #include <gtkmm/menu.h>
    00038 #include <gtkmm/optionmenu.h>
    00039 #include <gtkmm/notebook.h>
    00040 #include <gtkmm/treeview.h>
    00041 #include <gtkmm/box.h>
    00042
    00043 #include <ETL/handle>
    00044
    00045 #include "dialogsettings.h"
    00046
    00047 /* === M A C R O S ========================================================= */
    00048
    00049 /* === T Y P E D E F S ===================================================== */
    00050
    00051 /* === C L A S S E S & S T R U C T S ======================================= */
    00052
    00053 namespace synfig { class Canvas; };
    00054
    00055 namespace studio {
    00056
    00057 class Instance;
    00058 class CanvasView;
    00059
    00060 class CompView : public Gtk::Window
    00061 {
    00062     DialogSettings dialog_settings;
    00063
    00064     Gtk::Tooltips tooltips;
    00065
    00066     Gtk::OptionMenu *instance_selector;
    00067     Gtk::Notebook *notebook;
    00068
    00069     Gtk::TreeView *canvas_tree;
    00070     Gtk::TreeView *action_tree;
    00071
    00072     Gtk::Menu   instance_list_menu;
    00073     Gtk::Menu   menu;
    00074
    00075     etl::loose_handle<studio::Instance> selected_instance;
    00076
    00077     void set_selected_instance_(etl::handle<studio::Instance> x);
    00078
    00079     void clear_history();
    00080     void clear_redo();
    00081
    00082 public:
    00083     CompView();
    00084     ~CompView();
    00085
    00086     etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
    00087
    00088     etl::loose_handle<synfig::Canvas> get_selected_canvas();
    00089
    00090     etl::loose_handle<studio::CanvasView> get_selected_canvas_view();
    00091
    00092     void set_selected_instance(etl::loose_handle<studio::Instance> x);
    00093
    00094     void set_selected_instance_signal(etl::handle<studio::Instance> x);
    00095
    00096     void new_instance(etl::handle<studio::Instance> x);
    00097
    00098     void delete_instance(etl::handle<studio::Instance> x);
    00099
    00100     void refresh_instances();
    00101
    00102     bool close();
    00103
    00104 private:
    00105
    00106     Gtk::Widget* create_canvas_tree();
    00107     Gtk::Widget* create_action_tree();
    00108     Gtk::Widget* create_instance_selector();
    00109
    00110     void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *);
    00111     bool on_tree_event(GdkEvent *event);
    00112
    00113     bool on_action_event(GdkEvent *event);
    00114
    00115     void init_menu();
    00116
    00117     void menu_new_canvas();
    00118     void menu_delete();
    00119     void menu_rename();
    00120
    00121     void on_action_toggle(const Glib::ustring& path);
    00122 };
    00123
    00124 };
    00125
    00126 /* === E N D =============================================================== */
    00127
    00128 #endif