Ardour  9.0-pre0-582-g084a23a80d
PortMatrixGrid Class Reference

#include <port_matrix_grid.h>

Inheritance diagram for PortMatrixGrid:
[legend]

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 ()
 
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
 

Private Member Functions

void compute_dimensions ()
 
void render (cairo_t *)
 
void render_group_pair (cairo_t *, std::shared_ptr< const PortGroup >, std::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 (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
 
- 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 34 of file port_matrix_grid.h.

Constructor & Destructor Documentation

◆ PortMatrixGrid()

PortMatrixGrid::PortMatrixGrid ( PortMatrix ,
PortMatrixBody  
)

Member Function Documentation

◆ button_press()

void PortMatrixGrid::button_press ( double  ,
double  ,
GdkEventButton  
)
virtual

Reimplemented from PortMatrixComponent.

◆ button_release()

void PortMatrixGrid::button_release ( double  ,
double  ,
GdkEventButton  
)
virtual

Reimplemented from PortMatrixComponent.

◆ component_to_parent_x()

double PortMatrixGrid::component_to_parent_x ( double  x) const
virtual

Implements PortMatrixComponent.

◆ component_to_parent_y()

double PortMatrixGrid::component_to_parent_y ( double  y) const
virtual

Implements PortMatrixComponent.

◆ compute_dimensions()

void PortMatrixGrid::compute_dimensions ( )
privatevirtual

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

Implements PortMatrixComponent.

◆ draw_association_indicator()

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

◆ draw_empty_square()

void PortMatrixGrid::draw_empty_square ( cairo_t *  ,
uint32_t  ,
uint32_t   
)
private

◆ draw_extra()

void PortMatrixGrid::draw_extra ( cairo_t *  )
virtual

Implements PortMatrixComponent.

◆ draw_non_connectable_indicator()

void PortMatrixGrid::draw_non_connectable_indicator ( cairo_t *  ,
uint32_t  ,
uint32_t   
)
private

◆ motion()

void PortMatrixGrid::motion ( double  ,
double   
)
virtual

Reimplemented from PortMatrixComponent.

◆ mouseover_changed()

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

Implements PortMatrixComponent.

◆ nodes_on_line()

std::list<PortMatrixNode> PortMatrixGrid::nodes_on_line ( int  ,
int  ,
int  ,
int   
) const
private

◆ parent_to_component_x()

double PortMatrixGrid::parent_to_component_x ( double  x) const
virtual

Implements PortMatrixComponent.

◆ parent_to_component_y()

double PortMatrixGrid::parent_to_component_y ( double  y) const
virtual

Implements PortMatrixComponent.

◆ position_to_node()

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

◆ queue_draw_for()

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

◆ render()

void PortMatrixGrid::render ( cairo_t *  )
privatevirtual

Render the complete component to a cairo context.

Implements PortMatrixComponent.

◆ render_group_pair()

void PortMatrixGrid::render_group_pair ( cairo_t *  ,
std::shared_ptr< const PortGroup ,
std::shared_ptr< const PortGroup ,
uint32_t  ,
uint32_t   
)
private

◆ set_association()

void PortMatrixGrid::set_association ( PortMatrixNode  ,
bool   
)
private

◆ toggle_state()

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

Member Data Documentation

◆ _drag_start_x

int PortMatrixGrid::_drag_start_x
private

Definition at line 68 of file port_matrix_grid.h.

◆ _drag_start_y

int PortMatrixGrid::_drag_start_y
private

Definition at line 69 of file port_matrix_grid.h.

◆ _drag_valid

bool PortMatrixGrid::_drag_valid
private

Definition at line 66 of file port_matrix_grid.h.

◆ _drag_x

int PortMatrixGrid::_drag_x
private

Definition at line 70 of file port_matrix_grid.h.

◆ _drag_y

int PortMatrixGrid::_drag_y
private

Definition at line 71 of file port_matrix_grid.h.

◆ _dragging

bool PortMatrixGrid::_dragging
private

Definition at line 65 of file port_matrix_grid.h.

◆ _moved

bool PortMatrixGrid::_moved
private

Definition at line 67 of file port_matrix_grid.h.


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