Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Widget::Canvas Class Referencefinal

A widget for Inkscape's canvas. More...

#include <canvas.h>

Inheritance diagram for Inkscape::UI::Widget::Canvas:
Inkscape::UI::Widget::OptGLArea

Public Member Functions

 Canvas ()
 
 ~Canvas () final
 
void set_desktop (SPDesktop *desktop)
 
SPDesktopget_desktop () const
 
void set_drawing (Inkscape::Drawing *drawing)
 
CanvasItemGroupget_canvas_item_root () const
 
void set_pos (const Geom::IntPoint &pos)
 Scroll window so drawing point 'pos' is at upper left corner of canvas.
 
void set_pos (const Geom::Point &fpos)
 
void set_affine (const Geom::Affine &affine)
 Set the affine for the canvas.
 
const Geom::IntPointget_pos () const
 
const Geom::Affineget_affine () const
 
const Geom::Affineget_geom_affine () const
 
void set_desk (uint32_t rgba)
 Set the desk colour.
 
void set_border (uint32_t rgba)
 Set the page border colour.
 
void set_page (uint32_t rgba)
 Set the page colour.
 
void set_render_mode (Inkscape::RenderMode mode)
 
void set_color_mode (Inkscape::ColorMode mode)
 
void set_split_mode (Inkscape::SplitMode mode)
 
Inkscape::RenderMode get_render_mode () const
 
Inkscape::ColorMode get_color_mode () const
 
Inkscape::SplitMode get_split_mode () const
 
void set_clip_to_page_mode (bool clip)
 
void set_antialiasing_enabled (bool enabled)
 
void set_cms_active (bool active)
 
bool get_cms_active () const
 
Geom::IntPoint get_dimensions () const
 
bool world_point_inside_canvas (Geom::Point const &world) const
 Is world point inside canvas area?
 
Geom::Point canvas_to_world (Geom::Point const &window) const
 Translate point in canvas to world coordinates.
 
Geom::IntRect get_area_world () const
 Return the area shown in the canvas in world coordinates.
 
bool canvas_point_in_outline_zone (Geom::Point const &world) const
 Return whether a point in screen space / canvas coordinates is inside the region of the canvas where things respond to mouse clicks as if they are in outline mode.
 
bool is_dragging () const
 
std::optional< Geom::Pointget_last_mouse () const
 Return the last known mouse position of center if off-canvas.
 
void redraw_all ()
 Invalidate drawing and redraw during idle.
 
void redraw_area (Geom::Rect const &area)
 
void redraw_area (int x0, int y0, int x1, int y1)
 Redraw the given area during idle.
 
void redraw_area (Geom::Coord x0, Geom::Coord y0, Geom::Coord x1, Geom::Coord y1)
 
void request_update ()
 Redraw after changing canvas item geometry.
 
void canvas_item_destructed (Inkscape::CanvasItem *item)
 Clear current and grabbed items.
 
Inkscape::CanvasItemget_current_canvas_item () const
 
void set_current_canvas_item (Inkscape::CanvasItem *item)
 
Inkscape::CanvasItemget_grabbed_canvas_item () const
 
void set_grabbed_canvas_item (Inkscape::CanvasItem *item, EventMask mask)
 
void set_all_enter_events (bool on)
 
void enable_autoscroll ()
 
sigc::connection connectResize (sigc::slot< void()> &&slot)
 
sigc::connection connectFocusIn (sigc::slot< void()> &&slot)
 
sigc::connection connectFocusOut (sigc::slot< void()> &&slot)
 
- Public Member Functions inherited from Inkscape::UI::Widget::OptGLArea
 OptGLArea ()
 
 ~OptGLArea () override
 
void set_opengl_enabled (bool)
 Set whether OpenGL is enabled.
 
bool get_opengl_enabled () const
 
void make_current ()
 Call before doing any OpenGL operations to make the context current.
 
void bind_framebuffer () const
 Call before rendering to the widget to bind the widget's framebuffer.
 
void snapshot_vfunc (Glib::RefPtr< Gtk::Snapshot > const &snapshot) override
 

Private Types

using parent_type = OptGLArea
 

Private Member Functions

bool on_scroll (Gtk::EventControllerScroll const &controller, double dx, double dy)
 
