Commit graph

966 commits

Author SHA1 Message Date
Paul Davis
4bbfc60126 add 2 new canvas debug bits 2021-09-10 12:15:24 -06:00
Paul Davis
51110a92d9 canvas: fix computation of Box bounding box 2021-08-31 13:21:12 -06:00
Paul Davis
3734277263 canvas: improve box packing - compute child dimensions more correctly 2021-08-30 17:40:06 -06:00
Paul Davis
b47fbc91e0 canvas: provide Rect::shrink () with four arguments 2021-08-30 17:39:39 -06:00
Robin Gareus
10253a6ae4
Fix Windows builds, remove unnecessary srandom() calls
Since fc90c92a49 Gtkmm2ext::random_color () uses g_random_int()
which is implicitly seeded when first used.
2021-08-14 01:29:49 +02:00
Paul Davis
bf26be71aa move constraint packing tests out of the way 2021-08-13 17:27:20 -06:00
Robin Gareus
fc90c92a49
Fix Windows builds (rand/random API) 2021-08-14 01:07:13 +02:00
Paul Davis
0095681493 fix cast in call to time(2) 2021-08-13 14:11:41 -06:00
Paul Davis
d2b2b73c82 canvas; provide Rectangle::{height,width}() 2021-08-13 12:51:37 -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
5e3460aaae canvas: start to extend size allocation process for box packing 2021-08-13 12:51:37 -06:00
Paul Davis
4a700f270d canvas: remove debug output 2021-08-13 12:51:37 -06:00
Paul Davis
dc6a162ca1 canvas: remove Box::render() (it should just use Rectangle::render()) 2021-08-13 12:51:37 -06:00
Paul Davis
85edd83338 canvas: correctly set Box _rect after repositioning children 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
6f883650d8 canvas: use combined outline enum value for clarity 2021-08-13 12:51:37 -06:00
Paul Davis
71fe17a241 canvas: impl of Rectangle::dump() 2021-08-13 12:51:37 -06:00
Paul Davis
b2aa14a90b canvas; remove already-commented debug output 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
16bbf79cae canvas: decl for Rectangle::dump() 2021-08-13 12:51:37 -06:00
Paul Davis
dc48f55285 canvas: bounding box changes for Container 2021-08-13 12:51:37 -06:00
Paul Davis
9095057675 canvas: call Item::bounding_box() to recompute bounding box when needed
Since 74fe396cc5 compute_bounding_box() by itself does not do the entire computation, so we
must call into Item::bounding_box() to get the result with children added also
2021-08-13 12:51:37 -06:00
Paul Davis
c0425ba70f canvas: items should not add child bboxes in their ::compute_bounding_box() method, Item::bounding_box() does that 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
5b123441f4 canvas; change operator<<() for Rect to show BIG instead of gigantic 64 bit numbers 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
7066db16bd remove dangling method from rebase issues 2021-08-13 12:51:36 -06:00
Paul Davis
14621f3634 add missing Box::set_homogenous() method 2021-08-13 12:51:36 -06:00
Paul Davis
5153124664 change (GUI) Marker objects to accept any Canvas::Item as parent, and use this to draw BBT position markers in the BBT ruler 2021-08-13 12:51:34 -06:00
Paul Davis
749a49c278 incorporating new tempo map API 2021-08-13 12:51:29 -06:00
Paul Davis
82bad0725a libcanvas: reapply LineSet::add_line -> add_coord change after rebase conflicts with master 2021-08-13 12:51:27 -06:00
Paul Davis
54de7c70ee Canvas: print item colors in hex when debugging 2021-08-13 12:51:27 -06:00
Paul Davis
86a31e34ba Canvas: fix recursive calling of Item::size_allocate()
ConstraintPacker is the one Item-derivative that should NOT call Item::size_allocate_children()
because it just did the size computation for its children and called their
::constrained() method, which in turns calls size_allocate() with the correct size
2021-08-13 12:51:27 -06:00
Paul Davis
dbe37d2752 Canvas: make possible even more debugging of constraint packing 2021-08-13 12:51:27 -06:00
Paul Davis
f118b3ab53 Canvas: remove dangling cairo path in Arc or ConstraintPacker if fill was requested but not outline 2021-08-13 12:51:27 -06:00
Paul Davis
1d96bad59f Canvas: remove cBox (API fully merged into ConstraintPacker) 2021-08-13 12:51:27 -06:00
Paul Davis
1b66890547 Canvas: continuing move of cBox functionality into ConstraintPacker 2021-08-13 12:51:27 -06:00
Paul Davis
4e82279ce4 Canvas: next step of merging cBox and ConstraintPacker 2021-08-13 12:51:27 -06:00
Paul Davis
af60c50990 first steps in merging cBox into constraint packer 2021-08-13 12:51:27 -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