Commit graph

863 commits

Author SHA1 Message Date
Paul Davis
56ca52651e fix up requested color names everywhere.
Thank <deity> for emacs ... space-uncamelcase-word-at-point FTW
2014-12-14 16:15:38 -05:00
Paul Davis
48a7a11974 initial pass to replace all UIConfiguration::get_XXXXXX() calls with UIConfiguration::color(name).
IMPORTANT: names have not been downcased and spaced yet, so many colors are not found
2014-12-14 12:27:07 -05:00
David Robillard
ee38c44109 Structure MIDI device selector by manufacturer.
Unfortunately we store the state of models as simply model, so if there's ever
duplicate model names, we're somewhat screwed, but this makes the (previously
unmanageably huge) menu usable, while retaining the "model name as global
identifier" state unmodified.
2014-12-13 00:37:34 -05:00
David Robillard
ec8c0e93bb Fix shift-rect-select with MIDI notes. 2014-12-07 17:30:06 -05:00
David Robillard
39da38dd6e Nudge notes by 1 bar if secondary modifier active.
Similar to how transpose moves an octave if the same modifier is active.
2014-12-06 22:43:06 -05:00
David Robillard
16d60ef2f7 Grab keyboard only with note selection.
When entered, the keyboard is grabbed when the selection becomes non-empty, and
ungrabbed if it becomes empty again or the region is left or the user switches
out of internal mode.

This fixes scroll in internal mode and note moving with arrow keys.  Also frees
up useful keybindings when there is no note selection, which is much nicer than
the "nothing works in edit mode at all" greedy grab approach used previously.

Attempt #874327892 of getting this damned grabbing right.
2014-12-06 22:43:06 -05:00
David Robillard
63082821d8 Support paste between automation lanes.
Also push the increasingly unwieldly paste parameters into a context object.

As with othe things, currently it is only possible to do "cross-type paste" by
explicitly selecting the target track.  We will need to get automation region
view selection working to do better here, but at least for now it's possible to
get the data over.
2014-12-06 12:20:52 -05:00
David Robillard
34fcf22476 Fix internal paste when selection has only points. 2014-12-06 10:26:25 -05:00
David Robillard
a65cd2a1b9 Make scroll work on MIDI regions when internal.
For some reason, grabbing the magic keyboard focus makes scroll stop working
regardless of what MRV::canvas_group_event() returns.  I can't figure out any
reason to grab the keyboard in this case anyway, so I just removed it.

Also simlify MRV event handling code in general.
2014-12-05 17:36:02 -05:00
David Robillard
0ffeaa6d6a Remove braindead Parameter inheritance abuse. 2014-11-30 23:56:20 -05:00
David Robillard
cf537b97f5 Add missing namespace qualifiers. 2014-11-30 23:56:19 -05:00
David Robillard
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
David Robillard
57c1b6e261 Fix quantization and other time-related ops. 2014-11-22 21:49:42 -05:00
David Robillard
bed95a64a0 Fix note resizing. 2014-11-22 15:33:40 -05:00
David Robillard
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
David Robillard
24f7eccc86 Factor out copy-paste code to get grid type in beats defaulting to 1. 2014-11-22 00:46:15 -05:00
David Robillard
41a9060df9 Move time converters only to the region views that actually need them.
A step towards sorting out time issues more solidly, the time situation of MIDI
region views and automation region views is slightly different.
2014-11-22 00:46:15 -05:00
David Robillard
563f5c11a6 Support cut/copy/paste of MIDI notes and controllers at the same time. 2014-11-16 22:35:45 -05:00
David Robillard
fd9ccc7058 Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
2014-11-16 22:35:45 -05:00
David Robillard
8793e60af2 Use symbol for paste operation like everywhere else. 2014-11-16 22:35:45 -05:00
David Robillard
3f8251962f Fix crash when splitting regions in internal edit mode. 2014-11-16 22:35:45 -05:00
David Robillard
31acd96384 Implement "multi-paste" for notes, regions, and automation.
The idea here is that pasting several times to the same location doesn't make
sense.  Instead, the paste is appended past the last paste, snapped to the
grid.  This make it simple to replicate a given section a number of times,
simply by copying once and pasting several times.

This behaviour only appears when successive pastes are done to the same
location (whatever the edit point is).  When the paste point changes, the
"multi-paste" state is reset.

