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

CtrlRetriever

 

class CtrlRetriever

Small helper class used to map data to widget (usually in context of dialog). Usually scenario is that before opening dialog, data are are put into widget through CtrlRetriever Put method (it has operator() alias). Then, after user edits data in dialog, they are moved back from widget to variables using CtrlRetriever::Retrieve method.

 

 

Public Method List

 

template <class Tvoid Put(Ctrl& ctrl, T& val)

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

Assigns val to ctrl and adds this to widget - data mappings (to be used by Retrieve).

 


 

void Set()

Reassigns values to widgets.

 


 

void Retrieve()

Moves data mapped using Put from widgets back to variables.

 


 

Event<> operator<<(Event<> cb)

Adds cb event to WhenAction events of all mapped widgets.

 


 

Event<> operator^=(Event<> cb)

Sets WhenAction of all mapped widgets to cb.

 


 

void Reset()

Resets CtrlRetriever to initial state - all mapping between widgets and data are removed and CtrlRetriever can be used for another set of data/widgets.

 

 

Do you want to contribute?