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

# childrentree.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00022 /* ========================================================================= */
    00023
    00024 /* === S T A R T =========================================================== */
    00025
    00026 #ifndef __SYNFIG_STUDIO_CHILDRENTREE_H
    00027 #define __SYNFIG_STUDIO_CHILDRENTREE_H
    00028
    00029 /* === H E A D E R S ======================================================= */
    00030
    00031 #include <gtkmm/treeview.h>
    00032 #include <gtkmm/treestore.h>
    00033 #include <gtkmm/tooltips.h>
    00034 #include <gtkmm/table.h>
    00035 #include <gtkmm/box.h>
    00036 #include <gtkmm/adjustment.h>
    00037 #include <gtkmm/scale.h>
    00038 #include <gtkmm/button.h>
    00039
    00040 #include <synfigapp/canvasinterface.h>
    00041 #include <synfigapp/value_desc.h>
    00042 #include "childrentreestore.h"
    00043 #include <synfig/valuenode_animated.h>
    00044
    00045 #include "widget_value.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 studio {
    00054
    00055 class CellRenderer_TimeTrack;
    00056 class CellRenderer_ValueBase;
    00057
    00058 class ChildrenTree : public Gtk::Table
    00059 {
    00060     /*
    00061  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
    00062     */
    00063
    00064 public:
    00065
    00066     typedef studio::ColumnID ColumnID;
    00067
    00068     /*
    00069  -- ** -- P U B L I C  D A T A ------------------------------------------------
    00070     */
    00071
    00072 public:
    00073
    00074     ChildrenTreeStore::Model model;
    00075
    00076     /*
    00077  -- ** -- P R I V A T E   D A T A ---------------------------------------------
    00078     */
    00079
    00080 private:
    00081
    00082     Gtk::Tooltips tooltips_;
    00083
    00084     Gtk::TreePath last_tooltip_path;
    00085
    00086     Gtk::TreeView tree_view;
    00087
    00088     Gtk::HBox *hbox;
    00089
    00090     Glib::RefPtr<ChildrenTreeStore> children_tree_store_;
    00091
    00092     CellRenderer_TimeTrack *cellrenderer_time_track;
    00093
    00094     Gtk::TreeView::Column* column_time_track;
    00095
    00096     CellRenderer_ValueBase *cellrenderer_value;
    00097
    00098     sigc::signal<void,synfigapp::ValueDesc,synfig::ValueBase> signal_edited_value_;
    00099
    00100     sigc::signal<bool, int, Gtk::TreeRow, ColumnID> signal_user_click_;
    00101
    00102     sigc::signal<void,synfigapp::ValueDesc,std::set<synfig::Waypoint,std::less<synfig::UniqueID> >,int> signal_waypoint_clicked_childrentree_;
    00103
    00104     Gtk::Button *button_raise;
    00105     Gtk::Button *button_lower;
    00106     Gtk::Button *button_duplicate;
    00107     Gtk::Button *button_delete;
    00108
    00109     Widget_ValueBase blend_method_widget;
    00110
    00111     /*
    00112  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
    00113     */
    00114
    00115 private:
    00116
    00117     /*
    00118  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
    00119     */
    00120
    00121 private:
    00122
    00123     void on_edited_value(const Glib::ustring&path_string,synfig::ValueBase value);
    00124
    00125     void on_waypoint_clicked_childrentree(const etl::handle<synfig::Node>& node,const synfig::Time&,const synfig::Time&,int button);
    00126
    00127     bool on_tree_event(GdkEvent *event);
    00128
    00129     void on_selection_changed();
    00130
    00131     void on_dirty_preview();
    00132
    00133     void on_raise_pressed();
    00134
    00135     void on_lower_pressed();
    00136
    00137     void on_duplicate_pressed();
    00138
    00139     void on_delete_pressed();
    00140
    00141     /*
    00142  -- ** -- P U B L I C   M E T H O D S -----------------------------------------
    00143     */
    00144
    00145 public:
    00146
    00147     Gtk::HBox& get_hbox() { return *hbox; }
    00148
    00149     Gtk::TreeView& get_tree_view() { return tree_view; }
    00150
    00151     Glib::RefPtr<Gtk::TreeSelection> get_selection() { return tree_view.get_selection(); }
    00152     Glib::SignalProxy1< bool,GdkEvent* >  signal_event () { return tree_view.signal_event(); }
    00153
    00154     ChildrenTree();
    00155     ~ChildrenTree();
    00156
    00157     void set_model(Glib::RefPtr<ChildrenTreeStore> children_tree_store_);
    00158
    00159     void set_time_adjustment(Gtk::Adjustment &adjustment);
    00160
    00161     void set_show_timetrack(bool x=true);
    00162
    00164     sigc::signal<void,synfigapp::ValueDesc,synfig::ValueBase>& signal_edited_value() { return signal_edited_value_; }
    00165
    00166     sigc::signal<bool,int, Gtk::TreeRow, ColumnID>& signal_user_click() { return signal_user_click_; }
    00167
    00168     sigc::signal<void,synfigapp::ValueDesc,std::set<synfig::Waypoint,std::less<synfig::UniqueID> >,int>& signal_waypoint_clicked_childrentree() { return signal_waypoint_clicked_childrentree_; }
    00169
    00170     etl::handle<synfigapp::SelectionManager> get_selection_manager() { return children_tree_store_->canvas_interface()->get_selection_manager(); }
    00171
    00172 }; // END of ChildrenTree
    00173
    00174 }; // END of namespace studio
    00175
    00176 /* === E N D =============================================================== */
    00177
    00178 #endif