Boots 'n cats 'n boots 'n cats.
2014-11-14 20:04:19 -05:00
David Robillard
31b6b05125 Fix MIDI note cut/copy/paste. 2014-11-14 20:04:19 -05:00
David Robillard
5d5d9cb9e2 Fix various sticky/broken cursor issues.
This still isn't quite right, but it's a lot less broken than before, at least.
2014-11-14 02:37:36 -05:00
David Robillard
3b23aed5e1 Fix error when create-dragging note backwards past start of region (#5934). 2014-11-14 00:31:28 -05:00
David Robillard
a733a2a4c5 Don't make MIDI regions in note mode completely invisible.
This makes for extremely confusing behaviour, particularly when creating new
regions.  This is still probably too transparent, IMO, but at least isn't
totally mysterious.  "visible" is a bit of a misnomer in the code, now.
2014-11-13 23:33:11 -05:00
Paul Davis
ba4d1cd1c1 remove "canvasvar_" from all functions related to obtaining values from ARDOUR_UI::config() 2014-10-21 22:58:58 -04:00
Paul Davis
b73f725676 remove mouse zoom mode; bind z to zoom-to-range 2014-10-21 12:47:53 -04:00
Robin Gareus
f369208334 Disallow midi-note duration changes beyond region boundaries
Fixes crash/assert with negative Beats.

TODO discuss alternative:
 automatically extend/trim region (if possible) or
 accept but hide notes that are out of bounds. That would need
 some solution for ghost notes which still can have negative Beats
 while dragging.
2014-10-21 15:48:11 +02:00
Robin Gareus
148c1f1768 fix stuck key-grab/scrolling.
Problem: mouse-scrolling over a MIDI region in internal edit mode
never released “magic widget focus” (mod keys and global scrolls after
that were ignored). -> added to leave_notify.

Also, the MouseModeChanged signal needs to be emitted when internal edit,
mode changes in order to trigger MidiRegionView::mouse_mode_changed(), 
which in turn releases the magic focus while still hovering over a MIDI
region.
2014-10-21 11:07:53 +02:00
Robin Gareus
a9532179d5 Midi Region: pass unhandled scroll events to regionview
see note in MidiRegionView:📜 “allow PrimaryModifier scroll
through so that it still works for zoom.”
2014-10-21 11:01:28 +02:00
Robin Gareus
1f313ec19c Vertically align Midi Notes, Piano Roll & Canvas Line Grid 2014-09-08 18:44:32 +02:00
Paul Davis
4e689d9496 use new TrackingText for verbose cursor 2014-06-26 15:10:24 -04:00
Robin Gareus
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00
Paul Davis
6a5d805b38 more canvas refactoring.
Remove Canvas::Layout, use Canvas::Container for the same purpose, move child-rendering into Item::render_children() so that it
could theoretically be used by any derived type.
2014-06-22 11:41:05 -04:00
Paul Davis
0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
Paul Davis
ce08ec0de0 substantial changes in color management, involving a reduction in the use of Gdk::Color and more consistent logic for region coloring.
Group tabs now also get the text drawn in an appropriately contrast-y color
2014-06-09 23:29:00 -04:00
Paul Davis
dbaf203bac fix ridiculous spelling error 2014-04-15 12:44:49 -04:00
Paul Davis
279aefc60e fix error in height computation of MIDI region views (FUDGE!) use Rectangle::set_outline_all() and avoid the removed integer version of ::set_outline_what() 2014-03-11 07:39:25 -04:00
Paul Davis
41c4c41eaa fix apparent logic error for MidiRegionView when redisplaying note model 2014-03-06 23:16:42 -05:00
Paul Davis
feebabb330 trivial API change for MidiRegionView::update_hit() 2014-03-06 13:27:51 -05:00
Paul Davis
3bbbf56718 passthrough unhandled motion events in MIDI region views because we may be dragging non-note objects like patch changes 2014-02-11 22:46:21 -05:00
Paul Davis
7eb40ae6c8 slight code replacement 2014-01-20 10:52:27 -05:00
Paul Davis
934e827420 fix non-editing/non-draw event handling by MIDI regions 2014-01-16 10:53:02 -05:00
Paul Davis
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
Paul Davis
4f9e46976c make middle-click on piano roll track header more usefully select/unselect notes 2013-10-23 10:38:50 -04:00
John Emmas
5da78cea9a 'gtk2_ardour' - Use 'const_iterator' where appropriate, instead of 'iterator' 2013-10-03 09:52:39 +01:00
John Emmas
f8574fc39d 'gtk2_ardour' - Add namespaces + casting where necessary + general bits of 'correctness' to keep MSVC happy 2013-10-03 09:06:56 +01:00
Paul Davis
e2f0c5f91e merge resolution with master 2013-05-02 20:21:54 -04:00
Paul Davis
3973ce81b3 remove all of Gtk::Window::set_position (WIN_POS_MOUSE) for anything deriving from ArdourDialog or ArdourWindow; move the set_position() call into those classes' constructors, so that they are called before the windows are realized, and thus it actually works 2013-05-02 18:13:35 -04:00