13
0
Commit Graph

942 Commits

Author SHA1 Message Date
Alejandro Domínguez
5223b176f3
Replace boost::shared_array<T> with std::shared_ptr<T[]> 2024-11-06 23:03:19 +01:00
Alejandro Domínguez
9544855fdd
Remove unused headers 2024-11-06 22:50:35 +01:00
ea64eb87c5 canvas; fix thinko and typo in Rectangle size_request() 2024-11-05 15:02:06 -07:00
a3deba207e Canvas: auto-fy a couple of lops in Box::reposition_children() 2024-11-05 14:58:44 -07:00
e6758b6ba8 Canvas; make button handle dynamic size allocation 2024-11-05 14:56:37 -07:00
b500eeb36e canvas; fix indent in Text::dump() 2024-11-05 14:56:11 -07:00
5808c6e78f Canvas: fix logic bug when setting child items to be layout sensitive
Also, auto-fy the loop
2024-11-05 14:55:37 -07:00
ba782dd097 Canvas; items added to a box become layout sensitive 2024-11-05 14:54:39 -07:00
370b045715 canvas: fix typo in using explicit size request 2024-11-05 14:53:54 -07:00
75177f3ef8 canvas: honor explicit size request for Rectangle 2024-11-05 14:53:22 -07:00
d260b1d4c0 Canvas::Button improvements 2024-11-05 13:27:22 -07:00
c1ad49a411 skeleton for a canvas button 2024-11-05 13:27:22 -07:00
Mads Kiilerich
b4ff4f356c Make header files more self-contained - add missing Ardour and lib includes 2024-10-20 03:30:46 +02:00
74c4ca3e52
Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
ff95d81612
Reduce reliance on boost - the easy part
* boost::unordered_map -> std::unordered_map
* BOOST_STATIC_ASSERT/static_assert
* BOOST_FOREACH -> for
* boost::tuple -> std::tuple/g
* boost::math::isnormal -> std::isnormal
* boost::container::set -> std::set
* boost::none -> std::nullopt
* boost::optional -> std::optional
2024-10-19 03:41:16 +02:00
168b917730
Prepare for std::optional 2024-10-19 03:40:04 +02:00
Alejandro Domínguez
2436b4df06
Replace boost::noncopyable with C++11 deleted copy constructors 2024-10-19 01:04:15 +02:00
2d7cce44f1
Replace PBD::Signals (1/2) 2024-10-18 20:41:08 +02:00
c8924f4133 fix lollipop drawing
Cairo coordinate/argument limits are much smaller than the canvas. Trying
to clip to a gigantic rectangle throws cairo into a weird state, so
make sure we only clip to a part an exposed area
2024-10-17 07:44:31 -06:00
59ed3d7138 cleanup canvas piano roll header so that it can exist with no current MidiView 2024-10-17 07:44:30 -06:00
10244c0360 tempo bar and BBT ruler in MIDI cue editor 2024-10-17 07:44:30 -06:00
e3205bded0 do something to make MIDI bindings accessible in any EditingContext 2024-10-17 07:44:29 -06:00
10b48d2cc4 lock in some major steps for the midi cue/pianoroll editor 2024-10-17 07:44:29 -06:00
69d63bac92 do not plot ruler marks that are left of the current (scroll-adjusted) canvas edge 2024-05-29 14:13:47 -06:00
e7b3b61dbc fix bad redraws caused by TrackingText on canvas
Probably Item::set_position() should call Item::set_bbox_dirty() but
this will do as a first pass at that
2024-04-12 18:50:03 -06:00
adfba3d39d allow runtime control over cairo save/restore around item rendering
This is to allow easier debugging of whether a given item's render method fails to leave a cairo
context in the same state it received it in
2024-03-22 13:39:03 -06:00
e64af8e4ed add a test for an environment variable before switching canvas single-expose off 2024-03-18 11:28:16 -06:00
4b563ae518 move CairoCanvas::render() implementation for ArdourCanvas::Canvas into source
Note that this implementation only redraws a single (cairo_rectangle_t-defined) rect, and cannot
provide sub-rects the way that a normal GDK/GTK expose-driven redraw can
2024-03-18 10:50:36 -06:00
71e085d825 ensure that the canvas fully redraws after style/visibility events 2024-03-18 10:49:15 -06:00
802d9fa487 correctly implement canvas expose redraw for both single- and multi-expose contexts 2024-03-18 10:47:31 -06:00
ad51c7c2ba
Localize stripped down gtk2
This is intended mainly for GNU/Linux distros who will remove
GTK2 support in the near future.
2024-01-06 21:52:48 +01:00
92d6cb9933
Fix alloc-dealloc-mismatch (video image) 2023-12-12 20:36:55 +01:00
Mads Kiilerich
6b61b03434 wscript: drop traces of shutdown() handling
autowaf has no real shutdown functionality anyway. The automatic
shutdown function that could have been called wouldn't work anyway, as
it takes an argument.

