Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
inkscape-window.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
6/*
7 * Authors:
8 * Tavmjong Bah
9 *
10 * Copyright (C) 2018 Authors
11 *
12 * The contents of this file may be used under the GNU General Public License Version 2 or later.
13 * Read the file 'COPYING' for more information.
14 *
15 */
16
17#ifndef INKSCAPE_WINDOW_H
18#define INKSCAPE_WINDOW_H
19
20#include <glibmm/refptr.h>
21#include <gdkmm/toplevel.h>
22#include <gtkmm/applicationwindow.h>
23
24#include <sigc++/scoped_connection.h>
25
26namespace Gtk { class Box; }
27
29class SPDocument;
30class SPDesktop;
31class SPDesktopWidget;
32
33class InkscapeWindow : public Gtk::ApplicationWindow
34{
35public:
37 ~InkscapeWindow() override;
38
42 void change_document(SPDocument* document);
43
44 Gdk::Toplevel::State get_toplevel_state() const;
45
46 bool isFullscreen() const;
47 bool isMaximised() const;
48 bool isMinimised() const;
49
50 void toggleFullscreen();
51
53
54private:
57 SPDesktop* _desktop = nullptr;
59 Glib::RefPtr<Gtk::ShortcutController> _shortcut_controller;
60
62
63 sigc::scoped_connection _toplevel_state_connection;
64 Gdk::Toplevel::State _old_toplevel_state{};
65
66 void on_realize() override;
67 Glib::RefPtr<Gdk::Toplevel const> get_toplevel() const;
70 bool on_close_request() override;
71 void on_size_changed();
72
73 void update_dialogs();
74};
75
76#endif // INKSCAPE_WINDOW_H
77
78/*
79 Local Variables:
80 mode:c++
81 c-file-style:"stroustrup"
82 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
83 indent-tabs-mode:nil
84 fill-column:99
85 End:
86*/
87// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
bool isMinimised() const
InkscapeApplication * _app
SPDocument * _document
void setActiveTab(SPDesktop *desktop)
sigc::scoped_connection _toplevel_state_connection
bool on_close_request() override
void on_size_changed()
Configure is called when the widget's size, position or stack changes.
SPDesktopWidget * _desktop_widget
SPDesktop * get_desktop()
SPDocument * get_document()
void on_realize() override
void add_document_actions()
Make document actions accessible from the window.
Gdk::Toplevel::State _old_toplevel_state
bool isMaximised() const
Glib::RefPtr< Gdk::Toplevel const > get_toplevel() const
SPDesktopWidget * get_desktop_widget()
~InkscapeWindow() override
bool isFullscreen() const
Glib::RefPtr< Gtk::ShortcutController > _shortcut_controller
void change_document(SPDocument *document)
SPDesktop * _desktop
void on_toplevel_state_changed()
Gdk::Toplevel::State get_toplevel_state() const
A GtkBox on an SPDesktop.
To do: update description of desktop.
Definition desktop.h:149
Typed SVG document implementation.
Definition document.h:101
Definition desktop.h:50
SPDesktop * desktop