summaryrefslogtreecommitdiffstats
path: root/src/inkview-application.h
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-10-28 17:07:34 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-11-04 09:37:02 +0000
commit422ea274ba9ed5b038c767bceead4c38d8d78152 (patch)
treedbe228fdc5e4fdd99ec70a9ca1bb98e50fee69b2 /src/inkview-application.h
parentMerge branch 'fix-knot-selection' of gitlab.com:ao2/inkscape (diff)
downloadinkscape-422ea274ba9ed5b038c767bceead4c38d8d78152.tar.gz
inkscape-422ea274ba9ed5b038c767bceead4c38d8d78152.zip
Rewrite of inkview using InkApplication (Gtk::Application).
Use Gio::File for accessing files. Use Gio options to handle command line arguments. Use Gio::Action's. Use Gtk::Builder for control window. Only create SPDocument when requested for display and then cache it (should speed up start-up).
Diffstat (limited to 'src/inkview-application.h')
-rw-r--r--src/inkview-application.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/inkview-application.h b/src/inkview-application.h
new file mode 100644
index 000000000..d9160ddd1
--- /dev/null
+++ b/src/inkview-application.h
@@ -0,0 +1,54 @@
+/*
+ * Inkview - An SVG file viewer.
+ *
+ * Copyright (C) 2018 Tavmjong Bah
+ *
+ * The contents of this file may be used under the GNU General Public License Version 2 or later.
+ *
+ */
+
+#ifndef INKVIEW_APPLICATION_H
+#define INKVIEW_APPLICATION_H
+
+#include <gtkmm.h>
+
+class InkviewWindow;
+
+class InkviewApplication : public Gtk::Application
+{
+protected:
+ InkviewApplication();
+
+public:
+ static Glib::RefPtr<InkviewApplication> create();
+
+protected:
+ void on_startup() override;
+ void on_activate() override;
+ void on_open(const Gio::Application::type_vec_files& files, const Glib::ustring& hint) override;
+
+private:
+ // Callbacks
+ int on_handle_local_options(const Glib::RefPtr<Glib::VariantDict>& options);
+
+ // Command line options
+ bool fullscreen;
+ bool recursive;
+ int timer;
+ double scale;
+
+ InkviewWindow* window;
+};
+
+#endif // INKVIEW_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 :