synfig-studio
1.0.3
|
#include <instance.h>
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< FileReference > | FileReferenceList |
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< HistoryTreeStore > | history_tree_store () |
Glib::RefPtr< const HistoryTreeStore > | history_tree_store () const |
etl::handle< CanvasView > | find_canvas_view (etl::handle< synfig::Canvas > canvas) |
void | focus (etl::handle< synfig::Canvas > canvas) |
Sets the focus to a specific canvas. | |
CanvasViewList & | canvas_view_list () |
const CanvasViewList & | canvas_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 ¶m_list, synfigapp::Action::Category category=synfigapp::Action::CATEGORY_ALL) const |
void | add_actions_to_menu (Gtk::Menu *menu, const synfigapp::Action::ParamList ¶m_list1, const synfigapp::Action::ParamList ¶m_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 ¶m_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< CanvasInterface > | find_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 () |
CanvasInterfaceList & | canvas_interface_list () |
const CanvasInterfaceList & | canvas_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 Stack & | undo_action_stack () const |
const Stack & | redo_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< Instance > | create (synfig::Canvas::Handle canvas, etl::handle< synfig::FileContainerTemporary > container) |
Static Public Member Functions inherited from synfigapp::Instance | |
static etl::handle< Instance > | create (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) |
typedef std::list< etl::handle<CanvasView> > studio::Instance::CanvasViewList |
|
protected |
References studio::AutoRecover::auto_backup(), refresh_canvas_tree(), synfigapp::Instance::signal_filename_changed(), synfigapp::Action::System::signal_redo_status(), synfigapp::Instance::signal_saved(), synfigapp::Action::System::signal_undo_status(), synfigapp::Action::System::signal_unsaved_status_changed(), and update_all_titles().
Referenced by create().
Instance::~Instance | ( | ) |
Reimplemented from synfigapp::Instance.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int Instance::get_visible_canvases | ( | ) | const |
|
inline |
Referenced by refresh_canvas_tree().
|
inline |
|
inline |
|
inline |
|
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().
|
inline |
Referenced by close(), find_canvas_view(), and update_all_titles().
|
inline |
void studio::Instance::run_plugin | ( | std::string | plugin_path | ) |
References _, studio::App::dialog_message_1b(), synfigapp::PluginLauncher::execute(), studio::App::get_base_path(), synfigapp::PluginLauncher::get_original_path(), synfigapp::PluginLauncher::get_output(), synfigapp::PluginLauncher::get_result_path(), studio::App::instance_list, studio::App::open_as(), and synfigapp::UIInterface::RESPONSE_OK.
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
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 | ( | ) |
References _, synfigapp::CVSInfo::calc_repository_info(), synfigapp::CVSInfo::cvs_commit(), studio::App::dialog_entry(), studio::App::dialog_message_1b(), studio::App::dialog_message_2b(), synfigapp::Action::System::get_action_count(), synfigapp::CVSInfo::in_repository(), synfigapp::CVSInfo::is_modified(), save(), and update_all_titles().
Referenced by safe_close().
void Instance::dialog_cvs_add | ( | ) |
void Instance::dialog_cvs_update | ( | ) |
References _, synfigapp::CVSInfo::calc_repository_info(), synfigapp::CVSInfo::cvs_update(), studio::App::dialog_message_1b(), studio::App::dialog_message_2b(), synfigapp::Action::System::get_action_count(), synfigapp::Instance::get_file_name(), synfigapp::CVSInfo::get_original_timestamp(), synfigapp::CVSInfo::in_repository(), synfigapp::CVSInfo::is_updated(), revert(), and save().
void Instance::dialog_cvs_revert | ( | ) |
void Instance::close | ( | ) |
Closes the instance of this composition.
References studio::App::auto_recover, canvas_view_list(), studio::AutoRecover::clear_backup(), find_canvas_view(), synfigapp::Instance::get_canvas(), studio::App::get_selected_instance(), studio::App::instance_list, studio::App::set_selected_canvas_view(), studio::App::set_selected_instance(), and studio::App::signal_instance_deleted().
Referenced by revert(), and safe_close().
void Instance::revert | ( | ) |
References _, close(), studio::App::dialog_message_1b(), synfigapp::Instance::get_canvas(), synfigapp::Instance::get_file_name(), and open().
Referenced by dialog_cvs_revert(), dialog_cvs_update(), and safe_revert().
void Instance::update_all_titles | ( | ) |
References canvas_view_list().
Referenced by dialog_cvs_add(), dialog_cvs_commit(), and Instance().
void Instance::refresh_canvas_tree | ( | ) |
References canvas_tree_store(), and synfigapp::Instance::get_canvas().
Referenced by Instance().
bool Instance::safe_revert | ( | ) |
References _, studio::App::dialog_message_2b(), synfigapp::Action::System::get_action_count(), and revert().
bool Instance::safe_close | ( | ) |
References _, close(), dialog_cvs_commit(), studio::App::dialog_message_1b(), find_canvas_view(), synfigapp::Action::System::get_action_count(), synfigapp::Instance::get_canvas(), synfigapp::Instance::get_file_name(), synfigapp::CVSInfo::is_modified(), synfigapp::UIInterface::RESPONSE_CANCEL, synfigapp::UIInterface::RESPONSE_NO, synfigapp::UIInterface::RESPONSE_YES, save(), STATUS_CANCEL, and STATUS_OK.
void Instance::add_actions_to_menu | ( | Gtk::Menu * | menu, |
const synfigapp::Action::ParamList & | param_list, | ||
synfigapp::Action::Category | category = synfigapp::Action::CATEGORY_ALL |
||
) | const |
References synfigapp::Action::CATEGORY_HIDDEN, synfigapp::Action::compile_candidate_list(), studio::get_action_stock_id(), and process_action().
Referenced by make_param_menu().
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 | ||
) |
References _, synfigapp::Action::book(), studio::App::dialog_entry(), synfigapp::Action::BookEntry::factory, synfigapp::Action::BookEntry::get_param_vocab, synfigapp::Action::Param::get_string(), synfigapp::Action::Param::get_type(), synfigapp::Action::BookEntry::local_name, synfigapp::Action::BookEntry::name, synfigapp::Action::System::perform_action(), and synfigapp::Action::Param::TYPE_STRING.
Referenced by add_actions_to_group(), add_actions_to_menu(), and make_param_menu().
void Instance::make_param_menu | ( | Gtk::Menu * | menu, |
synfig::Canvas::Handle | canvas, | ||
synfigapp::ValueDesc | value_desc, | ||
float | location = 0.5f , |
||
bool | bezier = false |
||
) |
References _, synfigapp::Action::ParamList::add(), add_actions_to_menu(), ADD_IMAGE_MENU_ITEM, synfigapp::Action::book(), synfigapp::Action::CATEGORY_BEZIER, synfigapp::Action::CATEGORY_VALUEDESC, synfigapp::Action::CATEGORY_VALUENODE, synfigapp::CanvasInterface::convert(), synfigapp::Instance::find_canvas_interface(), find_canvas_view(), synfigapp::Instance::get_canvas(), synfigapp::ValueDesc::get_layer(), synfigapp::ValueDesc::get_param_name(), synfigapp::ValueDesc::get_static(), synfigapp::ValueDesc::get_value_node(), synfigapp::ValueDesc::get_value_type(), synfigapp::ValueDesc::is_animated(), synfigapp::ValueDesc::is_const(), synfigapp::ValueDesc::is_value_node(), studio::CanvasView::on_waypoint_clicked_canvasview(), synfigapp::ValueDesc::parent_is_layer(), synfigapp::ValueDesc::parent_is_value_node(), and process_action().
Referenced by make_param_menu().
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 |
|
static |
studio::Instance::CanvasTreeModel studio::Instance::canvas_tree_model |