Ardour  9.0-pre0-822-g12e3bc5c20
ArdourCanvas::GtkCanvas Class Reference

#include <canvas.h>

Inheritance diagram for ArdourCanvas::GtkCanvas:
[legend]

Public Member Functions

 GtkCanvas ()
 
 ~GtkCanvas ()
 
void use_nsglview (bool retina=true)
 
void request_redraw (Rect const &)
 
void request_size (Duple)
 
void grab (Item *)
 
void ungrab ()
 
void focus (Item *)
 
void unfocus (Item *)
 
bool have_grab () const
 
bool grab_can_translate () const
 
Rect visible_area () const
 
Coord width () const
 
Coord height () const
 
bool get_mouse_position (Duple &winpos) const
 
void set_single_exposure (bool s)
 
bool single_exposure ()
 
void re_enter ()
 
void start_tooltip_timeout (Item *)
 
void stop_tooltip_timeout ()
 
void queue_draw ()
 
void queue_draw_area (int x, int y, int width, int height)
 
void queue_resize ()
 
Glib::RefPtr< Pango::Context > get_pango_context ()
 
void render (Cairo::RefPtr< Cairo::Context > const &ctx, cairo_rectangle_t *r)
 
void prepare_for_render () const
 
uint32_t background_color ()
 
- Public Member Functions inherited from ArdourCanvas::Canvas
 Canvas ()
 
virtual ~Canvas ()
 
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
 
Itemroot ()
 
void freeze_queue_draw ()
 
void thaw_queue_draw ()
 
void set_background_color (Gtkmm2ext::Color)
 
Gtkmm2ext::Color background_color () const
 
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)
 
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
 
void use_intermediate_surface (bool yn=true)
 
void set_debug_render (bool yn)
 
bool debug_render () const
 
- Public Member Functions inherited from Gtkmm2ext::CairoCanvas
virtual ~CairoCanvas ()
 

Protected Member Functions

void on_size_allocate (Gtk::Allocation &)
 
bool on_scroll_event (GdkEventScroll *)
 
bool on_expose_event (GdkEventExpose *)
 
bool on_key_press_event (GdkEventKey *)
 
bool on_key_release_event (GdkEventKey *)
 
bool on_button_press_event (GdkEventButton *)
 
bool on_button_release_event (GdkEventButton *event)
 
bool on_motion_notify_event (GdkEventMotion *)
 
bool on_touch_begin_event (GdkEventTouch *)
 
bool on_touch_update_event (GdkEventTouch *event)
 
bool on_touch_end_event (GdkEventTouch *)
 
bool on_enter_notify_event (GdkEventCrossing *)
 
bool on_leave_notify_event (GdkEventCrossing *)
 
void on_style_changed (const Glib::RefPtr< Gtk::Style > &)
 
bool on_visibility_notify_event (GdkEventVisibility *)
 
void on_map ()
 
void on_unmap ()
 
void on_realize ()
 
bool button_handler (GdkEventButton *)
 
bool motion_notify_handler (GdkEventMotion *)
 
bool deliver_event (GdkEvent *)
 
void deliver_enter_leave (Duple const &point, int state)
 
void get_items_enclosing (Duple const &point, std::list< Item const * > &enclosing_items)
 
void pick_current_item (int state)
 
void pick_current_item (Duple const &, int state)
 
- Protected Member Functions inherited from ArdourCanvas::Canvas
void queue_draw_item_area (Item *, Rect)
 
Rect compute_draw_item_area (Item *, Rect)
 

Private Member Functions

void item_going_away (Item *, Rect)
 
void item_shown_or_hidden (Item *)
 
bool send_leave_event (Item const *, double, double) const
 
bool show_tooltip ()
 
void hide_tooltip ()
 
bool really_start_tooltip_timeout ()
 
bool resize_handler ()
 

Private Attributes

Item_current_item
 
Item_new_current_item
 
Item_grabbed_item
 
Item_focused_item
 
std::map< int, Item * > _touched_item
 
bool _single_exposure
 
bool _use_image_surface
 
sigc::connection tooltip_timeout_connection
 
Itemcurrent_tooltip_item
 
Gtk::Window * tooltip_window
 
Gtk::Label * tooltip_label
 
bool _in_dtor
 
bool resize_queued
 
void * _nsglview
 
