Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::dev::widget_content_measurer_interface Class Referenceabstract

An interface for measuring content of the widget. More...

Inheritance diagram for nana::dev::widget_content_measurer_interface:
nana::drawerbase::button::trigger::measurer nana::drawerbase::label::trigger::implement::measurer nana::drawerbase::picture::content_measurer

Public Types

using graph_reference = paint::graphics &
 

Public Member Functions

virtual ~widget_content_measurer_interface ()=default
 
virtual ::std::optional< sizemeasure (graph_reference graph, unsigned limit_pixels, bool limit_width) const =0
 Measures content. More...
 
virtual size extension () const =0
 Returns the extension to the size of widget from content extent. More...
 

Detailed Description

An interface for measuring content of the widget.

Member Typedef Documentation

Constructor & Destructor Documentation

virtual nana::dev::widget_content_measurer_interface::~widget_content_measurer_interface ( )
virtualdefault

Member Function Documentation

virtual size nana::dev::widget_content_measurer_interface::extension ( ) const
pure virtual

Returns the extension to the size of widget from content extent.

Returns
the width and height of extension to the widget size.

Implemented in nana::drawerbase::label::trigger::implement::measurer, nana::drawerbase::picture::content_measurer, and nana::drawerbase::button::trigger::measurer.

virtual ::std::optional<size> nana::dev::widget_content_measurer_interface::measure ( graph_reference  graph,
unsigned  limit_pixels,
bool  limit_width 
) const
pure virtual

Measures content.

Parameters
graphThe graphics for the operation.
limit_pixelsThe number of pixels of the limited edge. If this parameter is zero, it is ignored.
limit_widthTrue if limits the width, false if limits the height.
Returns
the size of content.

Implemented in nana::drawerbase::label::trigger::implement::measurer, nana::drawerbase::picture::content_measurer, and nana::drawerbase::button::trigger::measurer.