diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /src/ui/dialog/startup.h | |
parent | Initial commit. (diff) | |
download | inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/ui/dialog/startup.h | 85 |
1 files changed, 85 insertions, 0 deletions
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 <doctormo@gmail.com> + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#ifndef STARTSCREEN_H +#define STARTSCREEN_H + +#include <gtkmm.h> + +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<Gtk::Builder> 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 : |