wex v24.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/data/item.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.
 
typedef std::function< bool(const std::string &value) user_validate_t)
 A function that you can provide to validate the item.
 
typedef std::function< void(wxWindow *user, wxWindow *parent) 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.
 
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
 Returns increment value;.
 
iteminc (const std::any &rhs)
 Sets inc.
 
const auto & initial () const
 Returns the initial value.
 
iteminitial (const std::any &rhs)
 Sets initial.
 
const bool is_readonly () const
 Returns is_readonly.
 
const bool is_regex () const
 Returns is_regex.
 
itemis_readonly (bool rhs)
 Sets is_readonly.
 
itemis_regex (bool rhs)
 Sets is_regex.
 
const auto label_type () const
 Returns label type.
 
itemlabel_type (label_t rhs)
 Sets label type.
 
const auto & max () const
 Returns max value.
 
itemmax (const std::any &rhs)
 Sets max.
 
const auto & min () const
 Returns min value.
 
itemmin (const std::any &rhs)
 Sets min.
 
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.
 
const auto validate () const
 Returns validate.
 
itemvalidate (const user_validate_t &rhs)
 Sets validator.
 
const auto & validate_re () const
 Returns validate regex.
 
itemvalidate_re (const std::string &rhs)
 Sets validator regex.
 
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.

◆ user_validate_t

typedef std::function<bool(const std::string& value) wex::data::item::user_validate_t)

A function that you can provide to validate the item.

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