Guitar
Object Hierarchy:
Description:
public class Guitar : DrawingArea
Content:
Classes:
Properties:
- public bool auto_update { get; set; }
Auto-redraw when a note is added (disable for manual management)
- public bool detailed_labels { get; set; }
Show octaves in labels (e.g.: E4)
- public RGBA fret_color { get; set; }
Fret color as a RGBA array of floats
- public HashSet<GuitarFretMark> fret_marks { get; set; }
Collection of fret marks
- public ushort fret_number { get; set; }
Number of frets
- public RGBA grid_bg_color { get; set; }
Grid background color as a RGBA array of floats
- public ArrayList<GuitarString> guitar_strings { get; set; }
Collection of strings
- public bool highlight_first_fret { get; set; }
Draw additional line in 1st fret
- public bool show_labels { get; set; }
Render string labels (e.g.: EADGBE)
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 guitar widget
- public HashSet<GuitarPosition>? find_positions (string note)
Find all positions of a given note
- public void mark_note (string note, RGBA color = {0.0f, 0.0f, 0.0f, 1.0f})
Highlight all positions corresponding to a note
- public void mark_position (ushort string_index, ushort fret_index, RGBA color = {0.0f, 0.0f, 0.0f, 1.0f})
Highlight a position (string and fret) in the instrument
- public short note_position_in_string (ushort string_index, string note)
Compute the fret index to accomplish a given note in a given string
- public ushort position_to_midi (GuitarPosition position)
Get a MIDI code from a guitar position
- public string position_to_note (GuitarPosition position)
Convenient function for getting a note name from a guitar position
- public void redraw ()
Force a complete redraw of the widget
- public override void size_allocate (Allocation allocation)
- public void start_animation ()
Start the animation on strings set to vibrate
- public void stop_animation ()
Stop the string vibration animation
- public void unmark_all ()
Remove all marked notes in the Guitar view
- public void unmark_note (string note)
Remove the marks in all positions corresponding to a note
- public void unmark_position (ushort string_index, ushort fret_index)
Remove the mark of a position (string and fret) in the instrument
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