ardour
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PortMatrixGrid Class Reference

#include <port_matrix_grid.h>

Inheritance diagram for PortMatrixGrid:
PortMatrixComponent

Public Member Functions

 PortMatrixGrid (PortMatrix *, PortMatrixBody *)
 
void button_press (double, double, GdkEventButton *)
 
void button_release (double, double, GdkEventButton *)
 
void motion (double, double)
 
double component_to_parent_x (double x) const
 
double parent_to_component_x (double x) const
 
double component_to_parent_y (double y) const
 
double parent_to_component_y (double y) const
 
void mouseover_changed (std::list< PortMatrixNode > const &)
 
void draw_extra (cairo_t *)
 
- Public Member Functions inherited from PortMatrixComponent
 PortMatrixComponent (PortMatrix *, PortMatrixBody *)
 
virtual ~PortMatrixComponent ()
 
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
 

Private Member Functions

void compute_dimensions ()
 
void render (cairo_t *)
 
void render_group_pair (cairo_t *, boost::shared_ptr< const PortGroup >, boost::shared_ptr< const PortGroup >, uint32_t, uint32_t)
 
PortMatrixNode position_to_node (double, double) const
 
void queue_draw_for (std::list< PortMatrixNode > const &)
 
void draw_association_indicator (cairo_t *, uint32_t, uint32_t, double p=1)
 
void draw_empty_square (cairo_t *, uint32_t, uint32_t)
 
void draw_non_connectable_indicator (cairo_t *, uint32_t, uint32_t)
 
std::list< PortMatrixNodenodes_on_line (int, int, int, int) const
 
void set_association (PortMatrixNode, bool)
 
bool toggle_state (PortMatrixNode::State) const
 

Private Attributes

bool _dragging
 
bool _drag_valid
 
bool _moved
 
int _drag_start_x
 
int _drag_start_y
 
int _drag_x
 
int _drag_y
 

Additional Inherited Members

- Static Public Member Functions inherited from PortMatrixComponent
static uint32_t grid_spacing ()
 
- Protected Member Functions inherited from PortMatrixComponent
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
 
- Static Protected Member Functions inherited from PortMatrixComponent
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 inherited from PortMatrixComponent
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
 

Detailed Description

The grid part of the port matrix

Definition at line 39 of file port_matrix_grid.h.

Constructor & Destructor Documentation

PortMatrixGrid::PortMatrixGrid ( PortMatrix m,
PortMatrixBody b 
)

Definition at line 31 of file port_matrix_grid.cc.

Member Function Documentation

void PortMatrixGrid::button_press ( double  x,
double  y,
GdkEventButton *  ev 
)
virtual

Reimplemented from PortMatrixComponent.

Definition at line 314 of file port_matrix_grid.cc.

void PortMatrixGrid::button_release ( double  x,
double  y,
GdkEventButton *  ev 
)
virtual

Reimplemented from PortMatrixComponent.

Definition at line 368 of file port_matrix_grid.cc.

double PortMatrixGrid::component_to_parent_x ( double  x) const
virtual

Implements PortMatrixComponent.

Definition at line 560 of file port_matrix_grid.cc.

double PortMatrixGrid::component_to_parent_y ( double  y) const
virtual

Implements PortMatrixComponent.

Definition at line 572 of file port_matrix_grid.cc.

void PortMatrixGrid::compute_dimensions ( )
privatevirtual

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

Implements PortMatrixComponent.

Definition at line 41 of file port_matrix_grid.cc.

void PortMatrixGrid::draw_association_indicator ( cairo_t *  cr,
uint32_t  x,
uint32_t  y,
double  p = 1 
)
private

Definition at line 257 of file port_matrix_grid.cc.

void PortMatrixGrid::draw_empty_square ( cairo_t *  cr,
uint32_t  x,
uint32_t  y 
)
private

Definition at line 274 of file port_matrix_grid.cc.

void PortMatrixGrid::draw_extra ( cairo_t *  cr)
virtual

Implements PortMatrixComponent.

Definition at line 427 of file port_matrix_grid.cc.

void PortMatrixGrid::draw_non_connectable_indicator ( cairo_t *  cr,
uint32_t  x,
uint32_t  y 
)
private

Draw a square to indicate that two channels in a matrix cannot be associated with each other.

Definition at line 291 of file port_matrix_grid.cc.

void PortMatrixGrid::motion ( double  x,
double  y 
)
virtual

Reimplemented from PortMatrixComponent.

Definition at line 511 of file port_matrix_grid.cc.

void PortMatrixGrid::mouseover_changed ( std::list< PortMatrixNode > const &  old)
virtual

Implements PortMatrixComponent.

Definition at line 504 of file port_matrix_grid.cc.

list< PortMatrixNode > PortMatrixGrid::nodes_on_line ( int  x0,
int  y0,
int  x1,
int  y1 
) const
private

Definition at line 584 of file port_matrix_grid.cc.

double PortMatrixGrid::parent_to_component_x ( double  x) const
virtual

Implements PortMatrixComponent.

Definition at line 566 of file port_matrix_grid.cc.

double PortMatrixGrid::parent_to_component_y ( double  y) const
virtual

Implements PortMatrixComponent.

Definition at line 578 of file port_matrix_grid.cc.

PortMatrixNode PortMatrixGrid::position_to_node ( double  x,
double  y 
) const
private

Definition at line 305 of file port_matrix_grid.cc.

void PortMatrixGrid::queue_draw_for ( std::list< PortMatrixNode > const &  n)
private

Definition at line 530 of file port_matrix_grid.cc.

void PortMatrixGrid::render ( cairo_t *  )
privatevirtual

Render the complete component to a cairo context.

Implements PortMatrixComponent.

Definition at line 58 of file port_matrix_grid.cc.

void PortMatrixGrid::render_group_pair ( cairo_t *  ,
boost::shared_ptr< const PortGroup ,
boost::shared_ptr< const PortGroup ,
uint32_t  ,
uint32_t   
)
private
void PortMatrixGrid::set_association ( PortMatrixNode  node,
bool  s 
)
private

Definition at line 336 of file port_matrix_grid.cc.

bool PortMatrixGrid::toggle_state ( PortMatrixNode::State  s) const
private

Definition at line 643 of file port_matrix_grid.cc.

Member Data Documentation

int PortMatrixGrid::_drag_start_x
private

Definition at line 73 of file port_matrix_grid.h.

int PortMatrixGrid::_drag_start_y
private

Definition at line 74 of file port_matrix_grid.h.

bool PortMatrixGrid::_drag_valid
private

Definition at line 71 of file port_matrix_grid.h.

int PortMatrixGrid::_drag_x
private

Definition at line 75 of file port_matrix_grid.h.

int PortMatrixGrid::_drag_y
private

Definition at line 76 of file port_matrix_grid.h.

bool PortMatrixGrid::_dragging
private

Definition at line 70 of file port_matrix_grid.h.

bool PortMatrixGrid::_moved
private

Definition at line 72 of file port_matrix_grid.h.


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