Ardour  9.0-pre0-1320-gf48fe3f740
MidiViewBackground Class Referenceabstract

#include <midi_view_background.h>

Inheritance diagram for MidiViewBackground:
[legend]

Classes

struct  NoteRangeSuspender
 

Public Types

enum  VisibleNoteRange { FullRange , ContentsRange }
 
enum  RangeCanMove { CanMoveTop = 0x1 , CanMoveBottom = 0x2 }
 

Public Member Functions

 MidiViewBackground (ArdourCanvas::Item *parent, EditingContext &ec)
 
 ~MidiViewBackground ()
 
ARDOUR::NoteMode note_mode () const
 
void set_note_mode (ARDOUR::NoteMode nm)
 
ARDOUR::ColorMode color_mode () const
 
void set_color_mode (ARDOUR::ColorMode)
 
Gtkmm2ext::Color region_color () const
 
void set_note_visibility_range_style (VisibleNoteRange r)
 
VisibleNoteRange visibility_range_style () const
 
uint8_t lowest_note () const
 
uint8_t highest_note () const
 
void maybe_extend_note_range (uint8_t note_num)
 
int note_height () const
 
int note_to_y (uint8_t note) const
 
uint8_t y_to_note (int y) const
 
uint8_t contents_note_range () const
 
void apply_note_range (uint8_t lowest, uint8_t highest, bool to_children, RangeCanMove=RangeCanMove(CanMoveTop|CanMoveBottom))
 
void maybe_apply_note_range (uint8_t lowest, uint8_t highest, bool to_children, RangeCanMove=RangeCanMove(CanMoveTop|CanMoveBottom))
 
virtual int y_position () const
 
virtual uint8_t get_preferred_midi_channel () const =0
 
virtual void set_note_highlight (bool)=0
 
virtual void record_layer_check (std::shared_ptr< ARDOUR::Region >, samplepos_t)=0
 
virtual void set_size (int w, int h)
 
virtual ARDOUR::InstrumentInfoinstrument_info () const =0
 
void get_note_positions (std::vector< int > &numbers, std::vector< int > &pos, std::vector< int > &heights) const
 
EditingContextediting_context () const
 
- Public Member Functions inherited from ViewBackground
 ViewBackground ()
 
virtual ~ViewBackground ()
 
virtual int height () const =0
 
virtual int width () const =0
 
virtual int contents_height () const =0
 

Public Attributes

Gtk::Adjustment note_range_adjustment
 
sigc::signal< void > NoteModeChanged
 
sigc::signal< void > NoteRangeChanged
 
PBD::Signal< void()> HeightChanged
 

Protected Member Functions

void color_handler ()
 
void parameter_changed (std::string const &)
 
void note_range_adjustment_changed ()
 
void setup_note_lines ()
 
bool update_data_note_range (uint8_t min, uint8_t max)
 
void update_contents_height ()
 
virtual void apply_note_range_to_children ()=0
 
virtual bool updates_suspended () const
 
void sync_data_and_visual_range ()
 

Protected Attributes

EditingContext_editing_context
 
bool _range_dirty
 
double _range_sum_cache
 
uint8_t _lowest_note
 currently visible More...
 
uint8_t _highest_note
 currently visible More...
 
uint8_t _data_note_min
 in data More...
 
uint8_t _data_note_max
 in data More...
 
ArdourCanvas::RectSet_note_lines
 
ARDOUR::NoteMode _note_mode
 
Gtkmm2ext::Color _region_color
 
ARDOUR::ColorMode _color_mode
 
VisibleNoteRange _visibility_note_range
 
bool note_range_set
 

Detailed Description

A class that provides various context for a MidiVieww: = note ranges color information etc.

Definition at line 55 of file midi_view_background.h.

Member Enumeration Documentation

◆ RangeCanMove

Enumerator
CanMoveTop 
CanMoveBottom 

Definition at line 115 of file midi_view_background.h.

◆ VisibleNoteRange

