Commit Graph

36 Commits

Author SHA1 Message Date
Paul Licameli
b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
11c8377460 NormalizedKeyString redefined as TaggedIdentifier 2019-05-16 12:30:29 -04:00
James Crook
88dc11f525 Fix 'Set Track Name' input box too short.
This was a regression relative to Audacity 2.0.3
2019-05-15 13:38:16 +01:00
Paul Licameli
5d7584e91a cut WindowAccessible, PopupMenuTable, LinkingHtmlWindow from .h files 2019-03-31 15:14:34 -04:00
James Crook
4ff7d7875a Add 'Select Track' Button.
This is a first take at this new feature.  I'm expecting we'll want to refine it.
https://wiki.audacityteam.org/wiki/Proposal_Select_Track_button_in_TCP has the feature proposal.
2019-03-21 19:43:36 +00:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
6f31a9f7dc Specific types, const versions: getting track & vruler controls...
... See changes to classes CommonTrackPanelCell and Track; the rest follows
2019-03-17 15:20:52 -04:00
James Crook
466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +00:00
Paul Licameli
ccc2bbe3ef MixerBoard listens for events for track sliders, mute, solo, name 2018-10-27 18:01:08 -04:00
Paul Licameli
1be1217d1d Tracks Menus 2018-10-24 12:16:40 -04:00
Paul Licameli
16ab48079b Don't include CommandManager.h in other headers 2018-10-18 09:25:14 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
669054b4f4 Remove many uses of GetLink in TrackPanel 2018-10-01 13:42:24 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
Paul Licameli
b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
James Crook
ae564b2724 Bug 1837 - Unable to set empty track name
Also AudacityCommand dialogs now only show help button if there is help.
Also Track only shows track name over it, if there is a track name.
2018-03-25 13:43:49 +01:00
Paul Licameli
e5052a1973 Use a type distinction for key strings in normalized form...
... Such are not for display to the user.  They are appended to menu item
names to identify accelerators, and wxWidgets transforms them appropriately
for the operating system.
2018-02-25 14:56:17 -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
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
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
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
e2f0a16839 TrackButtonHandle keeps weak_ptr to the cell 2017-06-28 01:46:58 -04:00
Paul Licameli
708d84ac22 CommonTrackPanelCell::FindTrack returns shared_ptr 2017-06-27 23:09:35 -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
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
0e5e7b1c05 Move code for common track menu items 2017-06-15 08:21:37 -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
c3f5fea5fc TrackPanel still draws Miminize and Close, but no longer handles...
clicks on them...

... also implemented ESC key for those drags
2017-06-15 08:21:36 -04:00
Paul Licameli
f89cbefc7b Temporary hack lets us defer encapsulation of track control panel drawing...
... while we can work on encapsulating the click-drag actions.
2017-06-15 08:21:33 -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