Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
file.h File Reference

Go to the source code of this file.

Classes

class  Inkscape::IO::TempFilename
 

Namespaces

namespace  Gio
 
namespace  Inkscape
 Helper class to stream background task notifications as a series of messages.
 
namespace  Inkscape::IO
 Low-level IO code.
 

Functions

std::unique_ptr< SPDocumentink_file_new (std::string const &Template="")
 Create a blank document, remove any template data.
 
std::unique_ptr< SPDocumentink_file_open (std::span< char const > buffer)
 Open a document from memory.
 
std::pair< std::unique_ptr< SPDocument >, bool > ink_file_open (Glib::RefPtr< Gio::File > const &file)
 Open a document.
 
std::string Inkscape::IO::find_original_file (Glib::StdStringView const filepath, Glib::StdStringView const name)
 Takes an absolute file path and returns a second file at the same directory location, if and only if the filename exists and is a file.
 

Function Documentation

◆ ink_file_new()

std::unique_ptr< SPDocument > ink_file_new ( std::string const &  Template)

Create a blank document, remove any template data.

Input: Empty string or template file name.

Definition at line 34 of file file.cpp.

References SPDocument::createNewDoc(), name, node, sp_repr_lookup_name(), and sp_repr_unparent().

Referenced by InkscapeApplication::document_new(), Inkscape::Extension::Template::get_template_document(), and Inkscape::Extension::Internal::TemplateFromFile::new_from_template().

◆ ink_file_open() [1/2]

std::pair< std::unique_ptr< SPDocument >, bool > ink_file_open ( Glib::RefPtr< Gio::File > const &  file)

Open a document.

Definition at line 88 of file file.cpp.

References Inkscape::Extension::db, and Inkscape::Extension::open().

◆ ink_file_open() [2/2]

std::unique_ptr< SPDocument > ink_file_open ( std::span< char const >  buffer)