diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2018-12-29 17:21:51 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2018-12-29 17:21:51 +0000 |
| commit | c86cbcffd19cc7408b02991a8ae30bba86b62bbc (patch) | |
| tree | 8422d3169aa599e97ecdb7ec59ee3f832bcc17d3 /src/widgets/button.h | |
| parent | Rm deprecated budget widgets (diff) | |
| download | inkscape-c86cbcffd19cc7408b02991a8ae30bba86b62bbc.tar.gz inkscape-c86cbcffd19cc7408b02991a8ae30bba86b62bbc.zip | |
Move Button to Inkscape namespace
Diffstat (limited to 'src/widgets/button.h')
| -rw-r--r-- | src/widgets/button.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/src/widgets/button.h b/src/widgets/button.h deleted file mode 100644 index 736eed273..000000000 --- a/src/widgets/button.h +++ /dev/null @@ -1,92 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/** @file - * Generic button widget - *//* - * Authors: - * see git history - * Lauris Kaplinski <lauris@kaplinski.com> - * - * Copyright (C) 2018 Authors - * Released under GNU GPL v2+, read the file 'COPYING' for more information. - */ -#ifndef SEEN_SP_BUTTON_H -#define SEEN_SP_BUTTON_H - -#include <gtkmm/togglebutton.h> -#include <sigc++/connection.h> - -struct SPAction; - -namespace Inkscape { -namespace UI { -namespace View { -class View; -} -} -} - -enum SPButtonType { - SP_BUTTON_TYPE_NORMAL, - SP_BUTTON_TYPE_TOGGLE -}; - -struct SPBChoiceData { - guchar *px; -}; - -class SPButton : public Gtk::ToggleButton{ -private: - SPButtonType _type; - GtkIconSize _lsize; - unsigned int _psize; - SPAction *_action; - SPAction *_doubleclick_action; - - sigc::connection _c_set_active; - sigc::connection _c_set_sensitive; - - void set_action(SPAction *action); - void set_doubleclick_action(SPAction *action); - void set_composed_tooltip(SPAction *action); - void action_set_active(bool active); - void perform_action(); - bool process_event(GdkEvent *event); - - sigc::connection _on_clicked; - -protected: - virtual void get_preferred_width_vfunc(int &minimum_width, int &natural_width) const override; - virtual void get_preferred_height_vfunc(int &minimum_height, int &natural_height) const override; - void on_clicked() override; - -public: - SPButton(GtkIconSize size, - SPButtonType type, - SPAction *action, - SPAction *doubleclick_action); - - SPButton(GtkIconSize size, - SPButtonType type, - Inkscape::UI::View::View *view, - const gchar *name, - const gchar *tip); - - ~SPButton(); - - void toggle_set_down(bool down); -}; - -#define SP_BUTTON_IS_DOWN(b) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (b)) - -#endif // !SEEN_SP_BUTTON_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 : |
