// SPDX-License-Identifier: GPL-2.0-or-later /* * The main Inkscape application. * * Copyright (C) 2018 Tavmjong Bah * * The contents of this file may be used under the GNU General Public License Version 2 or later. * */ #ifndef INKSCAPE_APPLICATION_H #define INKSCAPE_APPLICATION_H /* * The main Inkscape application. * * Copyright (C) 2018 Tavmjong Bah * * The contents of this file may be used under the GNU General Public License Version 2 or later. * */ #include #include "document.h" #include "helper/action.h" #include "io/file-export-cmd.h" // File export (non-verb) class InkscapeApplication : public Gtk::Application { protected: InkscapeApplication(); public: static Glib::RefPtr create(); SPDocument* get_active_document(); protected: void on_startup() override; void on_startup2(); void on_activate() override; void on_open(const Gio::Application::type_vec_files& files, const Glib::ustring& hint) override; private: void create_window(const Glib::RefPtr& file = Glib::RefPtr()); private: // Callbacks int on_handle_local_options(const Glib::RefPtr& options); // Actions void on_new(); void on_quit(); void on_about(); Glib::RefPtr _builder; bool _with_gui; InkFileExportCmd _file_export; // Documents are owned by the application which is responsible for opening/saving/exporting. WIP std::vector _documents; // Actions from the command line or file. std::vector > _command_line_actions; }; #endif // INKSCAPE_APPLICATION_H /* Local Variables: mode:c++ c-file-style:"stroustrup" c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) indent-tabs-mode:nil fill-column:99 End: */ // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :