Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

CtrlMapper

 

class CtrlMapper

Trivial utility class for mapping values to widgets and back. It is sort of similar to CtrlRetriever, but does immediate transfer of values based on flag

 

 

Public Method List

 

template <class TCtrlMapper& operator()(Ctrl& ctrl, T& val)

Sets value of ctrl to val or val to ctrl based on current direction setting.

 


 

template <class TCtrlMapper& operator()(Ctrl& ctrl, T& val, const T& f)

Similar to two parameter operator(), but before setting val to ctrl, it multiplies it by f and before retrieving, divides by f. Useful as simple conversion tool when e.g. the value is to be stored in meters but edited as kilometers.

 


 

CtrlMapper& ToCtrls()

Sets direction flag to move values to widgets.

 


 

CtrlMapper& ToValues()

Sets direction flag to move widgets to values

 

 

Do you want to contribute?