Gtk::EventSequenceState on_button_pressed (Gtk::GestureClick const &controller, int n_press, double x, double y)
 
Gtk::EventSequenceState on_button_released (Gtk::GestureClick const &controller, int n_press, double x, double y)
 
void on_motion (Gtk::EventControllerMotion const &controller, double x, double y)
 
void on_enter (Gtk::EventControllerMotion const &controller, double x, double y)
 
void on_leave (Gtk::EventControllerMotion const &controller)
 
void on_focus_in ()
 
void on_focus_out ()
 
bool on_key_pressed (Gtk::EventControllerKey const &controller, unsigned keyval, unsigned keycode, Gdk::ModifierType state)
 
void on_key_released (Gtk::EventControllerKey const &controller, unsigned keyval, unsigned keycode, Gdk::ModifierType state)
 
void on_realize () final
 
void on_unrealize () final
 
void size_allocate_vfunc (int width, int height, int baseline) final
 
Glib::RefPtr< Gdk::GLContext > create_context () final
 Reimplement to create the desired OpenGL context.
 
void paint_widget (Cairo::RefPtr< Cairo::Context > const &) final
 Reimplement to render the widget.
 
void set_cms_transform ()
 Set the lcms transform.
 
void update_cursor ()
 

Private Attributes

SPDesktop_desktop = nullptr
 
Inkscape::Drawing_drawing = nullptr
 
Geom::IntPoint _pos = {0, 0}
 Coordinates of top-left pixel of canvas view within canvas.
 
Geom::Affine _affine
 The affine that we have been requested to draw at.
 
Inkscape::RenderMode _render_mode = Inkscape::RenderMode::NORMAL
 
Inkscape::SplitMode _split_mode = Inkscape::SplitMode::NORMAL
 
Inkscape::ColorMode _color_mode = Inkscape::ColorMode::NORMAL
 
bool _antialiasing_enabled = true
 
bool _cms_active = false
 
std::shared_ptr< Colors::CMS::Transform_cms_transform
 The lcms transform to apply to canvas.
 
bool _left_grabbed_item
 Relied upon by connector tool.
 
bool _all_enter_events
 Keep all enter events. Only set true in connector-tool.cpp.
 
bool _is_dragging
 Used in selection-chemistry to block undo/redo.
 
int _state
 Last known modifier state (SHIFT, CTRL, etc.).
 
Inkscape::CanvasItem_current_canvas_item
 Item containing cursor, nullptr if none.
 
Inkscape::CanvasItem_current_canvas_item_new
 Item to become _current_item, nullptr if none.
 
Inkscape::CanvasItem_grabbed_canvas_item
 Item that holds a pointer grab; nullptr if none.
 
EventMask _grabbed_event_mask
 
bool _need_update = true
 
Inkscape::SplitDirection _split_direction
 
Geom::Point _split_frac
 
Inkscape::SplitDirection _hover_direction
 
bool _split_dragging
 
Geom::IntPoint _split_drag_start
 
sigc::signal< void()> _signal_resize
 
sigc::signal< void()> _signal_focus_in
 
sigc::signal< void()> _signal_focus_out
 
std::unique_ptr< CanvasPrivated
 

Friends

class CanvasPrivate
 

Additional Inherited Members

- Protected Member Functions inherited from Inkscape::UI::Widget::OptGLArea
void on_realize () override
 
void on_unrealize () override
 

Detailed Description

A widget for Inkscape's canvas.

Definition at line 61 of file canvas.h.

Member Typedef Documentation

◆ parent_type

Definition at line 63 of file canvas.h.

Constructor & Destructor Documentation

◆ Canvas()

◆ ~Canvas()

Inkscape::UI::Widget::Canvas::~Canvas ( )
final

Definition at line 509 of file canvas.cpp.

References d.

Member Function Documentation

◆ canvas_item_destructed()

void Inkscape::UI::Widget::Canvas::canvas_item_destructed ( Inkscape::CanvasItem item)

Clear current and grabbed items.

Definition at line 1801 of file canvas.cpp.

References _current_canvas_item, _current_canvas_item_new, _grabbed_canvas_item, d, and item.

Referenced by Inkscape::CanvasItem::~CanvasItem().

