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/widgets/toolbox.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/widgets/toolbox.h (limited to 'src/widgets/toolbox.h') diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h new file mode 100644 index 0000000..40258a9 --- /dev/null +++ b/src/widgets/toolbox.h @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef SEEN_TOOLBOX_H +#define SEEN_TOOLBOX_H + +/* + * Authors: + * Lauris Kaplinski + * Frank Felfe + * Jon A. Cruz + * + * Copyright (C) 1999-2002 Authors + * Copyright (C) 2001-2002 Ximian, Inc. + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include +#include +#include +#include + +#include "preferences.h" + +class InkscapeWindow; +class SPDesktop; + +namespace Inkscape { +namespace UI { + +/** + * Main toolbox source. + */ +class ToolboxFactory +{ +public: + static void setToolboxDesktop(GtkWidget *toolbox, SPDesktop *desktop); + static void setOrientation(GtkWidget* toolbox, GtkOrientation orientation); + static void showAuxToolbox(GtkWidget* toolbox); + + static GtkWidget *createToolToolbox(InkscapeWindow *window); + static GtkWidget *createAuxToolbox(); + static GtkWidget *createCommandsToolbox(); + static GtkWidget *createSnapToolbox(); + + static int prefToPixelSize(Glib::ustring const& path); + static Gtk::IconSize prefToSize_mm(Glib::ustring const &path, int base = 0); + + static void set_icon_size(GtkWidget* toolbox, int pixel_size); + ToolboxFactory() = delete; + + static constexpr const char* tools_icon_size = "/toolbox/tools/iconsize"; + static constexpr const char* tools_visible_buttons = "/toolbox/tools/buttons"; + static constexpr const char* ctrlbars_icon_size = "/toolbox/controlbars/iconsize"; + static constexpr const char* snap_bar_simple = "/toolbox/simplesnap"; + static constexpr const int min_pixel_size = 16; + static constexpr const int max_pixel_size = 48; + static Glib::ustring get_tool_visible_buttons_path(const Glib::ustring& button_action_name); + +private: + static void _attachDoubleClickHandlers(Glib::RefPtr builder, InkscapeWindow *window); +}; + + + +} // namespace UI +} // namespace Inkscape + +#endif /* !SEEN_TOOLBOX_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