Cairo::RefPtr< Cairo::Surface > _canvas_image
 

Additional Inherited Members

- Static Public Member Functions inherited from ArdourCanvas::Canvas
static void set_tooltip_timeout (uint32_t msecs)
 
- Public Attributes inherited from ArdourCanvas::Canvas
sigc::signal< void, Duple const & > MouseMotion
 
sigc::signal< void > PreRender
 
bool item_save_restore
 
- Protected Attributes inherited from ArdourCanvas::Canvas
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 inherited from ArdourCanvas::Canvas
static uint32_t tooltip_timeout_msecs
 

Detailed Description

A canvas which renders onto a GTK EventBox

Definition at line 217 of file canvas/canvas/canvas.h.

Constructor & Destructor Documentation

◆ GtkCanvas()

ArdourCanvas::GtkCanvas::GtkCanvas ( )

◆ ~GtkCanvas()

ArdourCanvas::GtkCanvas::~GtkCanvas ( )

Member Function Documentation

◆ background_color()

uint32_t ArdourCanvas::GtkCanvas::background_color ( )
inlinevirtual

Implements Gtkmm2ext::CairoCanvas.

Definition at line 261 of file canvas/canvas/canvas.h.

◆ button_handler()

bool ArdourCanvas::GtkCanvas::button_handler ( GdkEventButton *  )
protected

◆ deliver_enter_leave()

void ArdourCanvas::GtkCanvas::deliver_enter_leave ( Duple const &  point,
int  state 
)
protected

◆ deliver_event()

bool ArdourCanvas::GtkCanvas::deliver_event ( GdkEvent *  )
protected

◆ focus()

void ArdourCanvas::GtkCanvas::focus ( Item )
virtual

called to ask the canvas' host to keyboard focus on an item

Implements ArdourCanvas::Canvas.

◆ get_items_enclosing()

void ArdourCanvas::GtkCanvas::get_items_enclosing ( Duple const &  point,
std::list< Item const * > &  enclosing_items 
)
protected

◆ get_mouse_position()

bool ArdourCanvas::GtkCanvas::get_mouse_position ( Duple winpos) const
virtual

Store the coordinates of the mouse pointer in window coordinates in winpos . Return true if the position was within the window, false otherwise.

Implements ArdourCanvas::Canvas.

◆ get_pango_context()

Glib::RefPtr<Pango::Context> ArdourCanvas::GtkCanvas::get_pango_context ( )
virtual

Implements ArdourCanvas::Canvas.

◆ grab()

void ArdourCanvas::GtkCanvas::grab ( Item )
virtual

called to ask the canvas' host to ‘grab’ an item

Implements ArdourCanvas::Canvas.

◆ grab_can_translate()

bool ArdourCanvas::GtkCanvas::grab_can_translate ( ) const
virtual

Reimplemented from ArdourCanvas::Canvas.

◆ have_grab()

bool ArdourCanvas::GtkCanvas::have_grab ( ) const
inlinevirtual

Reimplemented from ArdourCanvas::Canvas.

Definition at line 232 of file canvas/canvas/canvas.h.

◆ height()

Coord ArdourCanvas::GtkCanvas::height ( ) const
virtual

Implements ArdourCanvas::Canvas.

◆ hide_tooltip()

void ArdourCanvas::GtkCanvas::hide_tooltip ( )
private

◆ item_going_away()

void ArdourCanvas::GtkCanvas::item_going_away ( Item ,
Rect   
)
privatevirtual

Called when an item is being destroyed

Reimplemented from ArdourCanvas::Canvas.

◆ item_shown_or_hidden()

void ArdourCanvas::GtkCanvas::item_shown_or_hidden ( Item )
privatevirtual

Reimplemented from ArdourCanvas::Canvas.

◆ motion_notify_handler()

bool ArdourCanvas::GtkCanvas::motion_notify_handler ( GdkEventMotion *  )
protected

◆ on_button_press_event()

bool ArdourCanvas::GtkCanvas::on_button_press_event ( GdkEventButton *  )
protected

◆ on_button_release_event()

bool ArdourCanvas::GtkCanvas::on_button_release_event ( GdkEventButton *  event)
protected

◆ on_enter_notify_event()

bool ArdourCanvas::GtkCanvas::on_enter_notify_event ( GdkEventCrossing *  )
protected

