summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/calligraphy-toolbar.h
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-01-19 13:58:46 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-01-19 13:58:46 +0000
commite77e650354daef5ced80adddf6d5a334bb6216d3 (patch)
treeac1237a3194056ac457b5a9a7468b0d61c3a7335 /src/ui/toolbar/calligraphy-toolbar.h
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-e77e650354daef5ced80adddf6d5a334bb6216d3.tar.gz
inkscape-e77e650354daef5ced80adddf6d5a334bb6216d3.zip
derive all toolbars from Inkscape::Toolbar
Diffstat (limited to 'src/ui/toolbar/calligraphy-toolbar.h')
-rw-r--r--src/ui/toolbar/calligraphy-toolbar.h70
1 files changed, 67 insertions, 3 deletions
diff --git a/src/ui/toolbar/calligraphy-toolbar.h b/src/ui/toolbar/calligraphy-toolbar.h
index ea9804d2e..2305a72a2 100644
--- a/src/ui/toolbar/calligraphy-toolbar.h
+++ b/src/ui/toolbar/calligraphy-toolbar.h
@@ -28,12 +28,76 @@
* 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 CalligraphyToolbar : public Toolbar {
+private:
+ bool _presets_blocked;
+
+ EgeAdjustmentAction *_angle_action;
+ InkSelectOneAction *_profile_selector;
+
+ std::map<Glib::ustring, GObject *> _widget_map;
+
+ Glib::RefPtr<Gtk::Adjustment> _width_adj;
+ Glib::RefPtr<Gtk::Adjustment> _mass_adj;
+ Glib::RefPtr<Gtk::Adjustment> _wiggle_adj;
+ Glib::RefPtr<Gtk::Adjustment> _angle_adj;
+ Glib::RefPtr<Gtk::Adjustment> _thinning_adj;
+ Glib::RefPtr<Gtk::Adjustment> _tremor_adj;
+ Glib::RefPtr<Gtk::Adjustment> _fixation_adj;
+ Glib::RefPtr<Gtk::Adjustment> _cap_rounding_adj;
+ InkToggleAction *_usepressure;
+ InkToggleAction *_tracebackground;
+ InkToggleAction *_usetilt;
+
+ PrefPusher *_tracebackground_pusher;
+ PrefPusher *_usepressure_pusher;
+ PrefPusher *_usetilt_pusher;
+
+ void width_value_changed();
+ void velthin_value_changed();
+ void angle_value_changed();
+ void flatness_value_changed();
+ void cap_rounding_value_changed();
+ void tremor_value_changed();
+ void wiggle_value_changed();
+ void mass_value_changed();
+ void build_presets_list();
+ void change_profile(int mode);
+ void save_profile(GtkWidget *widget);
+
+ static void edit_profile(GtkAction *act, gpointer data);
+ static void update_presets_list(gpointer data);
+ static void tilt_state_changed( GtkToggleAction *act, gpointer data );
+
+protected:
+ CalligraphyToolbar(SPDesktop *desktop)
+ : Toolbar(desktop)
+ {}
+
+ ~CalligraphyToolbar();
+
+public:
+ static GtkWidget * prep(SPDesktop *desktop, GtkActionGroup* mainActions);
+};
-void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder);
-void update_presets_list(GObject *tbl);
+}
+}
+}
#endif /* !SEEN_CALLIGRAPHY_TOOLBAR_H */