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/widget/fill-style.h | |
parent | Initial commit. (diff) | |
download | inkscape-upstream/1.2.2.tar.xz inkscape-upstream/1.2.2.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/widget/fill-style.h | 85 |
1 files changed, 85 insertions, 0 deletions
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 <lauris@kaplinski.com> + * Jon A. Cruz <jon@joncruz.org> + * + * 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 <gtkmm/box.h> + +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 : |