10#ifndef INKSCAPE_APPLICATION_H
11#define INKSCAPE_APPLICATION_H
18#include <glibmm/refptr.h>
19#include <glibmm/ustring.h>
20#include <gtkmm/application.h>
153 std::map<std::unique_ptr<SPDocument>,
154 std::vector<std::unique_ptr<SPDesktop>>,
157 std::vector<std::unique_ptr<InkscapeWindow>>
_windows;
183 void on_open(
const Gio::Application::type_vec_files &files,
const Glib::ustring &hint);
188 void shell(
bool active_window =
false);
Authors: Sushant A A sushant.co19@gmail.com
std::vector< std::pair< std::string, Glib::VariantBase > > action_vector_t
Authors: Sushant A A sushant.co19@gmail.com
void on_open(const Gio::Application::type_vec_files &files, const Glib::ustring &hint)
void desktopCloseActive()
SPDesktop * _active_desktop
void set_active_desktop(SPDesktop *desktop)
InkActionExtraData & get_action_extra_data()
InkActionEffectData & get_action_effect_data()
void document_fix(SPDesktop *desktop)
Fix up a document if necessary (Only fixes that require GUI).
InkActionEffectData _action_effect_data
std::vector< Glib::RefPtr< Gio::SimpleAction > > _effect_actions
void set_active_window(InkscapeWindow *window)
std::map< std::string, Glib::ustring > _menu_label_to_tooltip_map
void process_document(SPDocument *document, std::string output_path)
Common processing for documents.
InkscapeWindow * get_active_window()
void dump()
Debug function.
bool destroyDesktop(SPDesktop *desktop, bool keep_alive=false)
Destroy a window and close the document it contains.
bool document_swap(SPDesktop *desktop, SPDocument *document)
Swap out one document for another in a tab.
InkFileExportCmd _file_export
std::pair< SPDocument *, bool > document_open(Glib::RefPtr< Gio::File > const &file)
void set_active_selection(Inkscape::Selection *selection)
void _start_main_option_section(const Glib::ustring §ion_name="")
Gio::Application * gio_app()
The Gio application instance, never NULL.
void shell(bool active_window=false)
bool document_revert(SPDocument *document)
Revert document: open saved document and swap it for each window.
SPDesktop * get_active_desktop()
void set_active_document(SPDocument *document)
Glib::RefPtr< Gio::Application > _gio_application
Glib::ustring _command_line_actions_input
std::map< std::unique_ptr< SPDocument >, std::vector< std::unique_ptr< SPDesktop > >, TransparentPtrLess< SPDocument > > _documents
void windowClose(InkscapeWindow *window)
SPDocument * get_active_document()
void init_extension_action_data()
SPDesktop * desktopOpen(SPDocument *document)
SPDocument * document_new(std::string const &template_filename={})
InkActionExtraData _action_extra_data
void parse_actions(const Glib::ustring &input, action_vector_t &action_vector)
static InkscapeApplication * instance()
Singleton instance.
bool _use_command_line_argument
int on_handle_local_options(const Glib::RefPtr< Glib::VariantDict > &options)
FontStrategy _pdf_font_strategy
Gtk::Application * gtk_app()
The Gtk application instance, or NULL if running headless without display.
void print_input_type_list() const
Prints file type extensions (without leading dot) of input formats.
InkFileExportCmd * file_export()
std::map< std::string, Glib::ustring > & get_menu_label_to_tooltip_map()
InkscapeApplication()
Exclusively for the creation of the singleton instance inside main().
Inkscape::Selection * _active_selection
void detachDesktopToNewWindow(SPDesktop *desktop)
InkActionHintData & get_action_hint_data()
void create_window(Glib::RefPtr< Gio::File > const &file={})
Create a window given a Gio::File.
SPDocument * document_add(std::unique_ptr< SPDocument > document)
std::vector< std::unique_ptr< InkscapeWindow > > _windows
Inkscape::Selection * get_active_selection()
SPDocument * _active_document
void document_close(SPDocument *document)
Close a document, remove from app.
std::vector< SPDocument * > get_documents()
Get a list of open documents (from document map).
SPDesktop * createDesktop(SPDocument *document, bool replace)
Create a desktop given a document.
InkActionHintData _action_hint_data
int get_number_of_windows() const
Return number of open Inkscape Windows (irrespective of number of documents)
action_vector_t _command_line_actions
void desktopClose(SPDesktop *desktop)
InkscapeWindow * _active_window
The set of selected SPObjects for a given document and layer model.
To do: update description of desktop.
Typed SVG document implementation.
std::vector< std::pair< std::string, Glib::VariantBase > > action_vector_t
Helper class to stream background task notifications as a series of messages.
Enable smart pointers to be used as map keys.