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/box3d-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 '')
| -rw-r--r-- | src/ui/toolbar/box3d-toolbar.h | 75 |
1 files changed, 73 insertions, 2 deletions
diff --git a/src/ui/toolbar/box3d-toolbar.h b/src/ui/toolbar/box3d-toolbar.h index 962a43c25..6ff04cc81 100644 --- a/src/ui/toolbar/box3d-toolbar.h +++ b/src/ui/toolbar/box3d-toolbar.h @@ -28,12 +28,83 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ +#include "toolbar.h" +#include <gtkmm/adjustment.h> + +#include "axis-manip.h" + +class Persp3D; class SPDesktop; +typedef struct _EgeAdjustmentAction EgeAdjustmentAction; typedef struct _GtkActionGroup GtkActionGroup; -typedef struct _GObject GObject; +typedef struct _InkToggleAction InkToggleAction; + +namespace Inkscape { +class Selection; + +namespace XML { +class Node; +} + +namespace UI { +namespace Tools { +class ToolBase; +} + +namespace Toolbar { +class Box3DToolbar : public Toolbar { +private: + EgeAdjustmentAction *_angle_x_action; + EgeAdjustmentAction *_angle_y_action; + EgeAdjustmentAction *_angle_z_action; + + Glib::RefPtr<Gtk::Adjustment> _angle_x_adj; + Glib::RefPtr<Gtk::Adjustment> _angle_y_adj; + Glib::RefPtr<Gtk::Adjustment> _angle_z_adj; + + InkToggleAction *_vp_x_state_action; + InkToggleAction *_vp_y_state_action; + InkToggleAction *_vp_z_state_action; + + XML::Node *_repr; + bool _freeze; + + void angle_value_changed(Glib::RefPtr<Gtk::Adjustment> &adj, + Proj::Axis axis); + static void vp_state_changed(GtkToggleAction *act, + Proj::Axis axis); + void check_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec); + void selection_changed(Inkscape::Selection *selection); + void resync_toolbar(Inkscape::XML::Node *persp_repr); + void set_button_and_adjustment(Persp3D *persp, + Proj::Axis axis, + Glib::RefPtr<Gtk::Adjustment>& adj, + GtkAction *act, + GtkToggleAction *tact); + double normalize_angle(double a); + + sigc::connection _changed; + +protected: + Box3DToolbar(SPDesktop *desktop) + : Toolbar(desktop), + _repr(nullptr) + {} + ~Box3DToolbar(); -void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); +public: + static GtkWidget * prep(SPDesktop *desktop, GtkActionGroup* mainActions); + 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_BOX3D_TOOLBAR_H */ |