Enumerator
FullRange 
ContentsRange 

Definition at line 76 of file midi_view_background.h.

Constructor & Destructor Documentation

◆ MidiViewBackground()

MidiViewBackground::MidiViewBackground ( ArdourCanvas::Item parent,
EditingContext ec 
)

◆ ~MidiViewBackground()

MidiViewBackground::~MidiViewBackground ( )

Member Function Documentation

◆ apply_note_range()

void MidiViewBackground::apply_note_range ( uint8_t  lowest,
uint8_t  highest,
bool  to_children,
RangeCanMove  = RangeCanMove(CanMoveTop|CanMoveBottom) 
)

◆ apply_note_range_to_children()

virtual void MidiViewBackground::apply_note_range_to_children ( )
protectedpure virtual

◆ color_handler()

void MidiViewBackground::color_handler ( )
protectedvirtual

Reimplemented from ViewBackground.

◆ color_mode()

ARDOUR::ColorMode MidiViewBackground::color_mode ( ) const
inline

Definition at line 85 of file midi_view_background.h.

◆ contents_note_range()

uint8_t MidiViewBackground::contents_note_range ( ) const
inline

Definition at line 109 of file midi_view_background.h.

◆ editing_context()

EditingContext& MidiViewBackground::editing_context ( ) const
inline

Definition at line 137 of file midi_view_background.h.

◆ get_note_positions()

void MidiViewBackground::get_note_positions ( std::vector< int > &  numbers,
std::vector< int > &  pos,
std::vector< int > &  heights 
) const

◆ get_preferred_midi_channel()

virtual uint8_t MidiViewBackground::get_preferred_midi_channel ( ) const
pure virtual

◆ highest_note()

uint8_t MidiViewBackground::highest_note ( ) const
inline

Definition at line 94 of file midi_view_background.h.

◆ instrument_info()

virtual ARDOUR::InstrumentInfo* MidiViewBackground::instrument_info ( ) const
pure virtual

◆ lowest_note()

uint8_t MidiViewBackground::lowest_note ( ) const
inline

Definition at line 93 of file midi_view_background.h.

◆ maybe_apply_note_range()

void MidiViewBackground::maybe_apply_note_range ( uint8_t  lowest,
uint8_t  highest,
bool  to_children,
RangeCanMove  = RangeCanMove(CanMoveTop|CanMoveBottom) 
)

◆ maybe_extend_note_range()

void MidiViewBackground::maybe_extend_note_range ( uint8_t  note_num)

◆ note_height()

int MidiViewBackground::note_height ( ) const
inline

Definition at line 98 of file midi_view_background.h.

◆ note_mode()

ARDOUR::NoteMode MidiViewBackground::note_mode ( ) const
inline

Definition at line 81 of file midi_view_background.h.

◆ note_range_adjustment_changed()

void MidiViewBackground::note_range_adjustment_changed ( )
protected

◆ note_to_y()

int MidiViewBackground::note_to_y ( uint8_t  note) const
inline

Definition at line 102 of file midi_view_background.h.

◆ parameter_changed()

void MidiViewBackground::parameter_changed ( std::string const &  )
protectedvirtual

Reimplemented from ViewBackground.

◆ record_layer_check()

virtual void MidiViewBackground::record_layer_check ( std::shared_ptr< ARDOUR::Region ,
samplepos_t   
)
pure virtual

◆ region_color()

Gtkmm2ext::Color MidiViewBackground::region_color ( ) const
inline

Definition at line 88 of file midi_view_background.h.

◆ set_color_mode()

void MidiViewBackground::set_color_mode ( ARDOUR::ColorMode  )

◆ set_note_highlight()

virtual void MidiViewBackground::set_note_highlight ( bool  )
pure virtual

◆ set_note_mode()

void MidiViewBackground::set_note_mode ( ARDOUR::NoteMode  nm)

◆ set_note_visibility_range_style()

void MidiViewBackground::set_note_visibility_range_style ( VisibleNoteRange  r)