◆ canvas_point_in_outline_zone()

bool Inkscape::UI::Widget::Canvas::canvas_point_in_outline_zone ( Geom::Point const &  world) const

Return whether a point in screen space / canvas coordinates is inside the region of the canvas where things respond to mouse clicks as if they are in outline mode.

Definition at line 1569 of file canvas.cpp.

References _render_mode, _split_direction, _split_frac, _split_mode, Inkscape::EAST, get_dimensions(), Inkscape::NORTH, Inkscape::OUTLINE, Inkscape::OUTLINE_OVERLAY, Inkscape::SOUTH, Inkscape::SPLIT, Inkscape::WEST, Geom::Point::x(), and Geom::Point::y().

◆ canvas_to_world()

Geom::Point Inkscape::UI::Widget::Canvas::canvas_to_world ( Geom::Point const &  window) const

Translate point in canvas to world coordinates.

Definition at line 1552 of file canvas.cpp.

References _pos.

Referenced by Inkscape::UI::Widget::CanvasGrid::_rulerButtonRelease(), and Inkscape::UI::Widget::CanvasGrid::rulerMotion().

◆ connectFocusIn()

sigc::connection Inkscape::UI::Widget::Canvas::connectFocusIn ( sigc::slot< void()> &&  slot)
inline

Definition at line 150 of file canvas.h.

References _signal_focus_in.

◆ connectFocusOut()

sigc::connection Inkscape::UI::Widget::Canvas::connectFocusOut ( sigc::slot< void()> &&  slot)
inline

Definition at line 151 of file canvas.h.

References _signal_focus_out.

◆ connectResize()

sigc::connection Inkscape::UI::Widget::Canvas::connectResize ( sigc::slot< void()> &&  slot)
inline

Definition at line 149 of file canvas.h.

References _signal_resize.

◆ create_context()

Glib::RefPtr< Gdk::GLContext > Inkscape::UI::Widget::Canvas::create_context ( )
finalprivatevirtual

Reimplement to create the desired OpenGL context.

Return nullptr on error.

Implements Inkscape::UI::Widget::OptGLArea.

Definition at line 1927 of file canvas.cpp.

References result.

◆ enable_autoscroll()

void Inkscape::UI::Widget::Canvas::enable_autoscroll ( )

Definition at line 923 of file canvas.cpp.

References d.

Referenced by SPKnot::handler_request_position().

◆ get_affine()

const Geom::Affine & Inkscape::UI::Widget::Canvas::get_affine ( ) const
inline

◆ get_area_world()

Geom::IntRect Inkscape::UI::Widget::Canvas::get_area_world ( ) const

◆ get_canvas_item_root()

CanvasItemGroup * Inkscape::UI::Widget::Canvas::get_canvas_item_root ( ) const

Definition at line 532 of file canvas.cpp.

References d.

Referenced by Inkscape::BooleanBuilder::BooleanBuilder().

◆ get_cms_active()

bool Inkscape::UI::Widget::Canvas::get_cms_active ( ) const
inline

Definition at line 106 of file canvas.h.

References _cms_active.

Referenced by SPDesktopWidget::switchDesktop().

◆ get_color_mode()

Inkscape::ColorMode Inkscape::UI::Widget::Canvas::get_color_mode ( ) const
inline

Definition at line 99 of file canvas.h.

References _color_mode.

Referenced by SPDesktopWidget::switchDesktop().

◆ get_current_canvas_item()

Inkscape::CanvasItem * Inkscape::UI::Widget::Canvas::get_current_canvas_item ( ) const
inline

Definition at line 136 of file canvas.h.

References _current_canvas_item.

◆ get_desktop()

SPDesktop * Inkscape::UI::Widget::Canvas::get_desktop ( ) const
inline

Definition at line 73 of file canvas.h.

References _desktop.

Referenced by Inkscape::CanvasItemGuideLine::_render(), and sp_dt_guide_event().

◆ get_dimensions()

Geom::IntPoint Inkscape::UI::Widget::Canvas::get_dimensions ( ) const

◆ get_geom_affine()

const Geom::Affine & Inkscape::UI::Widget::Canvas::get_geom_affine ( ) const

Definition at line 1595 of file canvas.cpp.

References d.

