Commit graph

39 commits

Author SHA1 Message Date
Robin Gareus
160b24b137 fix crash when cleaning up canvas items
Backport from Mixbus. In Ardour this does not currently matter
since there is no top-level canvas destroyed top-down.

...
Editor::session_going_away
MixerStrip::~MixerStrip
MixbusStripCanvas::~MixbusStripCanvas
ArdourCanvas::GtkCanvas::~GtkCanvas
ArdourCanvas::Canvas::~Canvas
ArdourCanvas::Root::~Root
ArdourCanvas::Container::~Container
ArdourCanvas::Item::~Item
ArdourCanvas::Item::clear_items
GtkCanvas::item_going_away()
queue_draw_item_area()

..expose can take place async to garbage collection: crash in one of the
items.
2015-11-02 05:15:55 +01:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Ben Loftis
bd6ef95989 add accessor methods for single_exposure 2015-02-12 11:35:35 -06:00
Ben Loftis
b8ec035b24 _single_exposure is now a member variable for each GtkCanvas.
Gtk coalesces multiple exposes into a single combined rect.
If _single_exposure is disabled, we break apart the individual expose rects for the canvas rendering.
2015-02-12 11:35:35 -06:00
David Robillard
333c776e0e Fix MIDI region keyboard editing (add key handling to canvas). 2014-11-15 02:04:28 -05:00
Paul Davis
ef56948d4a add background color property to Canvas::Canvas ; rearrange expose handling and include background fill
Conflicts:
	libs/canvas/canvas.cc
	libs/canvas/canvas/canvas.h
2014-11-10 10:43:25 -05:00
Robin Gareus
b04414d170 allow to use cairo-image/software surface for canvas & cairowidgets 2014-10-28 02:15:10 +01:00
Robin Gareus
6dc3a4bf61 remove unused old API 2014-10-28 01:27:14 +01:00
Paul Davis
df5a188825 further tweaks to canvas tooltip mechanism 2014-09-26 12:24:47 -04:00
Paul Davis
bb68d83e43 display and position canvas tooltip window 2014-09-26 11:05:24 -04:00
Paul Davis
d0dafc171c basic design of Canvas item tooltip mechanism.
No window yet to actually display the tooltip.
2014-09-25 21:43:15 -04:00
Paul Davis
69a92e67f0 Add Canvas::re_enter() which picks the current item again based on mouse pointer position and generates an enter event for it 2014-07-07 07:53:17 -04:00
John Emmas
cef26a4e1e Change some declarations from 'struct' to 'class' (and vice-versa) 2014-06-29 13:56:41 +01:00
Paul Davis
3accf1d2af new API for TrackingText and similar items 2014-06-26 15:10:24 -04:00
Ben Loftis
2cc25a9d79 add scroll wheel handler to canvas 2014-06-24 10:33:28 -05:00
Paul Davis
a8bd6ecc4f refactor Canvas so that all Items have children; add Container abstract base class; rename Group as "Layout" and retain only drawing semantics 2014-06-21 11:43:42 -04:00
Paul Davis
f0c18abf55 remove global canvas scroll offset, to provide no-scroll-parent == no-scroll behaviour 2014-06-09 08:39:48 -04:00
Paul Davis
ef9bf58359 fix problems with expose/redraws from canvas where requested area goes way outside the integer range allowed by GTK/GDK 2014-06-05 14:42:46 -04:00
Paul Davis
e0533e9dd7 more profound changes to canvas scrolling, in particular find appropriate ScrollGroup for Canvas::{window,canvas}_to_{canvas,window}() 2014-06-03 16:13:12 -04:00
Paul Davis
54a56cd3c6 various changes to get independent scrolling to work better in canvas. mostly tweaks relating to how scroll offsets are used during rendering.
Event handling offsets still require work.
2014-06-03 16:12:00 -04:00
Paul Davis
c9f890bd7c avoid recursing through the entire canvas when scrolling - only scroll explicitly identified ScrollGroups 2014-06-03 16:10:27 -04:00
Paul Davis
97109672c7 initial redesign of canvas scrolling to facilitate independent x- and y-axis scrolling of specific groups within the canvas.
This commit should cause no change in behaviour, but contains all the code and changes necessary
for the next step
2014-06-03 16:09:06 -04:00
Robin Gareus
fed5599baa smooth visual curve drawing 2014-05-30 03:04:02 +02:00
Paul Davis
218a4664be add visibility/export control to libcanvas 2013-12-27 16:24:58 -05:00
Paul Davis
9b6135b2e1 change enter/exit event delivery to follow X Window model (inferior, ancestor, virtual, nonlinear) 2013-12-12 20:44:04 -05:00
Paul Davis
88732abd01 change event propagation to be based on parent/child lineage, not z-axis stacking, plus some more alterations to try to get enter/leave working 2013-12-12 10:03:33 -05:00
Paul Davis
7ce86cec7d handle enter/leave items when zooming and scrolling occur 2013-10-31 03:10:18 -04:00
Paul Davis
7bbd28aa08 notable changes to try to improve most of enter/leave handling for canvas items 2013-10-30 23:36:30 -04:00
Paul Davis
77f5f4c4bf basically operational switch to canvas drawing coordinates, although text and waves don't work, and redraw areas are too small 2013-06-18 08:23:06 -04:00
Paul Davis
d0867e67e3 more tweaks for enter/leave events for canvas items 2013-04-24 22:57:23 -04:00
Paul Davis
9a3bc39970 tweak event/leave event delivery so that it applies to items being deleted as well as motion events (hmm, needed for item addition too ...) 2013-04-20 16:11:40 -04:00
Paul Davis
d1a05240ef fix clamping of line and rect coordinates to avoid issues with cairo when drawing way outside a surface's dimensions; move various coordinate methods down to Canvas, because they don't require GTK information; make visible_area() a Canvas virtual method so that we don't have to cast to call it 2013-04-17 10:53:17 -04:00
Paul Davis
a0044e5f71 add back various functionality to waveviews such as zero line, amplitude scaling 2013-04-16 10:07:52 -04:00
Paul Davis
84fb0a8dce remove all XML related API from canvas. it may have been useful during development, but it is just a distraction - we will NEVER be saving or restoring canvas state via XML or any kind of serialized state 2013-04-15 21:57:08 -04:00
Paul Davis
ee1f0520a8 many changes to get the cairo-canvas version much, much more functional. still problems with a lot of subtle and not-so-subtle issues 2013-04-11 20:19:22 -04:00
Paul Davis
053eaf77fd a variety of fixes for the cairocanvas, but it still buggy as hell handling events and lots of other stuff 2013-04-09 14:22:58 -04:00
Paul Davis
07a505b1b2 lots of tweaking and adding debug output including operator<</dump(ostream&) methods to help visualize canvas structure 2013-04-05 11:27:26 -04:00
Paul Davis
aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00