ardour
|
#include <note_base.h>
Public Types | |
typedef Evoral::Note < Evoral::Beats > | NoteType |
Public Member Functions | |
NoteBase (MidiRegionView ®ion, bool, const boost::shared_ptr< NoteType > note=boost::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) |
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 |
float | mouse_x_fraction () const |
float | mouse_y_fraction () const |
const boost::shared_ptr< NoteType > | note () const |
MidiRegionView & | region_view () const |
bool | mouse_near_ends () const |
virtual bool | big_enough_to_trim () const |
Static Public Member Functions | |
static uint32_t | meter_style_fill_color (uint8_t vel, bool selected) |
static uint32_t | calculate_outline (uint32_t color, bool selected=false) |
calculate outline colors from fill colors of notes More... | |
Static Public Attributes | |
static PBD::Signal1< void, NoteBase * > | NoteBaseDeleted |
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 | |
MidiRegionView & | _region |
ArdourCanvas::Item * | _item |
ArdourCanvas::Text * | _text |
State | _state |
const boost::shared_ptr< NoteType > | _note |
bool | _with_events |
bool | _own_note |
bool | _selected |
bool | _valid |
float | _mouse_x_fraction |
float | _mouse_y_fraction |
Private Member Functions | |
bool | event_handler (GdkEvent *) |
Base class for canvas notes (sustained note rectangles and hit diamonds).
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 54 of file note_base.h.
typedef Evoral::Note<Evoral::Beats> NoteBase::NoteType |
Definition at line 57 of file note_base.h.
|
protected |
Enumerator | |
---|---|
None | |
Pressed | |
Dragging |
Definition at line 138 of file note_base.h.
NoteBase::NoteBase | ( | MidiRegionView & | region, |
bool | with_events, | ||
const boost::shared_ptr< NoteType > | note = boost::shared_ptr<NoteType>() |
||
) |
Definition at line 49 of file note_base.cc.
|
virtual |
Definition at line 63 of file note_base.cc.
uint32_t NoteBase::base_color | ( | ) |
Definition at line 159 of file note_base.cc.
|
virtual |
Reimplemented in Hit.
Definition at line 300 of file note_base.cc.
|
inlinestatic |
calculate outline colors from fill colors of notes
Definition at line 123 of file note_base.h.
|
private |
Definition at line 255 of file note_base.cc.
void NoteBase::hide_velocity | ( | ) |
Definition at line 113 of file note_base.cc.
void NoteBase::invalidate | ( | ) |
Definition at line 82 of file note_base.cc.
|
inline |
Definition at line 63 of file note_base.h.
|
inlinestatic |
Definition at line 106 of file note_base.h.
bool NoteBase::mouse_near_ends | ( | ) | const |
Definition at line 293 of file note_base.cc.
|
inline |
Definition at line 100 of file note_base.h.
|
inline |
Definition at line 101 of file note_base.h.
|
pure virtual |
|
inline |
Definition at line 103 of file note_base.h.
void NoteBase::on_channel_change | ( | uint8_t | channel | ) |
Channel changed for this specific event
Definition at line 137 of file note_base.cc.
void NoteBase::on_channel_selection_change | ( | uint16_t | selection | ) |
Channel selection changed
Definition at line 120 of file note_base.cc.
|
inline |
Definition at line 104 of file note_base.h.
|
inline |
Definition at line 74 of file note_base.h.
void NoteBase::set_item | ( | ArdourCanvas::Item * | ) |
Definition at line 71 of file note_base.cc.
|
protected |
Definition at line 189 of file note_base.cc.
void NoteBase::set_selected | ( | bool | yn | ) |
Definition at line 144 of file note_base.cc.
void NoteBase::show_velocity | ( | ) |
Definition at line 94 of file note_base.cc.
|
inline |
Definition at line 70 of file note_base.h.
void NoteBase::validate | ( | ) |
Definition at line 88 of file note_base.cc.
|
protected |
Definition at line 141 of file note_base.h.
|
protected |
Definition at line 149 of file note_base.h.
|
protected |
Definition at line 150 of file note_base.h.
|
protected |
Definition at line 144 of file note_base.h.
|
protected |
Definition at line 146 of file note_base.h.
|
protected |
Definition at line 140 of file note_base.h.
|
protected |
Definition at line 147 of file note_base.h.
|
protected |
Definition at line 143 of file note_base.h.
|
protected |
Definition at line 142 of file note_base.h.
|
protected |
Definition at line 148 of file note_base.h.
|
protected |
Definition at line 145 of file note_base.h.
|
static |
hue circle divided into 16 equal-looking parts, courtesy Thorsten Wilms
dividing the hue circle in 16 parts, hand adjusted for equal look, courtesy Thorsten Wilms
Definition at line 132 of file note_base.h.
|
static |
Definition at line 65 of file note_base.h.