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/toolbar/spiral-toolbar.h | 98 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 src/ui/toolbar/spiral-toolbar.h (limited to 'src/ui/toolbar/spiral-toolbar.h') diff --git a/src/ui/toolbar/spiral-toolbar.h b/src/ui/toolbar/spiral-toolbar.h new file mode 100644 index 0000000..9c27eb5 --- /dev/null +++ b/src/ui/toolbar/spiral-toolbar.h @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef SEEN_SPIRAL_TOOLBAR_H +#define SEEN_SPIRAL_TOOLBAR_H + +/** + * @file + * Spiral aux toolbar + */ +/* Authors: + * MenTaLguY + * Lauris Kaplinski + * bulia byak + * Frank Felfe + * John Cliff + * David Turner + * Josh Andler + * Jon A. Cruz + * Maximilian Albert + * Tavmjong Bah + * Abhishek Sharma + * Kris De Gussem + * + * Copyright (C) 2004 David Turner + * Copyright (C) 2003 MenTaLguY + * Copyright (C) 1999-2011 authors + * Copyright (C) 2001-2002 Ximian, Inc. + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include "toolbar.h" + +#include + +class SPDesktop; + +namespace Gtk { +class ToolButton; +} + +namespace Inkscape { +class Selection; + +namespace XML { +class Node; +} + +namespace UI { +namespace Widget { +class LabelToolItem; +class SpinButtonToolItem; +} + +namespace Toolbar { +class SpiralToolbar : public Toolbar { +private: + UI::Widget::LabelToolItem *_mode_item; + + UI::Widget::SpinButtonToolItem *_revolution_item; + UI::Widget::SpinButtonToolItem *_expansion_item; + UI::Widget::SpinButtonToolItem *_t0_item; + + Gtk::ToolButton *_reset_item; + + Glib::RefPtr _revolution_adj; + Glib::RefPtr _expansion_adj; + Glib::RefPtr _t0_adj; + + bool _freeze; + + XML::Node *_repr; + + void value_changed(Glib::RefPtr &adj, + Glib::ustring const &value_name); + void defaults(); + void selection_changed(Inkscape::Selection *selection); + + std::unique_ptr _connection; + +protected: + SpiralToolbar(SPDesktop *desktop); + ~SpiralToolbar() override; + +public: + static GtkWidget * create(SPDesktop *desktop); + + static void event_attr_changed(Inkscape::XML::Node *repr, + gchar const *name, + gchar const *old_value, + gchar const *new_value, + bool is_interactive, + gpointer data); +}; +} +} +} + +#endif /* !SEEN_SPIRAL_TOOLBAR_H */ -- cgit v1.2.3