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

#include <instance.h>

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

Classes

class  CanvasTreeModel

Public Types

enum  Status { STATUS_OK, STATUS_ERROR, STATUS_CANCEL }
typedef std::list< etl::handle
< CanvasView > > 
CanvasViewList
- Public Types inherited from synfigapp::Instance
typedef std::list< etl::handle
< CanvasInterface > > 
CanvasInterfaceList
typedef std::list< FileReferenceFileReferenceList

Public Member Functions

sigc::signal< void > & signal_undo_redo_status_changed ()
 ~Instance ()
sigc::signal< void, CanvasView * > & signal_canvas_view_created ()
sigc::signal< void, CanvasView * > & signal_canvas_view_deleted ()
bool get_undo_status () const
bool get_redo_status () const
int get_visible_canvases () const
Glib::RefPtr< Gtk::TreeStore > canvas_tree_store ()
Glib::RefPtr< const
Gtk::TreeStore > 
canvas_tree_store () const
Glib::RefPtr< HistoryTreeStorehistory_tree_store ()
Glib::RefPtr< const
HistoryTreeStore
history_tree_store () const
etl::handle< CanvasViewfind_canvas_view (etl::handle< synfig::Canvas > canvas)
void focus (etl::handle< synfig::Canvas > canvas)
 Sets the focus to a specific canvas.
CanvasViewListcanvas_view_list ()
const CanvasViewListcanvas_view_list () const
void run_plugin (std::string plugin_path)
bool save_as (const synfig::String &filename)
bool has_real_filename ()
 returns true if the instance has a real filename associated with it, rather than the made up "synfig animation 1" or some such
bool dialog_save_as ()
void open ()
Status save ()
 Saves the instance to filename_.
void dialog_cvs_commit ()
void dialog_cvs_add ()
void dialog_cvs_update ()
void dialog_cvs_revert ()
void close ()
 Closes the instance of this composition.
void revert ()
void update_all_titles ()
void refresh_canvas_tree ()
bool safe_revert ()
bool safe_close ()
void add_actions_to_menu (Gtk::Menu *menu, const synfigapp::Action::ParamList &param_list, synfigapp::Action::Category category=synfigapp::Action::CATEGORY_ALL) const
void add_actions_to_menu (Gtk::Menu *menu, const synfigapp::Action::ParamList &param_list1, const synfigapp::Action::ParamList &param_list2, synfigapp::Action::Category category=synfigapp::Action::CATEGORY_ALL) const
void add_actions_to_group (const Glib::RefPtr< Gtk::ActionGroup > &action_group, synfig::String &ui_info, const synfigapp::Action::ParamList &param_list, synfigapp::Action::Category category=synfigapp::Action::CATEGORY_ALL) const
void process_action (synfig::String name, synfigapp::Action::ParamList param_list)
void make_param_menu (Gtk::Menu *menu, synfig::Canvas::Handle canvas, synfigapp::ValueDesc value_desc, float location=0.5f, bool bezier=false)
void make_param_menu (Gtk::Menu *menu, synfig::Canvas::Handle canvas, const std::list< synfigapp::ValueDesc > &value_desc_list, const synfigapp::ValueDesc &value_desc=synfigapp::ValueDesc())
- Public Member Functions inherited from synfigapp::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 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 int get_count ()
 Returns the number of instances that are currently open in the program.
static void edit_waypoint (synfigapp::ValueDesc value_desc, synfig::Waypoint waypoint)
static etl::handle< Instancecreate (synfig::Canvas::Handle canvas, etl::handle< synfig::FileContainerTemporary > container)
- Static Public Member Functions inherited from synfigapp::Instance
static etl::handle< Instancecreate (etl::handle< synfig::Canvas > canvas, etl::handle< synfig::FileContainerTemporary > container)

Public Attributes

studio::Instance::CanvasTreeModel canvas_tree_model

Protected Member Functions

 Instance (synfig::Canvas::Handle, etl::handle< synfig::FileContainerTemporary >)
- Protected Member Functions inherited from synfigapp::Instance
 Instance (etl::handle< synfig::Canvas >, etl::handle< synfig::FileContainerTemporary > container)

Member Typedef Documentation

typedef std::list< etl::handle<CanvasView> > studio::Instance::CanvasViewList

Member Enumeration Documentation

Enumerator:
STATUS_OK 
STATUS_ERROR 
STATUS_CANCEL 

Constructor & Destructor Documentation

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

Reimplemented from synfigapp::Instance.

Member Function Documentation