Referenced by Inkscape::UI::Tools::ToolBase::root_handler().

◆ get_grabbed_canvas_item()

Inkscape::CanvasItem * Inkscape::UI::Widget::Canvas::get_grabbed_canvas_item ( ) const
inline

Definition at line 140 of file canvas.h.

References _grabbed_canvas_item.

◆ get_last_mouse()

std::optional< Geom::Point > Inkscape::UI::Widget::Canvas::get_last_mouse ( ) const

Return the last known mouse position of center if off-canvas.

Definition at line 1590 of file canvas.cpp.

References d.

◆ get_pos()

const Geom::IntPoint & Inkscape::UI::Widget::Canvas::get_pos ( ) const
inline

◆ get_render_mode()

Inkscape::RenderMode Inkscape::UI::Widget::Canvas::get_render_mode ( ) const
inline

Definition at line 98 of file canvas.h.

References _render_mode.

Referenced by SPDesktopWidget::_updateTitle(), and SPDesktopWidget::switchDesktop().

◆ get_split_mode()

Inkscape::SplitMode Inkscape::UI::Widget::Canvas::get_split_mode ( ) const
inline

Definition at line 100 of file canvas.h.

References _split_mode.

◆ is_dragging()

bool Inkscape::UI::Widget::Canvas::is_dragging ( ) const
inline

Definition at line 118 of file canvas.h.

References _is_dragging.

Referenced by redo(), and undo().

◆ on_button_pressed()

Gtk::EventSequenceState Inkscape::UI::Widget::Canvas::on_button_pressed ( Gtk::GestureClick const &  controller,
int  n_press,
double  x,
double  y 
)
private

◆ on_button_released()

Gtk::EventSequenceState Inkscape::UI::Widget::Canvas::on_button_released ( Gtk::GestureClick const &  controller,
int  n_press,
double  x,
double  y 
)
private

◆ on_enter()

void Inkscape::UI::Widget::Canvas::on_enter ( Gtk::EventControllerMotion const &  controller,
double  x,
double  y 
)
private

Definition at line 1068 of file canvas.cpp.

References _state, and d.

Referenced by Canvas().

◆ on_focus_in()

void Inkscape::UI::Widget::Canvas::on_focus_in ( )
private

Definition at line 1101 of file canvas.cpp.

References _signal_focus_in.

Referenced by Canvas().

◆ on_focus_out()

void Inkscape::UI::Widget::Canvas::on_focus_out ( )
private

Definition at line 1107 of file canvas.cpp.

References _signal_focus_out.

Referenced by Canvas().

◆ on_key_pressed()

bool Inkscape::UI::Widget::Canvas::on_key_pressed ( Gtk::EventControllerKey const &  controller,
unsigned  keyval,
unsigned  keycode,
Gdk::ModifierType  state 
)
private

Definition at line 1112 of file canvas.cpp.

References _state, and d.

Referenced by Canvas().

◆ on_key_released()

void Inkscape::UI::Widget::Canvas::on_key_released ( Gtk::EventControllerKey const &  controller,
unsigned  keyval,
unsigned  keycode,
Gdk::ModifierType  state 
)
private

Definition at line 1129 of file canvas.cpp.

References _state, and d.

Referenced by Canvas().

◆ on_leave()

void Inkscape::UI::Widget::Canvas::on_leave ( Gtk::EventControllerMotion const &  controller)
private

Definition at line 1085 of file canvas.cpp.

References _state, and d.

Referenced by Canvas().

◆ on_motion()

◆ on_realize()

void Inkscape::UI::Widget::Canvas::on_realize ( )
finalprivate

Definition at line 537 of file canvas.cpp.

References _drawing, d, and Inkscape::UI::Widget::OptGLArea::on_realize().

◆ on_scroll()

bool Inkscape::UI::Widget::Canvas::on_scroll ( Gtk::EventControllerScroll const &  controller,
double  dx,
double  dy 
)
private

Definition at line 936 of file canvas.cpp.

References _state, d, Inkscape::UI::Widget::dx, and Inkscape::extinput_from_gdkevent().

Referenced by Canvas().

◆ on_unrealize()

void Inkscape::UI::Widget::Canvas::on_unrealize ( )
finalprivate

