summaryrefslogtreecommitdiff
path: root/libs/canvas/item.cc
AgeCommit message (Collapse)Author
2017-07-17Purify libcanvas, remove libardour dependencyRobin Gareus
A canvas is just a canvas. Move WaveView into its own library.
2017-06-26Add an optional ArdourCanvas::Item::prepare_for_render interfaceTim Mayberry
Called when an item has requested a redraw and intersects with visible canvas area. Also add Canvas::prepare_for_render that will call Item::prepare_for_render for items visible on the canvas.
2017-02-01add basic data members and methods for adding an explicit size allocation ↵Paul Davis
for Canvas::Item
2017-01-24This wasn't supposed to be pushed to master.Paul Davis
Revert "add basic data members and methods for adding an explicit size allocation for Canvas::Item" This reverts commit d1c1d8df614672b00a9835ae04566b12d21be697.
2017-01-24add basic data members and methods for adding an explicit size allocation ↵Paul Davis
for Canvas::Item
2017-01-19remove use of boost::optional to define "undefined" Canvas::Rect, and use ↵Paul Davis
Rect::empty instead. This commit includes Rect::operator bool() which might be a candidate for removal in a future commit, in an attempt to make the meaning clearer
2017-01-19do not add items twice to their canvas parent!Paul Davis
2016-09-27make inclusion/exclusion of hidden children optional in ↵Paul Davis
Item::add_child_bounding_boxes
2016-09-27add Item::add_front()Paul Davis
2015-12-01Move PBD symbol demangle functions into pbd/demangle.h/ccTim Mayberry
Add pbd/demangle.cc source file and move functions from pbd/stacktrace.cc into it
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-02-09canvas items must be able to use fractional positions when rendering.Paul Davis
This is required to be able to draw precise single pixel lines, as described in the Cairo FAQ
2014-12-24Fix crash when getting width of item with no bbox.David Robillard
2014-12-18change Item::visible() to Item::self_visible(); add Item::visible() which ↵Paul Davis
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-11-06raising/lowering canvas items should trigger a redrawPaul Davis
2014-10-13Containers should not consider the size of invisible items when computing ↵Paul Davis
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-13remove default/testing tooltips from the canvasPaul Davis
2014-09-25basic design of Canvas item tooltip mechanism.Paul Davis
No window yet to actually display the tooltip.
2014-06-30add event-insensitivity to the list of conditions that causes a container to ↵Paul Davis
NOT add its children to the list of items-at-point
2014-06-30invisible items/containers should not add their children to "items-at-point"Paul Davis
2014-06-22more canvas refactoring.Paul Davis
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-21refactor Canvas so that all Items have children; add Container abstract base ↵Paul Davis
class; rename Group as "Layout" and retain only drawing semantics
2014-06-18if we're not going to notify parents of bbox changes while an item is ↵Paul Davis
hidden, we need to remind it when the item is hidden or shown
2014-06-19Canvas tweaks.nick_m
* Only queue a draw for changed items that are set visible and in-window.
2014-06-15initialize _scroll_parent in Canvas::itemPaul Davis
2014-06-15initialize uninitialized variableRobin Gareus
2014-06-12change Canvas heirarchy and constructorsPaul Davis
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-09remove global canvas scroll offset, to provide no-scroll-parent == no-scroll ↵Paul Davis
behaviour
2014-06-08add Item::canvas_origin() for conveniencePaul Davis
2014-06-03merge onecanvas and cairocanvas branches, and manually resolve conflicts, ↵Paul Davis
including rounding in item_to_window() methods
2014-06-03more profound changes to canvas scrolling, in particular find appropriate ↵Paul Davis
ScrollGroup for Canvas::{window,canvas}_to_{canvas,window}()
2014-06-03use window-based coordinates when picking current item so that we get ↵Paul Davis
per-item (per-scroll-group,really) computation of position and coverage.
2014-06-03various changes to get independent scrolling to work better in canvas. ↵Paul Davis
mostly tweaks relating to how scroll offsets are used during rendering. Event handling offsets still require work.
2014-06-03rationalize and centralize computation of positional offset and scroll ↵Paul Davis
offset for canvas items
2014-06-03different approach to independent scrolling, involving ArdourCanvas::ScrollGroupPaul Davis
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-03initial redesign of canvas scrolling to facilitate independent x- and y-axis ↵Paul Davis
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-05-30smooth visual curve drawingRobin Gareus
2014-03-07move an assert to cover only cases where it is neededPaul Davis
2014-03-04only queue an item redraw from Item::show() or Item::Hide() if the call ↵Paul Davis
changes the visibility status of the item (i.e. make no-ops really be no-ops)
2014-02-13make Item::set_position() do nothing if the position doesn't changePaul Davis
2013-11-04drop use of bounding box to determine whether an item covers a point; add ↵Paul Davis
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-10-30notable changes to try to improve most of enter/leave handling for canvas itemsPaul Davis
2013-10-25don't request redraw of a Canvas item if it marked invisiblePaul Davis
2013-10-24add Item::redraw() convenience methodPaul Davis
2013-07-01minor fixes for recent cairocanvas work so that it builds on OS X (64bit)Paul Davis
2013-06-18basically operational switch to canvas drawing coordinates, although text ↵Paul Davis
and waves don't work, and redraw areas are too small
2013-04-24tweaks to improve enter/leave event handling - fixes at least some crashes ↵Paul Davis
caused by this stuff
2013-04-21add back change lost during branch mergingPaul Davis
2013-04-21Revert "add Group::clear(), do not clear _canvas member of Item when ↵Paul Davis
unparented (only the parent is changed)" This reverts commit a4df65a56f83823aba27432685977f420458a213.