22b07e0233
NOOP, remove trailing tabs/whitespace.
2015-10-05 16:17:49 +02:00
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
736038556f
canvas items must be able to use fractional positions when rendering.
...
This is required to be able to draw precise single pixel lines, as described
in the Cairo FAQ
2015-02-09 16:40:10 -05:00
86242348ec
Fix crash when getting width of item with no bbox.
2014-12-24 16:02:56 -05:00
74be550698
change Item::visible() to Item::self_visible(); add Item::visible() which returns accurate visibility
...
Child items will be hidden when their ancestors are hidden. The old ::visible() implementation didn't reflect this. In addition,
when changes are made to hidden items (new definition of visible/not visible), don't bother to request redraws, since this will
be done when the item becomes visible again.
2014-12-18 10:30:38 -05:00
c9c4a5c29d
raising/lowering canvas items should trigger a redraw
2014-11-06 10:58:37 -05:00
d3a4a92bd5
Containers should not consider the size of invisible items when computing their own bounding boxes.
...
This fixes issues related to the rulers container believing it was taller than it actually is, and possibly other issues also
2014-10-13 22:40:08 -04:00
b945fa69ba
remove default/testing tooltips from the canvas
2014-10-13 13:53:07 -04:00
d0dafc171c
basic design of Canvas item tooltip mechanism.
...
No window yet to actually display the tooltip.
2014-09-25 21:43:15 -04:00
79b9a044b8
add event-insensitivity to the list of conditions that causes a container to NOT add its children to the list of items-at-point
2014-06-30 16:31:31 -04:00
33339090c3
invisible items/containers should not add their children to "items-at-point"
2014-06-30 08:32:26 -04:00
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
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
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
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
dae45f1d75
initialize _scroll_parent in Canvas::item
2014-06-15 12:17:12 -04:00
69af017315
initialize uninitialized variable
2014-06-15 13:24:40 +02:00
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
f0c18abf55
remove global canvas scroll offset, to provide no-scroll-parent == no-scroll behaviour
2014-06-09 08:39:48 -04:00
153befa92c
add Item::canvas_origin() for convenience
2014-06-08 11:26:32 -04:00
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
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
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
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
bf7b35388b
rationalize and centralize computation of positional offset and scroll offset for canvas items
2014-06-03 16:11:24 -04:00
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
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
fed5599baa
smooth visual curve drawing
2014-05-30 03:04:02 +02:00
e5802bdbea
move an assert to cover only cases where it is needed
2014-03-07 11:23:22 -05:00
dde4d3bbc3
only queue an item redraw from Item::show() or Item::Hide() if the call changes the visibility status of the item (i.e. make no-ops really be no-ops)
2014-03-04 21:58:17 -05:00
79d2a686ff
make Item::set_position() do nothing if the position doesn't change
2014-02-13 18:18:19 -05:00
6473cc7cb4
drop use of bounding box to determine whether an item covers a point; add Item::covers(Duple const&)
...
Default implementation for Item still uses bounding box, but specializations for Arc (Circle), Polygon, Line and PolyLine have been added
2013-11-04 11:56:10 -05:00
7bbd28aa08
notable changes to try to improve most of enter/leave handling for canvas items
2013-10-30 23:36:30 -04:00
5ebc4a99be
don't request redraw of a Canvas item if it marked invisible
2013-10-25 13:29:23 -04:00
ecd29c6d70
add Item::redraw() convenience method
2013-10-24 17:54:54 -04:00
37743ea9b1
minor fixes for recent cairocanvas work so that it builds on OS X (64bit)
2013-07-01 12:04:02 -04:00
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
737433c446
tweaks to improve enter/leave event handling - fixes at least some crashes caused by this stuff
2013-04-24 18:31:00 -04:00
b36e085001
add back change lost during branch merging
2013-04-21 18:57:55 -04:00
b02a7445bf
Revert "add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed)"
...
This reverts commit a4df65a56f83823aba27432685977f420458a213.
2013-04-21 15:35:20 -04:00
fca81c9a6a
add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed)
2013-04-21 15:35:20 -04:00
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
c1df3295c1
virtual Fill:: and Outline:: methods so that Canvas::Items that cache image renderings of themselves can invalidate those caches when colors etc. change; add Item::{begin,end}_visual_change() so that we can notify the canvas more efficiently when *only* visual properties have changed and not the bounding box (probably needs to be used more widely)
2013-04-16 20:38:10 -04:00
37dd7e952b
add headers to all canvas .cc and .h files
2013-04-15 22:10:18 -04:00
64d3763652
remove all xml++.h inclusion by canvas implementations
2013-04-15 22:00:13 -04:00
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
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
4e84bc3a39
changes to get cairocanvas branch to build on OS X, with its stupid nil and Rect macros, plus some const_cast<> and unused variable fixes that should really be in master but will have to wait till we rebase master
2013-04-12 21:46:44 -04:00
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
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