Inkscape
Vector Graphics Editor
|
Namespaces | |
namespace | Implementation |
namespace | Internal |
Classes | |
class | DB |
class | Dependency |
A class to represent a dependency for an extension. More... | |
class | Effect |
Effects are extensions that take a document and do something to it in place. More... | |
class | ExecutionEnv |
class | ExpirationTimer |
class | Extension |
The object that is the basis for the Extension system. More... | |
class | Input |
class | InxParameter |
A class to represent the parameter of an extension. More... | |
class | InxWidget |
Base class to represent all widgets of an extension (including parameters) More... | |
class | Loader |
This class contains the mechanism to load c++ plugins dynamically. More... | |
class | Output |
class | ParamBool |
A boolean parameter. More... | |
class | ParamColor |
class | ParamFloat |
class | ParamInt |
class | ParamNotebook |
A class to represent a notebook parameter of an extension. More... | |
class | ParamOptionGroup |
class | ParamPath |
class | ParamString |
class | PathEffect |
class | PrefDialog |
A class to represent the preferences for an extension. More... | |
class | |
class | ProcessingAction |
class | Template |
class | TemplatePreset |
class | WidgetBox |
A box widget. More... | |
class | WidgetImage |
A label widget. More... | |
class | WidgetLabel |
A label widget. More... | |
class | WidgetSeparator |
A separator widget. More... | |
class | WidgetSpacer |
A separator widget. More... | |
Typedefs | |
typedef std::vector< std::shared_ptr< TemplatePreset > > | TemplatePresets |
typedef Implementation::Implementation *(* | _getImplementation) () |
typedef const gchar *(* | _getInkscapeVersion) () |
using | Mode = ParamPath::Mode |
using | TemplateShow = int |
typedef std::map< std::string, std::string > | TemplatePrefs |
Enumerations | |
enum | FileSaveMethod { FILE_SAVE_METHOD_SAVE_AS , FILE_SAVE_METHOD_SAVE_COPY , FILE_SAVE_METHOD_EXPORT , FILE_SAVE_METHOD_INKSCAPE_SVG , FILE_SAVE_METHOD_TEMPORARY } |
Used to distinguish between the various invocations of the save dialogs (and thus to determine the file type and save path offered in the dialog) More... | |
enum | TemplateVisibility : TemplateShow { TEMPLATE_ANY = -1 , TEMPLATE_HIDDEN = 0 , TEMPLATE_NEW_FROM = 1 , TEMPLATE_NEW_WELCOME = 2 , TEMPLATE_NEW_ICON = 3 , TEMPLATE_SIZE_LIST = 4 , TEMPLATE_SIZE_SEARCH = 8 , TEMPLATE_ALL = 255 } |
Functions | |
static bool | _find_filename_recursive (std::string directory, std::string const &filename) |
recursively searches directory for a file named filename; returns true if found | |
static void | check_extensions () |
static void | update_pref (Glib::ustring const &pref_path, gchar const *pref_default) |
Examines the given string preference and checks to see that at least one of the registered extensions matches it. If not, a default is assigned. | |
void | init () |
Invokes the init routines for internal modules. | |
template<typename Range , typename Value > | |
static bool | contains (Range &&range, Value const &value) |
void | load_user_extensions () |
void | load_shared_extensions () |
void | refresh_user_extensions () |
Refresh user extensions. | |
static void | check_extensions_internal (Extension *in_plug, gpointer in_data) |
static std::vector< Glib::RefPtr< Gio::File > > | get_files (Glib::RefPtr< Gio::AsyncResult > const &result, Glib::RefPtr< Gtk::FileDialog > const &file_dialog, Mode const mode, bool const select_multiple) |
std::unique_ptr< SPDocument > | open (Extension *key, char const *filename, bool is_importing) |
This is a generic function to use the open function of a module (including Autodetect) | |
void | save (Extension *key, SPDocument *doc, gchar const *filename, bool check_overwrite, bool official, Inkscape::Extension::FileSaveMethod save_method) |
This is a generic function to use the save function of a module (including Autodetect) | |
Print * | get_print (gchar const *key) |
bool | build_from_reprdoc (Inkscape::XML::Document *doc, std::unique_ptr< Implementation::Implementation > in_imp, std::string *baseDir, std::string *file_name) |
Creates a module from a Inkscape::XML::Document describing the module. | |
void | build_from_file (gchar const *filename) |
This function creates a module from a filename of an XML description. | |
void | build_from_mem (gchar const *buffer, std::unique_ptr< Implementation::Implementation > in_imp) |
Create a module from a buffer holding an XML description. | |
Glib::ustring | get_file_save_extension (FileSaveMethod method) |
Determine the desired default file extension depending on the given file save method. | |
Glib::ustring | get_file_save_path (SPDocument *doc, FileSaveMethod method) |
Determine the desired default save path depending on the given FileSaveMethod. | |
void | store_file_extension_in_prefs (Glib::ustring extension, FileSaveMethod method) |
Write the given file extension back to prefs so that it can be used later on. | |
void | store_save_path_in_prefs (Glib::ustring path, FileSaveMethod method) |
Write the given path back to prefs so that it can be used later on. | |
void | save (Extension *key, SPDocument *doc, char const *filename, bool check_overwrite, bool official, Inkscape::Extension::FileSaveMethod save_method) |
Print * | get_print (char const *key) |
void | build_from_file (char const *filename) |
void | build_from_mem (char const *buffer, std::unique_ptr< Implementation::Implementation > in_imp) |
Variables | |
DB | db |
This is the actual database object. | |
static std::vector< std::string > | user_extensions |
static std::vector< std::string > | shared_extensions |
Extension support.
This namespace contains the extension subsystem and implementations of the internal extensions. This includes input and output filters, bitmap extensions, and printing.
typedef Implementation::Implementation *(* Inkscape::Extension::_getImplementation) () |
Definition at line 27 of file loader.cpp.
typedef const gchar *(* Inkscape::Extension::_getInkscapeVersion) () |
Definition at line 28 of file loader.cpp.
using Inkscape::Extension::Mode = typedef ParamPath::Mode |
Definition at line 291 of file parameter-path.cpp.
typedef std::map<std::string, std::string> Inkscape::Extension::TemplatePrefs |
Definition at line 45 of file template.h.
typedef std::vector< std::shared_ptr< TemplatePreset > > Inkscape::Extension::TemplatePresets |
Definition at line 49 of file implementation.h.
using Inkscape::Extension::TemplateShow = typedef int |
Definition at line 31 of file template.h.
Enumerator | |
---|---|
TEMPLATE_ANY | |
TEMPLATE_HIDDEN | |
TEMPLATE_NEW_FROM | |
TEMPLATE_NEW_WELCOME | |
TEMPLATE_NEW_ICON | |
TEMPLATE_SIZE_LIST | |
TEMPLATE_SIZE_SEARCH | |
TEMPLATE_ALL |
Definition at line 32 of file template.h.
|
static |
recursively searches directory for a file named filename; returns true if found
Definition at line 391 of file extension.cpp.
References _find_filename_recursive(), and name.
Referenced by _find_filename_recursive(), and Inkscape::Extension::Extension::lookup_translation_catalog().
void Inkscape::Extension::build_from_file | ( | char const * | filename | ) |
void Inkscape::Extension::build_from_file | ( | gchar const * | filename | ) |
This function creates a module from a filename of an XML description.
filename | The file holding the XML description of the module. |
This function calls build_from_reprdoc with using sp_repr_read_file to create the reprdoc.
Definition at line 432 of file system.cpp.
References build_from_reprdoc(), Inkscape::GC::release(), and sp_repr_read_file().
Referenced by init(), load_shared_extensions(), and load_user_extensions().
void Inkscape::Extension::build_from_mem | ( | char const * | buffer, |
std::unique_ptr< Implementation::Implementation > | in_imp | ||
) |
void Inkscape::Extension::build_from_mem | ( | gchar const * | buffer, |
std::unique_ptr< Implementation::Implementation > | in_imp | ||
) |
Create a module from a buffer holding an XML description.
buffer | The buffer holding the XML description of the module. |
in_imp | An owning pointer to a freshly created implementation. |
This function calls build_from_reprdoc with using sp_repr_read_mem to create the reprdoc. It finds the length of the buffer using strlen.
Definition at line 459 of file system.cpp.
References build_from_reprdoc(), Inkscape::GC::release(), and sp_repr_read_mem().
Referenced by Inkscape::Extension::Internal::Filter::Filter::filter_init(), Inkscape::Extension::Internal::Filter::Filter::filters_load_node(), Inkscape::Extension::Internal::Bitmap::AdaptiveThreshold::init(), Inkscape::Extension::Internal::Bitmap::AddNoise::init(), Inkscape::Extension::Internal::Bitmap::Blur::init(), Inkscape::Extension::Internal::Bitmap::Channel::init(), Inkscape::Extension::Internal::Bitmap::Charcoal::init(), Inkscape::Extension::Internal::Bitmap::Colorize::init(), Inkscape::Extension::Internal::Bitmap::Contrast::init(), Inkscape::Extension::Internal::Bitmap::Crop::init(), Inkscape::Extension::Internal::Bitmap::CycleColormap::init(), Inkscape::Extension::Internal::Bitmap::Despeckle::init(), Inkscape::Extension::Internal::Bitmap::Edge::init(), Inkscape::Extension::Internal::Bitmap::Emboss::init(), Inkscape::Extension::Internal::Bitmap::Enhance::init(), Inkscape::Extension::Internal::Bitmap::Equalize::init(), Inkscape::Extension::Internal::Bitmap::GaussianBlur::init(), Inkscape::Extension::Internal::Bitmap::Implode::init(), Inkscape::Extension::Internal::Bitmap::Level::init(), Inkscape::Extension::Internal::Bitmap::LevelChannel::init(), Inkscape::Extension::Internal::Bitmap::MedianFilter::init(), Inkscape::Extension::Internal::Bitmap::Modulate::init(), Inkscape::Extension::Internal::Bitmap::Negate::init(), Inkscape::Extension::Internal::Bitmap::Normalize::init(), Inkscape::Extension::Internal::Bitmap::OilPaint::init(), Inkscape::Extension::Internal::Bitmap::Opacity::init(), Inkscape::Extension::Internal::Bitmap::Raise::init(), Inkscape::Extension::Internal::Bitmap::ReduceNoise::init(), Inkscape::Extension::Internal::Bitmap::Sample::init(), Inkscape::Extension::Internal::Bitmap::Shade::init(), Inkscape::Extension::Internal::Bitmap::Sharpen::init(), Inkscape::Extension::Internal::Bitmap::Solarize::init(), Inkscape::Extension::Internal::Bitmap::Spread::init(), Inkscape::Extension::Internal::Bitmap::Swirl::init(), Inkscape::Extension::Internal::Bitmap::Threshold::init(), Inkscape::Extension::Internal::Bitmap::Unsharpmask::init(), Inkscape::Extension::Internal::Bitmap::Wave::init(), Inkscape::Extension::Internal::BlurEdge::init(), Inkscape::Extension::Internal::CairoPsOutput::init(), Inkscape::Extension::Internal::CairoEpsOutput::init(), Inkscape::Extension::Internal::CairoRendererPdfOutput::init(), Inkscape::Extension::Internal::CdrInput::init(), Inkscape::Extension::Internal::Emf::init(), Inkscape::Extension::Internal::PrintEmf::init(), Inkscape::Extension::Internal::Filter::DiffuseLight::init(), Inkscape::Extension::Internal::Filter::MatteJelly::init(), Inkscape::Extension::Internal::Filter::SpecularLight::init(), Inkscape::Extension::Internal::Filter::Blur::init(), Inkscape::Extension::Internal::Filter::CleanEdges::init(), Inkscape::Extension::Internal::Filter::CrossBlur::init(), Inkscape::Extension::Internal::Filter::Feather::init(), Inkscape::Extension::Internal::Filter::ImageBlur::init(), Inkscape::Extension::Internal::Filter::Bump::init(), Inkscape::Extension::Internal::Filter::WaxBump::init(), Inkscape::Extension::Internal::Filter::Brilliance::init(), Inkscape::Extension::Internal::Filter::ChannelPaint::init(), Inkscape::Extension::Internal::Filter::ColorBlindness::init(), Inkscape::Extension::Internal::Filter::ColorShift::init(), Inkscape::Extension::Internal::Filter::Colorize::init(), Inkscape::Extension::Internal::Filter::ComponentTransfer::init(), Inkscape::Extension::Internal::Filter::Duochrome::init(), Inkscape::Extension::Internal::Filter::ExtractChannel::init(), Inkscape::Extension::Internal::Filter::FadeToBW::init(), Inkscape::Extension::Internal::Filter::Greyscale::init(), Inkscape::Extension::Internal::Filter::Invert::init(), Inkscape::Extension::Internal::Filter::Lighting::init(), Inkscape::Extension::Internal::Filter::LightnessContrast::init(), Inkscape::Extension::Internal::Filter::NudgeRGB::init(), Inkscape::Extension::Internal::Filter::NudgeCMY::init(), Inkscape::Extension::Internal::Filter::Quadritone::init(), Inkscape::Extension::Internal::Filter::SimpleBlend::init(), Inkscape::Extension::Internal::Filter::Solarize::init(), Inkscape::Extension::Internal::Filter::Tritone::init(), Inkscape::Extension::Internal::Filter::FeltFeather::init(), Inkscape::Extension::Internal::Filter::Roughen::init(), Inkscape::Extension::Internal::Filter::EdgeDetect::init(), Inkscape::Extension::Internal::Filter::Crosssmooth::init(), Inkscape::Extension::Internal::Filter::Outline::init(), Inkscape::Extension::Internal::Filter::NoiseFill::init(), Inkscape::Extension::Internal::Filter::Chromolitho::init(), Inkscape::Extension::Internal::Filter::CrossEngraving::init(), Inkscape::Extension::Internal::Filter::Drawing::init(), Inkscape::Extension::Internal::Filter::Electrize::init(), Inkscape::Extension::Internal::Filter::NeonDraw::init(), Inkscape::Extension::Internal::Filter::PointEngraving::init(), Inkscape::Extension::Internal::Filter::Posterize::init(), Inkscape::Extension::Internal::Filter::PosterizeBasic::init(), Inkscape::Extension::Internal::Filter::Snow::init(), Inkscape::Extension::Internal::Filter::ColorizableDropShadow::init(), Inkscape::Extension::Internal::Filter::InkBlot::init(), Inkscape::Extension::Internal::Filter::Blend::init(), Inkscape::Extension::Internal::Filter::ChannelTransparency::init(), Inkscape::Extension::Internal::Filter::LightEraser::init(), Inkscape::Extension::Internal::Filter::Opacity::init(), Inkscape::Extension::Internal::Filter::Silhouette::init(), Inkscape::Extension::Internal::GdkpixbufInput::init(), Inkscape::Extension::Internal::GimpGrad::init(), Inkscape::Extension::Internal::Grid::init(), Inkscape::Extension::Internal::LatexOutput::init(), Inkscape::Extension::Internal::PrintLatex::init(), Inkscape::Extension::Internal::OdfOutput::init(), Inkscape::Extension::Internal::PdfInput::init(), Inkscape::Extension::Internal::PngOutput::init(), Inkscape::Extension::Internal::PovOutput::init(), Inkscape::Extension::Internal::Svg::init(), Inkscape::Extension::Internal::Svgz::init(), Inkscape::Extension::Internal::TemplateFromFile::init(), Inkscape::Extension::Internal::TemplateOther::init(), Inkscape::Extension::Internal::TemplatePaper::init(), Inkscape::Extension::Internal::TemplateScreen::init(), Inkscape::Extension::Internal::TemplateSocial::init(), Inkscape::Extension::Internal::TemplateVideo::init(), Inkscape::Extension::Internal::VsdInput::init(), Inkscape::Extension::Internal::Wmf::init(), Inkscape::Extension::Internal::PrintWmf::init(), and Inkscape::Extension::Internal::WpgInput::init().
bool Inkscape::Extension::build_from_reprdoc | ( | Inkscape::XML::Document * | doc, |
std::unique_ptr< Implementation::Implementation > | in_imp, | ||
std::string * | baseDir, | ||
std::string * | file_name | ||
) |
Creates a module from a Inkscape::XML::Document describing the module.
doc | The XML description of the module |
This function basically has two segments. The first is that it goes through the Repr tree provided, and determines what kind of module this is, and what kind of implementation to use. All of these are then stored in two enums that are defined in this function. This makes it easier to add additional types (which will happen in the future, I'm sure).
Second, there is case statements for these enums. The first one is the type of module. This is the one where the module is actually created. After that, then the implementation is applied to get the load and unload functions. If there is no implementation then these are not set. This case could apply to modules that are built in (like the SVG load/save functions).
Definition at line 305 of file system.cpp.
References db, Inkscape::XML::Node::firstChild(), MODULE_EXTENSION, MODULE_FILTER, MODULE_INPUT, MODULE_OUTPUT, MODULE_PATH_EFFECT, MODULE_PLUGIN, MODULE_PRINT, MODULE_TEMPLATE, MODULE_UNKNOWN_FUNC, MODULE_UNKNOWN_IMP, MODULE_XSLT, Inkscape::XML::Node::name(), Inkscape::XML::Node::next(), Inkscape::XML::Node::root(), and Inkscape::Extension::DB::take_ownership().
Referenced by build_from_file(), and build_from_mem().
|
static |
Definition at line 337 of file init.cpp.
References check_extensions_internal(), db, Inkscape::Extension::Extension::error_file_close(), Inkscape::Extension::Extension::error_file_open(), and Inkscape::Extension::DB::foreach().
Referenced by init(), and refresh_user_extensions().
|
static |
Definition at line 326 of file init.cpp.
Referenced by check_extensions().
|
static |
Definition at line 274 of file init.cpp.
References end.
Referenced by load_shared_extensions(), and load_user_extensions().
Glib::ustring Inkscape::Extension::get_file_save_extension | ( | FileSaveMethod | method | ) |
Determine the desired default file extension depending on the given file save method.
The returned string is guaranteed to be non-empty.
method | the file save method of the dialog |
Definition at line 479 of file system.cpp.
References FILE_SAVE_METHOD_EXPORT, FILE_SAVE_METHOD_INKSCAPE_SVG, FILE_SAVE_METHOD_SAVE_AS, FILE_SAVE_METHOD_SAVE_COPY, FILE_SAVE_METHOD_TEMPORARY, Inkscape::Preferences::get(), and Inkscape::Preferences::getString().
Referenced by save(), and sp_file_save_dialog().
Glib::ustring Inkscape::Extension::get_file_save_path | ( | SPDocument * | doc, |
FileSaveMethod | method | ||
) |
Determine the desired default save path depending on the given FileSaveMethod.
The returned string is guaranteed to be non-empty.
method | the file save method of the dialog |
doc | the file's document |
Definition at line 506 of file system.cpp.
References FILE_SAVE_METHOD_EXPORT, FILE_SAVE_METHOD_INKSCAPE_SVG, FILE_SAVE_METHOD_SAVE_AS, FILE_SAVE_METHOD_SAVE_COPY, FILE_SAVE_METHOD_TEMPORARY, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), SPDocument::getDocumentFilename(), and Inkscape::Preferences::getString().
Referenced by sp_file_save_dialog().
|
static |
Definition at line 294 of file parameter-path.cpp.
Referenced by Inkscape::Extension::ParamPath::on_file_dialog_response().
Print * Inkscape::Extension::get_print | ( | char const * | key | ) |
Print * Inkscape::Extension::get_print | ( | gchar const * | key | ) |
Definition at line 282 of file system.cpp.
References db, Inkscape::Extension::DB::get(), and key.
Referenced by Inkscape::Extension::Internal::Emf::print_document_to_file(), Inkscape::Extension::Internal::Wmf::print_document_to_file(), Inkscape::Extension::Internal::LatexOutput::save(), and sp_print_document_to_file().
void Inkscape::Extension::init | ( | ) |
Invokes the init routines for internal modules.
This should be a list of all the internal modules that need to initialized. This is just a convenient place to put them.
Definition at line 156 of file init.cpp.
References build_from_file(), check_extensions(), Inkscape::IO::Resource::EXTENSIONS, Inkscape::Extension::Internal::Filter::Filter::filters_all(), Inkscape::IO::Resource::get_filenames(), Inkscape::Extension::Internal::Bitmap::AdaptiveThreshold::init(), Inkscape::Extension::Internal::Bitmap::AddNoise::init(), Inkscape::Extension::Internal::Bitmap::Blur::init(), Inkscape::Extension::Internal::Bitmap::Channel::init(), Inkscape::Extension::Internal::Bitmap::Charcoal::init(), Inkscape::Extension::Internal::Bitmap::Colorize::init(), Inkscape::Extension::Internal::Bitmap::Contrast::init(), Inkscape::Extension::Internal::Bitmap::Crop::init(), Inkscape::Extension::Internal::Bitmap::CycleColormap::init(), Inkscape::Extension::Internal::Bitmap::Despeckle::init(), Inkscape::Extension::Internal::Bitmap::Edge::init(), Inkscape::Extension::Internal::Bitmap::Emboss::init(), Inkscape::Extension::Internal::Bitmap::Enhance::init(), Inkscape::Extension::Internal::Bitmap::Equalize::init(), Inkscape::Extension::Internal::Bitmap::GaussianBlur::init(), Inkscape::Extension::Internal::Bitmap::Implode::init(), Inkscape::Extension::Internal::Bitmap::Level::init(), Inkscape::Extension::Internal::Bitmap::LevelChannel::init(), Inkscape::Extension::Internal::Bitmap::MedianFilter::init(), Inkscape::Extension::Internal::Bitmap::Modulate::init(), Inkscape::Extension::Internal::Bitmap::Negate::init(), Inkscape::Extension::Internal::Bitmap::Normalize::init(), Inkscape::Extension::Internal::Bitmap::OilPaint::init(), Inkscape::Extension::Internal::Bitmap::Opacity::init(), Inkscape::Extension::Internal::Bitmap::Raise::init(), Inkscape::Extension::Internal::Bitmap::ReduceNoise::init(), Inkscape::Extension::Internal::Bitmap::Sample::init(), Inkscape::Extension::Internal::Bitmap::Shade::init(), Inkscape::Extension::Internal::Bitmap::Sharpen::init(), Inkscape::Extension::Internal::Bitmap::Solarize::init(), Inkscape::Extension::Internal::Bitmap::Spread::init(), Inkscape::Extension::Internal::Bitmap::Swirl::init(), Inkscape::Extension::Internal::Bitmap::Unsharpmask::init(), Inkscape::Extension::Internal::Bitmap::Wave::init(), Inkscape::Extension::Internal::BlurEdge::init(), Inkscape::Extension::Internal::CairoPsOutput::init(), Inkscape::Extension::Internal::CairoEpsOutput::init(), Inkscape::Extension::Internal::CairoRendererPdfOutput::init(), Inkscape::Extension::Internal::CdrInput::init(), Inkscape::Extension::Internal::Emf::init(), Inkscape::Extension::Internal::PrintEmf::init(), Inkscape::Extension::Internal::GdkpixbufInput::init(), Inkscape::Extension::Internal::GimpGrad::init(), Inkscape::Extension::Internal::Grid::init(), Inkscape::Extension::Internal::LatexOutput::init(), Inkscape::Extension::Internal::PrintLatex::init(), Inkscape::Extension::Internal::OdfOutput::init(), Inkscape::Extension::Internal::PdfInput::init(), Inkscape::Extension::Internal::PngOutput::init(), Inkscape::Extension::Internal::PovOutput::init(), Inkscape::Extension::Internal::Svg::init(), Inkscape::Extension::Internal::Svgz::init(), Inkscape::Extension::Internal::TemplateFromFile::init(), Inkscape::Extension::Internal::TemplateOther::init(), Inkscape::Extension::Internal::TemplatePaper::init(), Inkscape::Extension::Internal::TemplateScreen::init(), Inkscape::Extension::Internal::TemplateSocial::init(), Inkscape::Extension::Internal::TemplateVideo::init(), Inkscape::Extension::Internal::VsdInput::init(), Inkscape::Extension::Internal::Wmf::init(), Inkscape::Extension::Internal::PrintWmf::init(), Inkscape::Extension::Internal::WpgInput::init(), load_shared_extensions(), load_user_extensions(), Inkscape::IO::Resource::SYSTEM, and update_pref().
Referenced by InkscapeApplication::on_startup().
void Inkscape::Extension::load_shared_extensions | ( | ) |
Definition at line 296 of file init.cpp.
References build_from_file(), contains(), Inkscape::IO::Resource::EXTENSIONS, Inkscape::IO::Resource::get_filenames(), Inkscape::IO::Resource::SHARED, shared_extensions, and user_extensions.
Referenced by init().
void Inkscape::Extension::load_user_extensions | ( | ) |
Definition at line 282 of file init.cpp.
References build_from_file(), contains(), Inkscape::IO::Resource::EXTENSIONS, Inkscape::IO::Resource::get_filenames(), shared_extensions, Inkscape::IO::Resource::USER, and user_extensions.
Referenced by init(), and refresh_user_extensions().
std::unique_ptr< SPDocument > Inkscape::Extension::open | ( | Extension * | key, |
char const * | filename, | ||
bool | is_importing | ||
) |
This is a generic function to use the open function of a module (including Autodetect)
key | Identifier of which module to use |
filename | The file that should be opened |
is_importing | Is the request an import request, for example drag & drop |
First things first, are we looking at an autodetection? Well if that's the case then the module needs to be found, and that is done with a database lookup through the module DB. The foreach function is called, with the parameter being a gpointer array. It contains both the filename (to find its extension) and where to write the module when it is found.
If there is no autodetection, then the module database is queried with the key given.
If everything is cool at this point, the module is loaded, and there is possibility for preferences. If there is a function, then it is executed to get the dialog to be displayed. After it is finished the function continues.
Lastly, the open function is called in the module itself.
Definition at line 66 of file system.cpp.
References db, Inkscape::Extension::Input::find_by_filename(), Inkscape::Preferences::get(), Inkscape::Extension::DB::get(), Inkscape::Extension::Extension::get_id(), Inkscape::Preferences::getBool(), key, Inkscape::Extension::Extension::loaded(), Inkscape::Extension::Input::open(), Inkscape::Extension::Extension::prefs(), Inkscape::Extension::Extension::set_gui(), Inkscape::Extension::Extension::set_state(), sp_ui_error_dialog(), and Inkscape::Extension::Extension::STATE_LOADED.
Referenced by file_import(), ink_file_open(), and Inkscape::Extension::Implementation::Script::open().
void Inkscape::Extension::refresh_user_extensions | ( | ) |
Refresh user extensions.
Remember to call check_extensions() once completed.
No need to add shared extensions here (extension manager update user ones)
Definition at line 318 of file init.cpp.
References check_extensions(), and load_user_extensions().
void Inkscape::Extension::save | ( | Extension * | key, |
SPDocument * | doc, | ||
char const * | filename, | ||
bool | check_overwrite, | ||
bool | official, | ||
Inkscape::Extension::FileSaveMethod | save_method | ||
) |
void Inkscape::Extension::save | ( | Extension * | key, |
SPDocument * | doc, | ||
gchar const * | filename, | ||
bool | check_overwrite, | ||
bool | official, | ||
Inkscape::Extension::FileSaveMethod | save_method | ||
) |
This is a generic function to use the save function of a module (including Autodetect)
key | Identifier of which module to use |
doc | The document to be saved |
filename | The file that the document should be saved to |
official | (optional) whether to set :output_module and :modified in the document; is true for normal save, false for temporary saves |
First things first, are we looking at an autodetection? Well if that's the case then the module needs to be found, and that is done with a database lookup through the module DB. The foreach function is called, with the parameter being a gpointer array. It contains both the filename (to find its extension) and where to write the module when it is found.
If there is no autodetection the module database is queried with the key given.
If everything is cool at this point, the module is loaded, and there is possibility for preferences. If there is a function, then it is executed to get the dialog to be displayed. After it is finished the function continues.
Lastly, the save function is called in the module itself.
Definition at line 162 of file system.cpp.
References Inkscape::XML::Node::attribute(), Inkscape::Extension::Output::causes_dataloss(), SPDocument::changeFilenameAndHrefs(), db, Inkscape::IO::file_is_writable(), Inkscape::IO::file_test(), Inkscape::Extension::DB::get(), get_file_save_extension(), Inkscape::Extension::Extension::get_id(), Inkscape::Extension::DB::get_output_list(), SPDocument::getDocumentFilename(), SPDocument::getReprRoot(), SPDocument::isModifiedSinceSave(), key, Inkscape::Extension::Extension::loaded(), Inkscape::Extension::Extension::prefs(), Inkscape::XML::Node::removeAttribute(), Inkscape::Extension::Output::save(), Inkscape::Extension::Extension::set_state(), Inkscape::XML::Node::setAttribute(), SPDocument::setModifiedSinceSave(), sp_ui_overwrite_file(), Inkscape::Extension::Extension::STATE_LOADED, and store_file_extension_in_prefs().
Referenced by Inkscape::Extension::Implementation::Script::_change_extension(), InkFileExportCmd::do_export_vector(), Inkscape::Extension::Internal::SvgBuilder::endLayer(), file_save(), and Inkscape::Extension::Implementation::Script::save().
void Inkscape::Extension::store_file_extension_in_prefs | ( | Glib::ustring | extension, |
FileSaveMethod | method | ||
) |
Write the given file extension back to prefs so that it can be used later on.
extension | the file extension which should be written to prefs |
method | the file save method of the dialog |
Definition at line 558 of file system.cpp.
References FILE_SAVE_METHOD_EXPORT, FILE_SAVE_METHOD_INKSCAPE_SVG, FILE_SAVE_METHOD_SAVE_AS, FILE_SAVE_METHOD_SAVE_COPY, FILE_SAVE_METHOD_TEMPORARY, Inkscape::Preferences::get(), and Inkscape::Preferences::setString().
Referenced by save().
void Inkscape::Extension::store_save_path_in_prefs | ( | Glib::ustring | path, |
FileSaveMethod | method | ||
) |
Write the given path back to prefs so that it can be used later on.
path | the path which should be written to prefs |
method | the file save method of the dialog |
Definition at line 576 of file system.cpp.
References FILE_SAVE_METHOD_EXPORT, FILE_SAVE_METHOD_INKSCAPE_SVG, FILE_SAVE_METHOD_SAVE_AS, FILE_SAVE_METHOD_SAVE_COPY, FILE_SAVE_METHOD_TEMPORARY, Inkscape::Preferences::get(), and Inkscape::Preferences::setString().
Referenced by sp_file_save_dialog().
|
static |
Examines the given string preference and checks to see that at least one of the registered extensions matches it. If not, a default is assigned.
pref_path | Preference path to update |
pref_default | Default string to set |
extension_family | List of extensions to search |
Definition at line 136 of file init.cpp.
References db, Inkscape::Preferences::get(), Inkscape::Preferences::getString(), and Inkscape::Preferences::setString().
Referenced by init().
DB Inkscape::Extension::db |
This is the actual database object.
There is only one of these.
Definition at line 32 of file db.cpp.
Referenced by Inkscape::Extension::Implementation::Script::_change_extension(), add_document_actions_effect(), build_from_reprdoc(), Inkscape::Extension::Dependency::check(), Inkscape::Extension::Implementation::Script::check(), Inkscape::Extension::Internal::CairoPsOutput::check(), Inkscape::Extension::Internal::CairoEpsOutput::check(), Inkscape::Extension::Internal::CairoRendererPdfOutput::check(), Inkscape::Extension::Internal::Emf::check(), Inkscape::Extension::Internal::LatexOutput::check(), Inkscape::Extension::Internal::Wmf::check(), check_extensions(), Inkscape::UI::Dialog::create_export_filters(), Inkscape::UI::Dialog::create_open_filters(), InkFileExportCmd::do_export(), InkFileExportCmd::do_export_ps_pdf(), InkFileExportCmd::do_export_svg(), Inkscape::UI::Dialog::ExtensionsGallery::ExtensionsGallery(), Inkscape::Extension::Input::find_by_filename(), Inkscape::Extension::Input::find_by_mime(), Inkscape::Extension::Template::get_any_preset(), Inkscape::Extension::Template::get_any_preset(), get_print(), Inkscape::UI::Dialog::ExtensionList::getExtension(), Inkscape::UI::Widget::TemplateList::init(), InkscapeApplication::init_extension_action_data(), ink_file_open(), open(), Inkscape::Extension::Implementation::Script::open(), Inkscape::UI::Toolbar::PageToolbar::populate_sizes(), InkscapeApplication::print_input_type_list(), Inkscape::Extension::PathEffect::processPathEffects(), save(), Inkscape::Extension::Internal::Emf::save(), Inkscape::Extension::Internal::Wmf::save(), Inkscape::Extension::Internal::CairoPsOutput::save(), Inkscape::Extension::Internal::CairoRendererPdfOutput::save(), Inkscape::Extension::Internal::CairoEpsOutput::save(), Inkscape::Extension::Implementation::Script::save(), Inkscape::UI::Dialog::ExtensionList::setup(), sp_file_save_dialog(), sp_file_save_document(), sp_file_save_template(), and update_pref().
|
static |
Definition at line 147 of file init.cpp.
Referenced by load_shared_extensions(), and load_user_extensions().
|
static |
Definition at line 146 of file init.cpp.
Referenced by load_shared_extensions(), and load_user_extensions().