Inkscape
Vector Graphics Editor
|
Base class for Event processors. More...
#include <tool-base.h>
Public Member Functions | |
ToolBase (SPDesktop *desktop, std::string &&prefs_path, std::string &&cursor_filename, bool uses_snap=true) | |
virtual | ~ToolBase () |
virtual void | set (Preferences::Entry const &val) |
Called by our pref_observer if a preference has been changed. | |
virtual bool | root_handler (CanvasEvent const &event) |
virtual bool | item_handler (SPItem *item, CanvasEvent const &event) |
Handles item specific events. | |
virtual void | menu_popup (CanvasEvent const &event, SPObject *obj=nullptr) |
Create popup menu and tell Gtk to show it. | |
virtual bool | can_undo (bool redo=false) |
virtual bool | is_ready () const |
virtual void | switching_away (std::string const &new_tool) |
std::string const & | getPrefsPath () const |
void | enableSelectionCue (bool enable=true) |
Enables/disables the ToolBase's SelCue. | |
MessageContext * | defaultMessageContext () const |
SPDesktop * | getDesktop () const |
SPGroup * | currentLayer () const |
void | set_last_active_tool (Glib::ustring last_tool) |
const Glib::ustring & | get_last_active_tool () const |
bool | start_root_handler (CanvasEvent const &event) |
Handles snapping events for all tools and then passes to tool_root_handler. | |
bool | tool_root_handler (CanvasEvent const &event) |
Calls the right tool's event handler, depending on the selected tool and state. | |
bool | start_item_handler (SPItem *item, CanvasEvent const &event) |
Starts handling item snapping and pass to virtual_item_handler afterwards. | |
bool | virtual_item_handler (SPItem *item, CanvasEvent const &event) |
bool | is_panning () const |
True if we're panning with any method (space bar, middle-mouse, right-mouse+Ctrl) | |
bool | is_space_panning () const |
True if we're panning with the space bar. | |
void | snap_delay_handler (gpointer item, gpointer item2, MotionEvent const &event, DelayedSnapEvent::Origin origin) |
Analyses the current event, calculates the mouse speed, turns snapping off (temporarily) if the mouse speed is above a threshold, and stores the current event such that it can be re-triggered when needed (re-triggering is controlled by a timeout). | |
void | process_delayed_snap_event () |
When the delayed snap event timer expires, this method will be called and will re-inject the last motion event in an appropriate place, with snapping being turned on again. | |
void | discard_delayed_snap_event () |
If a delayed snap event has been scheduled, this function will cancel it. | |
void | set_cursor (std::string filename) |
Sets the current cursor to the given filename. | |
void | use_cursor (Glib::RefPtr< Gdk::Cursor > cursor) |
Set the cursor to this specific one, don't remember it. | |
Glib::RefPtr< Gdk::Cursor > | get_cursor (Gtk::Widget &widget, std::string const &filename) const |
Returns the Gdk Cursor for the given filename. | |
void | use_tool_cursor () |
Uses the saved cursor, based on the saved filename. | |
void | enableGrDrag (bool enable=true) |
bool | deleteSelectedDrag (bool just_one) |
Delete a selected GrDrag point. | |
bool | hasGradientDrag () const |
Return true if there is a gradient drag. | |
GrDrag * | get_drag () |
Public Attributes | |
std::unique_ptr< MessageContext > | message_context |
SelCue * | _selcue = nullptr |
GrDrag * | _grdrag = nullptr |
ShapeEditor * | shape_editor = nullptr |
bool | _uses_snap = false |
Protected Member Functions | |
void | setup_for_drag_start (ButtonPressEvent const &ev) |
void | saveDragOrigin (Geom::Point const &pos) |
bool | checkDragMoved (Geom::Point const &pos) |
Analyse the current position and return true once it has moved farther than tolerance from the drag origin (indicating they intend to move the object, not click). | |
void | grabCanvasEvents (EventMask mask=EventType::KEY_PRESS|EventType::BUTTON_RELEASE|EventType::MOTION|EventType::BUTTON_PRESS) |
Grab events from the Canvas Catchall. | |
void | ungrabCanvasEvents () |
Ungrab events from the Canvas Catchall. | |
bool | sp_event_context_knot_mouseover () const |
Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case). | |
void | set_high_motion_precision (bool high_precision=true) |
Enable (or disable) high precision for motion events. | |
Protected Attributes | |
Glib::RefPtr< Gdk::Cursor > | _cursor |
std::string | _cursor_filename = "select.svg" |
std::string | _cursor_default = "select.svg" |
Geom::IntPoint | xyp |
where drag started | |
bool | dragging = false |
are we dragging? | |
int | tolerance = 0 |
bool | within_tolerance = false |
are we still within tolerance of origin | |
bool | _button1on = false |
bool | _button2on = false |
bool | _button3on = false |
SPItem * | item_to_select = nullptr |
the item where mouse_press occurred, to be selected if this is a click not drag | |
SPDesktop * | _desktop = nullptr |
Util::ActionAccel | _acc_undo |
Util::ActionAccel | _acc_redo |
Util::ActionAccel | _acc_quick_preview |
Util::ActionAccel | _acc_quick_zoom |
Util::ActionAccel | _acc_quick_pan |
Private Types | |
enum | Panning { PANNING_NONE = 0 , PANNING_SPACE_BUTTON1 = 1 , PANNING_BUTTON2 = 2 , PANNING_BUTTON3 = 3 , PANNING_SPACE = 4 } |
Private Member Functions | |
void | set_on_buttons (CanvasEvent const &event) |
This function allows to handle global tool events if _pre function is not fully overridden. | |
bool | are_buttons_1_and_3_on () const |
bool | are_buttons_1_and_3_on (CanvasEvent const &event) |
void | _filterEventForSnapping (SPItem *item, CanvasEvent const &event, DelayedSnapEvent::Origin origin) |
Common code between root and item handlers related to delayed snap events. | |
bool | _keyboardMove (KeyEvent const &event, Geom::Point const &dir) |
Moves the selected points along the supplied unit vector according to the modifier state of the supplied event. | |
void | _schedule_delayed_snap_event () |
Internal function used to set process_delayed_snap_event() to occur a given delay in the future from now. | |
Private Attributes | |
std::unique_ptr< Preferences::PreferencesObserver > | pref_observer |
std::string | _prefs_path |
Panning | panning = PANNING_NONE |
bool | rotating = false |
double | start_angle |
double | current_angle |
std::optional< DelayedSnapEvent > | _dse |
sigc::scoped_connection | _dse_timeout_conn |
bool | _dse_callback_in_process = false |
Glib::ustring | _last_active_tool |
Base class for Event processors.
This is per desktop object, which (its derivatives) implements different actions bound to mouse events.
ToolBase is an abstract base class of all tools. As the name indicates, event context implementations process UI events (mouse movements and keypresses) and take actions (like creating or modifying objects). There is one event context implementation for each tool, plus few abstract base classes. Writing a new tool involves subclassing ToolBase.
Definition at line 104 of file tool-base.h.
|
private |
Enumerator | |
---|---|
PANNING_NONE | |
PANNING_SPACE_BUTTON1 | |
PANNING_BUTTON2 | |
PANNING_BUTTON3 | |
PANNING_SPACE |
Definition at line 168 of file tool-base.h.
Inkscape::UI::Tools::ToolBase::ToolBase | ( | SPDesktop * | desktop, |
std::string && | prefs_path, | ||
std::string && | cursor_filename, | ||
bool | uses_snap = true |
||
) |
Definition at line 102 of file tool-base.cpp.
References _cursor_default, _desktop, _prefs_path, Inkscape::Preferences::PreferencesObserver::create(), desktop, discard_delayed_snap_event(), SPDesktop::getCanvas(), message_context, SPDesktop::messageStack(), pref_observer, set, set_cursor(), and Inkscape::UI::Tools::sp_event_context_read().
|
virtual |
Definition at line 130 of file tool-base.cpp.
References enableSelectionCue().
|
private |
Common code between root and item handlers related to delayed snap events.
Definition at line 1112 of file tool-base.cpp.
References Inkscape::inspect_event(), item, and origin.
|
private |
Moves the selected points along the supplied unit vector according to the modifier state of the supplied event.
Definition at line 274 of file tool-base.cpp.
References _desktop, SPDesktop::current_rotation(), SPDesktop::current_zoom(), delta, Inkscape::Preferences::get(), SPDesktop::getTool(), Inkscape::UI::Tools::gobble_key_events(), Inkscape::UI::ShapeEditor::has_knotholder(), Geom::Rotate::inverse(), Inkscape::KeyEvent::keyval, Inkscape::UI::ShapeEditor::knotholder, Inkscape::mod_alt(), Inkscape::mod_ctrl(), Inkscape::mod_shift(), num, and shape_editor.
|
private |
Internal function used to set process_delayed_snap_event() to occur a given delay in the future from now.
Subsequent calls will reset the timer. Calling process_delayed_snap_event() manually will cancel the timer.
Definition at line 1616 of file tool-base.cpp.
References Inkscape::Preferences::get(), and Inkscape::Preferences::getDoubleLimited().
|
private |
Definition at line 931 of file tool-base.cpp.
|
private |
Definition at line 936 of file tool-base.cpp.
|
inlinevirtual |
Definition at line 116 of file tool-base.h.
|
protected |
Analyse the current position and return true once it has moved farther than tolerance from the drag origin (indicating they intend to move the object, not click).
Definition at line 1084 of file tool-base.cpp.
References Geom::Point::floor(), and Geom::LInfty().
Referenced by Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), and Inkscape::UI::Tools::ZoomTool::root_handler().
SPGroup * Inkscape::UI::Tools::ToolBase::currentLayer | ( | ) | const |
Definition at line 148 of file tool-base.cpp.
References _desktop, Inkscape::LayerManager::currentLayer(), and SPDesktop::layerManager().
Referenced by Inkscape::UI::Tools::PenTool::_bsplineSpiroColor(), Inkscape::UI::Tools::TextTool::_setupText(), Inkscape::UI::Tools::PencilTool::addPowerStrokePencil(), Inkscape::UI::Tools::Box3dTool::drag(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::Tools::spdc_create_single_dot(), and Inkscape::UI::Tools::spdc_flush_white().
|
inline |
Definition at line 123 of file tool-base.h.
References message_context.
Referenced by Inkscape::UI::Tools::PenTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::TextTool::_showCurrUnichar(), Inkscape::UI::Tools::cc_generic_knot_handler(), Inkscape::UI::Tools::Box3dTool::drag(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), SPKnot::eventHandler(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::NodeTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::TweakTool::root_handler(), and Inkscape::UI::Tools::SelectTool::sp_select_context_abort().
bool Inkscape::UI::Tools::ToolBase::deleteSelectedDrag | ( | bool | just_one | ) |
Delete a selected GrDrag point.
Definition at line 1019 of file tool-base.cpp.
Referenced by Inkscape::UI::MultiPathManipulator::event(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TweakTool::root_handler(), and Inkscape::UI::Tools::ZoomTool::root_handler().
void Inkscape::UI::Tools::ToolBase::discard_delayed_snap_event | ( | ) |
If a delayed snap event has been scheduled, this function will cancel it.
Definition at line 1605 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::PencilTool::_cancel(), Inkscape::UI::Tools::PencilTool::_handleButtonRelease(), Inkscape::UI::Tools::PencilTool::_handleKeyRelease(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Widget::CanvasGrid::_rulerButtonRelease(), SPKnot::eventHandler(), gr_knot_moved_handler(), Inkscape::UI::Tools::TextTool::item_handler(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), sp_import_document(), Inkscape::UI::Tools::SelectTool::sp_select_context_abort(), ToolBase(), and Inkscape::UI::Tools::PenTool::~PenTool().
void Inkscape::UI::Tools::ToolBase::enableGrDrag | ( | bool | enable = true | ) |
Definition at line 1002 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::ArcTool::ArcTool(), Inkscape::UI::Tools::Box3dTool::Box3dTool(), Inkscape::UI::Tools::DropperTool::DropperTool(), Inkscape::UI::Tools::GradientTool::GradientTool(), Inkscape::UI::Tools::MarkerTool::MarkerTool(), Inkscape::UI::Tools::MeshTool::MeshTool(), Inkscape::UI::Tools::NodeTool::NodeTool(), Inkscape::UI::Tools::RectTool::RectTool(), Inkscape::UI::Tools::SelectTool::SelectTool(), Inkscape::UI::Tools::SpiralTool::SpiralTool(), Inkscape::UI::Tools::SprayTool::SprayTool(), Inkscape::UI::Tools::StarTool::StarTool(), Inkscape::UI::Tools::TextTool::TextTool(), Inkscape::UI::Tools::TweakTool::TweakTool(), Inkscape::UI::Tools::ZoomTool::ZoomTool(), Inkscape::UI::Tools::ArcTool::~ArcTool(), Inkscape::UI::Tools::Box3dTool::~Box3dTool(), Inkscape::UI::Tools::DropperTool::~DropperTool(), Inkscape::UI::Tools::GradientTool::~GradientTool(), Inkscape::UI::Tools::MarkerTool::~MarkerTool(), Inkscape::UI::Tools::MeasureTool::~MeasureTool(), Inkscape::UI::Tools::MeshTool::~MeshTool(), Inkscape::UI::Tools::NodeTool::~NodeTool(), Inkscape::UI::Tools::RectTool::~RectTool(), Inkscape::UI::Tools::SelectTool::~SelectTool(), Inkscape::UI::Tools::SpiralTool::~SpiralTool(), Inkscape::UI::Tools::SprayTool::~SprayTool(), Inkscape::UI::Tools::StarTool::~StarTool(), Inkscape::UI::Tools::TextTool::~TextTool(), Inkscape::UI::Tools::TweakTool::~TweakTool(), and Inkscape::UI::Tools::ZoomTool::~ZoomTool().
void Inkscape::UI::Tools::ToolBase::enableSelectionCue | ( | bool | enable = true | ) |
Enables/disables the ToolBase's SelCue.
Definition at line 987 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::ArcTool::ArcTool(), Inkscape::UI::Tools::Box3dTool::Box3dTool(), Inkscape::UI::Tools::CalligraphicTool::CalligraphicTool(), Inkscape::UI::Tools::ConnectorTool::ConnectorTool(), Inkscape::UI::Tools::DropperTool::DropperTool(), Inkscape::UI::Tools::EraserTool::EraserTool(), Inkscape::UI::Tools::FloodTool::FloodTool(), Inkscape::UI::Tools::GradientTool::GradientTool(), Inkscape::UI::Tools::LpeTool::LpeTool(), Inkscape::UI::Tools::MarkerTool::MarkerTool(), Inkscape::UI::Tools::MeshTool::MeshTool(), Inkscape::UI::Tools::NodeTool::NodeTool(), Inkscape::UI::Tools::PencilTool::PencilTool(), Inkscape::UI::Tools::PenTool::PenTool(), Inkscape::UI::Tools::RectTool::RectTool(), Inkscape::UI::Tools::SpiralTool::SpiralTool(), Inkscape::UI::Tools::SprayTool::SprayTool(), Inkscape::UI::Tools::StarTool::StarTool(), Inkscape::UI::Tools::TextTool::TextTool(), Inkscape::UI::Tools::TweakTool::TweakTool(), Inkscape::UI::Tools::ZoomTool::ZoomTool(), and ~ToolBase().
Glib::RefPtr< Gdk::Cursor > Inkscape::UI::Tools::ToolBase::get_cursor | ( | Gtk::Widget & | widget, |
std::string const & | filename | ||
) | const |
Returns the Gdk Cursor for the given filename.
WARNING: currently this changes the window cursor, see load_svg_cursor TODO: GTK4: Is the above warning still applicable?
Definition at line 170 of file tool-base.cpp.
References _desktop, getPrefsPath(), Inkscape::load_svg_cursor(), sp_desktop_get_color_tool(), and sp_desktop_get_opacity_tool().
Referenced by Inkscape::UI::Tools::PagesTool::PagesTool(), and use_tool_cursor().
|
inline |
Definition at line 214 of file tool-base.h.
References _grdrag.
Referenced by Inkscape::UI::Toolbar::GradientToolbar::_update(), Inkscape::UI::Tools::GradientTool::add_stop_near_point(), Inkscape::UI::Toolbar::GradientToolbar::select_dragger_by_stop(), Inkscape::UI::Toolbar::GradientToolbar::select_stop_by_draggers(), sp_gradient_reverse_selected_gradients(), and Inkscape::UI::Tools::MeshTool::split_near_point().
const Glib::ustring & Inkscape::UI::Tools::ToolBase::get_last_active_tool | ( | ) | const |
Definition at line 1638 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::ObjectPickerTool::root_handler().
|
inline |
Definition at line 125 of file tool-base.h.
References _desktop.
Referenced by Inkscape::UI::ControlPoint::_eventHandler(), Inkscape::UI::Tools::cc_create_connection_point(), Inkscape::UI::Tools::get_dilate_radius(), Inkscape::UI::Tools::get_dilate_radius(), Inkscape::UI::Tools::get_path_force(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Toolbar::Toolbars::setTool(), Inkscape::UI::Tools::sp_spray_dilate(), Inkscape::UI::Tools::sp_spray_switch_mode(), Inkscape::UI::Tools::sp_spray_update_area(), Inkscape::UI::Tools::sp_tweak_dilate(), Inkscape::UI::Tools::sp_tweak_switch_mode(), Inkscape::UI::Tools::sp_tweak_switch_mode_temporarily(), Inkscape::UI::Tools::sp_tweak_update_area(), Inkscape::UI::Tools::spdc_apply_bend_shape(), Inkscape::UI::Tools::spdc_apply_powerstroke_shape(), Inkscape::UI::Tools::spdc_apply_simplify(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_concat_colors_and_flush(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::UI::Tools::spdc_endpoint_snap_free(), Inkscape::UI::Tools::spdc_endpoint_snap_rotation(), Inkscape::UI::Tools::spdc_flush_white(), and Inkscape::UI::Tools::spdc_paste_curve_as_freehand_shape().
|
inline |
Definition at line 120 of file tool-base.h.
References _prefs_path.
Referenced by get_cursor(), Inkscape::UI::Tools::DynamicBase::set(), Inkscape::UI::Toolbar::Toolbars::setTool(), Inkscape::UI::Tools::sp_event_context_read(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_concat_colors_and_flush(), Inkscape::UI::Tools::spdc_flush_white(), and SPDesktopWidget::switchDesktop().
|
protected |
Grab events from the Canvas Catchall.
(Common configuration.)
Definition at line 1039 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::PenTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Tools::EraserTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::CalligraphicTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), and Inkscape::UI::Tools::ZoomTool::root_handler().
bool Inkscape::UI::Tools::ToolBase::hasGradientDrag | ( | ) | const |
Return true if there is a gradient drag.
Definition at line 1031 of file tool-base.cpp.
|
inline |
True if we're panning with any method (space bar, middle-mouse, right-mouse+Ctrl)
Definition at line 188 of file tool-base.h.
References panning.
|
inlinevirtual |
Reimplemented in Inkscape::UI::Tools::InteractiveBooleansTool.
Definition at line 117 of file tool-base.h.
|
inline |
True if we're panning with the space bar.
Definition at line 191 of file tool-base.h.
References panning, PANNING_SPACE, and PANNING_SPACE_BUTTON1.
Referenced by SPKnot::eventHandler().
|
virtual |
Handles item specific events.
Gets called from Gdk.
Only reacts to right mouse button at the moment.
Reimplemented in Inkscape::UI::Tools::ArcTool, Inkscape::UI::Tools::Box3dTool, Inkscape::UI::Tools::ConnectorTool, Inkscape::UI::Tools::FloodTool, Inkscape::UI::Tools::LpeTool, Inkscape::UI::Tools::NodeTool, Inkscape::UI::Tools::PenTool, Inkscape::UI::Tools::RectTool, Inkscape::UI::Tools::SelectTool, and Inkscape::UI::Tools::TextTool.
Definition at line 948 of file tool-base.cpp.
References Inkscape::BUTTON_PRESS, and Inkscape::CanvasEvent::type().
Referenced by Inkscape::UI::Tools::ArcTool::item_handler(), Inkscape::UI::Tools::Box3dTool::item_handler(), Inkscape::UI::Tools::FloodTool::item_handler(), Inkscape::UI::Tools::NodeTool::item_handler(), Inkscape::UI::Tools::PenTool::item_handler(), Inkscape::UI::Tools::RectTool::item_handler(), and Inkscape::UI::Tools::TextTool::item_handler().
|
virtual |
Create popup menu and tell Gtk to show it.
Reimplemented in Inkscape::UI::Tools::PagesTool.
Definition at line 1227 of file tool-base.cpp.
References Inkscape::BUTTON_PRESS, Inkscape::inspect_event(), Inkscape::KEY_PRESS, Inkscape::UI::popup_at(), Inkscape::UI::Tools::sp_event_context_find_item(), and Inkscape::CanvasEvent::type().
void Inkscape::UI::Tools::ToolBase::process_delayed_snap_event | ( | ) |
When the delayed snap event timer expires, this method will be called and will re-inject the last motion event in an appropriate place, with snapping being turned on again.
Definition at line 1517 of file tool-base.cpp.
References Inkscape::UI::ControlPoint::_eventHandler(), check_if_knot_deleted(), item, Inkscape::UI::Widget::CanvasGrid::rulerMotion(), sp_dt_guide_event(), and SP_KNOT_GRABBED.
Referenced by SPKnot::eventHandler().
|
virtual |
Reimplemented in Inkscape::UI::Tools::EraserTool, Inkscape::UI::Tools::ArcTool, Inkscape::UI::Tools::InteractiveBooleansTool, Inkscape::UI::Tools::Box3dTool, Inkscape::UI::Tools::CalligraphicTool, Inkscape::UI::Tools::ConnectorTool, Inkscape::UI::Tools::DropperTool, Inkscape::UI::Tools::FloodTool, Inkscape::UI::Tools::FreehandBase, Inkscape::UI::Tools::GradientTool, Inkscape::UI::Tools::LpeTool, Inkscape::UI::Tools::MarkerTool, Inkscape::UI::Tools::MeasureTool, Inkscape::UI::Tools::MeshTool, Inkscape::UI::Tools::NodeTool, Inkscape::UI::Tools::PagesTool, Inkscape::UI::Tools::PenTool, Inkscape::UI::Tools::PencilTool, Inkscape::UI::Tools::RectTool, Inkscape::UI::Tools::SelectTool, Inkscape::UI::Tools::SpiralTool, Inkscape::UI::Tools::SprayTool, Inkscape::UI::Tools::StarTool, Inkscape::UI::Tools::TextTool, Inkscape::UI::Tools::TweakTool, Inkscape::UI::Tools::ZoomTool, and Inkscape::UI::Tools::ObjectPickerTool.
Definition at line 326 of file tool-base.cpp.
References _desktop, Geom::atan2(), Inkscape::DEBUG_EVENTS, Inkscape::dump_event(), Inkscape::Preferences::get(), Inkscape::UI::Widget::Canvas::get_affine(), Inkscape::UI::Widget::Canvas::get_dimensions(), Inkscape::UI::Widget::Canvas::get_geom_affine(), Inkscape::UI::Widget::Canvas::get_pos(), SPDesktop::getCanvas(), Inkscape::inspect_event(), Geom::Affine::inverse(), and tolerance.
Referenced by Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::InteractiveBooleansTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::FreehandBase::root_handler(), Inkscape::UI::Tools::MarkerTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::NodeTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::TweakTool::root_handler(), Inkscape::UI::Tools::ZoomTool::root_handler(), and Inkscape::UI::Tools::ObjectPickerTool::root_handler().
|
protected |
Definition at line 1074 of file tool-base.cpp.
References Geom::Point::floor().
Referenced by Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::LpeTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), and Inkscape::UI::Tools::ZoomTool::root_handler().
|
virtual |
Called by our pref_observer if a preference has been changed.
Reimplemented in Inkscape::UI::Tools::PenTool, Inkscape::UI::Tools::InteractiveBooleansTool, Inkscape::UI::Tools::CalligraphicTool, Inkscape::UI::Tools::ConnectorTool, Inkscape::UI::Tools::DynamicBase, Inkscape::UI::Tools::LpeTool, Inkscape::UI::Tools::MeshTool, Inkscape::UI::Tools::NodeTool, Inkscape::UI::Tools::RectTool, Inkscape::UI::Tools::SelectTool, Inkscape::UI::Tools::SpiralTool, Inkscape::UI::Tools::SprayTool, Inkscape::UI::Tools::StarTool, and Inkscape::UI::Tools::TweakTool.
Definition at line 138 of file tool-base.cpp.
References _desktop, Inkscape::Preferences::Entry::getBool(), Inkscape::Preferences::Entry::getEntryName(), SPDesktop::getSelection(), Inkscape::Selection::setChangeLayer(), and Inkscape::Selection::setChangePage().
Referenced by Inkscape::UI::Tools::MeshTool::set(), Inkscape::UI::Tools::NodeTool::set(), and Inkscape::UI::Tools::sp_event_context_read().
void Inkscape::UI::Tools::ToolBase::set_cursor | ( | std::string | filename | ) |
Sets the current cursor to the given filename.
Does not readload if not changed.
Definition at line 156 of file tool-base.cpp.
References _cursor_filename, and use_tool_cursor().
Referenced by Inkscape::UI::Tools::NodeTool::mouseover_changed(), Inkscape::UI::Tools::InteractiveBooleansTool::root_handler(), Inkscape::UI::Tools::PagesTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::ZoomTool::root_handler(), ToolBase(), and Inkscape::UI::Tools::TweakTool::update_cursor().
|
protected |
Enable (or disable) high precision for motion events.
This is intended to be used by drawing tools, that need to process motion events with high accuracy and high update rate (for example free hand tools)
With standard accuracy some intermediate motion events might be discarded
Call this function when an operation that requires high accuracy is started (e.g. mouse button is pressed to draw a line). Make sure to call it again and restore standard precision afterwards.
Definition at line 1062 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonRelease(), Inkscape::UI::Tools::CalligraphicTool::root_handler(), and Inkscape::UI::Tools::SprayTool::root_handler().
void Inkscape::UI::Tools::ToolBase::set_last_active_tool | ( | Glib::ustring | last_tool | ) |
Definition at line 1634 of file tool-base.cpp.
|
private |
This function allows to handle global tool events if _pre function is not fully overridden.
Definition at line 886 of file tool-base.cpp.
References Inkscape::inspect_event(), and Inkscape::CanvasEvent::modifiers.
|
protected |
Definition at line 1068 of file tool-base.cpp.
References Inkscape::CanvasEvent::modifiers, Inkscape::ButtonEvent::pos, and Inkscape::UI::Tools::sp_event_context_find_item().
Referenced by Inkscape::UI::Tools::Box3dTool::item_handler().
void Inkscape::UI::Tools::ToolBase::snap_delay_handler | ( | gpointer | item, |
gpointer | item2, | ||
MotionEvent const & | event, | ||
DelayedSnapEvent::Origin | origin | ||
) |
Analyses the current event, calculates the mouse speed, turns snapping off (temporarily) if the mouse speed is above a threshold, and stores the current event such that it can be re-triggered when needed (re-triggering is controlled by a timeout).
item | Pointer that store a reference to a canvas or to an item. |
item2 | Another pointer, storing a reference to a knot or controlpoint. |
event | Pointer to the motion event. |
origin | Identifier (enum) specifying where the delay (and the call to this method) were initiated. |
Definition at line 1441 of file tool-base.cpp.
References item, Geom::L2(), and origin.
Referenced by SPKnot::eventHandler(), and Inkscape::UI::Widget::CanvasGrid::rulerMotion().
|
protected |
Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case).
Definition at line 975 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::PenTool::_handleMotionNotify(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), and Inkscape::UI::Tools::TextTool::root_handler().
bool Inkscape::UI::Tools::ToolBase::start_item_handler | ( | SPItem * | item, |
CanvasEvent const & | event | ||
) |
Starts handling item snapping and pass to virtual_item_handler afterwards.
Definition at line 1175 of file tool-base.cpp.
References item.
bool Inkscape::UI::Tools::ToolBase::start_root_handler | ( | CanvasEvent const & | event | ) |
Handles snapping events for all tools and then passes to tool_root_handler.
Definition at line 1134 of file tool-base.cpp.
References Inkscape::DEBUG_EVENTS, and Inkscape::dump_event().
|
inlinevirtual |
Reimplemented in Inkscape::UI::Tools::InteractiveBooleansTool, and Inkscape::UI::Tools::PagesTool.
Definition at line 118 of file tool-base.h.
bool Inkscape::UI::Tools::ToolBase::tool_root_handler | ( | CanvasEvent const & | event | ) |
Calls the right tool's event handler, depending on the selected tool and state.
Definition at line 1152 of file tool-base.cpp.
References Inkscape::DEBUG_EVENTS, Inkscape::dump_event(), and Inkscape::UI::Tools::set_event_location().
|
protected |
Ungrab events from the Canvas Catchall.
(Common configuration.)
Definition at line 1047 of file tool-base.cpp.
Referenced by Inkscape::UI::Tools::EraserTool::_cancel(), Inkscape::UI::Tools::PencilTool::_cancel(), Inkscape::UI::Tools::PenTool::_handleButtonRelease(), Inkscape::UI::Tools::PencilTool::_handleButtonRelease(), Inkscape::UI::Tools::ArcTool::cancel(), Inkscape::UI::Tools::Box3dTool::cancel(), Inkscape::UI::Tools::CalligraphicTool::cancel(), Inkscape::UI::Tools::RectTool::cancel(), Inkscape::UI::Tools::SpiralTool::cancel(), Inkscape::UI::Tools::StarTool::cancel(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::MarkerTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::ZoomTool::root_handler(), Inkscape::UI::Tools::ArcTool::~ArcTool(), Inkscape::UI::Tools::Box3dTool::~Box3dTool(), Inkscape::UI::Tools::DropperTool::~DropperTool(), Inkscape::UI::Tools::FreehandBase::~FreehandBase(), Inkscape::UI::Tools::MarkerTool::~MarkerTool(), Inkscape::UI::Tools::MeasureTool::~MeasureTool(), Inkscape::UI::Tools::ObjectPickerTool::~ObjectPickerTool(), Inkscape::UI::Tools::PagesTool::~PagesTool(), Inkscape::UI::Tools::RectTool::~RectTool(), Inkscape::UI::Tools::SpiralTool::~SpiralTool(), Inkscape::UI::Tools::StarTool::~StarTool(), Inkscape::UI::Tools::TextTool::~TextTool(), and Inkscape::UI::Tools::ZoomTool::~ZoomTool().
void Inkscape::UI::Tools::ToolBase::use_cursor | ( | Glib::RefPtr< Gdk::Cursor > | cursor | ) |
Set the cursor to this specific one, don't remember it.
If RefPtr is empty, sets the remembered cursor (reverting it)
Definition at line 200 of file tool-base.cpp.
References _cursor, _desktop, and SPDesktop::getCanvas().
Referenced by SPKnot::eventHandler().
void Inkscape::UI::Tools::ToolBase::use_tool_cursor | ( | ) |
Uses the saved cursor, based on the saved filename.
Definition at line 187 of file tool-base.cpp.
References _cursor_filename, _desktop, get_cursor(), SPDesktop::getCanvas(), and SPDesktop::waiting_cursor.
Referenced by set_cursor(), and Inkscape::UI::Widget::Canvas::update_cursor().
bool Inkscape::UI::Tools::ToolBase::virtual_item_handler | ( | SPItem * | item, |
CanvasEvent const & | event | ||
) |
Definition at line 1186 of file tool-base.cpp.
References item, and Inkscape::UI::Tools::set_event_location().
|
protected |
Definition at line 227 of file tool-base.h.
|
protected |
Definition at line 225 of file tool-base.h.
|
protected |
Definition at line 226 of file tool-base.h.
|
protected |
Definition at line 224 of file tool-base.h.
Referenced by Inkscape::UI::Tools::PenTool::_handleKeyPress(), and Inkscape::UI::Tools::InteractiveBooleansTool::event_key_press_handler().
|
protected |
Definition at line 223 of file tool-base.h.
Referenced by Inkscape::UI::Tools::PenTool::_handleKeyPress(), and Inkscape::UI::Tools::InteractiveBooleansTool::event_key_press_handler().
|
protected |
Definition at line 149 of file tool-base.h.
Referenced by Inkscape::UI::Tools::PenTool::_handleButtonPress().
|
protected |
Definition at line 150 of file tool-base.h.
|
protected |
Definition at line 151 of file tool-base.h.
|
protected |
Definition at line 141 of file tool-base.h.
Referenced by use_cursor().
|
protected |
Definition at line 143 of file tool-base.h.
Referenced by ToolBase().
|
protected |
Definition at line 142 of file tool-base.h.
Referenced by Inkscape::UI::Tools::DropperTool::root_handler(), set_cursor(), and use_tool_cursor().
|
protected |
Definition at line 220 of file tool-base.h.
Referenced by Inkscape::UI::Tools::PencilTool::_addFreehandPoint(), Inkscape::UI::Tools::EraserTool::_brush(), Inkscape::UI::Tools::PenTool::_bsplineSpiroColor(), Inkscape::UI::Tools::PenTool::_bsplineSpiroMotion(), Inkscape::UI::Tools::PencilTool::_endpointSnap(), Inkscape::UI::Tools::PenTool::_finish(), Inkscape::UI::Tools::PenTool::_finishSegment(), Inkscape::UI::Tools::PencilTool::_fitAndSplit(), Inkscape::UI::Tools::PenTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::PenTool::_handleButtonRelease(), Inkscape::UI::Tools::PencilTool::_handleButtonRelease(), Inkscape::UI::Tools::PenTool::_handleKeyPress(), Inkscape::UI::Tools::PencilTool::_handleKeyPress(), Inkscape::UI::Tools::PencilTool::_handleKeyRelease(), Inkscape::UI::Tools::PenTool::_handleMotionNotify(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Tools::TextTool::_insertUnichar(), Inkscape::UI::Tools::PencilTool::_interpolate(), _keyboardMove(), Inkscape::UI::Tools::PenTool::_lastpointMove(), Inkscape::UI::Tools::PenTool::_lastpointMoveScreen(), Inkscape::UI::Tools::PenTool::_redoLastPoint(), Inkscape::UI::Tools::PenTool::_redrawAll(), Inkscape::UI::Tools::PenTool::_setAngleDistanceStatusMessage(), Inkscape::UI::Tools::PenTool::_setToNearestHorizVert(), Inkscape::UI::Tools::TextTool::_setupText(), Inkscape::UI::Tools::PencilTool::_sketchInterpolate(), Inkscape::UI::Tools::TextTool::_styleSet(), Inkscape::UI::Tools::TextTool::_updateCursor(), Inkscape::UI::Tools::TextTool::_updateTextSelection(), Inkscape::UI::Tools::GradientTool::add_stop_near_point(), Inkscape::UI::Tools::PencilTool::addPowerStrokePencil(), Inkscape::UI::Tools::CalligraphicTool::apply(), Inkscape::UI::Tools::Box3dTool::Box3dTool(), Inkscape::UI::Tools::CalligraphicTool::brush(), Inkscape::UI::Tools::ArcTool::cancel(), Inkscape::UI::Tools::Box3dTool::cancel(), Inkscape::UI::Tools::RectTool::cancel(), Inkscape::UI::Tools::SpiralTool::cancel(), Inkscape::UI::Tools::StarTool::cancel(), Inkscape::UI::Tools::MeasureTool::copyToClipboard(), Inkscape::UI::Tools::MeasureTool::createAngleDisplayCurve(), currentLayer(), Inkscape::UI::Tools::TextTool::deleteSelected(), Inkscape::UI::Tools::Box3dTool::drag(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::Tools::ArcTool::finishItem(), Inkscape::UI::Tools::Box3dTool::finishItem(), Inkscape::UI::Tools::RectTool::finishItem(), Inkscape::UI::Tools::SpiralTool::finishItem(), Inkscape::UI::Tools::StarTool::finishItem(), Inkscape::UI::Tools::MeshTool::fit_mesh_in_bbox(), get_cursor(), Inkscape::UI::Tools::MarkerTool::get_marker_transform(), Inkscape::UI::Tools::NodeTool::get_rubberband(), getDesktop(), Inkscape::UI::Tools::DynamicBase::getNormalizedPoint(), Inkscape::UI::Tools::PagesTool::getSnappedResizePoint(), Inkscape::UI::Tools::DynamicBase::getViewPoint(), Inkscape::UI::Tools::InteractiveBooleansTool::hide_selected_objects(), Inkscape::UI::Tools::InteractiveBooleansTool::InteractiveBooleansTool(), Inkscape::UI::Tools::GradientTool::is_over_curve(), Inkscape::UI::Tools::InteractiveBooleansTool::is_ready(), Inkscape::UI::Tools::ConnectorTool::item_handler(), Inkscape::UI::Tools::LpeTool::item_handler(), Inkscape::UI::Tools::NodeTool::item_handler(), Inkscape::UI::Tools::TextTool::item_handler(), Inkscape::UI::Tools::MeasureTool::knotClickHandler(), Inkscape::UI::Tools::MeasureTool::knotEndMovedHandler(), Inkscape::UI::Tools::MeasureTool::knotStartMovedHandler(), Inkscape::UI::Tools::PagesTool::marginKnotMoved(), Inkscape::UI::Tools::PagesTool::marginKnotSet(), Inkscape::UI::Tools::NodeTool::NodeTool(), Inkscape::UI::Tools::MeshTool::over_curve(), Inkscape::UI::Tools::TextTool::pasteInline(), Inkscape::UI::Tools::PenTool::PenTool(), Inkscape::UI::Tools::TextTool::placeCursor(), Inkscape::UI::Tools::TextTool::placeCursorAt(), Inkscape::UI::Tools::PencilTool::powerStrokeInterpolate(), Inkscape::UI::Tools::PagesTool::resizeKnotFinished(), Inkscape::UI::Tools::PagesTool::resizeKnotMoved(), root_handler(), Inkscape::UI::Tools::EraserTool::root_handler(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::GradientTool::root_handler(), Inkscape::UI::Tools::LpeTool::root_handler(), Inkscape::UI::Tools::MarkerTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::NodeTool::root_handler(), Inkscape::UI::Tools::PagesTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::TweakTool::root_handler(), Inkscape::UI::Tools::ZoomTool::root_handler(), Inkscape::UI::Tools::ObjectPickerTool::root_handler(), Inkscape::UI::Tools::NodeTool::select_area(), Inkscape::UI::Tools::GradientTool::select_next(), Inkscape::UI::Tools::MeshTool::select_next(), Inkscape::UI::Tools::NodeTool::select_point(), Inkscape::UI::Tools::GradientTool::select_prev(), Inkscape::UI::Tools::MeshTool::select_prev(), Inkscape::UI::Tools::GradientTool::selection_changed(), Inkscape::UI::Tools::MeshTool::selection_changed(), Inkscape::UI::Tools::NodeTool::selection_changed(), Inkscape::UI::Tools::MarkerTool::selection_changed(), Inkscape::UI::Tools::Box3dTool::selection_changed(), set(), Inkscape::UI::Tools::NodeTool::set(), Inkscape::UI::Tools::InteractiveBooleansTool::set_opacity(), Inkscape::UI::Tools::MeasureTool::setGuide(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::MeasureTool::setLine(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::UI::Tools::MeasureTool::setMarkers(), Inkscape::UI::Tools::MeasureTool::setMeasureCanvasControlLine(), Inkscape::UI::Tools::MeasureTool::setMeasureCanvasItem(), Inkscape::UI::Tools::MeasureTool::setMeasureCanvasText(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), Inkscape::UI::Tools::MeasureTool::setPoint(), Inkscape::UI::Tools::InteractiveBooleansTool::shape_cancel(), Inkscape::UI::Tools::InteractiveBooleansTool::shape_commit(), Inkscape::UI::Tools::ObjectPickerTool::show_text(), Inkscape::UI::Tools::MeasureTool::showCanvasItems(), Inkscape::UI::Tools::MeasureTool::showInfoBox(), Inkscape::UI::Tools::MeasureTool::showItemInfoText(), Inkscape::UI::Tools::SelectTool::sp_select_context_abort(), Inkscape::UI::Tools::MeshTool::split_near_point(), Inkscape::UI::Tools::SprayTool::SprayTool(), Inkscape::UI::Tools::InteractiveBooleansTool::switching_away(), Inkscape::UI::Tools::TextTool::TextTool(), Inkscape::UI::Tools::MeasureTool::toGuides(), Inkscape::UI::Tools::MeasureTool::toItem(), Inkscape::UI::Tools::MeasureTool::toMarkDimension(), ToolBase(), Inkscape::UI::Tools::MeasureTool::toPhantom(), Inkscape::UI::Tools::TweakTool::update_cursor(), use_cursor(), use_tool_cursor(), Inkscape::UI::Tools::ConnectorTool::~ConnectorTool(), Inkscape::UI::Tools::InteractiveBooleansTool::~InteractiveBooleansTool(), Inkscape::UI::Tools::NodeTool::~NodeTool(), and Inkscape::UI::Tools::TextTool::~TextTool().
|
private |
Definition at line 232 of file tool-base.h.
|
private |
Definition at line 235 of file tool-base.h.
|
private |
Definition at line 234 of file tool-base.h.
GrDrag* Inkscape::UI::Tools::ToolBase::_grdrag = nullptr |
Definition at line 196 of file tool-base.h.
Referenced by Inkscape::UI::Tools::GradientTool::add_stops_between_selected_stops(), Inkscape::UI::Tools::MeshTool::corner_operation(), get_drag(), Inkscape::UI::Tools::GradientTool::GradientTool(), Inkscape::UI::Tools::GradientTool::is_over_curve(), Inkscape::UI::Tools::MeshTool::over_curve(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::GradientTool::select_next(), Inkscape::UI::Tools::MeshTool::select_next(), Inkscape::UI::Tools::GradientTool::select_prev(), Inkscape::UI::Tools::MeshTool::select_prev(), Inkscape::UI::Tools::GradientTool::selection_changed(), Inkscape::UI::Tools::MeshTool::selection_changed(), and Inkscape::UI::Tools::GradientTool::simplify().
|
private |
Definition at line 236 of file tool-base.h.
|
private |
Definition at line 134 of file tool-base.h.
Referenced by getPrefsPath(), and ToolBase().
SelCue* Inkscape::UI::Tools::ToolBase::_selcue = nullptr |
Definition at line 194 of file tool-base.h.
bool Inkscape::UI::Tools::ToolBase::_uses_snap = false |
Definition at line 203 of file tool-base.h.
|
private |
Definition at line 179 of file tool-base.h.
|
protected |
are we dragging?
Definition at line 146 of file tool-base.h.
Referenced by Inkscape::UI::Tools::EraserTool::_cancel(), Inkscape::UI::Tools::CalligraphicTool::cancel(), Inkscape::UI::Tools::SelectTool::item_handler(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), and Inkscape::UI::Tools::SelectTool::sp_select_context_abort().
|
protected |
the item where mouse_press occurred, to be selected if this is a click not drag
Definition at line 152 of file tool-base.h.
Referenced by Inkscape::UI::Tools::ArcTool::cancel(), Inkscape::UI::Tools::Box3dTool::cancel(), Inkscape::UI::Tools::RectTool::cancel(), Inkscape::UI::Tools::SpiralTool::cancel(), Inkscape::UI::Tools::StarTool::cancel(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::MarkerTool::root_handler(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), and Inkscape::UI::Tools::StarTool::root_handler().
std::unique_ptr<MessageContext> Inkscape::UI::Tools::ToolBase::message_context |
Definition at line 193 of file tool-base.h.
Referenced by Inkscape::UI::Tools::PenTool::_cancel(), Inkscape::UI::Tools::PencilTool::_cancel(), Inkscape::UI::Tools::PenTool::_finish(), Inkscape::UI::Tools::PenTool::_handleMotionNotify(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Tools::PenTool::_setAngleDistanceStatusMessage(), Inkscape::UI::Tools::TextTool::_updateCursor(), defaultMessageContext(), Inkscape::UI::Widget::RotateableSwatch::do_motion(), Inkscape::UI::Widget::RotateableStrokeWidth::do_motion(), Inkscape::UI::Widget::RotateableSwatch::do_release(), Inkscape::UI::Widget::RotateableStrokeWidth::do_release(), Inkscape::UI::Tools::Box3dTool::drag(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::Tools::ArcTool::finishItem(), Inkscape::UI::Tools::Box3dTool::finishItem(), Inkscape::UI::Tools::RectTool::finishItem(), Inkscape::UI::Tools::SpiralTool::finishItem(), Inkscape::UI::Tools::StarTool::finishItem(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::TweakTool::root_handler(), Inkscape::UI::Tools::GradientTool::selection_changed(), Inkscape::UI::Tools::MeshTool::selection_changed(), ToolBase(), Inkscape::UI::Tools::TweakTool::update_cursor(), Inkscape::UI::Tools::SprayTool::update_cursor(), Inkscape::UI::Tools::InteractiveBooleansTool::update_status(), Inkscape::UI::Tools::NodeTool::update_tip(), Inkscape::UI::Tools::NodeTool::update_tip(), and Inkscape::UI::Tools::MarkerTool::~MarkerTool().
|
private |
Definition at line 176 of file tool-base.h.
Referenced by is_panning(), and is_space_panning().
|
private |
Definition at line 133 of file tool-base.h.
Referenced by ToolBase().
|
private |
Definition at line 178 of file tool-base.h.
ShapeEditor* Inkscape::UI::Tools::ToolBase::shape_editor = nullptr |
Definition at line 198 of file tool-base.h.
Referenced by _keyboardMove(), Inkscape::UI::Tools::TextTool::_selectionChanged(), Inkscape::UI::Tools::TextTool::_selectionModified(), Inkscape::UI::Tools::TextTool::_updateTextSelection(), Inkscape::UI::Tools::ArcTool::ArcTool(), Inkscape::UI::Tools::Box3dTool::Box3dTool(), Inkscape::UI::Tools::FloodTool::FloodTool(), Inkscape::UI::Tools::RectTool::RectTool(), Inkscape::UI::Tools::ArcTool::selection_changed(), Inkscape::UI::Tools::Box3dTool::selection_changed(), Inkscape::UI::Tools::FloodTool::selection_changed(), Inkscape::UI::Tools::RectTool::selection_changed(), Inkscape::UI::Tools::SpiralTool::selection_changed(), Inkscape::UI::Tools::StarTool::selection_changed(), Inkscape::UI::Tools::sp_event_context_get_shape_editor(), Inkscape::UI::Tools::SpiralTool::SpiralTool(), Inkscape::UI::Tools::StarTool::StarTool(), Inkscape::UI::Tools::TextTool::TextTool(), Inkscape::UI::Tools::ArcTool::~ArcTool(), Inkscape::UI::Tools::Box3dTool::~Box3dTool(), Inkscape::UI::Tools::FloodTool::~FloodTool(), Inkscape::UI::Tools::RectTool::~RectTool(), Inkscape::UI::Tools::SpiralTool::~SpiralTool(), Inkscape::UI::Tools::StarTool::~StarTool(), and Inkscape::UI::Tools::TextTool::~TextTool().
|
private |
Definition at line 179 of file tool-base.h.
|
protected |
Definition at line 147 of file tool-base.h.
Referenced by Inkscape::UI::Tools::PenTool::_handleMotionNotify(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Tools::GradientTool::add_stop_near_point(), Inkscape::UI::Tools::FloodTool::FloodTool(), Inkscape::UI::Tools::GradientTool::GradientTool(), Inkscape::UI::Tools::GradientTool::is_over_curve(), Inkscape::UI::Tools::SelectTool::item_handler(), Inkscape::UI::Tools::MeshTool::MeshTool(), Inkscape::UI::Tools::MeshTool::over_curve(), root_handler(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::GradientTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Tools::ZoomTool::root_handler(), Inkscape::UI::Tools::GradientTool::simplify(), and Inkscape::UI::Tools::MeshTool::split_near_point().
|
protected |
are we still within tolerance of origin
Definition at line 148 of file tool-base.h.
Referenced by Inkscape::UI::Tools::ArcTool::cancel(), Inkscape::UI::Tools::Box3dTool::cancel(), Inkscape::UI::Tools::RectTool::cancel(), Inkscape::UI::Tools::SpiralTool::cancel(), Inkscape::UI::Tools::StarTool::cancel(), Inkscape::UI::Tools::ConnectorTool::ConnectorTool(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), and Inkscape::UI::Tools::ZoomTool::root_handler().
|
protected |
where drag started
Definition at line 145 of file tool-base.h.
Referenced by Inkscape::UI::Tools::ArcTool::cancel(), Inkscape::UI::Tools::Box3dTool::cancel(), Inkscape::UI::Tools::RectTool::cancel(), Inkscape::UI::Tools::SpiralTool::cancel(), Inkscape::UI::Tools::StarTool::cancel(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), and Inkscape::UI::Tools::ZoomTool::root_handler().