◆ set_size()

virtual void MidiViewBackground::set_size ( int  w,
int  h 
)
inlinevirtual

Reimplemented in PianorollMidiBackground.

Definition at line 130 of file midi_view_background.h.

◆ setup_note_lines()

void MidiViewBackground::setup_note_lines ( )
protected

◆ sync_data_and_visual_range()

void MidiViewBackground::sync_data_and_visual_range ( )
protected

◆ update_contents_height()

void MidiViewBackground::update_contents_height ( )
protectedvirtual

Reimplemented from ViewBackground.

◆ update_data_note_range()

bool MidiViewBackground::update_data_note_range ( uint8_t  min,
uint8_t  max 
)
protected

◆ updates_suspended()

virtual bool MidiViewBackground::updates_suspended ( ) const
inlineprotectedvirtual

Reimplemented in MidiStreamView.

Definition at line 161 of file midi_view_background.h.

◆ visibility_range_style()

VisibleNoteRange MidiViewBackground::visibility_range_style ( ) const
inline

Definition at line 91 of file midi_view_background.h.

◆ y_position()

virtual int MidiViewBackground::y_position ( ) const
inlinevirtual
Returns
y position, or -1 if hidden

Reimplemented from ViewBackground.

Reimplemented in MidiStreamView.

Definition at line 124 of file midi_view_background.h.

◆ y_to_note()

uint8_t MidiViewBackground::y_to_note ( int  y) const

Member Data Documentation

◆ _color_mode

ARDOUR::ColorMode MidiViewBackground::_color_mode
protected

Definition at line 150 of file midi_view_background.h.

◆ _data_note_max

uint8_t MidiViewBackground::_data_note_max
protected

in data

Definition at line 146 of file midi_view_background.h.

◆ _data_note_min

uint8_t MidiViewBackground::_data_note_min
protected

in data

Definition at line 145 of file midi_view_background.h.

◆ _editing_context

EditingContext& MidiViewBackground::_editing_context
protected

Definition at line 140 of file midi_view_background.h.

◆ _highest_note

uint8_t MidiViewBackground::_highest_note
protected

currently visible

Definition at line 144 of file midi_view_background.h.

◆ _lowest_note

uint8_t MidiViewBackground::_lowest_note
protected

currently visible

Definition at line 143 of file midi_view_background.h.

◆ _note_lines

ArdourCanvas::RectSet* MidiViewBackground::_note_lines
protected

Definition at line 147 of file midi_view_background.h.

◆ _note_mode

ARDOUR::NoteMode MidiViewBackground::_note_mode
protected

Definition at line 148 of file midi_view_background.h.

◆ _range_dirty

bool MidiViewBackground::_range_dirty
protected

Definition at line 141 of file midi_view_background.h.

◆ _range_sum_cache

double MidiViewBackground::_range_sum_cache
protected

Definition at line 142 of file midi_view_background.h.

◆ _region_color

Gtkmm2ext::Color MidiViewBackground::_region_color
protected

Definition at line 149 of file midi_view_background.h.

◆ _visibility_note_range

VisibleNoteRange MidiViewBackground::_visibility_note_range
protected

Definition at line 151 of file midi_view_background.h.

◆ HeightChanged

PBD::Signal<void()> MidiViewBackground::HeightChanged

Definition at line 131 of file midi_view_background.h.

◆ note_range_adjustment

Gtk::Adjustment MidiViewBackground::note_range_adjustment

Definition at line 61 of file midi_view_background.h.

◆ note_range_set

bool MidiViewBackground::note_range_set
protected

Definition at line 152 of file midi_view_background.h.

◆ NoteModeChanged

sigc::signal<void> MidiViewBackground::NoteModeChanged

Definition at line 83 of file midi_view_background.h.

◆ NoteRangeChanged

sigc::signal<void> MidiViewBackground::NoteRangeChanged

Definition at line 113 of file midi_view_background.h.


The documentation for this class was generated from the following file: