Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Tools::ToolBase Class Reference

Base class for Event processors. More...

#include <tool-base.h>

Inheritance diagram for Inkscape::UI::Tools::ToolBase:
Inkscape::UI::Tools::ArcTool Inkscape::UI::Tools::Box3dTool Inkscape::UI::Tools::ConnectorTool Inkscape::UI::Tools::DropperTool Inkscape::UI::Tools::DynamicBase Inkscape::UI::Tools::FloodTool Inkscape::UI::Tools::FreehandBase Inkscape::UI::Tools::GradientTool Inkscape::UI::Tools::InteractiveBooleansTool Inkscape::UI::Tools::MarkerTool Inkscape::UI::Tools::MeasureTool Inkscape::UI::Tools::MeshTool Inkscape::UI::Tools::NodeTool Inkscape::UI::Tools::ObjectPickerTool Inkscape::UI::Tools::PagesTool 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

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.
 
MessageContextdefaultMessageContext () const
 
SPDesktopgetDesktop () const
 
SPGroupcurrentLayer () 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.
 
GrDragget_drag ()
 

Public Attributes

std::unique_ptr< MessageContextmessage_context
 
SelCue_selcue = nullptr
 
GrDrag_grdrag = nullptr
 
ShapeEditorshape_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
 
SPItemitem_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::PreferencesObserverpref_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
 

Detailed Description

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.

Member Enumeration Documentation

◆ Panning

Enumerator
PANNING_NONE 
PANNING_SPACE_BUTTON1 
PANNING_BUTTON2 
PANNING_BUTTON3 
PANNING_SPACE 

Definition at line 168 of file tool-base.h.

Constructor & Destructor Documentation

◆ ToolBase()

Inkscape::UI::Tools::ToolBase::ToolBase ( SPDesktop desktop,
std::string &&  prefs_path,
std::string &&  cursor_filename,
bool  uses_snap = true 
)

◆ ~ToolBase()

Inkscape::UI::Tools::ToolBase::~ToolBase ( )
virtual

Definition at line 130 of file tool-base.cpp.

References enableSelectionCue().

Member Function Documentation

◆ _filterEventForSnapping()

void Inkscape::UI::Tools::ToolBase::_filterEventForSnapping ( SPItem item,
CanvasEvent const &  event,
DelayedSnapEvent::Origin  origin 
)
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.

◆ _keyboardMove()

bool Inkscape::UI::Tools::ToolBase::_keyboardMove ( KeyEvent const &  event,
Geom::Point const &  dir 
)
private

◆ _schedule_delayed_snap_event()

void Inkscape::UI::Tools::ToolBase::_schedule_delayed_snap_event ( )
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().

◆ are_buttons_1_and_3_on() [1/2]

bool Inkscape::UI::Tools::ToolBase::are_buttons_1_and_3_on ( ) const
private

Definition at line 931 of file tool-base.cpp.

◆ are_buttons_1_and_3_on() [2/2]

bool Inkscape::UI::Tools::ToolBase::are_buttons_1_and_3_on ( CanvasEvent const &  event)
private

Definition at line 936 of file tool-base.cpp.

◆ can_undo()

virtual bool Inkscape::UI::Tools::ToolBase::can_undo ( bool  redo = false)
inlinevirtual

Definition at line 116 of file tool-base.h.

◆ checkDragMoved()

bool Inkscape::UI::Tools::ToolBase::checkDragMoved ( Geom::Point const &  pos)
protected

◆ currentLayer()

◆ defaultMessageContext()

◆ deleteSelectedDrag()

◆ discard_delayed_snap_event()

◆ enableGrDrag()

void Inkscape::UI::Tools::ToolBase::enableGrDrag ( bool  enable = true)

◆ enableSelectionCue()

◆ get_cursor()

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().

◆ get_drag()

◆ get_last_active_tool()

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().

◆ getDesktop()

◆ getPrefsPath()

◆ grabCanvasEvents()

◆ hasGradientDrag()

bool Inkscape::UI::Tools::ToolBase::hasGradientDrag ( ) const

Return true if there is a gradient drag.

Definition at line 1031 of file tool-base.cpp.

◆ is_panning()

bool Inkscape::UI::Tools::ToolBase::is_panning ( ) const
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.

◆ is_ready()

virtual bool Inkscape::UI::Tools::ToolBase::is_ready ( ) const
inlinevirtual

Reimplemented in Inkscape::UI::Tools::InteractiveBooleansTool.

Definition at line 117 of file tool-base.h.

◆ is_space_panning()

bool Inkscape::UI::Tools::ToolBase::is_space_panning ( ) const
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().

◆ item_handler()

◆ menu_popup()

void Inkscape::UI::Tools::ToolBase::menu_popup ( CanvasEvent const &  event,
SPObject obj = nullptr 
)
virtual

◆ process_delayed_snap_event()

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().

◆ root_handler()

bool Inkscape::UI::Tools::ToolBase::root_handler ( CanvasEvent const &  event)
virtual
Todo:
Remove redundant /value in preference keys

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().

◆ saveDragOrigin()

◆ set()

◆ set_cursor()

void Inkscape::UI::Tools::ToolBase::set_cursor ( std::string  filename)

◆ set_high_motion_precision()

void Inkscape::UI::Tools::ToolBase::set_high_motion_precision ( bool  high_precision = true)
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().

◆ set_last_active_tool()

