wex v24.04.0
Public Member Functions | List of all members
wex::item_dialog Class Reference

Offers an item dialog. More...

#include <wex/ui/item-dialog.h>

Inheritance diagram for wex::item_dialog:
Inheritance graph
[legend]

Public Member Functions

 item_dialog (const std::vector< item > &v, const data::window &data=data::window().title(_("Options")), int rows=0, int cols=1)
 Constructor.
 
void reload (bool save=false) const
 Reloads dialog from config.
 
- Public Member Functions inherited from wex::item_template_dialog< item >
 item_template_dialog (const std::vector< item > &v, const data::window &data=wex::data::window(), int rows=0, int cols=1)
 Constructor.
 
void add (const item &item)
 Adds an item to the temp vector.
 
bool bind_button (const item &item)
 If this item is related to a button, bind to event handler.
 
const item find (const std::string &label) const
 Returns the (first) item that has specified label, or empty item if item does not exist.
 
void force_checkbox_checked (const std::string &contains=std::string(), const std::string &page=std::string())
 If you specified some checkboxes, calling this method requires that one of them should be checked for the OK button to be enabled.
 
const auto & get_items () const
 Returns all items.
 
const auto get_item_value (const std::string &label) const
 Returns the item actual value for specified label, or empty object if item does not exist.
 
bool set_item_value (const std::string &label, const std::any &value) const
 Sets the item actual value for specified label.
 
- Public Member Functions inherited from wex::dialog
 dialog (const data::window &data=data::window())
 Default constructor.
 
const auto & data () const
 Returns the window data.
 

Additional Inherited Members

- Protected Member Functions inherited from wex::dialog
wxSizerItem * add_user_sizer (wxWindow *window, const wxSizerFlags &flags=wxSizerFlags().Expand())
 Adds to the user sizer using the sizer flags.
 
wxSizerItem * add_user_sizer (wxSizer *sizer, const wxSizerFlags &flags=wxSizerFlags().Expand())
 Adds to the user sizer using the sizer flags.
 
void layout_sizers (bool add_separator_line=true)
 layouts the sizers.
 

Detailed Description

Offers an item dialog.

Constructor & Destructor Documentation

◆ item_dialog()

wex::item_dialog::item_dialog ( const std::vector< item > & v,
const data::window & data = data::window().title(_("Options")),
int rows = 0,
int cols = 1 )
inline

Constructor.

Parameters
va vector of items
datathe window data
rowsnumber of rows (0) is dynamic
colsnumber of columns