Definition at line 544 of file canvas.cpp.

References _drawing, d, and Inkscape::UI::Widget::OptGLArea::on_unrealize().

◆ paint_widget()

◆ redraw_all()

void Inkscape::UI::Widget::Canvas::redraw_all ( )

Invalidate drawing and redraw during idle.

Definition at line 1610 of file canvas.cpp.

References d, and geom_to_cairo().

Referenced by Canvas(), set_desk(), and set_page().

◆ redraw_area() [1/3]

void Inkscape::UI::Widget::Canvas::redraw_area ( Geom::Coord  x0,
Geom::Coord  y0,
Geom::Coord  x1,
Geom::Coord  y1 
)

Definition at line 1658 of file canvas.cpp.

References redraw_area().

◆ redraw_area() [2/3]

◆ redraw_area() [3/3]

void Inkscape::UI::Widget::Canvas::redraw_area ( int  x0,
int  y0,
int  x1,
int  y1 
)

Redraw the given area during idle.

Definition at line 1625 of file canvas.cpp.

References d, and geom_to_cairo().

◆ request_update()

void Inkscape::UI::Widget::Canvas::request_update ( )

Redraw after changing canvas item geometry.

Definition at line 1681 of file canvas.cpp.

References _need_update, and d.

Referenced by Inkscape::CanvasItem::request_update().

◆ set_affine()

void Inkscape::UI::Widget::Canvas::set_affine ( const Geom::Affine affine)

Set the affine for the canvas.

Definition at line 1708 of file canvas.cpp.

References _affine, and d.

Referenced by paint_widget().

◆ set_all_enter_events()

void Inkscape::UI::Widget::Canvas::set_all_enter_events ( bool  on)
inline

◆ set_antialiasing_enabled()

void Inkscape::UI::Widget::Canvas::set_antialiasing_enabled ( bool  enabled)

◆ set_border()

void Inkscape::UI::Widget::Canvas::set_border ( uint32_t  rgba)

Set the page border colour.

Although we don't draw the borders, this colour affects the shadows which we do draw (in OpenGL mode).

Definition at line 1736 of file canvas.cpp.

References d, and Inkscape::UI::Widget::OptGLArea::get_opengl_enabled().

Referenced by Inkscape::CanvasItemRect::set_shadow().

◆ set_clip_to_page_mode()

void Inkscape::UI::Widget::Canvas::set_clip_to_page_mode ( bool  clip)

Definition at line 1790 of file canvas.cpp.

References clip(), and d.

Referenced by SPNamedView::set_clip_to_page().

◆ set_cms_active()

void Inkscape::UI::Widget::Canvas::set_cms_active ( bool  active)
inline

Definition at line 105 of file canvas.h.

References _cms_active.

Referenced by apply_preferences_canvas_mode(), and canvas_color_manage_toggle().

◆ set_cms_transform()

void Inkscape::UI::Widget::Canvas::set_cms_transform ( )
private

Set the lcms transform.

Definition at line 1838 of file canvas.cpp.

References _cms_transform, Inkscape::Colors::CMS::System::get(), and Inkscape::Colors::CMS::System::getDisplayTransform().

Referenced by Canvas().

◆ set_color_mode()

void Inkscape::UI::Widget::Canvas::set_color_mode ( Inkscape::ColorMode  mode)

Definition at line 1763 of file canvas.cpp.

References _color_mode, _drawing, mode, and Inkscape::Drawing::setColorMode().

◆ set_current_canvas_item()

void Inkscape::UI::Widget::Canvas::set_current_canvas_item ( Inkscape::CanvasItem item)
inline

Definition at line 137 of file canvas.h.

References _current_canvas_item, and item.

◆ set_desk()

void Inkscape::UI::Widget::Canvas::set_desk ( uint32_t  rgba)

Set the desk colour.

Transparency is interpreted as amount of checkerboard.

Definition at line 1723 of file canvas.cpp.

References d, and redraw_all().

Referenced by SPNamedView::set_desk_color().

◆ set_desktop()

void Inkscape::UI::Widget::Canvas::set_desktop ( SPDesktop desktop)
inline

Definition at line 72 of file canvas.h.

References _desktop, and desktop.

◆ set_drawing()

