Commit graph

147 commits

Author SHA1 Message Date
David Robillard
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
David Robillard
333c776e0e Fix MIDI region keyboard editing (add key handling to canvas). 2014-11-15 02:04:28 -05:00
Paul Davis
fdcb792358 further work on new color manipulation code 2014-11-10 20:33:54 -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
Paul Davis
4260d0ca0e use new canvas colors header as necessary 2014-11-07 14:24:27 -05:00
Paul Davis
69fd25f6f4 move canvas colors code into its own file(s) 2014-11-07 14:24:13 -05:00
Paul Davis
7670e463cc add API to extract color from ArdourCanvas::Text and tidy up member declarations
Conflicts:
	libs/canvas/canvas/text.h
2014-11-06 20:38:02 -05:00
Paul Davis
857719f2e1 add Rect::shrink(Distance) even though it arguably should be handled by Rect::expand() 2014-11-05 19:45:23 -05:00
Paul Davis
f3d349bc9a add some more outline enums to ArdourCanvas::Rectangle 2014-11-05 19:45:23 -05:00
Paul Davis
589e59d7a1 allow derived classes to access Item::{scroll,position}_offset(), mostly for debugging purposes 2014-11-05 19:45:23 -05:00
Paul Davis
70e95f951d add ArdourCanvas::Fill::set_pattern() to allow any filled canvas item to be filled using an arbitrary Cairo Pattern 2014-11-05 11:13:09 -05:00
Paul Davis
56994e785e add new TimeRectangle to ArdourCanvas 2014-11-03 21:48:08 -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
65036cf3eb add #include that had gone unnoticed before 2014-10-24 12:18:46 -04: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
94adde7ebb add Canvas::Ruler::set_metric() to allow ruler metrics to be changed dynamically 2014-09-07 10:19:42 -04:00
Paul Davis
1a6136e1e3 change Metric element of a Canvas::Ruler item into a pointer internally 2014-09-07 10:19:31 -04:00
Paul Davis
5424119b55 Merge branch 'waveview_hacks' of https://github.com/nmains/ardour into cairocanvas 2014-07-18 10:46:22 -04:00
Ben Loftis
b2b736d596 tweaks for the monitor section. refactoring of some buttons, using new ArdourKnob instead of VolumeController. New ArdourDisplay shows a controllables user value, and provides support for preset values (hardcoded at present). Further refactoring to come, so that ArdourWidgets are derived from a common class. Controllable now has more responsibility for scaling between internal, user, and interface (knob percent) values. This also needs more refactoring and might have some unintended consequences. tested with audio and nothing seems amiss, yet. 2014-07-18 08:47:45 -05:00
nick_m
d3408844be Render waveview components onto alpha masks to simplify drawing.
Reduce user panic by removing ! from missing file dialog title.
Use justify left in missing file dialog.
2014-07-15 21:59:22 +10: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
Paul Davis
4eb565e0a9 verbose cursor text is always outlined 2014-06-30 10:39:41 -04:00
Paul Davis
471570705d move contrasting_text_color() into ArdourCanvas 2014-06-30 10:38:45 -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
Paul Davis
f5d62b1486 new TrackingText canvas item, to resolve conceptual issues with the Editor::VerboseCursor 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
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
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
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
nick_m
b31608f64e Cache entries are now region colour aware. 2014-06-18 00:16:51 +10: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
143f9509ea many fixes and improvements for a now-working ArdourCanvas::Ruler item 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
c22e96522d Merge branch 'waveview_caching_for_upstream' of https://github.com/nmains/ardour into cairocanvas 2014-06-08 13:01:47 -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
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
1d354f746a basic, initial structure for canvas widget item 2014-06-05 12:04:42 -04: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