Commit Graph

31 Commits

Author SHA1 Message Date
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
James Crook
5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli
32d767c7f5 Track::SetLinked() and Track::SetChannel() are private...
... but class WaveTrack needs to invoke SetLinked still during project load
2018-10-01 13:42:36 -04:00
Paul Licameli
beebe648fb Remove more uses of Track::SetLinked() and Track::SetChannel() 2018-10-01 13:42:36 -04:00
Paul Licameli
fbec3efa0c Eliminate some unnecessary track type tests 2018-10-01 13:42:34 -04:00
Paul Licameli
c107fb298b Remove GetLink(ed) in channel manipulation menu items 2018-10-01 13:42:32 -04:00
Paul Licameli
669054b4f4 Remove many uses of GetLink in TrackPanel 2018-10-01 13:42:24 -04:00
Paul Licameli
5c6fd64a0e TrackList::GetPrev and ::GetNext are private 2018-10-01 10:44:58 -04:00
Paul Licameli
35f5555216 Track::mChannel has an enum type 2018-09-29 12:42:46 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
65b4e34f71 Bug 1725 - Zoom buttons disabled after OK in Spectrogram Settings 2018-03-24 13:21:04 +00:00
James Crook
f9fb4b3b7d Bug 1773 - Wave Color not grayed out in TCP dropdown menu when in Spectrogram view
The "Wave Color" option is now not shown in spectrogram mode.
2018-01-18 12:19:09 +00:00
Paul Licameli
5407079c62 Remove EXPERIMENTAL_OUTPUT_DISPLAY...
... Maybe a good feature idea, but the implementation pollutes the code in
too many places.

It's a special case of the more general idea of many-to-one associations
between screen rectangles and track objects.  More generalized ways to
accommodate that should be sought.
2018-01-12 12:08:09 -05:00
Paul Licameli
5e670c900a Some i18n-hints 2018-01-02 13:04:19 -05:00
Paul Licameli
7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli
ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
James Crook
f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
James Crook
42c52de7f1 Coloured clips basics
These basics add a colour index to each clip and track, and allow for a choice of four colours to be set from the track menu drop down.  The additional wave colours (red, green and black) are not currently configurable, and the colour index is not currently saved.
2017-11-04 17:47:02 +00:00
Paul Licameli
4dcd10584f Fix crashes mousing over TCP 2017-07-10 23:18:33 -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
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
58fea6d520 null check uses of CommonTrackPanelCell::FindTrack 2017-06-26 16:39:14 -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
c1612d6842 Fix WaveTrack menu (ID collision, item names, enabling) 2017-06-15 11:02:28 -04:00
Paul Licameli
a313bcdb11 Move code for Wave track menu items 2017-06-15 08:21:40 -04:00
Paul Licameli
1a317af2f5 Move code for handling the menu button out of TrackPanel, but...
... Still to do, move out the code for menu items.  They remain accessible
from Shift-M but not from the menu button.

And ESC key is now implemented.
2017-06-15 08:21:36 -04:00
Paul Licameli
a569476e79 TrackPanel still draws Gain and Pan, but no longer handles clicks on them...
... also implemented ESC key for those drags
2017-06-15 08:21:35 -04:00
Paul Licameli
5ee73f944d TrackPanel still draws Mute and Solo, but no longer handles clicks on them...
... also implemented ESC key for those drags
2017-06-15 08:21:34 -04:00
Paul Licameli
14d45eda33 Define and use the UIHandle and TrackPanelCell protocols, but...
...no actions reimplemented to them yet.

Later commits will move special cases one at a time from TrackPanel, preserving
all click and drag capabilities at each step.  With a few exceptions, but those
lost abilities are restored in yet later commits.  (Ctrl+Click on the Label
track being one.)
2017-06-15 08:20:56 -04:00