◆ on_expose_event()

bool ArdourCanvas::GtkCanvas::on_expose_event ( GdkEventExpose *  )
protected

◆ on_key_press_event()

bool ArdourCanvas::GtkCanvas::on_key_press_event ( GdkEventKey *  )
protected

◆ on_key_release_event()

bool ArdourCanvas::GtkCanvas::on_key_release_event ( GdkEventKey *  )
protected

◆ on_leave_notify_event()

bool ArdourCanvas::GtkCanvas::on_leave_notify_event ( GdkEventCrossing *  )
protected

◆ on_map()

void ArdourCanvas::GtkCanvas::on_map ( )
protected

◆ on_motion_notify_event()

bool ArdourCanvas::GtkCanvas::on_motion_notify_event ( GdkEventMotion *  )
protected

◆ on_realize()

void ArdourCanvas::GtkCanvas::on_realize ( )
protected

◆ on_scroll_event()

bool ArdourCanvas::GtkCanvas::on_scroll_event ( GdkEventScroll *  )
protected

◆ on_size_allocate()

void ArdourCanvas::GtkCanvas::on_size_allocate ( Gtk::Allocation &  )
protected

◆ on_style_changed()

void ArdourCanvas::GtkCanvas::on_style_changed ( const Glib::RefPtr< Gtk::Style > &  )
protected

◆ on_touch_begin_event()

bool ArdourCanvas::GtkCanvas::on_touch_begin_event ( GdkEventTouch *  )
protected

◆ on_touch_end_event()

bool ArdourCanvas::GtkCanvas::on_touch_end_event ( GdkEventTouch *  )
protected

◆ on_touch_update_event()

bool ArdourCanvas::GtkCanvas::on_touch_update_event ( GdkEventTouch *  event)
protected

◆ on_unmap()

void ArdourCanvas::GtkCanvas::on_unmap ( )
protected

◆ on_visibility_notify_event()

bool ArdourCanvas::GtkCanvas::on_visibility_notify_event ( GdkEventVisibility *  )
protected

◆ pick_current_item() [1/2]

void ArdourCanvas::GtkCanvas::pick_current_item ( Duple const &  ,
int  state 
)
protectedvirtual

Implements ArdourCanvas::Canvas.

◆ pick_current_item() [2/2]

void ArdourCanvas::GtkCanvas::pick_current_item ( int  state)
protectedvirtual

Implements ArdourCanvas::Canvas.

◆ prepare_for_render()

void ArdourCanvas::GtkCanvas::prepare_for_render ( ) const

◆ queue_draw()

void ArdourCanvas::GtkCanvas::queue_draw ( )

◆ queue_draw_area()

void ArdourCanvas::GtkCanvas::queue_draw_area ( int  x,
int  y,
int  width,
int  height 
)

◆ queue_resize()

void ArdourCanvas::GtkCanvas::queue_resize ( )
virtual

called to ask for a resize/relayout of all or part of the canvas

Implements ArdourCanvas::Canvas.

◆ re_enter()

void ArdourCanvas::GtkCanvas::re_enter ( )
virtual

Ask the canvas to pick the current item again, and generate an enter event for it.

Implements ArdourCanvas::Canvas.

◆ really_start_tooltip_timeout()

bool ArdourCanvas::GtkCanvas::really_start_tooltip_timeout ( )
private

◆ render()

void ArdourCanvas::GtkCanvas::render ( Cairo::RefPtr< Cairo::Context > const &  ctx,
cairo_rectangle_t *  r 
)
virtual

◆ request_redraw()

void ArdourCanvas::GtkCanvas::request_redraw ( Rect const &  )
virtual

called to request a redraw of an area of the canvas in WINDOW coordinates

Implements ArdourCanvas::Canvas.

◆ request_size()

void ArdourCanvas::GtkCanvas::request_size ( Duple  )
virtual

called to ask the canvas to request a particular size from its host

Implements ArdourCanvas::Canvas.

◆ resize_handler()

bool ArdourCanvas::GtkCanvas::resize_handler ( )
private

◆ send_leave_event()

bool ArdourCanvas::GtkCanvas::send_leave_event ( Item const *  ,
double  ,
double   
) const
private

◆ set_single_exposure()

