Paul Davis
603f8a2c6b
auto-ify a loop in the canvas ruler rendering code
2025-09-02 11:10:11 -06:00
Paul Davis
40b7b0a55c
canvas: fix enter notify event handler to work with gtk ungrabs
...
GTK delivers both window and root coordinates as (0,0) for GDK_CROSSING_GTK_UNGRAB
modes. We need the real coordinates of the pointer to pick the right canvas item
2025-08-21 18:56:00 -06:00
Paul Davis
6c499b180b
canvas: add a method to prevent extensive item coordinate math during ::prepare_for_render_children()
...
Also, auto-ify a loop in Item::prepare_for_render_children()
2025-07-29 18:16:35 -06:00
Paul Davis
922b961672
auto-fication of a loop in Canvas::Item plus some variable renaming
2025-07-29 18:16:35 -06:00
Robin Gareus
99c1f50a72
Really remove gtk+ option (see also 1e28ee9cc9)
...
After patching gtk/ytk to add touch support and macOS rendering,
upstream gtk+2 is no longer an option
2025-07-06 15:20:20 +02:00
Paul Davis
774658e01c
remove debug output
2025-06-03 17:11:45 -06:00
Paul Davis
88f35a9c09
fix thinko when drawing lines in a LineSet
...
self represents the bounding box of each drawn line, but not
the coordinate(s) where to draw it
2025-06-03 17:10:07 -06:00
Paul Davis
959e360dd0
fix LineSet arithmetic (again!) and reduce redundancy
...
The logic for "is-integral" was backwards, and the code in both
branches of the conditional was identical
2025-06-03 17:09:29 -06:00
Paul Davis
ae913acacf
simplify cairo pixel alignment in Canvas::LineSet
...
1. do the math when we add a new coord, not at every render call
2. correctly decide whether to force an odd-width line on an integer
coordinate to a half pixel, or an even-width line on a non-integer
coordinate to a whole pixel.
2025-06-02 19:19:30 -06:00
Paul Davis
705fe2b52d
compile RectSet code
2025-06-02 19:16:11 -06:00
Paul Davis
6a67a6bcc4
new canvas item: RectSet
...
a collection of rectangles, conceptually similar to LineSet
this avoids keeping around N different Canvas::Rectangles and instead
collapses a related set of them down to a single item
2025-06-02 18:30:40 -06:00
Paul Davis
4a6716e39c
add option for a minor/micro tick font description to ArdourCanvas::Ruler
2025-05-19 14:57:19 -06:00
Robin Gareus
cdb7c8c4d1
Fix touch-related canvas ptr grab
...
This fixes an issue when canvas left double button click
pops up a dialog. Focus needs to propagate to the dialog.
see also 05f3ac50cc
2025-02-25 23:30:52 +01:00
Robin Gareus
000c25edcc
Update gtkmm -> ytkmm header location (omnibus commit)
2025-02-01 15:25:14 +01:00
Robin Gareus
233fc890de
Update gdkmm -> ydkmm header location (omnibus commit)
2025-02-01 15:01:52 +01:00
Robin Gareus
07866caf1e
Update gdk -> ydk header location (omnibus commit)
2025-02-01 13:37:48 +01:00
Paul Davis
7cf89d192b
robustify Canvas DEBUG_TRACE for PBD::CanvasEvents to handle case where an event handler deletes the item
2025-01-31 12:33:43 -07:00
Robin Gareus
58f1d46e31
One font to rule the rulers.
...
Remove bold fonts for Bar/beats and font-size
inconsistency on macOS (VerySmall, SmallBold).
This reverts commit e3dc0a24f2 .
and 14318dd342
and a76afae0e9
and 7c27f617dc
and 20029ec7e6
2025-01-23 19:43:26 +01:00
Paul Davis
7c892d7286
avoid crash when using -D canvasenterleave
...
This only happens when the canvas finds zero items to deliver
events too, which should never really happen but did while working on pianoroll
stuff.
2025-01-08 14:26:29 -07:00
Paul Davis
24a1fd9dbe
NO-OP: whitespace
2024-12-26 09:28:06 -07:00
Robin Gareus
05f3ac50cc
Focus grab pointer to receive motion events for 1st touch
...
X11 emulates MotionEvents for the 1st finger on a touch-screen
(no explicit touch events are sent) IFF the pointer is grabbed.
So let's do that.
Note 1st finger touch uncnditionally creates press and release events
2024-12-12 17:34:44 +01:00
Robin Gareus
4866baacf5
Release NSGLView, fixes heap-use-after-free
2024-12-06 18:52:04 +01:00
Robin Gareus
ac6c00da26
Add support for Touch events to Ardour Canvas
2024-12-02 21:13:16 +01:00
Ben Loftis
23ba0f8338
fix for 'green' canvas redraws: cairo expects x,y,w,h not x,y,x+,y+
2024-11-23 08:43:44 -06:00
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
Paul Davis
ea64eb87c5
canvas; fix thinko and typo in Rectangle size_request()
2024-11-05 15:02:06 -07:00
Paul Davis
a3deba207e
Canvas: auto-fy a couple of lops in Box::reposition_children()
2024-11-05 14:58:44 -07:00
Paul Davis
e6758b6ba8
Canvas; make button handle dynamic size allocation
2024-11-05 14:56:37 -07:00
Paul Davis
b500eeb36e
canvas; fix indent in Text::dump()
2024-11-05 14:56:11 -07:00
Paul Davis
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
Paul Davis
ba782dd097
Canvas; items added to a box become layout sensitive
2024-11-05 14:54:39 -07:00
Paul Davis
370b045715
canvas: fix typo in using explicit size request
2024-11-05 14:53:54 -07:00
Paul Davis
75177f3ef8
canvas: honor explicit size request for Rectangle
2024-11-05 14:53:22 -07:00
Paul Davis
d260b1d4c0
Canvas::Button improvements
2024-11-05 13:27:22 -07:00
Paul Davis
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
Robin Gareus
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
Robin Gareus
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
Robin Gareus
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
Robin Gareus
2d7cce44f1
Replace PBD::Signals (1/2)
2024-10-18 20:41:08 +02:00
Paul Davis
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
Paul Davis
59ed3d7138
cleanup canvas piano roll header so that it can exist with no current MidiView
2024-10-17 07:44:30 -06:00
Paul Davis
10244c0360
tempo bar and BBT ruler in MIDI cue editor
2024-10-17 07:44:30 -06:00
Paul Davis
e3205bded0
do something to make MIDI bindings accessible in any EditingContext
2024-10-17 07:44:29 -06:00
Paul Davis
10b48d2cc4
lock in some major steps for the midi cue/pianoroll editor
2024-10-17 07:44:29 -06:00
Paul Davis
69d63bac92
do not plot ruler marks that are left of the current (scroll-adjusted) canvas edge
2024-05-29 14:13:47 -06:00
Paul Davis
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
Paul Davis
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