Ardour
9.0-pre0-582-g084a23a80d
|
#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_change (uint8_t channel) |
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 & | region_view () const |
bool | mouse_near_ends () const |
virtual bool | big_enough_to_trim () const |
Static Public Member Functions | |
static uint32_t | base_color (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 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... | |
Protected Types | |
enum | State { None , Pressed , Dragging } |
Protected Member Functions | |
void | set_mouse_fractions (GdkEvent *) |
Protected Attributes | |
MidiView & | _region |
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 58 of file note_base.h.
Definition at line 67 of file note_base.h.
|
private |
Enumerator | |
---|---|
Selected | |
HideSelection |
Definition at line 61 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 124 of file note_base.h.
|
private |
void NoteBase::hide_velocity | ( | ) |
void NoteBase::invalidate | ( | ) |
|
inline |
Definition at line 73 of file note_base.h.
|
static |
bool NoteBase::mouse_near_ends | ( | ) | const |
|
inline |
Definition at line 113 of file note_base.h.
|
inline |
Definition at line 114 of file note_base.h.
|
pure virtual |
|
inline |
Definition at line 116 of file note_base.h.
void NoteBase::on_channel_change | ( | uint8_t | channel | ) |
Channel changed for this specific event
void NoteBase::on_channel_selection_change | ( | uint16_t | selection | ) |
Channel selection changed
|
inline |
Definition at line 117 of file note_base.h.
|
inline |
Definition at line 82 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 110 of file note_base.h.
void NoteBase::show_velocity | ( | ) |
|
inline |
Definition at line 78 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.
|
protected |
Definition at line 141 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 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 133 of file note_base.h.
|
staticprivate |
Definition at line 160 of file note_base.h.