20#include <sigc++/sigc++.h>
21#include <glibmm/ustring.h>
22#include <glibmm/refptr.h>
23#include <gdkmm/cursor.h>
30#include <sigc++/scoped_connection.h>
84 unsigned char *
image[SP_KNOT_VISIBLE_STATES];
85 Glib::RefPtr<Gdk::Cursor>
_cursors[SP_KNOT_VISIBLE_STATES];
108 void setImage(
unsigned char* normal,
unsigned char* mouseover,
unsigned char* dragging,
unsigned char* selected);
111 void setTip(Glib::ustring &&tip);
Cartesian point / 2D vector and related operations.
std::unique_ptr< T, CanvasItemUnlinkDeleter > CanvasItemPtr
Smart pointer used to hold CanvasItems, like std::unique_ptr.
Two-dimensional point with integer coordinates.
Two-dimensional point that doubles as a vector.
To do: update description of desktop.
Base class for visual SVG elements.
Desktop-bound visual control object.
static void ref(SPKnot *knot)
Geom::Point drag_origin
Origin of drag.
sigc::signal< void(SPKnot *, unsigned int)> ungrabbed_signal
void _setCtrlState()
Set knot control state (dragging/mouseover/normal).
SPItem * owner
Optional Owner Item.
unsigned char * image[SP_KNOT_VISIBLE_STATES]
sigc::signal< void(SPKnot *, Geom::Point const &, unsigned int)> moved_signal
sigc::signal< void(SPKnot *, unsigned int)> click_signal
void setPosition(Geom::Point const &p, unsigned int state)
Move knot to new position and emits "moved" signal.
void handler_request_position(Inkscape::MotionEvent const &event)
Geom::Point pos
Our desktop coordinates.
void setImage(unsigned char *normal, unsigned char *mouseover, unsigned char *dragging, unsigned char *selected)
void setSize(Inkscape::HandleSize size)
sigc::signal< void(SPKnot *, unsigned int)> mousedown_signal
sigc::signal< void(SPKnot *, unsigned int)> grabbed_signal
Geom::IntPoint xyp
Where drag started.
sigc::signal< bool(SPKnot *, Geom::Point *, unsigned int)> request_signal
sigc::signal< void(SPKnot *, unsigned int)> doubleclicked_signal
CanvasItemPtr< Inkscape::CanvasItemCtrl > ctrl
Our CanvasItemCtrl.
sigc::signal< bool(SPKnot *, Inkscape::CanvasEvent const &)> event_signal
static void unref(SPKnot *knot)
void hide()
Hide knot on its canvas.
Inkscape::HandleSize _size
Always square.
void setAnchor(unsigned int i)
sigc::scoped_connection _event_connection
double angle
Angle of mesh handle.
void show()
Show knot on its canvas.
void setTip(Glib::ustring &&tip)
void requestPosition(Geom::Point const &pos, unsigned int state)
Request or set new position for knot.
bool size_set
Use default size unless explicitly set.
SPAnchorType anchor
Anchor.
double pressure
The tablet pen pressure when the knot is being dragged.
bool shape_set
Use default shape unless explicitly set.
void setFlag(unsigned int flag, bool set)
Set flag in knot, with side effects.
Glib::RefPtr< Gdk::Cursor > _cursors[SP_KNOT_VISIBLE_STATES]
Geom::Point grabbed_rel_pos
Grabbed relative position.
Inkscape::CanvasItemCtrlShape shape
Shape type.
SPKnot & operator=(SPKnot const &)=delete
void updateCtrl()
Update knot's control state.
SPKnot(SPKnot const &)=delete
Geom::Point position() const
Returns position of knot.
SPItem * sub_owner
Optional SubOwner Item.
bool is_mouseover() const
SPDesktop * desktop
Desktop we are on.
void moveto(Geom::Point const &p)
Move knot to new position, without emitting a MOVED signal.
void selectKnot(bool select)
Select knot.
bool eventHandler(Inkscape::CanvasEvent const &event)
Event handler (from CanvasItems).
void setCursor(SPKnotStateType type, Glib::RefPtr< Gdk::Cursor > cursor)
void startDragging(Geom::Point const &p, Geom::IntPoint const &xy, uint32_t etime)
Update knot for dragging and tell canvas an item was grabbed.
Some enums used by SPKnot and by related types & functions.
Helper class to stream background task notifications as a series of messages.
@ CANVAS_ITEM_CTRL_SHAPE_SQUARE
Abstract base class for events.
Movement of the mouse pointer.