void Inkscape::UI::Tools::ToolBase::set_last_active_tool ( Glib::ustring  last_tool)

Definition at line 1634 of file tool-base.cpp.

◆ set_on_buttons()

void Inkscape::UI::Tools::ToolBase::set_on_buttons ( CanvasEvent const &  event)
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.

◆ setup_for_drag_start()

void Inkscape::UI::Tools::ToolBase::setup_for_drag_start ( ButtonPressEvent const &  ev)
protected

◆ snap_delay_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).

Parameters
itemPointer that store a reference to a canvas or to an item.
item2Another pointer, storing a reference to a knot or controlpoint.
eventPointer to the motion event.
originIdentifier (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().

◆ sp_event_context_knot_mouseover()

◆ start_item_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.

◆ start_root_handler()

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().

◆ switching_away()

virtual void Inkscape::UI::Tools::ToolBase::switching_away ( std::string const &  new_tool)
inlinevirtual

◆ tool_root_handler()

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().

◆ ungrabCanvasEvents()

void Inkscape::UI::Tools::ToolBase::ungrabCanvasEvents ( )
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().

◆ use_cursor()

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().

◆ use_tool_cursor()

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().

◆ virtual_item_handler()

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().

Member Data Documentation

◆ _acc_quick_pan

Util::ActionAccel Inkscape::UI::Tools::ToolBase::_acc_quick_pan
protected

Definition at line 227 of file tool-base.h.

◆ _acc_quick_preview

Util::ActionAccel Inkscape::UI::Tools::ToolBase::_acc_quick_preview
protected

Definition at line 225 of file tool-base.h.

◆ _acc_quick_zoom

Util::ActionAccel Inkscape::UI::Tools::ToolBase::_acc_quick_zoom
protected

Definition at line 226 of file tool-base.h.

◆ _acc_redo

Util::ActionAccel Inkscape::UI::Tools::ToolBase::_acc_redo
protected

◆ _acc_undo

Util::ActionAccel Inkscape::UI::Tools::ToolBase::_acc_undo
protected

◆ _button1on

bool Inkscape::UI::Tools::ToolBase::_button1on = false
protected

Definition at line 149 of file tool-base.h.

Referenced by Inkscape::UI::Tools::PenTool::_handleButtonPress().

◆ _button2on

bool Inkscape::UI::Tools::ToolBase::_button2on = false
protected

Definition at line 150 of file tool-base.h.

◆ _button3on

bool Inkscape::UI::Tools::ToolBase::_button3on = false
protected

Definition at line 151 of file tool-base.h.

◆ _cursor

Glib::RefPtr<Gdk::Cursor> Inkscape::UI::Tools::ToolBase::_cursor
protected

Definition at line 141 of file tool-base.h.

Referenced by use_cursor().

◆ _cursor_default

std::string Inkscape::UI::Tools::ToolBase::_cursor_default = "select.svg"
protected

Definition at line 143 of file tool-base.h.

Referenced by ToolBase().

◆ _cursor_filename

std::string Inkscape::UI::Tools::ToolBase::_cursor_filename = "select.svg"
protected

◆ _desktop

SPDesktop* Inkscape::UI::Tools::ToolBase::_desktop = nullptr
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().

◆ _dse

std::optional<DelayedSnapEvent> Inkscape::UI::Tools::ToolBase::_dse
private

Definition at line 232 of file tool-base.h.

◆ _dse_callback_in_process

bool Inkscape::UI::Tools::ToolBase::_dse_callback_in_process = false
private

Definition at line 235 of file tool-base.h.

◆ _dse_timeout_conn

sigc::scoped_connection Inkscape::UI::Tools::ToolBase::_dse_timeout_conn
private

Definition at line 234 of file tool-base.h.

◆ _grdrag

◆ _last_active_tool

Glib::ustring Inkscape::UI::Tools::ToolBase::_last_active_tool
private

Definition at line 236 of file tool-base.h.

◆ _prefs_path

std::string Inkscape::UI::Tools::ToolBase::_prefs_path
private

Definition at line 134 of file tool-base.h.

Referenced by getPrefsPath(), and ToolBase().

◆ _selcue

SelCue* Inkscape::UI::Tools::ToolBase::_selcue = nullptr

Definition at line 194 of file tool-base.h.

◆ _uses_snap

bool Inkscape::UI::Tools::ToolBase::_uses_snap = false

Definition at line 203 of file tool-base.h.

◆ current_angle

double Inkscape::UI::Tools::ToolBase::current_angle
private

Definition at line 179 of file tool-base.h.

◆ dragging

◆ item_to_select

◆ message_context

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().

◆ panning

Panning Inkscape::UI::Tools::ToolBase::panning = PANNING_NONE
private

Definition at line 176 of file tool-base.h.

Referenced by is_panning(), and is_space_panning().

◆ pref_observer

std::unique_ptr<Preferences::PreferencesObserver> Inkscape::UI::Tools::ToolBase::pref_observer
private

Definition at line 133 of file tool-base.h.

Referenced by ToolBase().

◆ rotating

bool Inkscape::UI::Tools::ToolBase::rotating = false
private

Definition at line 178 of file tool-base.h.

◆ shape_editor

◆ start_angle

double Inkscape::UI::Tools::ToolBase::start_angle
private

Definition at line 179 of file tool-base.h.

◆ tolerance

◆ within_tolerance

◆ xyp


The documentation for this class was generated from the following files: