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/widget/fill-style.h | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/ui/widget/fill-style.h (limited to 'src/ui/widget/fill-style.h') diff --git a/src/ui/widget/fill-style.h b/src/ui/widget/fill-style.h new file mode 100644 index 0000000..165aec7 --- /dev/null +++ b/src/ui/widget/fill-style.h @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * @brief Fill style configuration + */ +/* Authors: + * Lauris Kaplinski + * Jon A. Cruz + * + * Copyright (C) 2010 Jon A. Cruz + * Copyright (C) 2002 Lauris Kaplinski + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#ifndef SEEN_DIALOGS_SP_FILL_STYLE_H +#define SEEN_DIALOGS_SP_FILL_STYLE_H + +#include "ui/widget/paint-selector.h" + +#include + +namespace Gtk { +class Widget; +} + +class SPDesktop; + +namespace Inkscape { +namespace UI { +namespace Tools { +class ToolBase; +} + +namespace Widget { + +class FillNStroke : public Gtk::Box { + private: + FillOrStroke kind; + SPDesktop *_desktop = nullptr; + PaintSelector *_psel = nullptr; + guint32 _last_drag = 0; + guint _drag_id = 0; + bool _update = false; + + sigc::connection subselChangedConn; + sigc::connection eventContextConn; + sigc::connection stop_selected_connection; + + void paintModeChangeCB(UI::Widget::PaintSelector::Mode mode, bool switch_style); + void paintChangedCB(); + static gboolean dragDelayCB(gpointer data); + + + void eventContextCB(SPDesktop *desktop, Inkscape::UI::Tools::ToolBase *eventcontext); + + void dragFromPaint(); + void updateFromPaint(bool switch_style = false); + + public: + FillNStroke(FillOrStroke k); + ~FillNStroke() override; + + void selectionModifiedCB(guint flags); + void performUpdate(); + + void setFillrule(PaintSelector::FillRule mode); + void setDesktop(SPDesktop *desktop); +}; + +} // namespace Widget +} // namespace UI +} // namespace Inkscape + +#endif // SEEN_DIALOGS_SP_FILL_STYLE_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