diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-19 13:58:46 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-19 13:58:46 +0000 |
| commit | e77e650354daef5ced80adddf6d5a334bb6216d3 (patch) | |
| tree | ac1237a3194056ac457b5a9a7468b0d61c3a7335 /src/ui/toolbar/eraser-toolbar.h | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-e77e650354daef5ced80adddf6d5a334bb6216d3.tar.gz inkscape-e77e650354daef5ced80adddf6d5a334bb6216d3.zip | |
derive all toolbars from Inkscape::Toolbar
Diffstat (limited to 'src/ui/toolbar/eraser-toolbar.h')
| -rw-r--r-- | src/ui/toolbar/eraser-toolbar.h | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/src/ui/toolbar/eraser-toolbar.h b/src/ui/toolbar/eraser-toolbar.h index 2f837e5d7..0f8485aeb 100644 --- a/src/ui/toolbar/eraser-toolbar.h +++ b/src/ui/toolbar/eraser-toolbar.h @@ -28,11 +28,69 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ +#include "toolbar.h" + +#include <gtkmm/adjustment.h> + +class InkSelectOneAction; class SPDesktop; +typedef struct _EgeAdjustmentAction EgeAdjustmentAction; typedef struct _GtkActionGroup GtkActionGroup; -typedef struct _GObject GObject; +typedef struct _InkToggleAction InkToggleAction; + +namespace Inkscape { +namespace UI { +class PrefPusher; + +namespace Toolbar { +class EraserToolbar : public Toolbar { +private: + InkSelectOneAction *_eraser_mode_action; + EgeAdjustmentAction *_width; + EgeAdjustmentAction *_mass; + EgeAdjustmentAction *_thinning; + EgeAdjustmentAction *_cap_rounding; + EgeAdjustmentAction *_tremor; + + InkToggleAction *_usepressure; + InkToggleAction *_split; + + Glib::RefPtr<Gtk::Adjustment> _width_adj; + Glib::RefPtr<Gtk::Adjustment> _mass_adj; + Glib::RefPtr<Gtk::Adjustment> _thinning_adj; + Glib::RefPtr<Gtk::Adjustment> _cap_rounding_adj; + Glib::RefPtr<Gtk::Adjustment> _tremor_adj; + + PrefPusher *_pressure_pusher; + + bool _freeze; + + void mode_changed(int mode); + void set_eraser_mode_visibility(const guint eraser_mode); + void width_value_changed(); + void mass_value_changed(); + void velthin_value_changed(); + void cap_rounding_value_changed(); + void tremor_value_changed(); + static void update_presets_list(gpointer data); + static void toggle_break_apart(GtkToggleAction *act, + gpointer data); + +protected: + EraserToolbar(SPDesktop *desktop) + : Toolbar(desktop), + _freeze(false) + {} + + ~EraserToolbar(); + +public: + static GtkWidget * prep(SPDesktop *desktop, GtkActionGroup* mainActions); +}; -void sp_eraser_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); +} +} +} #endif /* !SEEN_ERASOR_TOOLBAR_H */ |
