wex  v21.04.0
Public Types | Public Member Functions | List of all members
wex::data::item Class Reference

Offers user data to be used by item. More...

#include <wex/item-data.h>

Public Types

enum  label_t { LABEL_NONE , LABEL_LEFT , LABEL_ABOVE }
 Label types supported. More...
 
typedef std::function< void(wxWindow *user, const std::any &value, bool save)> user_apply_t
 A function that you can provide to e.g. More...
 
typedef std::function< void(wxWindow *user, wxWindow *parent, bool readonly)> user_window_create_t
 A function that you can provide to specify what needs to be done for creating a user item.
 
typedef std::function< bool(wxWindow *user, bool save)> user_window_to_config_t
 A function that you can provide to specify what needs to be done for loading or saving a user item to the config.
 

Public Member Functions

 item (const data::control &data=data::control())
 Default constructor from control data.
 
 item (const item &data, const std::any &initial=std::any())
 Copy constructor, with initial value.
 
itemoperator= (const item &rhs)
 Assignment operator.
 
const auto apply () const
 Returns apply.
 
itemapply (const user_apply_t rhs)
 Sets apply.
 
auto columns () const
 Returns the number of columns for the current page.
 
itemcolumns (int rhs)
 Sets columns.
 
const auto & control () const
 Returns control data.
 
itemcontrol (const data::control &rhs)
 Sets control data.
 
const auto image_list () const
 Returns image list.
 
itemimage_list (wxImageList *il)
 Sets image list.
 
const auto & inc () const
 increment value if appropriate
 
iteminc (const std::any &rhs)
 Sets inc.
 
const auto & initial () const
 Returns the initial value.
 
const auto label_type () const
 Returns label type.
 
itemlabel_type (label_t rhs)
 Sets label type.
 
const auto & min () const
 Returns min value.
 
itemmin (const std::any &rhs)
 Sets min.
 
const auto & max () const
 Returns max value.
 
itemmax (const std::any &rhs)
 Sets max.
 
auto & user_window_create () const
 Return the process callback for window creation.
 
itemuser_window_create (const user_window_create_t rhs)
 Sets user window create.
 
auto & user_window_to_config () const
 Returns the process callback for window config.
 
itemuser_window_to_config (const user_window_to_config_t rhs)
 Sets user window config.
 
const data::windowwindow () const
 Returns window data.
 
itemwindow (const data::window &rhs)
 Sets window data.
 

Detailed Description

Offers user data to be used by item.

Member Typedef Documentation

◆ user_apply_t

typedef std::function< void(wxWindow* user, const std::any& value, bool save)> wex::data::item::user_apply_t

A function that you can provide to e.g.

specify what to do when clicking on a button item.

Member Enumeration Documentation

◆ label_t

Label types supported.

Enumerator
LABEL_NONE 

no label

LABEL_LEFT 

label left from window

LABEL_ABOVE 

label above window