Ardour  9.0-pre0-582-g084a23a80d
PortMatrixComponent Class Referenceabstract

#include <port_matrix_component.h>

Inheritance diagram for PortMatrixComponent:
[legend]

Public Member Functions

 PortMatrixComponent (PortMatrix *, PortMatrixBody *)
 
virtual ~PortMatrixComponent ()
 
virtual double component_to_parent_x (double x) const =0
 
virtual double parent_to_component_x (double x) const =0
 
virtual double component_to_parent_y (double y) const =0
 
virtual double parent_to_component_y (double y) const =0
 
virtual void mouseover_changed (std::list< PortMatrixNode > const &)=0
 
virtual void draw_extra (cairo_t *)=0
 
virtual void button_press (double, double, GdkEventButton *)
 
virtual void button_release (double, double, GdkEventButton *)
 
virtual void motion (double, double)
 
void set_show_ports (bool)
 
void setup ()
 
GdkPixmapget_pixmap (GdkDrawable *)
 
std::pair< uint32_t, uint32_t > dimensions ()
 
void require_render ()
 
void require_rebuild ()
 
void set_parent_rectangle (Gdk::Rectangle const &r)
 
Gdk::Rectangle parent_rectangle () const
 

Static Public Member Functions

static uint32_t grid_spacing ()
 

Protected Member Functions

Gdk::Color background_colour ()
 
void set_source_rgb (cairo_t *, Gdk::Color const &)
 
void set_source_rgba (cairo_t *, Gdk::Color const &, double)
 
uint32_t group_size (std::shared_ptr< const PortGroup >) const
 
uint32_t channel_to_position (ARDOUR::BundleChannel, std::shared_ptr< const PortGroup >) const
 
virtual ARDOUR::BundleChannel position_to_channel (double, double, std::shared_ptr< const PortGroup >) const
 
virtual void render (cairo_t *)=0
 
virtual void compute_dimensions ()=0
 

Static Protected Member Functions

static uint32_t label_border_width ()
 
static uint32_t name_pad ()
 
static double thin_grid_line_width ()
 
static double thick_grid_line_width ()
 
static uint32_t connection_indicator_pad ()
 
static uint32_t mouseover_line_width ()
 
static double angle ()
 
static Gdk::Color text_colour ()
 
static Gdk::Color grid_colour ()
 
static Gdk::Color association_colour ()
 
static Gdk::Color non_connectable_colour ()
 
static Gdk::Color mouseover_line_colour ()
 
static Gdk::Color highlighted_channel_colour ()
 
static Gdk::Color get_a_bundle_colour (int x)
 
static Gdk::Color get_a_group_colour (int x)
 

Protected Attributes

PortMatrix_matrix
 
PortMatrixBody_body
 the PortMatrixBody that we're in More...
 
uint32_t _width
 full width of the contents More...
 
uint32_t _height
 full height of the contents More...
 
Gdk::Rectangle _parent_rectangle
 

Private Attributes

GdkPixmap_pixmap
 pixmap More...
 
bool _render_required
 true if the rendered pixmap is out of date More...
 
bool _dimension_computation_required
 true if the dimensions are out of date More...
 

Detailed Description

One component of the PortMatrix. This is a cairo-rendered Pixmap.

Definition at line 40 of file port_matrix_component.h.

Constructor & Destructor Documentation

◆ PortMatrixComponent()

PortMatrixComponent::PortMatrixComponent ( PortMatrix ,
PortMatrixBody  
)

◆ ~PortMatrixComponent()

virtual PortMatrixComponent::~PortMatrixComponent ( )
virtual

Member Function Documentation

◆ angle()

static double PortMatrixComponent::angle ( )
inlinestaticprotected
Returns
angle of column labels, in radians

Definition at line 113 of file port_matrix_component.h.

◆ association_colour()

static Gdk::Color PortMatrixComponent::association_colour ( )
inlinestaticprotected
Returns
colour of association blobs

Definition at line 133 of file port_matrix_component.h.

◆ background_colour()

Gdk::Color PortMatrixComponent::background_colour ( )
protected
Returns
background colour

◆ button_press()

virtual void PortMatrixComponent::button_press ( double  ,
double  ,
GdkEventButton  
)
inlinevirtual

Reimplemented in PortMatrixRowLabels, PortMatrixGrid, and PortMatrixColumnLabels.

Definition at line 52 of file port_matrix_component.h.

◆ button_release()

virtual void PortMatrixComponent::button_release ( double  ,
double  ,
GdkEventButton  
)
inlinevirtual

Reimplemented in PortMatrixGrid.

Definition at line 53 of file port_matrix_component.h.

◆ channel_to_position()

uint32_t PortMatrixComponent::channel_to_position ( ARDOUR::BundleChannel  ,
std::shared_ptr< const PortGroup  
) const
protected

◆ component_to_parent_x()

virtual double PortMatrixComponent::component_to_parent_x ( double  x) const
pure virtual

◆ component_to_parent_y()

virtual double PortMatrixComponent::component_to_parent_y ( double  y) const
pure virtual

◆ compute_dimensions()

virtual void PortMatrixComponent::compute_dimensions ( )
protectedpure virtual

Compute any required dimensions. This must set up _width and _height.

Implemented in PortMatrixRowLabels, PortMatrixGrid, and PortMatrixColumnLabels.

◆ connection_indicator_pad()

static uint32_t PortMatrixComponent::connection_indicator_pad ( )
inlinestaticprotected
Returns
space around the connection indicator

Definition at line 104 of file port_matrix_component.h.

◆ dimensions()

std::pair<uint32_t, uint32_t> PortMatrixComponent::dimensions ( )

◆ draw_extra()

virtual void PortMatrixComponent::draw_extra ( cairo_t *  )
pure virtual

Implemented in PortMatrixLabels, and PortMatrixGrid.

◆ get_a_bundle_colour()

static Gdk::Color PortMatrixComponent::get_a_bundle_colour ( int  x)
inlinestaticprotected

Definition at line 153 of file port_matrix_component.h.

◆ get_a_group_colour()

static Gdk::Color PortMatrixComponent::get_a_group_colour ( int  x)
inlinestaticprotected

Definition at line 162 of file port_matrix_component.h.

◆ get_pixmap()

GdkPixmap* PortMatrixComponent::get_pixmap ( GdkDrawable )

◆ grid_colour()

static Gdk::Color PortMatrixComponent::grid_colour ( )
inlinestaticprotected
Returns
grid line colour

Definition at line 128 of file port_matrix_component.h.

◆ grid_spacing()

static uint32_t PortMatrixComponent::grid_spacing ( )
static
Returns
grid spacing

◆ group_size()

uint32_t PortMatrixComponent::group_size ( std::shared_ptr< const PortGroup ) const
protected

◆ highlighted_channel_colour()

static Gdk::Color PortMatrixComponent::highlighted_channel_colour ( )
inlinestaticprotected
Returns
colour to paint channel highlights

Definition at line 148 of file port_matrix_component.h.

◆ label_border_width()

static uint32_t PortMatrixComponent::label_border_width ( )
inlinestaticprotected
Returns
width of borders drawn around labels

Definition at line 84 of file port_matrix_component.h.

◆ motion()

virtual void PortMatrixComponent::motion ( double  ,
double   
)
inlinevirtual

Reimplemented in PortMatrixRowLabels, PortMatrixGrid, and PortMatrixColumnLabels.

Definition at line 54 of file port_matrix_component.h.

◆ mouseover_changed()

virtual void PortMatrixComponent::mouseover_changed ( std::list< PortMatrixNode > const &  )
pure virtual

◆ mouseover_line_colour()

static Gdk::Color PortMatrixComponent::mouseover_line_colour ( )
inlinestaticprotected
Returns
colour to paint mouseover lines

Definition at line 143 of file port_matrix_component.h.

◆ mouseover_line_width()

static uint32_t PortMatrixComponent::mouseover_line_width ( )
inlinestaticprotected

Definition at line 108 of file port_matrix_component.h.

◆ name_pad()

