Commit graph

954 commits

Author SHA1 Message Date
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
Paul Davis
e64af8e4ed add a test for an environment variable before switching canvas single-expose off 2024-03-18 11:28:16 -06:00
Paul Davis
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
Paul Davis
71e085d825 ensure that the canvas fully redraws after style/visibility events 2024-03-18 10:49:15 -06:00
Paul Davis
802d9fa487 correctly implement canvas expose redraw for both single- and multi-expose contexts 2024-03-18 10:47:31 -06:00
Robin Gareus
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
Robin Gareus
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
Paul Davis
cd99fed7cd canvas: add PolyItem::clear() 2023-09-30 11:09:58 -06:00
Paul Davis
0a6ac2678a canvas: if LineSet does the 0.5 pixel shift, make it the right direction 2023-09-25 20:01:21 -06:00
Paul Davis
5fa5c5d202 canvas: NOOP fix comment about docs on single pixel lines 2023-09-25 19:52:10 -06:00
Paul Davis
bc78694a1a canvas: fix bounding box of a LineSet (lower edge was not lower enough) 2023-09-25 19:51:33 -06:00