Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::IO::Resource Namespace Reference

Enumerations

enum  Type {
  ATTRIBUTES , EXAMPLES , EXTENSIONS , FONTS ,
  FONTCOLLECTIONS , ICONS , KEYS , MARKERS ,
  NONE , PAINT , PALETTES , SCREENS ,
  TEMPLATES , TUTORIALS , SYMBOLS , FILTERS ,
  THEMES , UIS , DOCS
}
 
enum  Domain {
  SYSTEM , CREATE , CACHE , SHARED ,
  USER
}
 

Functions

gchar * _get_path (Domain domain, Type type, char const *filename, char const *extra=nullptr)
 
Util::ptr_shared get_path (Domain domain, Type type, char const *filename, char const *extra)
 
std::string get_path_string (Domain domain, Type type, char const *filename, char const *extra)
 
std::string get_filename (Type type, char const *filename, bool localized, bool silent)
 
std::string get_filename (std::string const &path, std::string const &filename)
 
std::vector< std::string > get_filenames (Type type, std::vector< const char * > const &extensions, std::vector< const char * > const &exclusions)
 
std::vector< std::string > get_filenames (Domain domain, Type type, std::vector< const char * > const &extensions, std::vector< const char * > const &exclusions)
 
std::vector< std::string > get_filenames (std::string path, std::vector< const char * > const &extensions, std::vector< const char * > const &exclusions)
 
std::vector< std::string > get_foldernames (Type type, std::vector< const char * > const &exclusions)
 
std::vector< std::string > get_foldernames (Domain domain, Type type, std::vector< const char * > const &exclusions)
 
std::vector< std::string > get_foldernames (std::string const &path, std::vector< const char * > const &exclusions)
 
void get_filenames_from_path (std::vector< std::string > &files, std::string const &path, std::vector< const char * > const &extensions, std::vector< const char * > const &exclusions)
 
void get_foldernames_from_path (std::vector< std::string > &folders, std::string const &path, std::vector< const char * > const &exclusions)
 
std::string profile_path (const char *filename)
 Get, or guess, or decide the location where the preferences.xml file should be located.
 
std::string profile_path ()
 
std::string shared_path (const char *filename)
 
std::string shared_path ()
 
std::string log_path (const char *filename)
 
std::string homedir_path ()
 

Enumeration Type Documentation

◆ Domain

Enumerator
SYSTEM 
CREATE 
CACHE 
SHARED 
USER 

Definition at line 45 of file resource.h.

◆ Type

Enumerator
ATTRIBUTES 
EXAMPLES 
EXTENSIONS 
FONTS 
FONTCOLLECTIONS 
ICONS 
KEYS 
MARKERS 
NONE 
PAINT 
PALETTES 
SCREENS 
TEMPLATES 
TUTORIALS 
SYMBOLS 
FILTERS 
THEMES 
UIS 
DOCS 

Definition at line 23 of file resource.h.

Function Documentation

◆ _get_path()

gchar * Inkscape::IO::Resource::_get_path ( Domain  domain,
Type  type,
char const *  filename,
char const *  extra = nullptr 
)
Returns
Path. Value is in platform-native encoding (see Glib::filename_to_utf8).

Definition at line 47 of file resource.cpp.

References ATTRIBUTES, CACHE, CREATE, DOCS, EXAMPLES, EXTENSIONS, FILTERS, FONTCOLLECTIONS, FONTS, get_inkscape_datadir(), ICONS, KEYS, MARKERS, name, NONE, PAINT, PALETTES, profile_path(), SCREENS, SHARED, shared_path(), SYMBOLS, SYSTEM, TEMPLATES, THEMES, TUTORIALS, UIS, and USER.

Referenced by get_filename(), get_path(), and get_path_string().

◆ get_filename() [1/2]

std::string Inkscape::IO::Resource::get_filename ( std::string const &  path,
std::string const &  filename 
)

Definition at line 238 of file resource.cpp.

References get_filename().

◆ get_filename() [2/2]

◆ get_filenames() [1/3]

std::vector< std::string > Inkscape::IO::Resource::get_filenames ( Domain  domain,
Type  type,
std::vector< const char * > const &  extensions,
std::vector< const char * > const &  exclusions 
)

Definition at line 277 of file resource.cpp.

References get_filenames_from_path(), and get_path_string().

◆ get_filenames() [2/3]

std::vector< std::string > Inkscape::IO::Resource::get_filenames ( std::string  path,
std::vector< const char * > const &  extensions,
std::vector< const char * > const &  exclusions 
)

Definition at line 283 of file resource.cpp.

References get_filenames_from_path().

◆ get_filenames() [3/3]

◆ get_filenames_from_path()

void Inkscape::IO::Resource::get_filenames_from_path ( std::vector< std::string > &  files,
std::string const &  path,
std::vector< const char * > const &  extensions,
std::vector< const char * > const &  exclusions 
)

◆ get_foldernames() [1/3]

std::vector< std::string > Inkscape::IO::Resource::get_foldernames ( Domain  domain,
Type  type,
std::vector< const char * > const &  exclusions 
)

Definition at line 308 of file resource.cpp.

References get_foldernames_from_path(), and get_path_string().

◆ get_foldernames() [2/3]

std::vector< std::string > Inkscape::IO::Resource::get_foldernames ( std::string const &  path,
std::vector< const char * > const &  exclusions 
)

Definition at line 315 of file resource.cpp.

References get_foldernames_from_path().

◆ get_foldernames() [3/3]

std::vector< std::string > Inkscape::IO::Resource::get_foldernames ( Type  type,
std::vector< const char * > const &  exclusions 
)

Definition at line 298 of file resource.cpp.

References CREATE, get_foldernames_from_path(), get_path_string(), SHARED, SYSTEM, and USER.

◆ get_foldernames_from_path()

void Inkscape::IO::Resource::get_foldernames_from_path ( std::vector< std::string > &  folders,
std::string const &  path,
std::vector< const char * > const &  exclusions 
)

Definition at line 373 of file resource.cpp.

Referenced by get_foldernames(), get_foldernames(), and get_foldernames().

◆ get_path()

◆ get_path_string()

◆ homedir_path()

std::string Inkscape::IO::Resource::homedir_path ( )

Definition at line 513 of file resource.cpp.

Referenced by Inkscape::UI::Dialog::Export::prependDirectory().

◆ log_path()

std::string Inkscape::IO::Resource::log_path ( const char *  filename)

Definition at line 508 of file resource.cpp.

References profile_path().

Referenced by Inkscape::Extension::Extension::error_file_open().

◆ profile_path() [1/2]

◆ profile_path() [2/2]

std::string Inkscape::IO::Resource::profile_path ( const char *  filename)

Get, or guess, or decide the location where the preferences.xml file should be located.

This also indicates where all other inkscape shared files may optionally exist.

Definition at line 407 of file resource.cpp.

References profile_path().

◆ shared_path() [1/2]

std::string Inkscape::IO::Resource::shared_path ( )

◆ shared_path() [2/2]

std::string Inkscape::IO::Resource::shared_path ( const char *  filename)

Definition at line 487 of file resource.cpp.

References shared_path().