Commit Graph

133 Commits

Author SHA1 Message Date
Paul Licameli 2527bdecaf Add and correct various comments 2020-05-23 06:00:56 -04:00
Paul Licameli d373e27840 Remove some unused forward declarations and #include directives 2020-05-23 05:32:01 -04:00
Paul Licameli 580ad8221e Mutable cache for ruler updates, so Draw functions can be const 2020-01-23 13:51:12 -05:00
Paul Licameli 99064d6dd5 Mutable cache for Ruler's chosen fonts 2020-01-23 13:35:32 -05:00
Paul Licameli 21306d6186 Remove indirection storing number scale in Ruler 2020-01-23 13:27:05 -05:00
Paul Licameli fec3b11674 Demote more of the ruler updating procedure into Updater 2020-01-23 13:18:47 -05:00
Paul Licameli fe4db0dd8e Nix Ruler member vars used only for grid drawing; more const methods 2020-01-23 12:56:11 -05:00
Paul Licameli ec723466ba Invalidate Ruler, whenever anything the Updater uses is reassigned 2020-01-22 13:38:37 -05:00
Paul Licameli b0154f89e0 Move Tick and TickCustom methods to temporary worker structure...
... which forces us to be more explicit about just what parts of the Ruler
state are used in it (when we construct it) and be sure they don't modify it
2020-01-22 13:38:34 -05:00
Paul Licameli 8cf7d0b8e9 Make Ruler::Tick and TickCustom const member functions...
... on the way to making them not (direct) member functions of Ruler.

Hoist the choice of font and destination label array out of them, and
group other outputs into an argument.
2020-01-22 12:51:08 -05:00
Paul Licameli e08543650b Factor function to choose ruler fonts 2020-01-22 12:09:52 -05:00
Paul Licameli 3876031669 Group ruler fonts and lead into a structure 2020-01-22 12:09:52 -05:00
Paul Licameli 80f884b0b7 Don't need extra indirection handling wxFont, see documentation of it 2020-01-22 12:09:52 -05:00
Paul Licameli a14d5c348a Eliminate Ruler::mDC 2020-01-21 19:58:05 -05:00
Paul Licameli 3a64b172c8 Demote duplicated code in Ruler into a static function 2020-01-21 19:36:02 -05:00
Paul Licameli 8729f3fb8e Simplify Ruler with std::vector members 2020-01-21 16:07:27 -05:00
Paul Licameli 7682961f53 Remove unused members of Ruler 2020-01-21 15:17:51 -05:00
Paul Licameli a84391b4a2 Eliminate some members from Ruler...
... Move some fields used only during formatting into a temporary structure.

