Ben Loftis
663f9827f9
last piece of scroll-wheel checkin, oops
2014-06-24 10:46:53 -05:00
Ben Loftis
2cc25a9d79
add scroll wheel handler to canvas
2014-06-24 10:33:28 -05:00
Paul Davis
199ac89d40
return of the zero line
2014-06-23 15:24:08 -04:00
Paul Davis
a743e68a0c
revert drawing of rectified waves back to previous approach since it (might be) slightly more efficient and is simpler to understand; add comments
2014-06-23 15:12:30 -04:00
Paul Davis
437099fff9
completely rethink waveform rendering (again)
...
There are 3 possible components to draw at each x-axis position: the waveform "line", the zero line and an outline/clip indicator.
We have to decide which of the 3 to draw at each position, pixel by pixel. This makes the rendering less efficient but it is
the only way I can see to do this correctly.
2014-06-23 14:57:55 -04:00
Paul Davis
71c417948e
fix logic error that meant one side of the waveform outline is not drawn; draw zero line before outline, for better effects with low amplitude waves
2014-06-23 10:06:59 -04:00
Paul Davis
6a5d805b38
more canvas refactoring.
...
Remove Canvas::Layout, use Canvas::Container for the same purpose, move child-rendering into Item::render_children() so that it
could theoretically be used by any derived type.
2014-06-22 11:41:05 -04:00
Paul Davis
f0933bf005
add missing new files for canvas redesign
2014-06-22 09:53:14 -04:00
Paul Davis
99f9b3456a
explicitly qualify cast to ArdourCanvas::Container so that it works.
...
I assume that gcc is failing to complain about ambiguity with Gtk::Container even though there should
really be no ambiguity
2014-06-22 09:29:16 -04: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
c1045881dd
if we're not going to notify parents of bbox changes while an item is hidden, we need to remind it when the item is hidden or shown
2014-06-18 21:02:30 -04:00
Paul Davis
36a34dc1a4
Merge branch 'canvas_tweaks' of https://github.com/nmains/ardour into cairocanvas
2014-06-18 11:20:10 -04:00
Paul Davis
becf857f48
a whole slew of changes related to centralizing and rationalizing cursor management.
...
Debugging output left in place to help address the reports that will come in as people test this more
2014-06-18 10:24:59 -04:00
nick_m
0bd17ed2e4
Canvas tweaks.
...
* Only queue a draw for changed items that are set visible and in-window.
2014-06-19 00:06:32 +10:00
Paul Davis
47efeb9f21
Merge branch 'cache_fixes' of https://github.com/nmains/ardour into cairocanvas
2014-06-17 11:35:13 -04:00
Paul Davis
93bc93b6f6
a set of 3 fixes that cure Canvas::Text leaving dirty pixels when being dragged. or might not - testing is non-deterministic, which is alarming
2014-06-17 11:34:54 -04:00
Paul Davis
f98e0a0707
use a different approach for indicating expose rects (from robin gareus). #ifdef'd out by default
2014-06-17 11:34:54 -04:00
nick_m
b31608f64e
Cache entries are now region colour aware.
2014-06-18 00:16:51 +10:00
Paul Davis
8050712503
comment correction regarding Canvas::visible_area()
2014-06-15 12:18:47 -04:00
Paul Davis
dae45f1d75
initialize _scroll_parent in Canvas::item
2014-06-15 12:17:12 -04:00
Robin Gareus
69af017315
initialize uninitialized variable
2014-06-15 13:24:40 +02:00
John Emmas
55d51d38ce
Add newly introduced sources to our MSVC projects
2014-06-15 09:56:49 +01:00
John Emmas
e59210c402
Remove no longer needed sources from MSVC projects
2014-06-15 09:55:34 +01:00
Paul Davis
590882f3c8
change Canvas heirarchy and constructors
...
Items no longer need a parent group (they require a Canvas pointer instead), so all constructors have been rationalized
and have two variants, one with a parent and one with a canvas.
All Items now inherit from Fill and Outline, to banish diagonal inheritance and virtual base classes and all that.
There were zero changes to the Ardour GUI arising from these changes.
2014-06-12 14:53:44 -04:00
Paul Davis
23d7893910
remove drag handle canvas object - it was just a stupid unfinished experiment
2014-06-12 10:40:43 -04:00
Paul Davis
87a6f633a1
derive ArdourCanvas::Ruler from Rectangle
2014-06-12 10:35:16 -04:00
Paul Davis
e1825361b5
remove hard-coded colors
2014-06-12 01:07:58 -04:00
Paul Davis
143f9509ea
many fixes and improvements for a now-working ArdourCanvas::Ruler item
2014-06-11 23:54:28 -04:00
Paul Davis
f5fc4a6b09
add ruler.cc to canvas wscript
2014-06-11 23:54:28 -04:00
Paul Davis
2cab65062d
add Ruler to Canvas fwd.h
2014-06-11 23:54:28 -04:00
Paul Davis
5ee4f41925
add initial (untested) implementation of canvas ruler item
2014-06-11 23:54:28 -04:00
Paul Davis
7a3a66db72
fix Canvas::LineSet implementation to support horizontal and vertical linesets
2014-06-09 15:39:19 -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
b86e1204ec
fix borked logic controlling whether/when to draw clip/outline pixels/lines in waveviews
2014-06-08 13:13:44 -04:00
Paul Davis
c22e96522d
Merge branch 'waveview_caching_for_upstream' of https://github.com/nmains/ardour into cairocanvas
2014-06-08 13:01:47 -04:00
nick_m
e495577f98
Use global clip level from prefs. Restore clip colour, \
2014-06-09 02:50:14 +10:00
Paul Davis
5e281d3b44
when delivering enter/leave events to canvas items, ensure that the event coordinates are in canvas space, not window space
...
This fixes a variety of borkage in the canvas at present
2014-06-08 11:26:32 -04:00
Paul Davis
153befa92c
add Item::canvas_origin() for convenience
2014-06-08 11:26:32 -04:00
nick_m
7a05dde39d
Use a dumb cache for waveview ImageSurfaces. This halves the size of the
...
previous one, but usually ends up using three of them at the current
CACHE_HIGH_WATER setting.
Should result in a smaller memory footprint for sessions with
multiple copies of nearby audio segments (electronic style).
The downside is the larger memory footprint for linear recording
sessions if CACHE_HIGH_WATER > 1 (1 giving a max of two
half - sized cache entries per audio stream).
2014-06-08 01:47:38 +10:00
Paul Davis
b54a2713a1
When rendering a Canvas::Rectangle take its _position into account, even though in general this is always (0,0) within its parent
2014-06-06 08:33:13 -04:00
Paul Davis
792fe016e7
clip rendering of ScrollGroup to just the part of the canvas covered by the scroll group.
...
This stops tracks from appearing to scroll up under the rulers, among other things.
2014-06-05 18:18:28 -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
8c79f70eef
remove debugging output
2014-06-05 12:04:42 -04:00
Paul Davis
1d354f746a
basic, initial structure for canvas widget item
2014-06-05 12:04:42 -04:00
John Emmas
236926e7ca
Add newly introduced sources to MSVC project
...
(scroll_group stuff)
2014-06-04 13:50:06 +01:00
Paul Davis
8fa81c1436
merge onecanvas and cairocanvas branches, and manually resolve conflicts, including rounding in item_to_window() methods
2014-06-03 16:37:53 -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
d4989ed9ce
fix missing leftover Canvas::pick_current_item() which was confusing button release event coordinates
2014-06-03 16:12:00 -04:00
Paul Davis
073df89c4d
use window-based coordinates when picking current item so that we get per-item (per-scroll-group,really) computation of position and coverage.
2014-06-03 16:12:00 -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