Age | Commit message (Collapse) | Author |
|
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
|
|
Previously, calling `.right()` on a `Gfx::Rect` would return the last
column's coordinate still inside the rectangle, or `left + width - 1`.
This is called 'endpoint inclusive' and does not make a lot of sense for
`Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would
return 4 as its right side. This same problem exists for `.bottom()`.
This changes `Gfx::Rect` to be endpoint exclusive, which gives us the
nice property that `width = right - left` and `height = bottom - top`.
It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly
the same.
All users of `Gfx::Rect` have been updated accordingly.
|
|
Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.
Rewords a few actions and dialogs to use uniform language and
punctuation.
|
|
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.
This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.
From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
|
|
This makes Piano exactly as usable as when I started the large refactor
some years ago, which *sounds* like I'm a terrible person but now it (1)
looks nicer and (2) has a flexible backend that can already deal with
aribtrary kinds of processors on any track.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
|
|
This is not related to the track controls and it may move into another
separate widget in the future. The move also allows to simplify the
octave slider callback logic.
|
|
Includes shadowed variables and if-else return.
|
|
The current implementation could crash in various locations if the label
was null.
|
|
This more generic name will better reflect the purpose of the widget in
the future, as this commit begins the long process of enhancing the
widget into a container for all controls of Piano's currently selected
track.
|
|
This was a rather easy change, since only parameter names make use of
strings in the first place.
This also improves OOM resistance: If we can't create a parameter name,
we will just set it to the empty string.
|
|
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
|
|
|
|
On mouse move the pressed button is not present in the event argument
which causes the corresponding code to never fire. Instead it now stores
the original mouse down event and acts according to that on mouse move.
|
|
|
|
This exposes that the export is pretty slow, but it's much nicer than
having the GUI lock up for 20s :^)
|
|
Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
|
|
|
|
Those don't have any non-try counterpart, so we might as well just omit
it.
|
|
|
|
Rip that bandaid off!
This does the following, in one big, awkward jump:
- Replace all uses of `set_main_widget<Foo>()` with the `try` version.
- Remove `set_main_widget<Foo>()`.
- Rename the `try` version to just be `set_main_widget` because it's now
the only one.
The majority of places that call `set_main_widget<Foo>()` are inside
constructors, so this unfortunately gives us a big batch of new
`release_value_but_fixme_should_propagate_errors()` calls.
|
|
This instance was detected by searching for files that include
AK/StdLibExtraDetails.h, but don't match the regex:
\\b(AddConst|__AddConstToReferencedType|AddConstToReferencedType|AddLval
ueReference|__AddReference|AddRvalueReference|__AssertSize|AssertSize|__
CommonType|CommonType|__Conditional|Conditional|CopyConst|__Decay|Decay|
declval|DependentFalse|FalseType|__IdentityType|IdentityType|IndexSequen
ce|IntegerSequence|IntegralConstant|IsArithmetic|IsAssignable|IsBaseOf|I
sCallableWithArguments|IsClass|IsConst|IsConstructible|IsConvertible|IsC
opyAssignable|IsCopyConstructible|IsDestructible|IsEnum|__IsFloatingPoin
t|IsFloatingPoint|IsFunction|IsFundamental|IsHashCompatible|__IsIntegral
|IsIntegral|IsLvalueReference|IsMoveAssignable|IsMoveConstructible|IsNul
lPointer|IsOneOf|IsOneOfIgnoringCV|IsPOD|IsPointer|__IsPointerHelper|IsP
ointerOfType|IsRvalueReference|IsSame|IsSameIgnoringCV|IsSigned|IsSpecia
lizationOf|IsTrivial|IsTriviallyAssignable|IsTriviallyConstructible|IsTr
iviallyCopyable|IsTriviallyCopyAssignable|IsTriviallyCopyConstructible|I
sTriviallyDestructible|IsTriviallyMoveAssignable|IsTriviallyMoveConstruc
tible|IsUnion|IsUnsigned|IsVoid|MakeIndexSequence|MakeIntegerSequence|ma
ke_integer_sequence_impl|__MakeSigned|MakeSigned|__MakeUnsigned|MakeUnsi
gned|__RemoveConst|RemoveConst|RemoveCV|RemoveCVReference|__RemovePointe
r|RemovePointer|__RemoveReference|RemoveReference|__RemoveVolatile|Remov
eVolatile|TrueType|UnderlyingType|Void|VoidType)\\b
(Without the linebreaks.)
This regex is pessimistic, so there might be more files that don't
actually use any "detailed extra stdlib" functions.
In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
|
|
These instances were detected by searching for files that include
Array.h, but don't match the regex:
\\b(Array(?!\.h>)|iota_array|integer_sequence_generate_array)\\b
These are the three symbols defined by Array.h.
In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
|
|
In 7c5e30daaa615ad3a2ef55222423a747ac0a1227, the focus was "only" on
Userland/Libraries/, whereas this commit cleans up the remaining
headers in the repo, and any new badly-formatted include.
|
|
The audio player loop uses custom IPC plumbing to safely bypass any
event loop shenanigans. There is still work to be done, but this already
improves the realtime capabilities of Piano.
|
|
|
|
This makes Action shortcuts work again. :^)
`note_key_action()` and `special_key_action()` now return whether they
consumed the event. We don't even call them if any modifier keys were
held down, so things like `Ctrl+T` no longer play notes.
|
|
|
|
This is just two ints or 8 bytes or the size of the reference on
x86_64 or AArch64.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
Anything that handles audio in this way should run at maximum priority.
|
|
Therefore, we don't rely on LibDSP Processors to use allocation guards
themselves. It also demonstrates that nested allocation guards work
correctly :^)
|
|
:greenlinus:
|
|
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.
Also included are changes to readd now missing dependencies to tools
that actually need them.
|
|
|
|
The only remaining "manual" knob instatiation is the octave, which will
be moved into an entirely different UI in the future.
|
|
|
|
This is not the most useful keyboard binding anyways, plus it will be
extremely hacky to implement it with the generic processor parameter
widgets. Therefore, we'll get rid of it and add back a more generic
keyboard binding system later.
|
|
This automatically creates the correct collection of name label, value
label and "editor" (knob, checkbox, dropdown) depending on the processor
type and layouts them vertically.
|
|
This is for enum widgets; though positioning is not correct as
checkboxes need more options for text-less layout.
|
|
This is a temporary fix until we move AudioPlayerLoop to direct buffer
enqueuing.
|
|
This is a tangly commit and it fixes all the bugs that a plain move
would have caused (i.e. we need to touch other logic which had wrong
assumptions).
|