mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a method MidiKeyboardComponent::getTotalKeyboardWidth()
This commit is contained in:
parent
beac2e4b3a
commit
5cdd56065d
2 changed files with 10 additions and 0 deletions
|
|
@ -270,6 +270,13 @@ int MidiKeyboardComponent::getKeyStartPosition (const int midiNoteNumber) const
|
|||
return x;
|
||||
}
|
||||
|
||||
int MidiKeyboardComponent::getTotalKeyboardWidth() const noexcept
|
||||
{
|
||||
int x, w;
|
||||
getKeyPos (rangeEnd, x, w);
|
||||
return x + w;
|
||||
}
|
||||
|
||||
int MidiKeyboardComponent::getNoteAtPosition (Point<int> p)
|
||||
{
|
||||
float v;
|
||||
|
|
|
|||
|
|
@ -209,6 +209,9 @@ public:
|
|||
*/
|
||||
int getKeyStartPosition (int midiNoteNumber) const;
|
||||
|
||||
/** Returns the total width needed to fit all the keys in the available range. */
|
||||
int getTotalKeyboardWidth() const noexcept;
|
||||
|
||||
/** Returns the key at a given coordinate. */
|
||||
int getNoteAtPosition (Point<int> position);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue