AgsGui.Piano¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Orientable (2)
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The base key code |
||
r/w |
The base note to use as lower |
||
r/w |
The count of keys to draw |
||
r/w |
The key height to use for drawing |
||
r/w |
The key width to use for drawing |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
active_key |
r |
||
active_key_count |
r |
||
base_key_code |
r |
||
base_note |
r |
||
button_state |
r |
||
current_key |
r |
||
cursor_position |
r |
||
flags |
r |
||
font_size |
r |
||
key_count |
r |
||
key_height |
r |
||
key_width |
r |
||
orientation |
r |
||
widget |
r |
Class Details¶
- class AgsGui.Piano(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod key_code_to_note(key_code)¶
-
Get note from key code.
New in version 3.0.0.
- classmethod new(orientation, key_width, key_height)¶
- Parameters:
orientation (
Gtk.Orientation
) – theGtk.Orientation
key_width (
int
) – the width of one keykey_height (
int
) – the height of one key
- Returns:
the new
AgsGui.Piano
instance- Return type:
Create a new instance of
AgsGui.Piano
.New in version 3.0.0.
- get_active_key(active_key_count)¶
- Parameters:
active_key_count (
int
) – return location of count of active keys- Returns:
the active keys as
int
array- Return type:
Get active keys.
New in version 3.0.0.
- get_base_key_code()¶
- Returns:
the base key code
- Return type:
Get base key code of self.
New in version 3.2.0.
- get_base_note()¶
- Returns:
the base note
- Return type:
Get base note of self.
New in version 3.2.0.
- get_button_state()¶
- Returns:
the button state
- Return type:
Get mouse button state of self.
New in version 3.6.6.
- get_key_count()¶
- Returns:
the key count
- Return type:
Get key count of self.
New in version 3.2.0.
- get_key_height()¶
- Returns:
the key height
- Return type:
Get key height of self.
New in version 3.2.0.
- get_key_width()¶
- Returns:
the key width
- Return type:
Get key width of self.
New in version 3.2.0.
- key_clicked(note, key_code)¶
-
Emits
::key-clicked
event.New in version 3.0.0.
- key_pressed(note, key_code)¶
-
Emits
::key-pressed
event.New in version 3.0.0.
- key_released(note, key_code)¶
-
Emits
::key-released
event.New in version 3.0.0.
- set_base_key_code(base_key_code)¶
- Parameters:
base_key_code (
int
) – the base key code
Set base key code of self.
New in version 3.2.0.
- set_base_note(base_note)¶
- Parameters:
base_note (
str
) – the base note
Set base note of self.
New in version 3.2.0.
- set_button_state(button_state)¶
- Parameters:
button_state (
int
) – theAgsGui.PianoButtonState
-enum
Set button_state of self.
New in version 3.6.6.
- set_key_count(key_count)¶
- Parameters:
key_count (
int
) – the key count
Set key count of self.
New in version 3.2.0.
- set_key_height(key_height)¶
- Parameters:
key_height (
int
) – the key width
Set key width of self.
New in version 3.2.0.
- set_key_width(key_width)¶
- Parameters:
key_width (
int
) – the base note
Set key width of self.
New in version 3.2.0.
- do_key_clicked(note, key_code) virtual¶
-
Emits
::key-clicked
event.New in version 3.0.0.
- do_key_pressed(note, key_code) virtual¶
-
Emits
::key-pressed
event.New in version 3.0.0.
- do_key_released(note, key_code) virtual¶
-
Emits
::key-released
event.New in version 3.0.0.
Signal Details¶
- AgsGui.Piano.signals.key_clicked(piano, note, key_code)¶
- Signal Name:
key-clicked
- Flags:
- Parameters:
piano (
AgsGui.Piano
) – The object which received the signalnote (
str
) – the note as stringkey_code (
int
) – the numeric representation of the note
The
::key-clicked
signal notifies about key clicked.New in version 3.0.0.
- AgsGui.Piano.signals.key_pressed(piano, note, key_code)¶
- Signal Name:
key-pressed
- Flags:
- Parameters:
piano (
AgsGui.Piano
) – The object which received the signalnote (
str
) – the note as stringkey_code (
int
) – the numeric representation of the note
The
::key-pressed
signal notifies about key pressed.New in version 3.0.0.
- AgsGui.Piano.signals.key_released(piano, note, key_code)¶
- Signal Name:
key-released
- Flags:
- Parameters:
piano (
AgsGui.Piano
) – The object which received the signalnote (
str
) – the note as stringkey_code (
int
) – the numeric representation of the note
The
::key-released
signal notifies about key released.New in version 3.0.0.
Property Details¶
- AgsGui.Piano.props.base_key_code¶
-
The base key code.
New in version 3.0.0.
- AgsGui.Piano.props.base_note¶
-
The base note to use as lower.
New in version 3.0.0.
- AgsGui.Piano.props.key_count¶
-
The count of keys to be drawn.
New in version 3.0.0.
- AgsGui.Piano.props.key_height¶
-
The key height to use for drawing a key.
New in version 3.0.0.