sigc::signal<void>& studio::Instance::signal_undo_redo_status_changed ( )
inline
sigc::signal<void,CanvasView*>& studio::Instance::signal_canvas_view_created ( )
inline
sigc::signal<void,CanvasView*>& studio::Instance::signal_canvas_view_deleted ( )
inline
bool studio::Instance::get_undo_status ( ) const
inline
bool studio::Instance::get_redo_status ( ) const
inline
int Instance::get_visible_canvases ( ) const
Glib::RefPtr<Gtk::TreeStore> studio::Instance::canvas_tree_store ( )
inline

Referenced by refresh_canvas_tree().

Glib::RefPtr<const Gtk::TreeStore> studio::Instance::canvas_tree_store ( ) const
inline
Glib::RefPtr<HistoryTreeStore> studio::Instance::history_tree_store ( )
inline
Glib::RefPtr<const HistoryTreeStore> studio::Instance::history_tree_store ( ) const
inline
static int studio::Instance::get_count ( )
inlinestatic

Returns the number of instances that are currently open in the program.

Referenced by studio::App::new_instance().

handle< CanvasView > Instance::find_canvas_view ( etl::handle< synfig::Canvas >  canvas)

References canvas_view_list(), and create().

Referenced by close(), focus(), make_param_menu(), and safe_close().

void Instance::focus ( etl::handle< synfig::Canvas >  canvas)

Sets the focus to a specific canvas.

References find_canvas_view().

CanvasViewList& studio::Instance::canvas_view_list ( )
inline
const CanvasViewList& studio::Instance::canvas_view_list ( ) const
inline
void studio::Instance::run_plugin ( std::string  plugin_path)
bool studio::Instance::save_as ( const synfig::String &  filename)

Reimplemented from synfigapp::Instance.

References synfigapp::Instance::save_as().

bool studio::Instance::has_real_filename ( )

returns true if the instance has a real filename associated with it, rather than the made up "synfig animation 1" or some such

References studio::App::custom_filename_prefix.

bool studio::Instance::dialog_save_as ( )

Opens a "Save As" dialog, and then saves the composition to that file returns true if the save was successful

Todo:
Fix big involving "Save As" with referenced compositions

References _, ANIMATION_DIR_PREFERENCE, studio::App::dialog_message_1b(), studio::App::dialog_message_2b(), and studio::App::dialog_save_file().

void studio::Instance::open ( )

References studio::App::dialog_open().

Referenced by revert().

Instance::Status studio::Instance::save ( )

Saves the instance to filename_.

Reimplemented from synfigapp::Instance.

References _, studio::App::dialog_message_1b(), and synfigapp::Instance::save().

Referenced by dialog_cvs_commit(), dialog_cvs_update(), and safe_close().

void Instance::dialog_cvs_commit ( )
void Instance::dialog_cvs_add ( )
void Instance::dialog_cvs_update ( )
void Instance::dialog_cvs_revert ( )
void Instance::close ( )
void Instance::revert ( )
void Instance::update_all_titles ( )
void Instance::refresh_canvas_tree ( )
bool Instance::safe_revert ( )
bool Instance::safe_close ( )
void Instance::add_actions_to_menu ( Gtk::Menu *  menu,
const synfigapp::Action::ParamList param_list,
synfigapp::Action::Category  category = synfigapp::Action::CATEGORY_ALL 
) const
void Instance::add_actions_to_menu ( Gtk::Menu *  menu,
const synfigapp::Action::ParamList param_list1,
const synfigapp::Action::ParamList param_list2,
synfigapp::Action::Category  category = synfigapp::Action::CATEGORY_ALL 
) const
void Instance::add_actions_to_group ( const Glib::RefPtr< Gtk::ActionGroup > &  action_group,
synfig::String &  ui_info,
const synfigapp::Action::ParamList param_list,
synfigapp::Action::Category  category = synfigapp::Action::CATEGORY_ALL 
) const
void Instance::process_action ( synfig::String  name,
synfigapp::Action::ParamList  param_list 
)
void Instance::make_param_menu ( Gtk::Menu *  menu,
synfig::Canvas::Handle  canvas,
synfigapp::ValueDesc  value_desc,
float  location = 0.5f,
bool  bezier = false 
)
void Instance::make_param_menu ( Gtk::Menu *  menu,
synfig::Canvas::Handle  canvas,
const std::list< synfigapp::ValueDesc > &  value_desc_list,
const synfigapp::ValueDesc value_desc = synfigapp::ValueDesc() 
)
static void studio::Instance::edit_waypoint ( synfigapp::ValueDesc  value_desc,
synfig::Waypoint  waypoint 
)
static
handle< Instance > Instance::create ( synfig::Canvas::Handle  canvas,
etl::handle< synfig::FileContainerTemporary >  container 
)
static

Member Data Documentation

studio::Instance::CanvasTreeModel studio::Instance::canvas_tree_model

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