(And fixing a minor problem with uninitialized variables in case of logarithmic
scale, which made it unpredictable how Plot Spectrum with logarithmic
frequencely axis formatted numbers.)
2020-01-21 12:53:33 -05:00
Paul Licameli 6e14d2e56c RulerPanel uses TranslatableString for units string...
... also fixing missed translation of "k" in spectrum vertical ruler
2019-12-28 23:49:18 -05:00
Paul Licameli 46bf5a82fc Don't pass whole TimeTrack to Ruler or Mixer...
... they need only the information in a (Bounded)Envelope.
2019-06-10 20:48:38 -04:00
Paul Licameli 2e1fe80601 Remove or comment wxPanelWrapper.h in headers 2019-04-04 10:13:23 -04:00
Paul Licameli 77f747daeb Remove wx/{checklst,wfstream,version,variant,types}.h from *.h 2019-03-30 12:59:21 -04:00
Paul Licameli 4d29686116 Remove wx/gdicmn.h from headers 2019-03-30 11:52:48 -04:00
Paul Licameli ec2f26e48c Remove wx/pen.h, wx/thread.h from headers 2019-03-30 10:17:18 -04:00
Paul Licameli 70e88782fe Remove wx/{grid,font,ffile,colour,button,bmpbuttn}.h from headers 2019-03-28 12:27:10 -04:00
Paul Licameli 906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli 303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00
Paul Licameli 22f85f244b Bug1917: TrackPanel should keep focus after click or drag...
... though ruler won't, and if you start to drag in TrackPanel but abort it
with the ESC key, that too returns focus
2018-08-07 10:42:38 -04:00
Paul Licameli 7cfda551dd Move scrub click handling into a UIHandle, eliminate OnMouseEvents...
... And the one-shot hack can be simplified away.
2018-08-05 17:18:25 -04:00
Paul Licameli 153eb63b3e Rest of quick play mouse handling is invoked from UIHandle...
... and ESC key aborts the drag of play region
2018-08-05 17:18:25 -04:00
Paul Licameli 9491605cfc CellularPanel handles save/restore of focus for clicks in ruler...
... This lets the ESC key really work to abort drags
2018-08-05 17:18:25 -04:00
Paul Licameli 0ae7f55fea Manage showing and hiding of quick play guide in CellularPanel base 2018-08-05 17:18:25 -04:00
Paul Licameli af17e1ff95 Quick-play handle object manages lifetime of SnapManager 2018-08-05 17:18:24 -04:00
Paul Licameli a70e2284b0 Manage ruler status messages and tooltips in CellularPanel base class 2018-08-05 17:18:24 -04:00
Paul Licameli ba4ae4f7bd Manage ruler cursor changes in CellularPanel base class 2018-08-05 17:18:24 -04:00
Paul Licameli a853b7a3b4 Skeletal hit test and handle objects for quick play and scrubbing 2018-08-05 17:18:23 -04:00
Paul Licameli bccb135e30 AdornedRulerPanel inherits from CellularPanel -- hit testing, still to do 2018-08-05 17:18:23 -04:00
Paul Licameli aeece118e8 Rewrite the handling of quick play indicators...
... All updates of position are done in DoGetRectangle().  Ruler need only
expose one function, DrawOverlays().

Don't redraw indicators twice when dragging (hiding and showing again), making
some flicker.  Just do one update.
2018-08-04 15:35:36 -04:00
Paul Licameli b33d3516f0 Rename a function in AdornedRulerPanel...
... Avoid confustion of "capture" meaning recording, with "capture" of the
mouse during drag
2018-07-29 14:18:08 -04:00
Paul Licameli 70f27d41d3 Rewrite AdornedRulerPanel with one less friend 2018-07-06 21:11:48 -04:00
James Crook b60fae4470 Fix some warnings on mac
These are mostly missing 'overrides'
2018-04-07 20:28:27 +01:00
James Crook 8ce8e7bcce Bug 521 - Lower half of Waveform (dB) vertical scale does not show dB level.
Added a DbMirrorValue for two sided dB scale on Waveform VRuler when in dB view mode.
2018-03-24 20:35:08 +00:00
Paul Licameli ab5ff9060b More constructor arguments for RulerPanel 2018-02-21 19:21:03 -05:00
James Crook a49f14ad02 doxygen. Class list completed for letter 'A'. 2017-11-09 18:32:29 +00:00
Paul Licameli f4c3f19dd1 Bug1520: Correct TQP when snap-to-nearest second & region selection 2017-07-22 19:44:09 -04:00
James Crook 2a043c0b35 Add settable ruler colouring. 2017-04-26 22:32:09 +01:00
Paul Licameli 0113e6f44f Remove naked new[] in: ondemand, toolbars, widgets 2017-03-17 17:52:45 -04:00
Steve Daulton e239efe486 Fix bug 1531 2016-10-23 22:10:38 +01:00
James Crook f9d269bcee Change ScrubBar to ScrubRuler
This also makes it clearer in the code when we are dealing with a Toolbar ID (for the scrubbing toolbar) and when we are dealing with a button ID (for enabling/disabling the scrub ruler).
2016-08-22 12:25:36 +01:00
James Crook 59988357fb Change default state of scrub bar. Make Togglable via QP.
1) Enable scrub bar by default, to increase visibility of the new feature.
2) Add 'Enable/Disable Scrub Bar' to QP right click menu.

Did not remove Scrubbing from transport menu, as to do so disables scrubbing.
2016-08-20 16:02:06 +01:00