Robin Gareus
d8e7e24f59
Use dedicated common actions per edit context
...
Pianoroll and main editor mouse-mode/tool actions are
now separate.
2025-03-05 22:49:37 +01:00
Paul Davis
a0b2e85c7c
better handling of MIDI channel selector on pianoroll
2025-02-02 11:32:45 -07:00
Paul Davis
f5f238b30a
prefer !foo to foo == 0 for nullptr conditionals
2025-01-29 17:40:57 -07:00
Paul Davis
348bf8b6c2
GridLines needs an EditingContext so that it uses the right samples per pixel
2025-01-29 17:40:57 -07:00
Paul Davis
852ad9a7da
move grid updating code and members into EditingContext
2025-01-29 17:40:57 -07:00
Paul Davis
ef6502d88d
initial refactoring to prepare for grid lines in pianoroll
2025-01-29 17:40:57 -07:00
Paul Davis
b82ae5590c
ensure that a Pianoroll window (and its action groups) are deleted when appropriate
2025-01-28 13:29:40 -07:00
Paul Davis
829d798759
use _track_canvas_width not _visible_canvas_width for zoom math in Pianoroll
...
The latter is the width of the entire canvas including the pianoroll header
2025-01-26 15:51:18 -07:00
Paul Davis
eff21bb3e9
add debug printf to explain a stacktrace (for now)
2025-01-26 15:51:18 -07:00
Paul Davis
698ae7ca9f
fix Pianoroll::zoom_to_show() so that it does what it says
...
... and also interacts with EditingContext::reset_zoom() correctly due to the
scaling factor that, for the Pianoroll, tries to show a bit more time than
is represented by the data
2025-01-26 15:51:18 -07:00
Paul Davis
656273cb9f
fix zoom focus issues (not properly refactored in pianorule
2025-01-22 18:20:25 -07:00
Paul Davis
e5fb2d83da
use the right GdkWindow when setting the canvas cursor
2025-01-16 12:30:15 -07:00
Paul Davis
22a5113b59
change how mouse mode actions are defined
...
they now use a lambda for the functor, and the lambda calls
current_editing_context() to pick which EditingContext will
be affected.
this design replaces one where each EditingContext had its
own set of mouse mode actions defined, using its own name
as the action group
2025-01-16 12:30:15 -07:00
Paul Davis
4e8591da99
move cut/copy/delete/paste operations into EditingContext
...
derived classes (Editor and Pianoroll) provide ::cut_copy() to wrap the
context-specific logic, and then both defer to MidiView for MIDI-specific
operations.
Note that this also changes several action names in ardour.keys.in
2025-01-14 15:31:53 -07:00
Paul Davis
13161a3975
refactor point-selection-changed logic "up" into EditingContext
2025-01-14 15:28:51 -07:00
Paul Davis
1ae5ea0e92
prwevent scroll-driven zoom in pianoroll from exceeding a reasonable level
2025-01-08 14:26:28 -07:00
Paul Davis
e206fd5863
share the full zoom button in EditingContexts
2025-01-07 17:11:08 -07:00
Paul Davis
bd9ab55fa0
move zoom in/out buttons to EditingContext and use on the pianoroll
2025-01-07 12:59:13 -07:00
Paul Davis
d0890abe9c
bring in change from bf7d4f895e but also try to fix API ambiguity and bug in that commit and existing code
...
_grid_type is an EditingContext member; grid_type is a method parameter
2025-01-05 11:49:18 -07:00
Paul Davis
9139b0731b
use icon for cue editor sound selected MIDI notes button and make it sensitive to the UIConfig parameter, and active
2025-01-03 09:14:26 -07:00
Paul Davis
4e80b8c9c7
set zoom focus selector tooltip in the right class
2024-12-29 11:30:06 -07:00
Paul Davis
0a40b50b86
refactor zoom focus handling so that all EditingContexts can use the same code
2024-12-29 11:24:16 -07:00
Paul Davis
5248e81f9d
start using visible channel in MIDI cue editor
2024-12-20 10:44:35 -07:00
Paul Davis
4c34f3cd29
provide rudimentary button control over percussive/sustained drawing in clip editor
...
Note that the note length selector can always be used to change the length of a note added
via a click
2024-12-13 21:48:18 -07:00
Paul Davis
0ff0d4df8b
get mouse-centered zoom working in cue editor
2024-12-12 11:53:15 -07:00
Paul Davis
fb4fefe573
fix some issues with zoom focus after refactoring it into EditingContext
2024-12-12 11:53:15 -07:00
Paul Davis
0e170b6457
C++, please
2024-12-12 11:53:15 -07:00
Paul Davis
a6ca9be006
refactor editor-y zooms into EditingContext
2024-12-12 11:53:15 -07:00
Paul Davis
98c9c03e9f
remove all trace of cursor stacks; canvas cursor is always "just set"
2024-12-08 12:13:41 -07:00
Paul Davis
5b112e489b
move zoom in/out actions into shared "Editing" group
2024-12-07 08:00:46 -07:00
Robin Gareus
d44ceb3ab7
Add API to consistently round start/end to duration to pixels
2024-11-28 15:00:40 +01:00
Paul Davis
28e638deac
undo a change the broke cursor management
...
push push pop pop must always work, even if the two pushes are for the same cursor
2024-11-19 16:31:36 -07:00
Paul Davis
f598f4e4e0
potential fixes for SNAFU with cursors
2024-11-19 16:04:41 -07:00
Paul Davis
e7b10fc37d
virtualize editing connections to parameter changes
2024-11-12 10:47:08 -07:00
Paul Davis
677a6764ac
add new buttons to EditingContext; use them in MidiCueEditor
2024-11-12 09:49:59 -07:00
Paul Davis
bccf36d665
catch pushing identical cursors to the cursor stack
2024-11-11 21:01:11 -07:00
Paul Davis
c7192b4cc0
add the concept of a length that is data-independent to MIDI files (GUI)
2024-10-31 12:22:35 -06: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
Paul Davis
56ce9c33c0
renaming: AutomationLineBase => AutomationLine, AutomationLine => EditorAutomationLine
2024-10-17 07:44:31 -06:00
Paul Davis
90c8726c6d
wideranging changes to get automation editing working in cue editor
2024-10-17 07:44:31 -06:00
Paul Davis
45e4b97a6f
move some methods from Editor to Editing context so that drawing controls work everywhere
2024-10-17 07:44:31 -06:00
Paul Davis
8523598664
fix management of undo/redo and _current_editing_context
...
We cannot switch on a leave event from a widget, because the undo/redo menu items must remain
labelled until we are actually in a new editing context. So switch when we switch tabs
or when we edit the (MIDI) cue editor
2024-10-17 07:44:31 -06:00
Paul Davis
86ecca8c76
make undo/redo action sensitivity work with multiple EditingContexts
2024-10-17 07:44:31 -06:00
Paul Davis
c4534cc9c4
undo history for MidiCueEditor
...
redo not operational yet for some unknown reason
2024-10-17 07:44:31 -06:00
Paul Davis
4bbdbc6d13
fix handling of MIDI draw tool actions and widgets
...
The actions and draw_xxx values are now "static", and changes in the values are
notified via a static PBD::Signal so that each EditingContext can update the
appearance of its relevant widgets.
Note also wider use of lambdas when creating actions and menu items.
2024-10-17 07:44:30 -06:00
Paul Davis
71f946f3b3
move tooltip settings for EditingContext widgets to EditingContext
2024-10-17 07:44:30 -06:00
Paul Davis
36eda47075
get temporal zoom workign in MidiCueEditor
...
and remove qite a bit of debug output
2024-10-17 07:44:30 -06:00
Paul Davis
033dd31ff1
fix reordering warning
2024-10-17 07:44:30 -06:00
Paul Davis
dc44d10b48
handle Escape signal in all EditingContexts (including MidiCueEditor)
2024-10-17 07:44:30 -06:00
Paul Davis
f2e1697058
dammit jim, it's a stack not a queue
2024-10-17 07:44:30 -06:00