void ArdourCanvas::GtkCanvas::set_single_exposure ( bool  s)

◆ show_tooltip()

bool ArdourCanvas::GtkCanvas::show_tooltip ( )
private

◆ single_exposure()

bool ArdourCanvas::GtkCanvas::single_exposure ( )
inline

Definition at line 242 of file canvas/canvas/canvas.h.

◆ start_tooltip_timeout()

void ArdourCanvas::GtkCanvas::start_tooltip_timeout ( Item )
virtual

Reimplemented from ArdourCanvas::Canvas.

◆ stop_tooltip_timeout()

void ArdourCanvas::GtkCanvas::stop_tooltip_timeout ( )
virtual

Reimplemented from ArdourCanvas::Canvas.

◆ unfocus()

void ArdourCanvas::GtkCanvas::unfocus ( Item )
virtual

called to ask the canvas' host to drop keyboard focus on an item

Implements ArdourCanvas::Canvas.

◆ ungrab()

void ArdourCanvas::GtkCanvas::ungrab ( )
virtual

called to ask the canvas' host to ‘ungrab’ any grabbed item

Implements ArdourCanvas::Canvas.

◆ use_nsglview()

void ArdourCanvas::GtkCanvas::use_nsglview ( bool  retina = true)

◆ visible_area()

Rect ArdourCanvas::GtkCanvas::visible_area ( ) const
virtual

Implements ArdourCanvas::Canvas.

◆ width()

Coord ArdourCanvas::GtkCanvas::width ( ) const
virtual

Implements ArdourCanvas::Canvas.

Member Data Documentation

◆ _canvas_image

Cairo::RefPtr<Cairo::Surface> ArdourCanvas::GtkCanvas::_canvas_image
private

Definition at line 327 of file canvas/canvas/canvas.h.

◆ _current_item

Item* ArdourCanvas::GtkCanvas::_current_item
private

Item currently chosen for event delivery based on pointer position

Definition at line 300 of file canvas/canvas/canvas.h.

◆ _focused_item

Item* ArdourCanvas::GtkCanvas::_focused_item
private

the item that currently has key focus or 0

Definition at line 306 of file canvas/canvas/canvas.h.

◆ _grabbed_item

Item* ArdourCanvas::GtkCanvas::_grabbed_item
private

the item that is currently grabbed, or 0

Definition at line 304 of file canvas/canvas/canvas.h.

◆ _in_dtor

bool ArdourCanvas::GtkCanvas::_in_dtor
private

Definition at line 323 of file canvas/canvas/canvas.h.

◆ _new_current_item

Item* ArdourCanvas::GtkCanvas::_new_current_item
private

Item pending as _current_item

Definition at line 302 of file canvas/canvas/canvas.h.

◆ _nsglview

void* ArdourCanvas::GtkCanvas::_nsglview
private

Definition at line 326 of file canvas/canvas/canvas.h.

◆ _single_exposure

bool ArdourCanvas::GtkCanvas::_single_exposure
private

Definition at line 311 of file canvas/canvas/canvas.h.

◆ _touched_item

std::map<int, Item*> ArdourCanvas::GtkCanvas::_touched_item
private

for multitouch: the item(s) that have been touched (effectively a GRAB)

Definition at line 309 of file canvas/canvas/canvas.h.

◆ _use_image_surface

bool ArdourCanvas::GtkCanvas::_use_image_surface
private

Definition at line 312 of file canvas/canvas/canvas.h.

◆ current_tooltip_item

Item* ArdourCanvas::GtkCanvas::current_tooltip_item
private

Definition at line 315 of file canvas/canvas/canvas.h.

◆ resize_queued

bool ArdourCanvas::GtkCanvas::resize_queued
private

Definition at line 324 of file canvas/canvas/canvas.h.

◆ tooltip_label

Gtk::Label* ArdourCanvas::GtkCanvas::tooltip_label
private

Definition at line 317 of file canvas/canvas/canvas.h.

◆ tooltip_timeout_connection

sigc::connection ArdourCanvas::GtkCanvas::tooltip_timeout_connection
private

Definition at line 314 of file canvas/canvas/canvas.h.

◆ tooltip_window

Gtk::Window* ArdourCanvas::GtkCanvas::tooltip_window
private

Definition at line 316 of file canvas/canvas/canvas.h.


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