HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
tt::stencil Class Referenceabstract
Inheritance diagram for tt::stencil:
tt::image_stencil tt::label_stencil tt::text_stencil tt::glyph_stencil tt::pixel_map_stencil

Public Member Functions

 stencil (alignment alignment)
 
 stencil (stencil const &) noexcept=delete
 
 stencil (stencil &&) noexcept=delete
 
stenciloperator= (stencil const &) noexcept=delete
 
stenciloperator= (stencil &&) noexcept=delete
 
virtual extent2 preferred_extent () noexcept
 Return the extent that this cell wants to be drawn as.
 
virtual void set_layout_parameters (aarectangle const &rectangle, float base_line_position=std::numeric_limits< float >::infinity()) noexcept
 Pass layout parameters in local coordinates.
 
virtual void draw (draw_context context, tt::color color=tt::color{}, matrix3 transform=geo::identity()) noexcept=0
 Draw the cell.
 

Static Public Member Functions

static std::unique_ptr< class image_stencilmake_unique (alignment alignment, icon const &icon)
 
static std::unique_ptr< class text_stencilmake_unique (alignment alignment, std::u8string const &text, text_style const &style)
 
static std::unique_ptr< class label_stencilmake_unique (alignment alignment, tt::label const &label, text_style const &style)
 

Member Function Documentation

◆ draw()

virtual void tt::stencil::draw ( draw_context context,
tt::color color = tt::color{},
matrix3 transform = geo::identity() )
pure virtualnoexcept

Draw the cell.

Parameters
contextThe current draw context.
colorThe color to use for drawing.

Implemented in tt::glyph_stencil, tt::pixel_map_stencil, tt::text_stencil, and tt::label_stencil.

◆ preferred_extent()

virtual extent2 tt::stencil::preferred_extent ( )
inlinevirtualnoexcept

Return the extent that this cell wants to be drawn as.

Reimplemented in tt::label_stencil, and tt::text_stencil.

◆ set_layout_parameters()

virtual void tt::stencil::set_layout_parameters ( aarectangle const & rectangle,
float base_line_position = std::numeric_limits<float>::infinity() )
inlinevirtualnoexcept

Pass layout parameters in local coordinates.

Parameters
rectangleThe rectangle the stencil will be drawn into.
base_line_positionThe position of the base line within the rectangle.

Reimplemented in tt::label_stencil.


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