ardour
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
PortMatrixComponent Class Referenceabstract

#include <port_matrix_component.h>

Inheritance diagram for PortMatrixComponent:
PortMatrixGrid PortMatrixLabels PortMatrixColumnLabels PortMatrixRowLabels

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 ()
 
GdkPixmap * get_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 (boost::shared_ptr< const PortGroup >) const
 
uint32_t channel_to_position (ARDOUR::BundleChannel, boost::shared_ptr< const PortGroup >) const
 
virtual ARDOUR::BundleChannel position_to_channel (double, double, boost::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 41 of file port_matrix_component.h.

Constructor & Destructor Documentation

PortMatrixComponent::PortMatrixComponent ( PortMatrix m,
PortMatrixBody b 
)

Constructor.

Parameters
mPort matrix that we're in.
bPort matrix body that we're in.

Definition at line 30 of file port_matrix_component.cc.

PortMatrixComponent::~PortMatrixComponent ( )
virtual

Destructor

Definition at line 41 of file port_matrix_component.cc.

Member Function Documentation

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

Definition at line 116 of file port_matrix_component.h.

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

Definition at line 136 of file port_matrix_component.h.

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

Definition at line 117 of file port_matrix_component.cc.

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

Reimplemented in PortMatrixRowLabels, PortMatrixGrid, and PortMatrixColumnLabels.

Definition at line 53 of file port_matrix_component.h.

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

Reimplemented in PortMatrixGrid.

Definition at line 54 of file port_matrix_component.h.

uint32_t PortMatrixComponent::channel_to_position ( ARDOUR::BundleChannel  bc,
boost::shared_ptr< const PortGroup group 
) const
protected
Parameters
bcChannel.
groupGroup.
Returns
Position of bc in groups in grid units, taking show_only_bundles into account.

Definition at line 147 of file port_matrix_component.cc.

virtual double PortMatrixComponent::component_to_parent_x ( double  x) const
pure virtual
virtual double PortMatrixComponent::component_to_parent_y ( double  y) const
pure virtual
virtual void PortMatrixComponent::compute_dimensions ( )
protectedpure virtual

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

Implemented in PortMatrixRowLabels, PortMatrixColumnLabels, and PortMatrixGrid.

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

Definition at line 107 of file port_matrix_component.h.

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

Definition at line 105 of file port_matrix_component.cc.

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

Implemented in PortMatrixGrid, and PortMatrixLabels.

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

Definition at line 156 of file port_matrix_component.h.

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

Definition at line 165 of file port_matrix_component.h.

GdkPixmap * PortMatrixComponent::get_pixmap ( GdkDrawable *  drawable)

Definition at line 56 of file port_matrix_component.cc.

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

Definition at line 131 of file port_matrix_component.h.

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

Definition at line 80 of file port_matrix_component.h.

uint32_t PortMatrixComponent::group_size ( boost::shared_ptr< const PortGroup g) const
protected
Parameters
gGroup.
Returns
Visible size of the group in grid units, taking visibility and show_only_bundles into account.

Definition at line 126 of file port_matrix_component.cc.

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

Definition at line 151 of file port_matrix_component.h.

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

Definition at line 87 of file port_matrix_component.h.

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

Reimplemented in PortMatrixRowLabels, PortMatrixColumnLabels, and PortMatrixGrid.

Definition at line 55 of file port_matrix_component.h.

virtual void PortMatrixComponent::mouseover_changed ( std::list< PortMatrixNode > const &  )
pure virtual
static Gdk::Color PortMatrixComponent::mouseover_line_colour ( )
inlinestaticprotected
Returns
colour to paint mouseover lines

Definition at line 146 of file port_matrix_component.h.

static uint32_t PortMatrixComponent::mouseover_line_width ( )
inlinestaticprotected

Definition at line 111 of file port_matrix_component.h.

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

Definition at line 92 of file port_matrix_component.h.

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

Definition at line 141 of file port_matrix_component.h.

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

Definition at line 75 of file port_matrix_component.h.

virtual double PortMatrixComponent::parent_to_component_x ( double  x) const
pure virtual
virtual double PortMatrixComponent::parent_to_component_y ( double  y) const
pure virtual
ARDOUR::BundleChannel PortMatrixComponent::position_to_channel ( double  p,
double  ,
boost::shared_ptr< const PortGroup group 
) const
protectedvirtual

Reimplemented in PortMatrixColumnLabels.

Definition at line 181 of file port_matrix_component.cc.

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

Render the complete component to a cairo context.

Implemented in PortMatrixRowLabels, PortMatrixColumnLabels, and PortMatrixGrid.

void PortMatrixComponent::require_rebuild ( )
inline

Definition at line 66 of file port_matrix_component.h.

void PortMatrixComponent::require_render ( )
inline

Definition at line 62 of file port_matrix_component.h.

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

Definition at line 71 of file port_matrix_component.h.

void PortMatrixComponent::set_show_ports ( bool  )
void PortMatrixComponent::set_source_rgb ( cairo_t *  cr,
Gdk::Color const &  c 
)
protected

Definition at line 93 of file port_matrix_component.cc.

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

Definition at line 99 of file port_matrix_component.cc.

void PortMatrixComponent::setup ( )

Definition at line 49 of file port_matrix_component.cc.

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

Definition at line 126 of file port_matrix_component.h.

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

Definition at line 102 of file port_matrix_component.h.

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

Definition at line 97 of file port_matrix_component.h.

Member Data Documentation

PortMatrixBody* PortMatrixComponent::_body
protected

the PortMatrixBody that we're in

Definition at line 187 of file port_matrix_component.h.

bool PortMatrixComponent::_dimension_computation_required
private

true if the dimensions are out of date

Definition at line 195 of file port_matrix_component.h.

uint32_t PortMatrixComponent::_height
protected

full height of the contents

Definition at line 189 of file port_matrix_component.h.

PortMatrix* PortMatrixComponent::_matrix
protected

Definition at line 186 of file port_matrix_component.h.

Gdk::Rectangle PortMatrixComponent::_parent_rectangle
protected

Definition at line 190 of file port_matrix_component.h.

GdkPixmap* PortMatrixComponent::_pixmap
private

pixmap

Definition at line 193 of file port_matrix_component.h.

bool PortMatrixComponent::_render_required
private

true if the rendered pixmap is out of date

Definition at line 194 of file port_matrix_component.h.

uint32_t PortMatrixComponent::_width
protected

full width of the contents

Definition at line 188 of file port_matrix_component.h.


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