Paul Davis
670b1fe3e2
fix initialization order warning
2022-06-21 17:34:48 -06:00
Paul Davis
f913373351
canvas: change Item::bb_clean() to better named Item::set_bbox_clean()
2022-04-26 22:04:08 -06:00
Paul Davis
c75ceb31ab
canvas: when an item has its bbox marked dirty, this should propagate to all parents
2022-04-26 22:04:08 -06:00
Paul Davis
15bb91cf4f
canvas: fixing missing initializer for _scroll_translation in 3rd Item constructor
2022-01-27 14:02:34 -07:00
Paul Davis
993c7c4bec
canvas: manually remove changes from 6f91dc0799 and implement same goal in a different way
...
The AudioClipEditor features a scroll bar that is a part of the canvas. Because scroll
groups are at the top level of a canvas, the scroll bar is necessary within a scroll
group, which causes it to get confused about the difference between its own
position within the canvas and that of the scroll group. This commit introduces
a per-Item flag, _scroll_translation, which is true by default. If false, the
item will not have coordinates translated to reflect scroll group position.
2022-01-20 09:45:47 -07:00
Paul Davis
08e50934c9
canvas: add scroll offset info to Item::dump()
2021-12-10 17:16:10 -07:00
Paul Davis
7e80111d92
Canvas: Fix notification to parent of show/hide status
...
This was changed in fc9840f2a9 to hard code a "false" argument describing
whether or not the child bbox had changed. This causes the parent to not
recompute its own bounding box when a child is shown/hidden, which is
incorrect. We now force it to true, which may be overkill for some purposes,
but at worst will just force an unnecessary bbox re-computation and nothing
more.
2021-11-09 08:49:21 -07:00
Paul Davis
0f0c5c7039
remove Kiwi constraint-based packing code from canvas library and users (library version)
2021-11-04 11:25:30 -06:00
Paul Davis
27ca49efd3
canvas: generic Item::_size_allocate() must adjust allocated space to parent-relative coords
2021-09-29 11:20:50 -06:00
Paul Davis
494bc8da14
canvas: add ::set_size_request_to_display_given_text() analogous to Gtkmm2ext utility
2021-09-10 12:15:24 -06:00
Paul Davis
0296b0b0cb
canvas: don't call ::size_allocate() for children unless there is just one child and it is "layout sensitive
...
the dumb/Item version of ::size_allocate_children() doesn't do anything but give its full allocation to children, and if there
was more than one child, this could not be done in a "dumb" way. Likewise, if the sole child is not layout sensitive, it
doesn't care about size allocation
2021-08-13 12:51:37 -06:00
Paul Davis
b416caf1bb
canvas: several steps further with box packing and size allocation
2021-08-13 12:51:37 -06:00
Paul Davis
88b95bc8f8
canvas: size_allocate() as a way to set position is only for layout-sensitive item trees
2021-08-13 12:51:37 -06:00
Paul Davis
a1c67b4ad7
canvas: remove intrinsic size concept, fall back to requested size; converge on gtk style size_request
2021-08-13 12:51:37 -06:00
Paul Davis
9698de0212
canvas: missing method
2021-08-13 12:51:37 -06:00
Paul Davis
1a70cf5b8e
canvasL Item gets packing options similar to GTK
2021-08-13 12:51:37 -06:00
Paul Davis
da3ea7e236
canvas: rename variable for clarity
2021-08-13 12:51:37 -06:00
Paul Davis
341a355de4
canvas: remove debug output
2021-08-13 12:51:37 -06:00
Paul Davis
a55a004142
canvas: another fix to bounding box computation, this time for Item itself
2021-08-13 12:51:37 -06:00
Paul Davis
b8b392f729
canvas: use whoami() instead of whatami() in some debugging output
2021-08-13 12:51:37 -06:00
Paul Davis
a36d43c845
canvas: NOOP whitespace/indent a line
2021-08-13 12:51:37 -06:00
Paul Davis
ad6afbe68a
canvas: use Item::bb_clean() to mark _bounding_box_dirty false
2021-08-13 12:51:36 -06:00
Paul Davis
ddcd004350
canvas: only reset _bounding_box_dirty in the parent if the child's bbox did change
2021-08-13 12:51:36 -06:00
Paul Davis
c1fa1e1a29
canvas: when an item's position is set, its bounding box has changed
2021-08-13 12:51:36 -06:00
Paul Davis
f5753dcd07
missing member initialization
2021-08-13 12:51:36 -06:00
Paul Davis
860d43697c
Canvas: propagate ::size_allocate() down the item tree
...
This previously wasn't done because of fear that it would affect the traditional fixed-sized canvas,
but only items that _layout_sensitive (i.e. are packed into a constraint packer directly) will
actually do anything in ::size_allocate().
Possibly might want to relax this to cover items that have a constraint packer between them
and a root group.
2021-08-13 12:51:27 -06:00
Paul Davis
2e4d228f54
manual fixes for constraint-packer -> newbbgui merge
2021-08-13 12:51:27 -06:00
Paul Davis
93d2f6f433
remove debug output
2021-08-13 12:51:27 -06:00
Paul Davis
27919fec61
items should not round their bounding box when requesting a redraw
2021-08-13 12:51:27 -06:00
Paul Davis
35a9bcc409
add Rectangle::size_request() which returns actual rectangle size, not bounding box
2021-08-13 12:51:26 -06:00
Paul Davis
12b4807bc9
add a very (very) basic resize/layout design to the canvas
...
Items call ::queue_resize(), which sets a flag in the canvas; at next idle, we call
Canvas::layout() which walks the item tree and recursively calls layout (depth first)
on all items needing a resize.
Only Container types implement layout, and so far only Box
2021-08-13 12:51:26 -06:00
Paul Davis
aa62460081
Canvas: re-use Solver as much as possible, with possible (but not substantive) speedup; remove debug output
2021-08-13 12:51:26 -06:00
Paul Davis
f5d67e6520
Canvas: temporary easy way to get debug output from Canvas::render() in a test program
2021-08-13 12:51:26 -06:00
Paul Davis
61742ededf
Canvas: change behavior of Item::preferred_size() for items without an intrinsic size
2021-08-13 12:51:26 -06:00
Paul Davis
ea96798ee9
Canvas: tweak debug output for canvas rendering
2021-08-13 12:51:26 -06:00
Paul Davis
f47deb717c
Canvas: add layout-related methods and members to Item
2021-08-13 12:51:25 -06:00
Paul Davis
fc9840f2a9
Canvas: change API of Item::child_changed() to include bool indicate bounding_box change
2021-08-13 12:51:25 -06:00
Robin Gareus
cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log
2019-08-03 15:53:17 +02:00
Robin Gareus
beb73edf55
Purify libcanvas, remove libardour dependency
...
A canvas is just a canvas. Move WaveView into its own library.
2017-07-17 21:06:04 +02:00
Tim Mayberry
c4e31fc322
Add an optional ArdourCanvas::Item::prepare_for_render interface
...
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-06-26 08:40:47 +10:00
Paul Davis
e616324683
add basic data members and methods for adding an explicit size allocation for Canvas::Item
2017-02-01 21:58:20 +01:00
Paul Davis
cce1c58198
This wasn't supposed to be pushed to master.
...
Revert "add basic data members and methods for adding an explicit size allocation for Canvas::Item"
This reverts commit d1c1d8df61 .
2017-01-24 23:17:38 +01:00
Paul Davis
d1c1d8df61
add basic data members and methods for adding an explicit size allocation for Canvas::Item
2017-01-24 22:45:22 +01:00
Paul Davis
4fa4b9a135
remove use of boost::optional to define "undefined" Canvas::Rect, and use 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-19 20:54:54 +01:00
Paul Davis
c91c028c37
do not add items twice to their canvas parent!
2017-01-19 00:24:54 +01:00
Paul Davis
f66f7ba136
make inclusion/exclusion of hidden children optional in Item::add_child_bounding_boxes
2016-09-27 14:59:32 -05:00
Paul Davis
5672419fff
add Item::add_front()
2016-09-27 14:59:32 -05:00
Tim Mayberry
5f4f89fb39
Move PBD symbol demangle functions into pbd/demangle.h/cc
...
Add pbd/demangle.cc source file and move functions from pbd/stacktrace.cc into
it
2015-12-01 14:22:38 +10:00
Robin Gareus
22b07e0233
NOOP, remove trailing tabs/whitespace.
2015-10-05 16:17:49 +02:00
Paul Davis
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