◆ set_grabbed_canvas_item()

void Inkscape::UI::Widget::Canvas::set_grabbed_canvas_item ( Inkscape::CanvasItem item,
EventMask  mask 
)
inline

Definition at line 141 of file canvas.h.

References _grabbed_canvas_item, _grabbed_event_mask, and item.

◆ set_page()

void Inkscape::UI::Widget::Canvas::set_page ( uint32_t  rgba)

Set the page colour.

Like the desk colour, transparency is interpreted as checkerboard.

Definition at line 1746 of file canvas.cpp.

References d, and redraw_all().

Referenced by Inkscape::CanvasItemRect::set_fill().

◆ set_pos() [1/2]

void Inkscape::UI::Widget::Canvas::set_pos ( const Geom::IntPoint pos)

Scroll window so drawing point 'pos' is at upper left corner of canvas.

Definition at line 1693 of file canvas.cpp.

References _pos, and d.

Referenced by paint_widget().

◆ set_pos() [2/2]

void Inkscape::UI::Widget::Canvas::set_pos ( const Geom::Point fpos)
inline

Definition at line 83 of file canvas.h.

References Geom::Point::round(), and set_pos().

Referenced by set_pos().

◆ set_render_mode()

void Inkscape::UI::Widget::Canvas::set_render_mode ( Inkscape::RenderMode  mode)

Definition at line 1756 of file canvas.cpp.

References _render_mode, d, and mode.

◆ set_split_mode()

void Inkscape::UI::Widget::Canvas::set_split_mode ( Inkscape::SplitMode  mode)

◆ size_allocate_vfunc()

void Inkscape::UI::Widget::Canvas::size_allocate_vfunc ( int  width,
int  height,
int  baseline 
)
finalprivate

◆ update_cursor()

◆ world_point_inside_canvas()

bool Inkscape::UI::Widget::Canvas::world_point_inside_canvas ( Geom::Point const &  world) const

Is world point inside canvas area?

Definition at line 1544 of file canvas.cpp.

References Geom::GenericRect< C >::contains(), Geom::Point::floor(), and get_area_world().

Friends And Related Symbol Documentation

◆ CanvasPrivate

friend class CanvasPrivate
friend

Definition at line 238 of file canvas.h.

Member Data Documentation

◆ _affine

Geom::Affine Inkscape::UI::Widget::Canvas::_affine
private

The affine that we have been requested to draw at.

Definition at line 195 of file canvas.h.

Referenced by get_affine(), paint_widget(), and set_affine().

◆ _all_enter_events

bool Inkscape::UI::Widget::Canvas::_all_enter_events
private

Keep all enter events. Only set true in connector-tool.cpp.

Definition at line 212 of file canvas.h.

Referenced by set_all_enter_events().

◆ _antialiasing_enabled

bool Inkscape::UI::Widget::Canvas::_antialiasing_enabled = true
private

Definition at line 201 of file canvas.h.

Referenced by set_antialiasing_enabled(), and set_drawing().

◆ _cms_active

bool Inkscape::UI::Widget::Canvas::_cms_active = false
private

Definition at line 204 of file canvas.h.

Referenced by get_cms_active(), and set_cms_active().

◆ _cms_transform

std::shared_ptr<Colors::CMS::Transform> Inkscape::UI::Widget::Canvas::_cms_transform
private

The lcms transform to apply to canvas.

Definition at line 205 of file canvas.h.

Referenced by set_cms_transform().

◆ _color_mode

Inkscape::ColorMode Inkscape::UI::Widget::Canvas::_color_mode = Inkscape::ColorMode::NORMAL
private

Definition at line 200 of file canvas.h.

Referenced by get_color_mode(), set_color_mode(), and set_drawing().

◆ _current_canvas_item

Inkscape::CanvasItem* Inkscape::UI::Widget::Canvas::_current_canvas_item
private

Item containing cursor, nullptr if none.

Definition at line 216 of file canvas.h.

Referenced by canvas_item_destructed(), get_current_canvas_item(), and set_current_canvas_item().

◆ _current_canvas_item_new

Inkscape::CanvasItem* Inkscape::UI::Widget::Canvas::_current_canvas_item_new
private

Item to become _current_item, nullptr if none.

