Inkscape
Vector Graphics Editor
|
#include <export.h>
Public Member Functions | |
Export () | |
~Export () final | |
![]() | |
DialogBase (char const *prefs_path=nullptr, Glib::ustring dialog_type={}) | |
DialogBase constructor. | |
DialogBase (DialogBase const &)=delete | |
DialogBase & | operator= (DialogBase const &)=delete |
~DialogBase () override | |
virtual void | update () |
The update() method is essential to Gtk state management. | |
void | setDesktop (SPDesktop *new_desktop) |
Called when the desktop might have changed for this dialog. | |
void | on_map () override |
Glib::ustring const & | get_name () const |
Glib::ustring const & | getPrefsPath () const |
Glib::ustring const & | get_type () const |
const Glib::ustring & | get_icon () const |
void | blink () |
Highlight notebook where dialog already exists. | |
virtual void | focus_dialog () |
void | defocus_dialog () |
bool | getShowing () |
void | fix_inner_scroll (Gtk::ScrolledWindow &scrollwin) |
SPDesktop * | getDesktop () const |
Static Public Member Functions | |
static std::string | absolutizePath (SPDocument *doc, const std::string &filename) |
Convert path to absolute path. | |
static bool | unConflictFilename (SPDocument *doc, std::string &filename, std::string const extension) |
static std::string | filePathFromObject (SPDocument *doc, SPObject *obj, const std::string &file_entry_text) |
static std::string | prependDirectory (const std::string &name, const std::string &orig, SPDocument *doc=nullptr) |
Adds the full directory path to the final part of a file name. | |
static std::string | defaultFilename (SPDocument *doc, const std::string &filename_entry_text, const std::string &extension) |
static bool | checkOrCreateDirectory (std::string const &filename) |
Checks if the directory exists and if not, tries to create the directory and if failed, displays an error message. | |
static bool | exportRaster (Geom::Rect const &area, unsigned long int const &width, unsigned long int const &height, float const &dpi, Inkscape::Colors::Color const &bgcolor, Glib::ustring const &filename, bool overwrite, unsigned(*callback)(float, void *), void *data, Inkscape::Extension::Output *extension, std::vector< SPItem const * > *items=nullptr) |
Export to raster graphics. | |
static bool | exportVector (Inkscape::Extension::Output *extension, SPDocument *doc, Glib::ustring const &filename, bool overwrite, Geom::Rect const &area) |
static bool | exportVector (Inkscape::Extension::Output *extension, SPDocument *doc, Glib::ustring const &filename, bool overwrite, const std::vector< SPItem const * > &items, SPPage const *page) |
static bool | exportVector (Inkscape::Extension::Output *extension, SPDocument *doc, Glib::ustring const &filename, bool overwrite, const std::vector< SPItem const * > &items, const std::vector< SPPage const * > &pages) |
Export to vector graphics. | |
Private Member Functions | |
void | setDefaultNotebookPage () |
void | onNotebookPageSwitch (Widget *page, unsigned page_number) |
void | documentReplaced () override |
void | desktopReplaced () override |
Called when the desktop has certainly changed. | |
void | selectionChanged (Inkscape::Selection *selection) override |
void | selectionModified (Inkscape::Selection *selection, unsigned flags) override |
Private Attributes | |
Glib::RefPtr< Gtk::Builder > | builder |
Gtk::Box & | container |
Gtk::Notebook & | export_notebook |
SingleExport & | single_image |
BatchExport & | batch_export |
Inkscape::Preferences * | prefs = nullptr |
std::map< notebook_page, int > | pages |
sigc::scoped_connection | notebook_signal |
Additional Inherited Members | |
![]() | |
InkscapeApplication * | getApp () const |
SPDocument * | getDocument () const |
Selection * | getSelection () const |
void | setShowing (bool showing) |
function called from notebook dialog that performs an update of the dialog and sets the dialog showing state true | |
![]() | |
Glib::ustring | _name |
Glib::ustring const | _prefs_path |
Glib::ustring const | _dialog_type |
Inkscape::UI::Dialog::Export::Export | ( | ) |
Definition at line 40 of file export.cpp.
References Inkscape::append(), container, Inkscape::UI::create_builder(), export_notebook, Inkscape::Preferences::get(), Inkscape::UI::get_widget(), notebook_signal, onNotebookPageSwitch(), prefs, and setDefaultNotebookPage().
|
finaldefault |
|
static |
Convert path to absolute path.
Definition at line 135 of file export.cpp.
References SPDocument::getDocumentFilename().
Referenced by checkOrCreateDirectory(), exportRaster(), exportVector(), Inkscape::UI::Dialog::SingleExport::onExport(), and unConflictFilename().
|
static |
Checks if the directory exists and if not, tries to create the directory and if failed, displays an error message.
Definition at line 175 of file export.cpp.
References absolutizePath(), Inkscape::UI::Dialog::DialogBase::desktop, Inkscape::ERROR_MESSAGE, Inkscape::IO::file_test(), Inkscape::MessageStack::flash(), SPDesktop::getDocument(), SPDesktop::messageStack(), Inkscape::IO::sanitizeString(), and sp_ui_error_dialog().
Referenced by Inkscape::UI::Dialog::SingleExport::onExport().
|
static |
Definition at line 512 of file export.cpp.
References SPDocument::getDocumentFilename(), and prependDirectory().
Referenced by Inkscape::UI::Dialog::SingleExport::loadExportHints(), and Inkscape::UI::Dialog::SingleExport::onBrowse().
|
overrideprivatevirtual |
Called when the desktop has certainly changed.
It may have changed to nullptr when destructing the dialog, so the override should expect nullptr too.
Reimplemented from Inkscape::UI::Dialog::DialogBase.
Definition at line 79 of file export.cpp.
References batch_export, documentReplaced(), Inkscape::UI::Dialog::DialogBase::getApp(), Inkscape::UI::Dialog::DialogBase::getDesktop(), Inkscape::UI::Dialog::BatchExport::setApp(), Inkscape::UI::Dialog::SingleExport::setApp(), Inkscape::UI::Dialog::BatchExport::setDesktop(), Inkscape::UI::Dialog::SingleExport::setDesktop(), and single_image.
|
overrideprivatevirtual |
Reimplemented from Inkscape::UI::Dialog::DialogBase.
Definition at line 73 of file export.cpp.
References batch_export, Inkscape::UI::Dialog::DialogBase::getDocument(), Inkscape::UI::Dialog::BatchExport::setDocument(), Inkscape::UI::Dialog::SingleExport::setDocument(), and single_image.
Referenced by desktopReplaced().
|
static |
Export to raster graphics.
Path to temporary PNG file. Value is in platform-native encoding (see Glib::filename_to_utf8).
Definition at line 203 of file export.cpp.
References absolutizePath(), data, Inkscape::UI::Dialog::DialogBase::desktop, Inkscape::ERROR_MESSAGE, EXPORT_ERROR, EXPORT_OK, Inkscape::Extension::Output::export_raster(), Inkscape::MessageStack::flash(), Inkscape::MessageStack::flashF(), Inkscape::Extension::Extension::get_param_bool(), Inkscape::Extension::Extension::get_param_float(), Inkscape::Extension::Extension::get_param_int(), SPDesktop::getDocument(), Geom::Rect::hasZeroArea(), Inkscape::UI::Widget::height, Inkscape::INFORMATION_MESSAGE, Inkscape::Extension::Output::is_raster(), items, SPDesktop::messageStack(), result, Inkscape::IO::sanitizeString(), sp_export_png_file(), sp_ui_error_dialog(), sp_ui_overwrite_file(), and width.
Referenced by Inkscape::UI::Dialog::BatchExport::onExport(), and Inkscape::UI::Dialog::SingleExport::onExport().
|
static |
Export to vector graphics.
Definition at line 330 of file export.cpp.
References absolutizePath(), Inkscape::ObjectSet::add(), SPObject::cropToObjects(), Inkscape::PageManager::deletePage(), Inkscape::UI::Dialog::DialogBase::desktop, SPDocument::ensureUpToDate(), Inkscape::ERROR_MESSAGE, Inkscape::ObjectSet::fitCanvas(), Inkscape::MessageStack::flash(), Inkscape::MessageStack::flashF(), SPObject::getIds(), SPDocument::getObjectById(), SPDocument::getPageManager(), SPDocument::getRoot(), Inkscape::INFORMATION_MESSAGE, Inkscape::Extension::Output::is_raster(), item, items, SPDesktop::messageStack(), page, pages, Inkscape::IO::sanitizeString(), Inkscape::Extension::Output::save(), sp_ui_error_dialog(), sp_ui_overwrite_file(), and SPDocument::vacuumDocument().
|
static |
Definition at line 313 of file export.cpp.
References exportVector(), items, page, and pages.
|
static |
Definition at line 300 of file export.cpp.
References Inkscape::PageManager::disablePages(), Inkscape::PageManager::enablePages(), SPDocument::ensureUpToDate(), exportVector(), SPDocument::fitToRect(), Inkscape::PageManager::getFirstPage(), SPDocument::getPageManager(), and page.
Referenced by exportVector(), exportVector(), Inkscape::UI::Dialog::BatchExport::onExport(), and Inkscape::UI::Dialog::SingleExport::onExport().
|
static |
Definition at line 453 of file export.cpp.
References SPObject::getId(), and prependDirectory().
Referenced by Inkscape::UI::Dialog::SingleExport::loadExportHints().
|
private |
Definition at line 110 of file export.cpp.
References Inkscape::UI::Dialog::BATCH_EXPORT, batch_export, Inkscape::UI::Dialog::DialogBase::desktop, Inkscape::UI::Dialog::DialogBase::getDesktop(), SPDesktop::getSelection(), pages, Inkscape::UI::Dialog::DialogBase::selection, Inkscape::UI::Dialog::BatchExport::selectionChanged(), Inkscape::UI::Dialog::SingleExport::selectionChanged(), Inkscape::UI::Dialog::SINGLE_IMAGE, and single_image.
Referenced by Export().
|
static |
Adds the full directory path to the final part of a file name.
name
and starting with the directory part ofname
(if it is an absolute path or empty)orig
doc
orDefinition at line 483 of file export.cpp.
References SPDocument::getDocumentFilename(), Inkscape::IO::Resource::homedir_path(), name, and orig.
Referenced by defaultFilename(), filePathFromObject(), and Inkscape::UI::Dialog::SingleExport::loadExportHints().
|
overrideprivatevirtual |
Reimplemented from Inkscape::UI::Dialog::DialogBase.
Definition at line 89 of file export.cpp.
References Inkscape::UI::Dialog::BATCH_EXPORT, batch_export, export_notebook, pages, Inkscape::UI::Dialog::DialogBase::selection, Inkscape::UI::Dialog::BatchExport::selectionChanged(), Inkscape::UI::Dialog::SingleExport::selectionChanged(), Inkscape::UI::Dialog::SINGLE_IMAGE, and single_image.
|
overrideprivate |
Definition at line 99 of file export.cpp.
References Inkscape::UI::Dialog::BATCH_EXPORT, batch_export, export_notebook, pages, Inkscape::UI::Dialog::DialogBase::selection, Inkscape::UI::Dialog::BatchExport::selectionModified(), Inkscape::UI::Dialog::SingleExport::selectionModified(), Inkscape::UI::Dialog::SINGLE_IMAGE, and single_image.
|
private |
Definition at line 66 of file export.cpp.
References Inkscape::UI::Dialog::BATCH_EXPORT, batch_export, export_notebook, pages, Inkscape::UI::Dialog::SINGLE_IMAGE, and single_image.
Referenced by Export().
|
static |
Definition at line 151 of file export.cpp.
References absolutizePath(), and Inkscape::IO::file_test().
Referenced by Inkscape::UI::Dialog::BatchExport::onExport().
|
private |
Definition at line 64 of file export.h.
Referenced by desktopReplaced(), documentReplaced(), onNotebookPageSwitch(), selectionChanged(), selectionModified(), and setDefaultNotebookPage().
|
private |
|
private |
|
private |
Definition at line 62 of file export.h.
Referenced by Export(), selectionChanged(), selectionModified(), and setDefaultNotebookPage().
|
private |
|
private |
Definition at line 70 of file export.h.
Referenced by exportVector(), exportVector(), onNotebookPageSwitch(), selectionChanged(), selectionModified(), and setDefaultNotebookPage().
|
private |
|
private |
Definition at line 63 of file export.h.
Referenced by desktopReplaced(), documentReplaced(), onNotebookPageSwitch(), selectionChanged(), selectionModified(), and setDefaultNotebookPage().