|
Ardour
9.2-541-gc1841a13dd
|
#include <note_base.h>
Public Types | |
| typedef Evoral::Note< Temporal::Beats > | NoteType |
Public Member Functions | |
| NoteBase (MidiView ®ion, bool, const std::shared_ptr< NoteType > note=std::shared_ptr< NoteType >()) | |
| virtual | ~NoteBase () |
| void | set_item (ArdourCanvas::Item *) |
| ArdourCanvas::Item * | item () const |
| virtual void | show ()=0 |
| virtual void | hide ()=0 |
| bool | valid () const |
| void | invalidate () |
| void | validate () |
| bool | selected () const |
| void | set_selected (bool yn) |
| void | set_hide_selection (bool yn) |
| virtual void | move_event (double dx, double dy)=0 |
| uint32_t | base_color () |
| void | show_velocity () |
| void | hide_velocity () |
| void | on_channel_selection_change (uint16_t selection) |
| virtual void | set_outline_color (uint32_t c)=0 |
| virtual void | set_fill_color (uint32_t c)=0 |
| virtual void | set_ignore_events (bool ignore)=0 |
| virtual ArdourCanvas::Coord | x0 () const =0 |
| virtual ArdourCanvas::Coord | y0 () const =0 |
| virtual ArdourCanvas::Coord | x1 () const =0 |
| virtual ArdourCanvas::Coord | y1 () const =0 |
| virtual void | set_velocity (double) |
| virtual double | visual_velocity () const =0 |
| float | mouse_x_fraction () const |
| float | mouse_y_fraction () const |
| const std::shared_ptr< NoteType > | note () const |
| MidiView & | midi_view () const |
| bool | mouse_near_ends () const |
| virtual bool | big_enough_to_trim () const |
Static Public Member Functions | |
| static uint32_t | base_color (int pitch, int velocity, ARDOUR::ColorMode color_mode, Gtkmm2ext::Color, int channel, bool selected) |
| static void | set_colors () |
| static Gtkmm2ext::Color | meter_style_fill_color (uint8_t vel, bool selected) |
| static Gtkmm2ext::Color | selected_color () |
| static uint32_t | calculate_outline (uint32_t color, bool showing_selection=false) |
| calculate outline colors from fill colors of notes More... | |
Static Public Attributes | |
| static const uint32_t | midi_channel_colors [16] |
| hue circle divided into 16 equal-looking parts, courtesy Thorsten Wilms More... | |
| static std::vector< uint32_t > | pitch_colors |
Protected Types | |
| enum | State { None , Pressed , Dragging } |
Protected Member Functions | |
| void | set_mouse_fractions (GdkEvent *) |
Protected Attributes | |
| MidiView & | _view |
| ArdourCanvas::Item * | _item |
| ArdourCanvas::Text * | _text |
| State | _state |
| const std::shared_ptr< NoteType > | _note |
| bool | _with_events |
| bool | _own_note |
| Flags | _flags |
| bool | _valid |
| float | _mouse_x_fraction |
| float | _mouse_y_fraction |
Private Types | |
| enum | Flags { Selected = 0x1 , HideSelection = 0x2 } |
Private Member Functions | |
| bool | event_handler (GdkEvent *) |
Static Private Attributes | |
| static Gtkmm2ext::Color | _selected_col |
| static Gtkmm2ext::SVAModifier | color_modifier |
| static Gtkmm2ext::Color | velocity_color_table [128] |
| static bool | _color_init |
Base class for canvas notes (sustained note rectangles, percussive hit diamonds, and velocity lollipops)
This is not actually a canvas item itself to avoid the dreaded diamond inheritance pattern, since various types of canvas items (Note (rect), Hit (diamond), etc) need to share this functionality but can't share an ancestor.
Note: Because of this, derived classes need to manually bounce events to on_event, it won't happen automatically.
Definition at line 59 of file note_base.h.
Definition at line 68 of file note_base.h.
|
private |
| Enumerator | |
|---|---|
| Selected | |
| HideSelection | |
Definition at line 62 of file note_base.h.
|
protected |
| Enumerator | |
|---|---|
| None | |
| Pressed | |
| Dragging | |
Definition at line 139 of file note_base.h.
| NoteBase::NoteBase | ( | MidiView & | region, |
| bool | , | ||
| const std::shared_ptr< NoteType > | note = std::shared_ptr< NoteType >() |
||
| ) |
|
virtual |
| uint32_t NoteBase::base_color | ( | ) |
|
static |
|
virtual |
Reimplemented in Hit.
|
inlinestatic |
calculate outline colors from fill colors of notes
Definition at line 123 of file note_base.h.
|
private |
| void NoteBase::hide_velocity | ( | ) |
| void NoteBase::invalidate | ( | ) |
|
inline |
Definition at line 74 of file note_base.h.
|
static |
|
inline |
Definition at line 115 of file note_base.h.
| bool NoteBase::mouse_near_ends | ( | ) | const |
|
inline |
Definition at line 111 of file note_base.h.
|
inline |
Definition at line 112 of file note_base.h.
|
pure virtual |
|
inline |
Definition at line 114 of file note_base.h.
| void NoteBase::on_channel_selection_change | ( | uint16_t | selection | ) |
Channel selection changed
|
inline |
Definition at line 83 of file note_base.h.
|
inlinestatic |
Definition at line 120 of file note_base.h.
|
static |
| void NoteBase::set_hide_selection | ( | bool | yn | ) |
| void NoteBase::set_item | ( | ArdourCanvas::Item * | ) |
|
protected |
| void NoteBase::set_selected | ( | bool | yn | ) |
|
inlinevirtual |
Reimplemented in Note.
Definition at line 108 of file note_base.h.
| void NoteBase::show_velocity | ( | ) |
|
inline |
Definition at line 79 of file note_base.h.
| void NoteBase::validate | ( | ) |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
staticprivate |
Definition at line 161 of file note_base.h.
|
protected |
Definition at line 148 of file note_base.h.
|
protected |
Definition at line 142 of file note_base.h.
|
protected |
Definition at line 150 of file note_base.h.
|
protected |
Definition at line 151 of file note_base.h.
|
protected |
Definition at line 145 of file note_base.h.
|
protected |
Definition at line 147 of file note_base.h.
|
staticprivate |
Definition at line 158 of file note_base.h.
|
protected |
Definition at line 144 of file note_base.h.
|
protected |
Definition at line 143 of file note_base.h.
|
protected |
Definition at line 149 of file note_base.h.
|
protected |
Definition at line 141 of file note_base.h.
|
protected |
Definition at line 146 of file note_base.h.
|
staticprivate |
Definition at line 159 of file note_base.h.
|
static |
hue circle divided into 16 equal-looking parts, courtesy Thorsten Wilms
Definition at line 132 of file note_base.h.
|
static |
Definition at line 133 of file note_base.h.
|
staticprivate |
Definition at line 160 of file note_base.h.