static uint32_t PortMatrixComponent::name_pad ( )
inlinestaticprotected
Returns
padding between a name and the nearest line

Definition at line 89 of file port_matrix_component.h.

◆ non_connectable_colour()

static Gdk::Color PortMatrixComponent::non_connectable_colour ( )
inlinestaticprotected
Returns
colour to paint grid squares when they can't be associated

Definition at line 138 of file port_matrix_component.h.

◆ parent_rectangle()

Gdk::Rectangle PortMatrixComponent::parent_rectangle ( ) const
inline

Definition at line 74 of file port_matrix_component.h.

◆ parent_to_component_x()

virtual double PortMatrixComponent::parent_to_component_x ( double  x) const
pure virtual

◆ parent_to_component_y()

virtual double PortMatrixComponent::parent_to_component_y ( double  y) const
pure virtual

◆ position_to_channel()

virtual ARDOUR::BundleChannel PortMatrixComponent::position_to_channel ( double  ,
double  ,
std::shared_ptr< const PortGroup  
) const
protectedvirtual

Reimplemented in PortMatrixColumnLabels.

◆ render()

virtual void PortMatrixComponent::render ( cairo_t *  )
protectedpure virtual

Render the complete component to a cairo context.

Implemented in PortMatrixRowLabels, PortMatrixGrid, and PortMatrixColumnLabels.

◆ require_rebuild()

void PortMatrixComponent::require_rebuild ( )
inline

Definition at line 65 of file port_matrix_component.h.

◆ require_render()

void PortMatrixComponent::require_render ( )
inline

Definition at line 61 of file port_matrix_component.h.

◆ set_parent_rectangle()

void PortMatrixComponent::set_parent_rectangle ( Gdk::Rectangle const &  r)
inline

Definition at line 70 of file port_matrix_component.h.

◆ set_show_ports()

void PortMatrixComponent::set_show_ports ( bool  )

◆ set_source_rgb()

void PortMatrixComponent::set_source_rgb ( cairo_t *  ,
Gdk::Color const &   
)
protected

◆ set_source_rgba()

void PortMatrixComponent::set_source_rgba ( cairo_t *  ,
Gdk::Color const &  ,
double   
)
protected

◆ setup()

void PortMatrixComponent::setup ( )

◆ text_colour()

static Gdk::Color PortMatrixComponent::text_colour ( )
inlinestaticprotected
Returns
text colour

Definition at line 123 of file port_matrix_component.h.

◆ thick_grid_line_width()

static double PortMatrixComponent::thick_grid_line_width ( )
inlinestaticprotected
Returns
width of thick lines in the grid

Definition at line 99 of file port_matrix_component.h.

◆ thin_grid_line_width()

static double PortMatrixComponent::thin_grid_line_width ( )
inlinestaticprotected
Returns
width of thin lines in the grid

Definition at line 94 of file port_matrix_component.h.

Member Data Documentation

◆ _body

PortMatrixBody* PortMatrixComponent::_body
protected

the PortMatrixBody that we're in

Definition at line 184 of file port_matrix_component.h.

◆ _dimension_computation_required

bool PortMatrixComponent::_dimension_computation_required
private

true if the dimensions are out of date

Definition at line 192 of file port_matrix_component.h.

◆ _height

uint32_t PortMatrixComponent::_height
protected

full height of the contents

Definition at line 186 of file port_matrix_component.h.

◆ _matrix

PortMatrix* PortMatrixComponent::_matrix
protected

Definition at line 183 of file port_matrix_component.h.

◆ _parent_rectangle

Gdk::Rectangle PortMatrixComponent::_parent_rectangle
protected

Definition at line 187 of file port_matrix_component.h.

◆ _pixmap

GdkPixmap* PortMatrixComponent::_pixmap
private

pixmap

Definition at line 190 of file port_matrix_component.h.

◆ _render_required

bool PortMatrixComponent::_render_required
private

true if the rendered pixmap is out of date

Definition at line 191 of file port_matrix_component.h.

◆ _width

uint32_t PortMatrixComponent::_width
protected

full width of the contents

Definition at line 185 of file port_matrix_component.h.


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