Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
StaveBracketWidget Class Reference

#include "stage/timeline/stave-bracket-widget.hpp"

Description

Helper widget to handle display of the structure of track nesting in the timeline header pane.

For each TrackHeadWidget, the connected cells in the first grid column are populated with this component, indicating connectivity and layout constraints. The actual drawing is based on Cairo, and implemented in the virtual draw() function.

Definition at line 58 of file stave-bracket-widget.hpp.

Public Member Functions

 ~StaveBracketWidget ()
 
 StaveBracketWidget ()
 
void clearConnectors ()
 
void addConnector (uint offset)
 Request to draw a connector to the nested sub-Track's stave bracket.
 

Private Types

using _Base = Gtk::DrawingArea
 

Private Member Functions

bool on_draw (CairoC cox) override
 Custom drawing: a »stave bracket« to indicate track scope.
 
Gtk::SizeRequestMode get_request_mode_vfunc () const final
 indicate layout oriented towards vertical extension
 
void get_preferred_width_vfunc (int &, int &) const override
 
void get_preferred_width_for_height_vfunc (int, int &, int &) const override
 The structural outline adapts flexible in vertical direction, but requires a proportional horizontal size for proper drawing.
 

Private Attributes

std::vector< uintconnectors_
 

Constructor & Destructor Documentation

◆ ~StaveBracketWidget()

Definition at line 332 of file stave-bracket-widget.cpp.

◆ StaveBracketWidget()

Definition at line 334 of file stave-bracket-widget.cpp.

References stage::CLASS_fork_bracket.

Member Typedef Documentation

◆ _Base

using _Base = Gtk::DrawingArea
private

Definition at line 61 of file stave-bracket-widget.hpp.

Member Function Documentation

◆ clearConnectors()

void clearConnectors ( )
inline

Definition at line 83 of file stave-bracket-widget.hpp.

References StaveBracketWidget::connectors_.

Referenced by TrackHeadWidget::linkSubTrackPositions().

+ Here is the caller graph for this function:

◆ addConnector()

void addConnector ( uint  offset)
inline

Request to draw a connector to the nested sub-Track's stave bracket.

Parameters
offsetvertical location where the sub-Track starts, relative to the start of this stave bracket's start
Remarks
called from the 2nd DisplayEvaluation pass, when linking the layout
See also
TrackHeadWidget::linkSubTrackPositions

Definition at line 96 of file stave-bracket-widget.hpp.

References StaveBracketWidget::connectors_.

Referenced by TrackHeadWidget::linkSubTrackPositions().

+ Here is the caller graph for this function:

◆ on_draw()

bool on_draw ( CairoC  cox)
overrideprivate

Custom drawing: a »stave bracket« to indicate track scope.

The layout is controlled by settings in the CSS style context

  • a base width (which is the width of the vertical double bar) is based on current font settings, with scale #BASE_WIDTH_PER_EM
  • this base width also defines the width requirement reported to GTK through get_preferred_width_for_height_vfunc
  • possible padding is picket up from CSS
  • current text colour is used for drawing

Definition at line 354 of file stave-bracket-widget.cpp.

References StaveBracketWidget::connectors_.

◆ get_request_mode_vfunc()

Gtk::SizeRequestMode get_request_mode_vfunc ( ) const
finalprivate

indicate layout oriented towards vertical extension

Definition at line 379 of file stave-bracket-widget.cpp.

◆ get_preferred_width_vfunc()

void get_preferred_width_vfunc ( int &  minimum_width,
int &  natural_width 
) const
overrideprivate

Definition at line 397 of file stave-bracket-widget.cpp.

◆ get_preferred_width_for_height_vfunc()

void get_preferred_width_for_height_vfunc ( int  givenHeight,
int &  minimum_width,
int &  natural_width 
) const
overrideprivate

The structural outline adapts flexible in vertical direction, but requires a proportional horizontal size for proper drawing.

The horizontal requisition is based on the font in CSS style context.

Definition at line 390 of file stave-bracket-widget.cpp.

Member Data Documentation

◆ connectors_

std::vector<uint> connectors_
private
+ Inheritance diagram for StaveBracketWidget:
+ Collaboration diagram for StaveBracketWidget:

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