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/toolbar/page-toolbar.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/toolbar/page-toolbar.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/ui/toolbar/page-toolbar.h b/src/ui/toolbar/page-toolbar.h new file mode 100644 index 0000000..8a2ec08 --- /dev/null +++ b/src/ui/toolbar/page-toolbar.h @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef SEEN_PAGE_TOOLBAR_H +#define SEEN_PAGE_TOOLBAR_H + +/** + * @file + * Page toolbar + */ +/* Authors: + * Martin Owens <doctormo@geek-2.com> + * + * Copyright (C) 2021 Martin Owens + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include <gtkmm.h> + +#include "toolbar.h" + +class SPDesktop; +class SPDocument; +class SPPage; + +namespace Inkscape { +class PaperSize; +namespace UI { +namespace Tools { +class ToolBase; +} +namespace Toolbar { + +class PageToolbar : public Gtk::Toolbar +{ +public: + PageToolbar(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &builder, SPDesktop *desktop); + ~PageToolbar() override; + + static GtkWidget *create(SPDesktop *desktop); + +protected: + void labelEdited(); + void sizeChoose(); + void sizeChanged(); + void setSizeText(SPPage *page = nullptr); + +private: + SPDesktop *_desktop; + SPDocument *_document; + + void toolChanged(SPDesktop *desktop, Inkscape::UI::Tools::ToolBase *ec); + void pagesChanged(); + void selectionChanged(SPPage *page); + void on_parent_changed(Gtk::Widget *prev) override; + + sigc::connection _ec_connection; + sigc::connection _doc_connection; + sigc::connection _pages_changed; + sigc::connection _page_selected; + sigc::connection _page_modified; + + bool was_referenced; + Gtk::ComboBoxText *combo_page_sizes; + Gtk::Entry *entry_page_sizes; + Gtk::Entry *text_page_label; + Gtk::Label *label_page_pos; + Gtk::ToolButton *btn_page_backward; + Gtk::ToolButton *btn_page_foreward; + Gtk::ToolButton *btn_page_delete; + Gtk::ToolButton *btn_move_toggle; + Gtk::SeparatorToolItem *sep1; + + double _unit_to_size(std::string number, std::string unit_str, std::string backup); +}; + +} // namespace Toolbar +} // namespace UI +} // namespace Inkscape + +#endif /* !SEEN_PAGE_TOOLBAR_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 : |