Commit graph

322 commits

Author SHA1 Message Date
Paul Davis
5285bb587f fix position where rubberband rect is drawn 2014-06-06 08:33:13 -04:00
Paul Davis
ad346dc638 reinstate a canvas group where we reparent regions while dragging, so that they are always on top.
I mistakenly removed this during the onecanvas changes.
2014-06-05 15:16:55 -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
da7a860256 remove useless groups from timebar area, clarify scroll group naming in editor 2014-06-03 16:11:24 -04:00
Paul Davis
5696199daf remove timebar canvas and just use a single canvas instead. This is just part one - lots of minor fixes to be done 2014-06-03 16:10:27 -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
da67cb92e9 whitespace deletion 2014-06-03 16:10:27 -04:00
Paul Davis
6019f06bdf different approach to independent scrolling, involving ArdourCanvas::ScrollGroup
The idea now is that a scroll group item can be added to the canvas which will causes its children to scroll in either or both
directions (horizontal or vertical). There are few complications: the position() of the ScrollGroup is ambiguous depending
on whether you want it with scroll taken into account or not, so Item::canvas_position() was added, which defaults to
the same value as Item::position() but is overridden by ScrollGroup to return the position independent of scrolling. This
method is used when translating between item/canvas/window coordinate systems.

Note that the basic idea is that we MOVE the scroll group when a scroll happens. This mirrors what happens in the GnomeCanvas,
where Nick Mainsbridge came up with a great idea that allowed unification of the time bar and track canvases.
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
Paul Davis
529a31bde7 remove unnecessary and wierd constant for bottom rect (drop zone) of track canvas 2014-05-19 14:00:36 -04:00
Paul Davis
5668eea2a3 add a transparent rect that is always located at the bottom of the track canvas
This gives us an event/drag-n-drop/click target for things "at the bottom"
2014-04-16 04:16:56 -04:00
Paul Davis
8b93576c18 not that anyone ever runs with the SAE profile and not that we want to support it, but don't crash if they do 2014-04-16 03:00:49 -04:00
Paul Davis
dbb8501429 make our intentions even clearer when call Editor::track_canvas_viewport_size_allocated() 2014-04-16 02:55:08 -04:00
Paul Davis
fea4f14242 make our intentions clear when call Editor::track_canvas_viewport_size_allocated() 2014-04-16 02:52:55 -04:00
Paul Davis
f2673bb9bf remove reference to JACK constant 2014-04-10 10:22:13 -04:00
Paul Davis
232cb73983 remove final reference to jack headers 2014-04-10 10:17:36 -04:00
Paul Davis
f89ddb10aa comment edit 2014-04-01 04:14:34 -04:00
Paul Davis
200a67fba8 most of the support for save/restore of visible track count 2014-03-25 10:33:18 -04:00
Paul Davis
95f81e2d24 add optional arg to Editor::ensure_time_axis_view_is_visible() to "force" "make it visible as the top track" behaviour 2014-03-24 19:46:45 -04:00
Paul Davis
4f7d94ea67 latest tweaks to autoscroll: symmetrical boundary on both sides, stop runaway scrolling, and more 2014-03-21 09:49:35 -04:00
Paul Davis
65b4308c84 first pass at quantizing vertical scroll to whole tracks.
Dragging regions vertically does the quantization BUT speed control is lacking and the region ends up on
a track that is still invisible ... to be fixed as the sun rises.
2014-03-21 07:02:32 -04:00
Paul Davis
9df3157dfc big rework of scrolling, horizontal part considered almost 100% done.
Many more changes than I would typically like in a single commit, but this was all very intertwined.
Vertical scrolling using track-stepping still to follow.
2014-03-20 13:29:45 -04:00
Paul Davis
c04285addf convert canvas_event_frame() and window_event_frame() to canvas_event_sample() and window_event_sample() to go along with the convention adopted in cairocanvas code re: frames+samples 2014-02-26 08:43:53 -05:00
Paul Davis
cc22583c16 reorder (in source only) positioning of ruler/marker canvas groups 2014-02-25 12:02:50 -05:00
Paul Davis
b2895eaa50 fix visibility of punch and loop rects.
They used to be in the time_line_group but this is regularly cleared of all its members (which were assumed to be time lines).
2014-01-26 14:04:23 -05:00
Paul Davis
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
Paul Davis
daf51a2e49 fix height issue with canvas-based rulers/bars, and use enums for outline specs 2014-01-10 10:57:33 -05:00
Paul Davis
e841b33475 add (debug) names to various items 2013-12-30 14:01:56 -05:00
Paul Davis
08b485db75 send enter events to EVERY newly entered item (ignore the bool return from the event handler); other canvas debugging aids;switch items_at_point() to use canvas coordinates 2013-11-03 10:07:00 -05:00
John Emmas
f8574fc39d 'gtk2_ardour' - Add namespaces + casting where necessary + general bits of 'correctness' to keep MSVC happy 2013-10-03 09:06:56 +01:00
Paul Davis
0947791a80 remove debug output 2013-07-10 19:10:52 -04:00
Paul Davis
525cb6b4a7 some sort-of-deep fixes to get autoscroll/vertical scroll to work properly for cairocanvas 2013-07-10 19:10:06 -04:00
Paul Davis
b9c94f6dbf remove all calls to Outline::set_outline_width (1) because this is "wrong" when using Cairo - the default is 0.5 and it can remain that way 2013-04-17 10:56:04 -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
96eee9e7a1 change UIConfig to use accessor/setter methods like RCConfig so that ParameterChanged methods can actually be emitted; add variable (over a small range) background shading for all TimeAxisViewItems 2013-04-16 23:46:22 -04:00
Robin Gareus
5cac4a6885 vtl: get rid of unused "bar" inside the ruler 2013-04-17 02:27:17 +02:00
Robin Gareus
1227f2b73e vtl: get rid of one more unnecessary canvas-group 2013-04-17 02:27:06 +02:00
Paul Davis
64c861a791 fix markers so that the blue line spans both canvases 2013-04-15 16:10:13 -04:00
Paul Davis
7e19053b88 Fix dragging objects on the canvas and remove redundant canvas groups
Delivery of fake motion events to the editor needed the event coordinates to be
in canvas space, as they are with "real" events. Editor and other objects had
many redundant groups from timbyr's work on gnomecanvas to scroll by moving
groups. We don't need this anymore with cairo-canvas (though possibly a
stationay background group for the canvas might be useful again one day as in
the SAE logo. Its implementation would be fairly different though, since we
would have to explicitly move the group on every scroll, since nothing else
ever moves on scroll).

