synfig-studio  1.0.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
synfigapp::Instance Class Reference

#include <instance.h>

Inheritance diagram for synfigapp::Instance:
synfigapp::Action::System synfigapp::CVSInfo studio::Instance

Classes

struct  FileReference

Public Types

typedef std::list< etl::handle
< CanvasInterface > > 
CanvasInterfaceList
typedef std::list< FileReferenceFileReferenceList

Public Member Functions

 ~Instance ()
bool is_layer_registered_to_save (synfig::Layer::Handle layer)
void register_layer_to_save (synfig::Layer::Handle layer)
void unregister_layer_to_save (synfig::Layer::Handle layer)
void set_selection_manager (const etl::handle< SelectionManager > &sm)
void unset_selection_manager ()
const etl::handle
< SelectionManager > & 
get_selection_manager ()
etl::handle
< synfig::FileSystemGroup > 
get_file_system () const
etl::handle
< synfig::FileContainerTemporary > 
get_container () const
void save_surface (const synfig::Surface &surface, const synfig::String &filename)
etl::handle< CanvasInterfacefind_canvas_interface (synfig::Canvas::Handle canvas)
synfig::Canvas::Handle get_canvas () const
bool embed_all ()
void convert_animated_filenames (const synfig::Canvas::Handle &canvas, const synfig::String &old_path, const synfig::String &new_path)
 make relative filenames from animated valuenodes
bool save ()
 Saves the instance to filename_.
bool save_as (const synfig::String &filename)
bool generate_new_name (synfig::Layer::Handle layer, synfig::Canvas::Handle canvas, synfig::FileSystem::Handle file_system, synfig::String &out_description, synfig::String &out_filename, synfig::String &out_filename_param)
 create unique file name for an embedded image layer (if image filename is empty, description layer is used)
sigc::signal< void > & signal_filename_changed ()
sigc::signal< void > & signal_saved ()
CanvasInterfaceListcanvas_interface_list ()
const CanvasInterfaceListcanvas_interface_list () const
synfig::String get_file_name () const
void set_file_name (const synfig::String &name)
- Public Member Functions inherited from synfigapp::Action::System
 System ()
 ~System ()
synfig::String get_most_recent_action_name ()
bool get_clear_redo_stack_on_new_action () const
void set_clear_redo_stack_on_new_action (bool x)
bool perform_action (etl::handle< Action::Base > action)
bool set_action_status (etl::handle< Action::Undoable > action, bool x)
const Stackundo_action_stack () const
const Stackredo_action_stack () const
bool undo ()
 Undoes the last action.
bool redo ()
 Redoes the last undone action.
void clear_undo_stack ()
 Clears the undo stack.
void clear_redo_stack ()
 Clears the redo stack.
void inc_action_count () const
 Increments the action counter.
void dec_action_count () const
 Decrements the action counter.
void reset_action_count () const
 Resets the action counter.
int get_action_count () const
 Returns the number of actions performed since last save.
void set_ui_interface (const etl::handle< UIInterface > &uim)
void unset_ui_interface ()
const etl::handle< UIInterface > & get_ui_interface ()
sigc::signal< void, bool > & signal_unsaved_status_changed ()
sigc::signal< void, bool > & signal_undo_status ()
sigc::signal< void, bool > & signal_redo_status ()
sigc::signal< void > & signal_undo_stack_cleared ()
sigc::signal< void > & signal_redo_stack_cleared ()
sigc::signal< void > & signal_undo ()
sigc::signal< void > & signal_redo ()
sigc::signal< void,
etl::handle< Action::Undoable > > & 
signal_new_action ()
 Called whenever an undoable action is processed and added to the stack.
sigc::signal< void,
etl::handle< Action::Undoable > > & 
signal_action_status_changed ()
- Public Member Functions inherited from synfigapp::CVSInfo
void calc_repository_info ()
 CVSInfo (const synfig::String &file_name)
 CVSInfo ()
 ~CVSInfo ()
bool in_sandbox () const
 Returns TRUE if file_name is in a sandbox.
bool in_repository () const
 Returns TRUE if file_name is in the repository.
bool is_modified () const
 Returns TRUE if file_name has modifications not yet on the repository.
bool is_updated () const
 Returns TRUE if there is a new version of file_name on the repository.
const synfig::String & get_cvs_version () const
 Returns the CVS version string.