The only reason it doesn't fail is that the top level wscript has no
shutdown handling and doesn't recurse to other scripts, so it is all
dead code.
2023-10-15 10:47:16 -06:00
Mads Kiilerich
88cecdfaef wscript: drop repeated autowaf.set_options - it is enough to set at top level 2023-10-15 10:47:16 -06:00
cd99fed7cd canvas: add PolyItem::clear() 2023-09-30 11:09:58 -06:00
0a6ac2678a canvas: if LineSet does the 0.5 pixel shift, make it the right direction 2023-09-25 20:01:21 -06:00
5fa5c5d202 canvas: NOOP fix comment about docs on single pixel lines 2023-09-25 19:52:10 -06:00
bc78694a1a canvas: fix bounding box of a LineSet (lower edge was not lower enough) 2023-09-25 19:51:33 -06:00
Mads Kiilerich
f1bb18ae53 wscript: drop unused path_prefix
It is not referenced anywhere, and also not set consistently.
2023-09-17 07:34:55 -06:00
Mads Kiilerich
d220f477ed wscript: drop unused "mandatory variables" 'top' and 'out' in libs
Variables by these names are only used from the local wscript and when
running "waf configure", which already for other reasons only can run at
the top-level.

These variables are thus not mandatory and not used.
2023-09-17 07:34:55 -06:00
Mads Kiilerich
a0916ef368 wscript: drop unused APPNAME assignment in libs
https://waf.io/book/ says
  By default, the project name and version are set to noname and 1.0. To
  change them, it is necessary to provide two additional variables in
  the top-level project file

- and waf code inspection confirms that waf itself only will use the top
level APPNAME.

Also, the 'waf dist' comment doesn't seem relevant - especially after
this change - and is removed too.

(Note: libs/evoral/wscript and libs/temporal/wscript still use APPNAME
for other purposes.)
2023-09-17 07:34:55 -06:00
Mads Kiilerich
3b4cf9191c wscript: drop unused VERSION assignment in libs
https://waf.io/book/ says
  By default, the project name and version are set to noname and 1.0. To
  change them, it is necessary to provide two additional variables in the
  top-level project file

- and waf code inspection confirms that waf itself only will use the top
  level VERSION.

Some wscripts will use
  bld.env['VERSION']
but that will also just use the value set in the top wscript.
2023-09-17 07:34:55 -06:00
Mads Kiilerich
7737c17d52 wscript: drop unused imports, scripted
Done with ad hoc scripting hacks processing unused imports found by pyflakes:

for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Logs.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^import waflib.Logs as Logs,/import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/import waflib.Options as Options, /import /g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^from waflib import Options,/from waflib import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep ' imported but unused$' | sed "s/^\([^:]*\):[0-9]*:[0-9]* '\(.*\)'.*/\1 \2/g" | while read f lib; do sed -i "/^import $lib$/d" $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import Options$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.TaskGen.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import TaskGen$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Task.Task.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Task import Task$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Tools.winres.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Tools import winres$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Utils.* but unused' | cut -d: -f1 | while read f; do sed -i '/^import waflib.Utils as Utils$/d' $f; done
2023-09-17 07:34:55 -06:00
2242b3706c another pixel width fix, to accomodate for the unliekly
If the line width is odd, not just 1.0, the 0.5 pixel shift is required
2023-09-15 17:34:30 -06:00
0a597bea66 rulers: fix subtle off-by-one pixel error caused by double-rounding
This change also makes it more clear that we're computing window-coordinate system values
for the x-axis than the previous inaccurate version was
2023-09-15 17:34:30 -06:00
4c5c7769bb canvas: skip intermediate Canvas::Rect object (trivial optimization) 2023-09-15 17:34:30 -06:00
e88a121ff8
Fix canvas rectangle bounding box
When drawing the outline of a rectangle, the bounding
box must cover the whole pixel of the line. Otherwise
the line would be left behind when the rectangle shrinks.
2023-09-07 02:45:26 +02:00
845600b261 fix off-by-one pixel error caused by using floor() instead of round() 2023-08-26 10:07:41 -06:00
4c845eb2a0 cairo single pixel line offset fix, part 1 2023-07-17 20:54:33 -06:00
3ab3ef3b55
Fix lineset drawing (again), apply cairo 0.5px offset
see also f08299ea1e
2023-07-17 23:28:36 +02:00