Also tweaks to text item placement, and switch TimeAxisViewItem from
name_pixbuf to name_text, since ArdourCanvas::Text is already "pixbuf optimized".
2013-04-15 13:50:05 -04:00
Paul Davis
af4539f857 a few changes to fix region dragging, all related to coordinate system handling, which is now much simpler with the new canvas; more debugging output when asked for 2013-04-15 10:38:12 -04:00
Paul Davis
cfe4bfb732 remove another pointless adjustment 2013-04-13 07:50:31 -04:00
Paul Davis
05caa9caa1 removal of sundry Adjustments and consolidation of scrolling around two editor-owned Adjustments 2013-04-13 07:29:49 -04:00
Paul Davis
4e9108cd1e remove TimeAxisView::clip_to_viewport() and Editor::update_canvas_now() and Editor::flush_canvas() which should no longer be necessary with a sane canvas design 2013-04-12 18:01:44 -04:00
Paul Davis
b05968fb4e change frames_per_pixel to samples_per_pixel 2013-04-12 11:31:50 -04:00
Paul Davis
8877199ae0 leftmost_position => leftmost_sample, current_page_frames => current_page_samples 2013-04-12 11:21:12 -04:00
Paul Davis
4258a34912 change all frame_to_pixel and pixel_to_frame to sample_to_pixel and pixel_to_sample 2013-04-12 11:15:45 -04:00
Paul Davis
ecfd2a7455 remove all unit-based methods from (Public)Editor; rationalize Editor::event_frame() to clearly identify whether the passed-in GdkEvent has window units or canvas units (the latter will be true for all events that are handled by the canvas and then passed to Editor 2013-04-12 11:09:49 -04:00
Robin Gareus
6ae4f10437 Merge branch 'master' into cairocanvas
Conflicts:
	gtk2_ardour/editor.h
	gtk2_ardour/editor_canvas.cc
	gtk2_ardour/wscript
2013-04-11 22:24:05 +02:00
Robin Gareus
66ee2c8e59 enable videotimeline by default 2013-04-11 19:49:48 +02:00
Paul Davis
204da61f98 remove incorrect merge of cairocanvas patch that stopped most tracks from displaying; add more debugging info 2013-04-10 14:42:36 -04:00