[−][src]Struct piano_keyboard::KeyboardBuilder
The central builder to create a keyboard.
Methods
impl KeyboardBuilder
[src]
pub fn new() -> KeyboardBuilder
[src]
pub fn standard_piano(self, nr_of_keys: u8) -> Result<KeyboardBuilder, String>
[src]
Define a standard piano with 25/37/49/61/64/73/76 or 88 keys.
pub fn is_rd64(self) -> KeyboardBuilder
[src]
pub fn set_most_left_right_white_keys(
self,
left_white_key: u8,
right_white_key: u8
) -> Result<KeyboardBuilder, String>
[src]
self,
left_white_key: u8,
right_white_key: u8
) -> Result<KeyboardBuilder, String>
The keys are defined by MIDI key codes. This means the values have to be in range 0..128, with 0 representing C_-1. Thus the default 88 keyboard uses key codes 21 (A_0) to 108 (C_8).
pub fn set_width(self, width: u16) -> Result<KeyboardBuilder, String>
[src]
Sets the desired keyboard width in pixels.
pub fn white_black_gap_present(self, gap_present: bool) -> KeyboardBuilder
[src]
pub fn build2d(self) -> Keyboard2d
[src]
Final build the keyboard, which means to perform all calculations and create all the elements.
Auto Trait Implementations
impl RefUnwindSafe for KeyboardBuilder
impl Send for KeyboardBuilder
impl Sync for KeyboardBuilder
impl Unpin for KeyboardBuilder
impl UnwindSafe for KeyboardBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,