Piano
Object Hierarchy:
Description:
public class Piano : DrawingArea
Content:
Classes:
Enums:
Properties:
- public RGBA accident_key_color { get; set; }
RGBA color used to draw accident keys
- public bool auto_update { get; set; }
Automatically redraw the piano whenever there's a change
- public bool detailed_labels { get; set; }
Show octaves should be added in labels (e.g. E4)
- public ushort first_note { get; set; }
MIDI Code of the first key's note (Defaults to C2)
- public ushort key_count { get; set; }
Number of keys
- public LabelPosition labels_position { get; set; }
Labels position
- public RGBA nat_key_color { get; set; }
RGBA color used to draw natural keys
- public bool show_labels { get; set; }
Whether note names should be drawn
Creation methods:
Methods:
- public override bool button_press_event (EventButton event)
Customized button_press_event
- public override bool button_release_event (EventButton event)
Customized button_released_event
- public override bool draw (Context cr)
Draw the piano widget
- public HashSet<ushort>? find_positions (string note)
Find all MIDI codes for a given note
- public void mark_midi (ushort midi_note, RGBA color = {0.0f, 0.0f, 0.5f, 1.0f})
Highlight a key corresponding to a MIDI code
- public void mark_note (string note, RGBA color = {0.0f, 0.0f, 0.5f, 1.0f})
Highlight all positions corresponding to a note
- public double midi_to_x (ushort midi_code)
Get the x coordinate of the key associated to a given MIDI code
- public ushort point_to_midi (double x, double y) throws PianoError
Get the MIDI code corresponding to a point (x,y) in the widget
- public void redraw ()
Force a complete redraw of the widget
- public override void size_allocate (Allocation allocation)
- public void unmark_all ()
Remove all marked notes in the Piano view
- public void unmark_midi (ushort midi_note)
Remove the mark of a position in the instrument
- public void unmark_note (string note)
Remove the marks in all positions corresponding to a note
Signals:
Fields:
Inherited Members:
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
- add_child
- construct_child
- custom_finished
- custom_tag_end
- custom_tag_start
- get_internal_child
- get_name
- parser_finished
- set_buildable_property
- set_name