Definition at line 217 of file canvas.h.

Referenced by canvas_item_destructed().

◆ _desktop

SPDesktop* Inkscape::UI::Widget::Canvas::_desktop = nullptr
private

Definition at line 188 of file canvas.h.

Referenced by get_desktop(), paint_widget(), set_desktop(), size_allocate_vfunc(), and update_cursor().

◆ _drawing

Inkscape::Drawing* Inkscape::UI::Widget::Canvas::_drawing = nullptr
private

◆ _grabbed_canvas_item

Inkscape::CanvasItem* Inkscape::UI::Widget::Canvas::_grabbed_canvas_item
private

Item that holds a pointer grab; nullptr if none.

Definition at line 218 of file canvas.h.

Referenced by canvas_item_destructed(), get_grabbed_canvas_item(), and set_grabbed_canvas_item().

◆ _grabbed_event_mask

EventMask Inkscape::UI::Widget::Canvas::_grabbed_event_mask
private

Definition at line 219 of file canvas.h.

Referenced by set_grabbed_canvas_item().

◆ _hover_direction

Inkscape::SplitDirection Inkscape::UI::Widget::Canvas::_hover_direction
private

Definition at line 227 of file canvas.h.

Referenced by on_button_pressed(), on_motion(), paint_widget(), set_split_mode(), and update_cursor().

◆ _is_dragging

bool Inkscape::UI::Widget::Canvas::_is_dragging
private

Used in selection-chemistry to block undo/redo.

Definition at line 213 of file canvas.h.

Referenced by is_dragging().

◆ _left_grabbed_item

bool Inkscape::UI::Widget::Canvas::_left_grabbed_item
private

Relied upon by connector tool.

Definition at line 211 of file canvas.h.

◆ _need_update

bool Inkscape::UI::Widget::Canvas::_need_update = true
private

Definition at line 222 of file canvas.h.

Referenced by request_update().

◆ _pos

Geom::IntPoint Inkscape::UI::Widget::Canvas::_pos = {0, 0}
private

Coordinates of top-left pixel of canvas view within canvas.

Definition at line 194 of file canvas.h.

Referenced by canvas_to_world(), get_area_world(), get_pos(), set_pos(), and size_allocate_vfunc().

◆ _render_mode

Inkscape::RenderMode Inkscape::UI::Widget::Canvas::_render_mode = Inkscape::RenderMode::NORMAL
private

◆ _signal_focus_in

sigc::signal<void ()> Inkscape::UI::Widget::Canvas::_signal_focus_in
private

Definition at line 232 of file canvas.h.

Referenced by connectFocusIn(), and on_focus_in().

◆ _signal_focus_out

sigc::signal<void ()> Inkscape::UI::Widget::Canvas::_signal_focus_out
private

Definition at line 233 of file canvas.h.

Referenced by connectFocusOut(), and on_focus_out().

◆ _signal_resize

sigc::signal<void ()> Inkscape::UI::Widget::Canvas::_signal_resize
private

Definition at line 231 of file canvas.h.

Referenced by connectResize(), and size_allocate_vfunc().

◆ _split_direction

Inkscape::SplitDirection Inkscape::UI::Widget::Canvas::_split_direction
private

◆ _split_drag_start

Geom::IntPoint Inkscape::UI::Widget::Canvas::_split_drag_start
private

Definition at line 229 of file canvas.h.

Referenced by on_button_pressed(), and on_motion().

◆ _split_dragging

bool Inkscape::UI::Widget::Canvas::_split_dragging
private

Definition at line 228 of file canvas.h.

Referenced by on_button_pressed(), on_button_released(), and on_motion().

◆ _split_frac

Geom::Point Inkscape::UI::Widget::Canvas::_split_frac
private

◆ _split_mode

Inkscape::SplitMode Inkscape::UI::Widget::Canvas::_split_mode = Inkscape::SplitMode::NORMAL
private

◆ _state

int Inkscape::UI::Widget::Canvas::_state
private

Last known modifier state (SHIFT, CTRL, etc.).

Definition at line 214 of file canvas.h.

Referenced by on_button_pressed(), on_button_released(), on_enter(), on_key_pressed(), on_key_released(), on_leave(), on_motion(), and on_scroll().

◆ d


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