Paul Licameli
2a1bf3a77f
More std:: style for wxString...
...
... Remove all uses of the three-valued Cmp comparison member function, which
returns 0 for equality, except in one place. Use operators == and != instead.
(C++20's spaceship operator hasn't landed here yet!)
2019-03-10 14:45:20 -04:00
Paul Licameli
dd8eb9e3d9
Less use of wxArrayString::Index() ...
...
... instead use the utility make_iterator_range and its index() or contains()
method. This generic utility works with any container defining begin() and
end().
This further lessens dependency on wxWidgets container idioms.
2019-03-10 14:45:06 -04:00
Paul Licameli
c68e336247
More use of std:: style members of wxString...
...
... replacing:
Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0
Use standard library style members of wxArrayString (and wxString) ...
...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes
for wxString,
IsEmpty => empty
Clear => clear
Alloc => reserve
for wxArrayString,
Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli
caab0a5a4d
std::vector<int> replaces wxArrayInt, again
...
see also 8be1e8fdad
2019-03-09 12:02:13 -05:00
Paul Licameli
f2405f3023
rename a function
2019-03-09 12:02:13 -05:00
Steve Daulton
03b82618b2
Fix typo error in SetProjectCommand
...
Error was introduced in cb55164c43
.
2018-12-04 17:32:13 +00:00
James Crook
465148cb3e
Bug 2039 - Macros: Reload parameter not remembered.
...
This arose from the conversion from optional parameters to required parameters.
The same problem was found in Screenshot command and in open/save command.
2018-11-27 13:23:32 +00:00
Steve Daulton
520659f0de
Update VRulers after macro vzoom command
2018-11-12 01:37:11 +00:00
Steve Daulton
42e0cd7f25
Add 'vzoom' and 'kind' to GetInfo Tracks
2018-11-11 20:00:18 +00:00
Steve Daulton
277473f0de
Add min and max VZoom to SetTrackInfoCommand
2018-11-11 16:57:36 +00: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
James Crook
c79d65cdeb
Bug 2019 - Scriptables: Set Envelope allows envelope points at zero which can cause NaNs
2018-10-29 19:59:29 +00:00
Paul Licameli
87592cc89b
Remove unused (and unintended) overload of Items
2018-10-29 13:32:44 -04:00
James Crook
76166135d4
Fix many MSVC compiler warnings.
2018-10-29 13:19:33 +00: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
e048a4aacd
Move a static function and an enumeration out of MenuCommandHandler
2018-10-24 12:16:46 -04:00
Paul Licameli
9759c6bd4f
Plugin Menus
2018-10-24 12:16:44 -04:00
Paul Licameli
2792faa114
Edit and Label Menus
2018-10-24 12:14:05 -04:00
Paul Licameli
d1e2ec3b0f
Remove some uses of MenuCommandHandler outside Menus.cpp...
...
... where the functions were simple call-throughs to something else
2018-10-24 11:02:32 -04:00
Steve Daulton
388cf47a92
Update SetLabelCommand.cpp
...
SetLabels: command may put labels out of order, so sort them after.
2018-10-22 17:59:14 +01:00
Paul Licameli
d40dfa2de2
More comments explaining the C++11 exotica
2018-10-21 12:46:41 -04:00
Paul Licameli
e756f2e71c
Define classes and interpreter to be used in menu definition tables
2018-10-21 12:16:22 -04:00
Paul Licameli
5277584bb0
Hide details of managing occult command items
2018-10-20 14:19:58 -04:00
Paul Licameli
01875db4bd
Don't hold a dangling pointer to a menu bar in CommandManager
2018-10-20 12:53:03 -04:00
Paul Licameli
fefc3bf35d
Don't call CommandManger::AddGlobalCommand, use an option instead
2018-10-20 11:59:39 -04:00
Paul Licameli
c9d9871f6c
Remove a comment
2018-10-20 11:58:02 -04:00
Paul Licameli
7f5e6d12b1
Only one public CommandManager fn to begin a menu and one to end...
...
... It knows the nesting, so it decides for itself whether to manage the menu
as main or sub-.
2018-10-20 09:40:03 -04:00
Paul Licameli
83ede10891
Remove unused forward declaration
2018-10-20 09:21:22 -04:00
Paul Licameli
27aa59ed50
AddItemList takes IdentInterfaceSymbol (untranslated) ...
...
... so that we can use a static constant table of names, which can't use
macro _ in initializers.
2018-10-20 09:21:22 -04:00
Steve Daulton
f09bfbc217
Small change of format for GetInfo Labels
...
to make parsing a bit easier in LISP
2018-10-18 22:56:02 +01:00
Paul Licameli
16ab48079b
Don't include CommandManager.h in other headers
2018-10-18 09:25:14 -04:00
Paul Licameli
fc1bc7994e
Remove CommandManager::SetDefaultFlags and related
2018-10-17 23:14:55 -04:00
Paul Licameli
a1bd9062ae
Remove dead code; so that all remaining calls to NewIdentifier...
...
...are followed by a setting of flags and mask
2018-10-17 23:13:56 -04:00
Paul Licameli
63f20f3405
CommandManager::AddItemList requires flags
2018-10-17 23:13:56 -04:00
Paul Licameli
742e578d49
Flags in AddItem (and AddCommand) may not be NoFlagsSpecified
2018-10-17 23:13:56 -04:00
Paul Licameli
db997f8ecd
Flags argument of AddItem (and AddCommand) is obligatory
2018-10-17 23:13:56 -04:00
Paul Licameli
596eefe675
CommandManager::Options also specified the long name
2018-10-17 13:49:43 -04:00
Paul Licameli
cfe7ddcf55
struct CommandManager::Options lets us fold AddCheck into AddItem
2018-10-17 13:32:39 -04:00
Paul Licameli
de4132d66c
Reorder accel argument and unify two overloads of AddItem
2018-10-17 13:32:36 -04:00
Paul Licameli
c376ffb165
Simplify calls to SetDefaultFlags: default mask to equal flags
2018-10-17 13:21:00 -04:00
Paul Licameli
42aef9f3e8
Mask != flags is unusual: simplify most AddItem/AddCheck...
...
... and the no longer used AddCommand.
There are only four exceptions, all using NoAutoSelect in the flags and not in
the mask.
2018-10-17 13:20:58 -04:00
Paul Licameli
399e2d099d
Fix spelling in an enum constant name
2018-10-17 12:53:25 -04:00
Paul Licameli
88c67c46f3
Unify the two overloads of CommandManager::AddCheck
2018-10-17 12:53:25 -04:00
Paul Licameli
fef9e2abac
Remove some unused things
2018-10-17 12:53:25 -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
fc6570646d
MenuCommandHandler is not a base class of MenuManager...
...
... This forces a better placement of state variables in the appropriate
classes.
In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
James Crook
51b3076786
Fix include path
2018-10-16 13:01:22 +01:00
Steve Daulton
cb55164c43
Add Project Rate to SetProjectCommand
2018-10-15 23:51:41 +01:00
Paul Licameli
ef97ce88ca
Correct more double spaces
2018-10-15 12:54:44 -04:00