X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fcompview.h;fp=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fcompview.h;h=0fef0905021f7ae1a0f5aaabd67b9df1fa14107f;hb=3a3c4bca3a17137bec5d7960560934b91ef4146e;hp=0000000000000000000000000000000000000000;hpb=41257b650db1defb40ac20072ffeef70d5985f5e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/compview.h b/synfig-studio/trunk/src/gtkmm/compview.h new file mode 100644 index 0000000..0fef090 --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/compview.h @@ -0,0 +1,124 @@ +/*! ======================================================================== +** Sinfg +** Template Header File +** $Id: compview.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This software and associated documentation +** are CONFIDENTIAL and PROPRIETARY property of +** the above-mentioned copyright holder. +** +** You may not copy, print, publish, or in any +** other way distribute this software without +** a prior written agreement with +** the copyright holder. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SINFG_COMPVIEW_H +#define __SINFG_COMPVIEW_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "dialogsettings.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace sinfg { class Canvas; }; + +namespace studio { + +class Instance; +class CanvasView; + +class CompView : public Gtk::Window +{ + DialogSettings dialog_settings; + + Gtk::Tooltips tooltips; + + Gtk::OptionMenu *instance_selector; + Gtk::Notebook *notebook; + + Gtk::TreeView *canvas_tree; + Gtk::TreeView *action_tree; + + Gtk::Menu instance_list_menu; + Gtk::Menu menu; + + etl::loose_handle selected_instance; + + void set_selected_instance_(etl::handle x); + + void clear_history(); + void clear_redo(); + +public: + CompView(); + ~CompView(); + + etl::loose_handle get_selected_instance() { return selected_instance; } + + etl::loose_handle get_selected_canvas(); + + etl::loose_handle get_selected_canvas_view(); + + void set_selected_instance(etl::loose_handle x); + + void set_selected_instance_signal(etl::handle x); + + void new_instance(etl::handle x); + + void delete_instance(etl::handle x); + + void refresh_instances(); + + bool close(); + +private: + + Gtk::Widget* create_canvas_tree(); + Gtk::Widget* create_action_tree(); + Gtk::Widget* create_instance_selector(); + + void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *); + bool on_tree_event(GdkEvent *event); + + bool on_action_event(GdkEvent *event); + + void init_menu(); + + void menu_new_canvas(); + void menu_delete(); + void menu_rename(); + + void on_action_toggle(const Glib::ustring& path); +}; + +}; + +/* === E N D =============================================================== */ + +#endif