Ardour
9.0-pre0-582-g084a23a80d
|
#include <canvas.h>
Public Member Functions | |
Canvas () | |
virtual | ~Canvas () |
virtual void | request_redraw (Rect const &)=0 |
virtual void | request_size (Duple)=0 |
virtual void | grab (Item *)=0 |
virtual void | ungrab ()=0 |
virtual void | queue_resize ()=0 |
virtual void | focus (Item *)=0 |
virtual void | unfocus (Item *)=0 |
virtual bool | have_grab () const |
virtual bool | grab_can_translate () const |
void | render (Rect const &, Cairo::RefPtr< Cairo::Context > const &) const |
void | prepare_for_render (Rect const &) const |
gint64 | get_last_render_start_timestamp () const |
gint64 | get_microseconds_since_render_start () const |
Item * | root () |
void | freeze_queue_draw () |
void | thaw_queue_draw () |
void | set_background_color (Gtkmm2ext::Color) |
Gtkmm2ext::Color | background_color () const |
virtual void | item_going_away (Item *, Rect) |
virtual void | item_shown_or_hidden (Item *) |
void | item_visual_property_changed (Item *) |
void | item_changed (Item *, Rect) |
void | item_moved (Item *, Rect) |
Duple | canvas_to_window (Duple const &, bool rounded=true) const |
Duple | window_to_canvas (Duple const &) const |
void | canvas_to_window (Coord cx, Coord cy, Coord &wx, Coord &wy) |
void | window_to_canvas (Coord wx, Coord wy, Coord &cx, Coord &cy) |
void | scroll_to (Coord x, Coord y) |
void | add_scroller (ScrollGroup &i) |
virtual Rect | visible_area () const =0 |
virtual Coord | width () const =0 |
virtual Coord | height () const =0 |
virtual bool | get_mouse_position (Duple &winpos) const =0 |
Duple | clamp_to_window (Duple const &winpos, Duple border=Duple()) |
void | zoomed () |
std::string | indent () const |
std::string | render_indent () const |
void | dump (std::ostream &) const |
virtual void | re_enter ()=0 |
virtual void | start_tooltip_timeout (Item *) |
virtual void | stop_tooltip_timeout () |
virtual Glib::RefPtr< Pango::Context > | get_pango_context ()=0 |
void | use_intermediate_surface (bool yn=true) |
void | set_debug_render (bool yn) |
bool | debug_render () const |
Static Public Member Functions | |
static void | set_tooltip_timeout (uint32_t msecs) |
Public Attributes | |
sigc::signal< void, Duple const & > | MouseMotion |
sigc::signal< void > | PreRender |
bool | item_save_restore |
Protected Member Functions | |
void | queue_draw_item_area (Item *, Rect) |
Rect | compute_draw_item_area (Item *, Rect) |
virtual void | pick_current_item (int state)=0 |
virtual void | pick_current_item (Duple const &, int state)=0 |
Protected Attributes | |
Root | _root |
uint32_t | _queue_draw_frozen |
Rect | frozen_area |
Gtkmm2ext::Color | _bg_color |
bool | _debug_render |
gint64 | _last_render_start_timestamp |
std::list< ScrollGroup * > | scrollers |
bool | _use_intermediate_surface |
Static Protected Attributes | |
static uint32_t | tooltip_timeout_msecs |
The base class for our different types of canvas.
A canvas is an area which holds a collection of canvas items, which in turn represent shapes, text, etc.
The canvas has an arbitrarily large area, and is addressed in coordinates of screen pixels, with an origin of (0, 0) at the top left. x increases rightwards and y increases downwards.
Definition at line 72 of file canvas/canvas/canvas.h.
ArdourCanvas::Canvas::Canvas | ( | ) |
|
inlinevirtual |
Definition at line 76 of file canvas/canvas/canvas.h.
void ArdourCanvas::Canvas::add_scroller | ( | ScrollGroup & | i | ) |
|
inline |
Definition at line 114 of file canvas/canvas/canvas.h.
Definition at line 126 of file canvas/canvas/canvas.h.
Ensures that the position given by winpos
(in window coordinates) is within the current window area, possibly reduced by border
.
|
inline |
Definition at line 190 of file canvas/canvas/canvas.h.
void ArdourCanvas::Canvas::dump | ( | std::ostream & | ) | const |
|
pure virtual |
called to ask the canvas' host to keyboard focus on an item
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
void ArdourCanvas::Canvas::freeze_queue_draw | ( | ) |
|
inline |
Definition at line 101 of file canvas/canvas/canvas.h.
gint64 ArdourCanvas::Canvas::get_microseconds_since_render_start | ( | ) | const |
|
pure virtual |
Store the coordinates of the mouse pointer in window coordinates in winpos
. Return true if the position was within the window, false otherwise.
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
|
pure virtual |
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
|
pure virtual |
called to ask the canvas' host to ‘grab’ an item
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
|
inlinevirtual |
Reimplemented in ArdourCanvas::GtkCanvas.
Definition at line 95 of file canvas/canvas/canvas.h.
|
inlinevirtual |
Reimplemented in ArdourCanvas::GtkCanvas.
Definition at line 94 of file canvas/canvas/canvas.h.
|
pure virtual |
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
std::string ArdourCanvas::Canvas::indent | ( | ) | const |
Called when an item is being destroyed
Reimplemented in ArdourCanvas::GtkCanvas.
Definition at line 117 of file canvas/canvas/canvas.h.
|
virtual |
Reimplemented in ArdourCanvas::GtkCanvas.
void ArdourCanvas::Canvas::item_visual_property_changed | ( | Item * | ) |
|
protectedpure virtual |
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
|
protectedpure virtual |
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
void ArdourCanvas::Canvas::prepare_for_render | ( | Rect const & | ) | const |
|
pure virtual |
called to ask for a resize/relayout of all or part of the canvas
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
|
pure virtual |
Ask the canvas to pick the current item again, and generate an enter event for it.
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
void ArdourCanvas::Canvas::render | ( | Rect const & | , |
Cairo::RefPtr< Cairo::Context > const & | |||
) | const |
std::string ArdourCanvas::Canvas::render_indent | ( | ) | const |
|
pure virtual |
called to request a redraw of an area of the canvas in WINDOW coordinates
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
|
pure virtual |
called to ask the canvas to request a particular size from its host
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
|
inline |
Definition at line 106 of file canvas/canvas/canvas.h.
void ArdourCanvas::Canvas::set_background_color | ( | Gtkmm2ext::Color | ) |
|
inline |
Definition at line 189 of file canvas/canvas/canvas.h.
|
static |
Set the timeout used to display tooltips, in milliseconds
|
inlinevirtual |
Reimplemented in ArdourCanvas::GtkCanvas.
Definition at line 175 of file canvas/canvas/canvas.h.
|
inlinevirtual |
Reimplemented in ArdourCanvas::GtkCanvas.
Definition at line 176 of file canvas/canvas/canvas.h.
void ArdourCanvas::Canvas::thaw_queue_draw | ( | ) |
|
pure virtual |
called to ask the canvas' host to drop keyboard focus on an item
Implemented in ArdourCanvas::GtkCanvas, ArdourSurface::Push2Canvas, and ArdourSurface::Maschine2Canvas.
|
pure virtual |
called to ask the canvas' host to ‘ungrab’ any grabbed item
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
void ArdourCanvas::Canvas::use_intermediate_surface | ( | bool | yn = true | ) |
Redirect drawing to an intermediate (image) surface. see also https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-push-group
|
pure virtual |
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
|
pure virtual |
Implemented in ArdourSurface::Push2Canvas, ArdourSurface::Maschine2Canvas, and ArdourCanvas::GtkCanvas.
Definition at line 132 of file canvas/canvas/canvas.h.
void ArdourCanvas::Canvas::zoomed | ( | ) |
|
protected |
Definition at line 198 of file canvas/canvas/canvas.h.
|
protected |
Definition at line 199 of file canvas/canvas/canvas.h.
|
mutableprotected |
Definition at line 201 of file canvas/canvas/canvas.h.
|
protected |
Definition at line 196 of file canvas/canvas/canvas.h.
|
protected |
Definition at line 195 of file canvas/canvas/canvas.h.
|
protected |
Definition at line 213 of file canvas/canvas/canvas.h.
|
protected |
Definition at line 197 of file canvas/canvas/canvas.h.
bool ArdourCanvas::Canvas::item_save_restore |
Definition at line 192 of file canvas/canvas/canvas.h.
sigc::signal<void,Duple const&> ArdourCanvas::Canvas::MouseMotion |
Signal to be used by items that need to track the mouse position within the window.
Definition at line 154 of file canvas/canvas/canvas.h.
sigc::signal<void> ArdourCanvas::Canvas::PreRender |
Definition at line 156 of file canvas/canvas/canvas.h.
|
protected |
Definition at line 211 of file canvas/canvas/canvas.h.
|
staticprotected |
Definition at line 203 of file canvas/canvas/canvas.h.