Inkscape
Vector Graphics Editor
|
#include <template-from-file.h>
Public Member Functions | |
TemplatePresetFile (Template *mod, std::string const &filename) | |
A file based template preset. | |
![]() | |
TemplatePreset (Template *mod, const Inkscape::XML::Node *repr, TemplatePrefs prefs={}, int priority=0) | |
Parse the inx xml node for preset information. | |
~TemplatePreset () | |
std::string const & | get_key () const |
std::string const & | get_icon () const |
std::string const & | get_category () const |
std::string const & | get_name () const |
std::string const & | get_label () const |
std::string const & | get_description () const |
int | get_sort_priority () const |
int | get_visibility () const |
bool | is_visible (TemplateShow mode) |
std::unique_ptr< SPDocument > | new_from_template (TemplatePrefs const &others={}) |
Generate a new document from this preset. | |
void | resize_to_template (SPDocument *doc, SPPage *page, const TemplatePrefs &others={}) |
Resize the given page to however the page format requires it to be. | |
bool | match_size (double width, double height, const TemplatePrefs &others={}) |
Reverse match for templates, allowing page duplication and labeling. | |
std::string | get_icon_path () const |
Private Member Functions | |
void | _load_data (const Inkscape::XML::Node *root) |
Additional Inherited Members | |
![]() | |
std::string | _get_icon_path (std::string const &name) const |
bool | setup_prefs (const TemplatePrefs &others={}) |
Setup the preferences and ask the user to fill in the remaineder. | |
void | _add_prefs (const TemplatePrefs &prefs) |
Called by setup_prefs to save the given prefs into this extension. | |
![]() | |
std::string | _key |
std::string | _icon |
std::string | _name |
std::string | _label |
std::string | _desc |
std::string | _category |
int | _priority |
int | _visibility |
TemplatePrefs | _prefs |
Definition at line 26 of file template-from-file.h.
Inkscape::Extension::Internal::TemplatePresetFile::TemplatePresetFile | ( | Template * | mod, |
std::string const & | filename | ||
) |
A file based template preset.
Definition at line 41 of file template-from-file.cpp.
References Inkscape::Extension::TemplatePreset::_key, _load_data(), Inkscape::Extension::TemplatePreset::_name, Inkscape::Extension::TemplatePreset::_prefs, Inkscape::Extension::TemplatePreset::_visibility, root, Inkscape::XML::Node::root(), sp_repr_lookup_name(), sp_repr_read_file(), and Inkscape::Extension::TEMPLATE_NEW_ICON.
|
private |
Definition at line 72 of file template-from-file.cpp.
References Inkscape::Extension::TemplatePreset::_category, Inkscape::Extension::TemplatePreset::_desc, Inkscape::Extension::TemplatePreset::_icon, Inkscape::Extension::TemplatePreset::_key, Inkscape::Extension::TemplatePreset::_label, Inkscape::Extension::TemplatePreset::_name, Inkscape::Extension::TemplatePreset::_priority, Inkscape::Extension::Internal::err(), root, and sp_repr_lookup_content().
Referenced by TemplatePresetFile().