X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Faction_system.h;h=22c134db7c378bb616f29b36d3b17821c7c80348;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=ebd0f994ef6d220773daedaeba7395919f687a82;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/action_system.h b/synfig-studio/trunk/src/synfigapp/action_system.h index ebd0f99..22c134d 100644 --- a/synfig-studio/trunk/src/synfigapp/action_system.h +++ b/synfig-studio/trunk/src/synfigapp/action_system.h @@ -2,19 +2,20 @@ /*! \file action_system.h ** \brief Template Header ** -** $Id: action_system.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** 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. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** 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 */ /* ========================================================================= */ @@ -42,13 +43,13 @@ namespace synfigapp { class CanvasInterface; - + namespace Action { - - - + + + class System; //! Passive action grouping class @@ -70,11 +71,11 @@ public: void set_name(const synfig::String &x) { name_=x; } etl::loose_handle get_instance() { return instance_; } - + void request_redraw(etl::handle); - + void cancel(); - + void inc_depth() { depth_++; } void dec_depth() { depth_--; } @@ -83,11 +84,11 @@ public: }; // END of class Action::PassiveGrouper typedef std::list< etl::handle > Stack; - + class System : public etl::shared_object, public sigc::trackable { friend class PassiveGrouper; - + /* -- ** -- P U B L I C T Y P E S --------------------------------------------- */ @@ -99,7 +100,7 @@ public: */ public: - + /* -- ** -- P R I V A T E D A T A --------------------------------------------- */ @@ -121,7 +122,7 @@ private: sigc::signal signal_undo_; sigc::signal signal_redo_; sigc::signal > signal_action_status_changed_; - + mutable sigc::signal signal_unsaved_status_changed_; //! If this is non-zero, then the changes have not yet been saved. @@ -130,7 +131,7 @@ private: etl::handle ui_interface_; bool clear_redo_stack_on_new_action_; - + /* -- ** -- P R I V A T E M E T H O D S --------------------------------------- */ @@ -167,7 +168,7 @@ public: const etl::handle& get_most_recent_action() { return most_recent_action_; } bool get_clear_redo_stack_on_new_action()const { return clear_redo_stack_on_new_action_; } - + void set_clear_redo_stack_on_new_action(bool x) { clear_redo_stack_on_new_action_=x; } bool perform_action(etl::handle action); @@ -183,13 +184,13 @@ public: //! Redoes the last undone action bool redo(); - - //! Clears the undo stack. + + //! Clears the undo stack. void clear_undo_stack(); - - //! Clears the redo stack. + + //! Clears the redo stack. void clear_redo_stack(); - + //! Increments the action counter /*! \note You should not have to call this under normal circumstances. ** \see dec_action_count(), reset_action_count(), get_action_count() */ @@ -211,7 +212,7 @@ public: void set_ui_interface(const etl::handle &uim) { assert(uim); ui_interface_=uim; } void unset_ui_interface() { ui_interface_=new DefaultUIInterface(); } - const etl::handle &get_ui_interface() { return ui_interface_; } + const etl::handle &get_ui_interface() { return ui_interface_; } /* -- ** -- S I G N A L I N T E R F A C E S -----------------------------------