From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- src/ui/dialog/startup.h | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/ui/dialog/startup.h (limited to 'src/ui/dialog/startup.h') diff --git a/src/ui/dialog/startup.h b/src/ui/dialog/startup.h new file mode 100644 index 0000000..b555aae --- /dev/null +++ b/src/ui/dialog/startup.h @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * @brief A dialog for the start screen + * + * Copyright (C) Martin Owens 2020 + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#ifndef STARTSCREEN_H +#define STARTSCREEN_H + +#include + +class SPDocument; + +namespace Inkscape { +namespace UI { +namespace Dialog { + +class StartScreen : public Gtk::Dialog { + +public: + StartScreen(); + ~StartScreen() override; + + SPDocument* get_document() { return _document; } + +protected: + bool on_key_press_event(GdkEventKey* event) override; + void on_response(int response_id) override; + +private: + void notebook_next(Gtk::Widget *button); + Gtk::TreeModel::Row active_combo(std::string widget_name); + void set_active_combo(std::string widget_name, std::string unique_id); + void show_toggle(); + void enlist_recent_files(); + void enlist_keys(); + void filter_themes(); + void keyboard_changed(); + void notebook_switch(Gtk::Widget *tab, guint page_num); + + void theme_changed(); + void canvas_changed(); + void refresh_theme(Glib::ustring theme_name); + void refresh_dark_switch(); + + void new_document(); + void load_document(); + void on_recent_changed(); + void on_kind_changed(Gtk::Widget *tab, guint page_num); + + +private: + Glib::RefPtr builder; + Gtk::Window *window = nullptr; + Gtk::Notebook *tabs = nullptr; + Gtk::Notebook *kinds = nullptr; + Gtk::Fixed *banners = nullptr; + Gtk::ComboBox *themes = nullptr; + Gtk::TreeView *recent_treeview = nullptr; + Gtk::Button *load_btn = nullptr; + + SPDocument* _document = nullptr; + + bool _first_open = false; +}; + + +} // namespace Dialog +} // namespace UI +} // namespace Inkscape + +#endif // STARTSCREEN_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:fileencoding=utf-8:textwidth=99 : -- cgit v1.2.3