1 /* === S Y N F I G ========================================================= */
2 /*! \file historytreestore.h
3 ** \brief Template Header
5 ** $Id: historytreestore.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_STUDIO_HISTORYTREESTORE_H
25 #define __SYNFIG_STUDIO_HISTORYTREESTORE_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/treestore.h>
30 #include <synfigapp/canvasinterface.h>
31 #include <gdkmm/pixbuf.h>
32 #include <synfigapp/action.h>
34 /* === M A C R O S ========================================================= */
36 /* === T Y P E D E F S ===================================================== */
38 /* === C L A S S E S & S T R U C T S ======================================= */
44 class HistoryTreeStore : virtual public Gtk::TreeStore
47 -- ** -- P U B L I C T Y P E S ---------------------------------------------
52 class Model : public Gtk::TreeModel::ColumnRecord
56 Gtk::TreeModelColumn<etl::handle<synfigapp::Action::Undoable> > action;
57 Gtk::TreeModelColumn<Glib::ustring> name;
58 Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > icon;
59 Gtk::TreeModelColumn<bool> is_active;
60 Gtk::TreeModelColumn<bool> is_undo;
61 Gtk::TreeModelColumn<bool> is_redo;
63 Gtk::TreeModelColumn<Glib::ustring> canvas_id;
64 Gtk::TreeModelColumn<synfig::Canvas::Handle> canvas;
80 -- ** -- P U B L I C D A T A ------------------------------------------------
88 -- ** -- P R I V A T E D A T A ---------------------------------------------
93 etl::loose_handle<studio::Instance> instance_;
94 Gtk::TreeIter curr_row;
97 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
103 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
112 void on_undo_stack_cleared();
114 void on_redo_stack_cleared();
116 void on_new_action(etl::handle<synfigapp::Action::Undoable> action);
118 void on_action_status_changed(etl::handle<synfigapp::Action::Undoable> action);
121 -- ** -- P U B L I C M E T H O D S -----------------------------------------
126 HistoryTreeStore(etl::loose_handle<studio::Instance> instance_);
129 etl::loose_handle<studio::Instance> instance() { return instance_; }
130 etl::loose_handle<const studio::Instance> instance()const { return instance_; }
134 void refresh() { rebuild(); }
136 void insert_action(Gtk::TreeRow row,etl::handle<synfigapp::Action::Undoable> action, bool is_active=true, bool is_undo=true, bool is_redo=false);
139 -- ** -- P R O T E C T E D M E T H O D S -----------------------------------
144 static Glib::RefPtr<HistoryTreeStore> create(etl::loose_handle<studio::Instance> instance);
146 }; // END of class HistoryTreeStore
148 }; // END of namespace studio
150 /* === E N D =============================================================== */