const time_t & get_original_timestamp () const
 Returns the unix timestamp of the repository file.
time_t get_current_timestamp () const
 Returns the unix timestamp of the checked out file.
synfig::String get_cvs_root () const
 Returns the Root.
synfig::String get_cvs_module () const
 Returns the name of the module.
void cvs_add (const synfig::String &message=synfig::String())
void cvs_update ()
void cvs_commit (const synfig::String &message=synfig::String())

Static Public Member Functions

static etl::handle< Instancecreate (etl::handle< synfig::Canvas > canvas, etl::handle< synfig::FileContainerTemporary > container)

Protected Member Functions

 Instance (etl::handle< synfig::Canvas >, etl::handle< synfig::FileContainerTemporary > container)

Friends

class PassiveGrouper

Member Typedef Documentation

typedef std::list< etl::handle<CanvasInterface> > synfigapp::Instance::CanvasInterfaceList

Constructor & Destructor Documentation

Instance::Instance ( etl::handle< synfig::Canvas >  canvas,
etl::handle< synfig::FileContainerTemporary >  container 
)
protected

References instance_map_, and unset_selection_manager().

Referenced by create().

Instance::~Instance ( )

Reimplemented in studio::Instance.

References instance_map_.

Member Function Documentation

bool synfigapp::Instance::is_layer_registered_to_save ( synfig::Layer::Handle  layer)
inline
void synfigapp::Instance::register_layer_to_save ( synfig::Layer::Handle  layer)
inline
void synfigapp::Instance::unregister_layer_to_save ( synfig::Layer::Handle  layer)
inline
void synfigapp::Instance::set_selection_manager ( const etl::handle< SelectionManager > &  sm)
inline
void synfigapp::Instance::unset_selection_manager ( )
inline

Referenced by Instance().

const etl::handle<SelectionManager>& synfigapp::Instance::get_selection_manager ( )
inline
etl::handle< synfig::FileSystemGroup > synfigapp::Instance::get_file_system ( ) const
inline

Referenced by save_surface().

etl::handle< synfig::FileContainerTemporary > synfigapp::Instance::get_container ( ) const
inline
void Instance::save_surface ( const synfig::Surface &  surface,
const synfig::String &  filename 
)

References create(), get_canvas(), and get_file_system().

Referenced by save_as().

handle< CanvasInterface > Instance::find_canvas_interface ( synfig::Canvas::Handle  canvas)
synfig::Canvas::Handle synfigapp::Instance::get_canvas ( ) const
inline
bool Instance::embed_all ( )

References get_canvas().

Referenced by save_as().

void Instance::convert_animated_filenames ( const synfig::Canvas::Handle &  canvas,
const synfig::String &  old_path,
const synfig::String &  new_path 
)

make relative filenames from animated valuenodes

Referenced by save_as().

bool Instance::save ( )

Saves the instance to filename_.

Reimplemented in studio::Instance.

References get_canvas(), get_file_name(), and save_as().

Referenced by studio::Instance::save().

bool Instance::save_as ( const synfig::String &  filename)
bool Instance::generate_new_name ( synfig::Layer::Handle  layer,
synfig::Canvas::Handle  canvas,
synfig::FileSystem::Handle  file_system,
synfig::String &  out_description,
synfig::String &  out_filename,
synfig::String &  out_filename_param 
)

create unique file name for an embedded image layer (if image filename is empty, description layer is used)

sigc::signal<void>& synfigapp::Instance::signal_filename_changed ( )
inline
sigc::signal<void>& synfigapp::Instance::signal_saved ( )
inline
CanvasInterfaceList& synfigapp::Instance::canvas_interface_list ( )
inline

Referenced by find_canvas_interface().

const CanvasInterfaceList& synfigapp::Instance::canvas_interface_list ( ) const
inline
synfig::String Instance::get_file_name ( ) const
void Instance::set_file_name ( const synfig::String &  name)

Reimplemented from synfigapp::CVSInfo.

References get_canvas().

Referenced by save_as().

handle< Instance > Instance::create ( etl::handle< synfig::Canvas >  canvas,
etl::handle< synfig::FileContainerTemporary >  container 
)
static

References Instance().

Referenced by find_canvas_interface(), and save_surface().

Friends And Related Function Documentation

friend class PassiveGrouper
friend

The documentation for this class was generated from the following files: