X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsynfig-studio%2Fsrc%2Fgtkmm%2Fchildrentree.h;fp=synfig-studio%2Ftags%2Fstable%2Fsynfig-studio%2Fsrc%2Fgtkmm%2Fchildrentree.h;h=ad7c72ec167e8527823c68c7950caa9d9fd17d41;hb=d3571d71f12a4e9ab2676c4de150561b5c1cd464;hp=0000000000000000000000000000000000000000;hpb=4e86cbeab28f3f13e56f3ea9ae0fbcc296fa7a1a;p=synfig.git diff --git a/synfig-studio/tags/stable/synfig-studio/src/gtkmm/childrentree.h b/synfig-studio/tags/stable/synfig-studio/src/gtkmm/childrentree.h new file mode 100644 index 0000000..ad7c72e --- /dev/null +++ b/synfig-studio/tags/stable/synfig-studio/src/gtkmm/childrentree.h @@ -0,0 +1,177 @@ +/* === S Y N F I G ========================================================= */ +/*! \file childrentree.h +** \brief Template Header +** +** $Id: childrentree.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STUDIO_CHILDRENTREE_H +#define __SYNFIG_STUDIO_CHILDRENTREE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "childrentreestore.h" +#include + +#include "widget_value.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 studio { + +class CellRenderer_TimeTrack; +class CellRenderer_ValueBase; + +class ChildrenTree : public Gtk::Table +{ + /* + -- ** -- P U B L I C T Y P E S --------------------------------------------- + */ + +public: + + typedef studio::ColumnID ColumnID; + + /* + -- ** -- P U B L I C D A T A ------------------------------------------------ + */ + +public: + + ChildrenTreeStore::Model model; + + /* + -- ** -- P R I V A T E D A T A --------------------------------------------- + */ + +private: + + Gtk::Tooltips tooltips_; + + Gtk::TreePath last_tooltip_path; + + Gtk::TreeView tree_view; + + Gtk::HBox *hbox; + + Glib::RefPtr children_tree_store_; + + CellRenderer_TimeTrack *cellrenderer_time_track; + + Gtk::TreeView::Column* column_time_track; + + CellRenderer_ValueBase *cellrenderer_value; + + sigc::signal signal_edited_value_; + + sigc::signal signal_user_click_; + + sigc::signal signal_waypoint_clicked_; + + Gtk::Button *button_raise; + Gtk::Button *button_lower; + Gtk::Button *button_duplicate; + Gtk::Button *button_delete; + + Widget_ValueBase blend_method_widget; + + /* + -- ** -- P R I V A T E M E T H O D S --------------------------------------- + */ + +private: + + /* + -- ** -- S I G N A L T E R M I N A L S ------------------------------------- + */ + +private: + + void on_edited_value(const Glib::ustring&path_string,synfig::ValueBase value); + + void on_waypoint_clicked(const Glib::ustring &, synfig::Waypoint,int button); + + bool on_tree_event(GdkEvent *event); + + void on_selection_changed(); + + void on_dirty_preview(); + + void on_raise_pressed(); + + void on_lower_pressed(); + + void on_duplicate_pressed(); + + void on_delete_pressed(); + + /* + -- ** -- P U B L I C M E T H O D S ----------------------------------------- + */ + +public: + + Gtk::HBox& get_hbox() { return *hbox; } + + Gtk::TreeView& get_tree_view() { return tree_view; } + + Glib::RefPtr get_selection() { return tree_view.get_selection(); } + Glib::SignalProxy1< bool,GdkEvent* > signal_event () { return tree_view.signal_event(); } + + ChildrenTree(); + ~ChildrenTree(); + + void set_model(Glib::RefPtr children_tree_store_); + + void set_time_adjustment(Gtk::Adjustment &adjustment); + + void set_show_timetrack(bool x=true); + + //! Signal called with a value has been edited. + sigc::signal& signal_edited_value() { return signal_edited_value_; } + + sigc::signal& signal_user_click() { return signal_user_click_; } + + sigc::signal& signal_waypoint_clicked() { return signal_waypoint_clicked_; } + + etl::handle get_selection_manager() { return children_tree_store_->canvas_interface()->get_selection_manager(); } + +}; // END of ChildrenTree + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif