1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-07 07:12:34 +02:00

672 Commits

Author SHA1 Message Date
Paul Licameli
51e25cdfa0 Highlighting of Track Control Panel sliders 2017-07-09 12:34:46 -04:00
Paul Licameli
44d6d5f427 Highlight MIDI channel buttons 2017-07-09 12:34:46 -04:00
Paul Licameli
25641ae568 Highlight TCP buttons 2017-07-09 12:34:46 -04:00
Paul Licameli
ada4b6307d Pass more context information into drawing routines 2017-07-09 12:34:27 -04:00
Paul Licameli
f09a7be3dc TCP draw use hit target for button, slider state; remove hacky global 2017-07-09 12:34:27 -04:00
Paul Licameli
8e44827980 TrackPanelCell hit tests can return multiple results...
.. though only the first is used yet
2017-07-09 08:17:40 -04:00
Paul Licameli
b3d62e2ab6 Simplify by removing class HitTestResult...
... Because all hit tests returned all fields blank, or else, returned a
UIHandle object whose Preview method gives the rest of the information; so
the other fields were redundant.
2017-07-09 07:57:34 -04:00
Paul Licameli
c079544667 Defaulting TrackPanel cursor, status message; simplifies other code 2017-07-09 07:57:33 -04:00
Paul Licameli
f5b0afc2fc Rename TrackPanel::HandleCursor as HandleMotion...
Call HitTest in just one place

Can now preserve repeatedly hit UIHandle objects during pre-click motion

Fields of HitTestResult besides the handle pointer are now unused

The need to repaint a track during mouse movement can be indicated when
constructing a UIHandle or when updating it for move; HitPreview no longer
does this

And the last allows simplifications of LabelTrack glyph highlighting

Also move the temporary state for label glyph dragging out of LabelTrack
2017-07-09 07:56:47 -04:00
Paul Licameli
2c1a16f593 Changed lifetime management of UIHandle objects, no singletons...
... Rather, construct them during hit tests (also capturing more state sooner
rather than at Click time, and adding some accessors for later use)

This also fixes bug 1677 by other means and avoids similar problems.

A cell may be implemented to re-use a previously hit handle object, not yet
clicked, in a later hit test, by remembering a weak pointer, but TrackPanel
holds the strong pointers that determine when the object is destroyed.

And the objects will surely be destroyed after drag-release, or ESC key.

For now they are also destroyed whenever not dragging, and hit-testing is
re-invoked; that will be changed later, so that the re-use mentioned above
becomes effective, but still they will be destroyed when the pointer moves
from one cell to another.
2017-07-09 07:23:28 -04:00
Paul Licameli
3a8280c562 Distinguish TrackPanelMouseState from TrackPanelMouseEvent...
... Let cell hit tests, and handle preview, know states only, not transitions.

Cell hit tests are passed a mouse state that does not always match the current,
but anticipates the button click to come; usually left, but if the Control
[sic] key on Mac is down, then right.

Thus, pressing and releasing Mac Control in multi-tool switches in and out of
the magnifier cursor.
2017-07-09 06:38:55 -04:00
Paul Licameli
e424f8e54e TrackPanel::mpClickedTrack is a safe weak_ptr 2017-06-28 01:46:59 -04:00
Paul Licameli
b0c6a67c33 TrackPanelMouseEvent stores shared_ptr to cell; some handles too...
... those handles that force a simulated button-up when play interrupts drag,
and can assume that pointers to tracks remain nonNULL and part of the current
project state (not the undo history).

Also pass shared_ptr to Track into more hit test routines.
2017-06-28 01:46:56 -04:00
Paul Licameli
708d84ac22 CommonTrackPanelCell::FindTrack returns shared_ptr 2017-06-27 23:09:35 -04:00
Paul Licameli
34da6e6ad3 Mouse-over highlighting of slider thumbs in toolbar & mixer board 2017-06-27 06:38:53 -04:00
Paul Licameli
f8b74db76e Iterators over TrackPanelCell give shared_ptr 2017-06-26 17:14:33 -04:00
Paul Licameli
28b40e02fb Manage TrackPanelResizerCell by shared_ptr, no singleton 2017-06-26 16:39:07 -04:00
Paul Licameli
35ce499ce1 Manage TrackControls and TrackVRulerControls by shared_ptr; ...
... they are not singletons; and the back-pointers to their Tracks are weak.
2017-06-26 16:34:10 -04:00
Paul Licameli
c355b82dc6 Remove a comment 2017-06-26 16:03:15 -04:00
Paul Licameli
2806b509e2 Fix crashes in repainting, and update first visible track correctly 2017-06-26 15:20:35 -04:00
Paul Licameli
d3c9a1decb JAWS fix?: Now do the delay of event handling...
... Queue, don't immediately process, TrackList events, and if listeners want
to hold pointers to tracks, let them use weak_ptr or shared_ptr
2017-06-25 13:35:17 -04:00
Paul Licameli
321919301e Use weak_ptr to remember focused track, don't ask for trouble 2017-06-25 13:35:15 -04:00
Paul Licameli
750fc34fac Clarify what the TrackList events are for...
Also fixes this bug:

Vertical rulers did not narrow as needed after deletion of the lowest track.
2017-06-25 03:00:28 -04:00
James Crook
911a57d451 Bug 1660 - (Windows) Default track name appears as "Audio Trac ". 2017-06-18 12:42:12 +01:00
Paul Licameli
293abceb52 comment 2017-06-17 20:02:35 -04:00
Paul Licameli
4264406795 Correct the left edge of sizer between channels 2017-06-17 20:02:35 -04:00
Paul Licameli
f9865f39ef Fix crashes in TCP popup menu items on Windows 2017-06-17 20:02:16 -04:00
Paul Licameli
91c86fd937 TrackPanelCellIterator visits all cells, and FindCell simply uses it 2017-06-17 03:01:40 -04:00
Paul Licameli
ffbc4d5f90 Simplify iterations over TrackPanelCells with range-for 2017-06-17 03:01:40 -04:00
Paul Licameli
f94ac4dc43 comments 2017-06-17 03:01:40 -04:00
Paul Licameli
a94eb75b4e Further regularize the odd case of hit-test on the resizer region 2017-06-16 18:05:09 -04:00
Paul Licameli
34026d19fd Still better cursor handling: change cursor at once...
... on start or stop of transport, in cases as described in the previous
commit comment, even if the pointer does not move.
2017-06-16 18:05:08 -04:00
Paul Licameli
d9a91c1431 TrackPanel simplifications; improved cursor handling...
... in cases such as:  dragging an envelope point, then hitting space to play,
which forces the drag to finish early.  If you move the mouse, cursor will
remain "ban", even while the mouse button remains down but no drag is really
happening.
2017-06-16 18:05:08 -04:00
Paul Licameli
d6b430c262 Remove unused function 2017-06-16 18:05:07 -04:00
Paul Licameli
f858a7bd9c Correct boundaries of the background cell 2017-06-16 18:05:07 -04:00
Paul Licameli
a00b1935d7 Fix keystroke handling in TrackPanel (such as Shift+M) 2017-06-15 22:09:11 -04:00
Paul Licameli
770b3b52ef TrackPanel no longer implements the selection tool or MIDI stretch...
This one's big!

Also restores the effect of ctrl-click on label track.

Also adds ESC key handling for the Stretch.
2017-06-15 08:54:59 -04:00
Paul Licameli
efdb9889b1 TrackPanel no longer implements label keystrokes, drags, text selection...
... also implemented ESC key for those drags

... temporarily loses the special CTRL click handling
2017-06-15 08:54:58 -04:00
Paul Licameli
bbfa574790 Move track resizing code out of TrackPanel.cpp, though it still...
... cooperates more closely with TrackPanel than the other UIHandle subclasses
do.
2017-06-15 08:54:58 -04:00
Paul Licameli
703abe87bc TrackPanel no longer implements track selection click or rearrange drag...
... also implement ESC key for the drag
2017-06-15 08:54:57 -04:00
Paul Licameli
46b97084eb Move note track control panel click handling out of TrackPanel.cpp 2017-06-15 08:54:55 -04:00
Paul Licameli
e4627b1668 TrackPanel no longer implements other mouse wheel actions 2017-06-15 08:21:42 -04:00
Paul Licameli
8ef5f696d8 Define BackgoundCell, move some things into it 2017-06-15 08:21:41 -04:00
Paul Licameli
674ccc5e15 Clean up last bits of old popup menu code 2017-06-15 08:21:40 -04:00
Paul Licameli
91e6239eeb Move code for vertical ruler clicks, drags, popup menus, scroll wheel 2017-06-15 08:21:40 -04:00
Paul Licameli
a313bcdb11 Move code for Wave track menu items 2017-06-15 08:21:40 -04:00
Paul Licameli
ba5f6ce411 Move code for Note track menu items 2017-06-15 08:21:39 -04:00
Paul Licameli
01d5d30b7e Move code for Label track menu items 2017-06-15 08:21:38 -04:00
Paul Licameli
516d812f3a Move code for Time track menu items 2017-06-15 08:21:38 -04:00
Paul Licameli
0e5e7b1c05 Move code for common track menu items 2017-06-15 08:21:37 -04:00