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

Offers a toolbar together with wex art. More...

#include <wex/ui/toolbar.h>

Inherits wxAuiToolBar.

Public Types

typedef std::vector< std::tuple< int, std::string, std::string, std::string, std::string, bool, std::function< void(wxCheckBox *)> > checkboxes_t)
 Type for adding checkboxes.
 

Public Member Functions

 toolbar (frame *frame, const data::window &data=data::window().style(wxAUI_TB_DEFAULT_STYLE))
 Constructor.
 
void add_checkboxes (const checkboxes_t &v, bool realize=true)
 Adds a vector of checkbox controls to this toolbar.
 
void add_checkboxes_standard (bool realize=true)
 Adds the standard checkboxes.
 
void add_find (bool realize=true)
 Adds a find textctrl, up and down arrows and checkboxes.
 
void add_standard (bool realize=true)
 Adds the standard controls (e.g. file open).
 
bool add_tool (const std::vector< data::toolbar_item > &v, bool realize=true)
 Adds a vector of general toolbar items to this toolbar.
 
bool set_checkbox (const std::string &name, bool value) const
 Sets checkbox state of checkboxes added using add_checkboxes.
 

Detailed Description

Offers a toolbar together with wex art.

Default no controls are added, you have to call one of the add_ methods to do that.

Member Function Documentation

◆ add_checkboxes_standard()

void wex::toolbar::add_checkboxes_standard ( bool realize = true)

Adds the standard checkboxes.

This is a hex and a sync checkbox, and a process check box if you called prepare_output previously.

◆ add_find()

void wex::toolbar::add_find ( bool realize = true)

Adds a find textctrl, up and down arrows and checkboxes.

The find textctrl allows you to find in a grid, stc or listview component on the specified frame.

◆ add_tool()

bool wex::toolbar::add_tool ( const std::vector< data::toolbar_item > & v,
bool realize = true )

Adds a vector of general toolbar items to this toolbar.

If bitmap in wex::art is present the bitmap from the art is added. Returns false if one of the items could not be added.

◆ set_checkbox()

bool wex::toolbar::set_checkbox ( const std::string & name,
bool value ) const

Sets checkbox state of checkboxes added using add_checkboxes.

Returns true if checkbox was found.

Parameters
namename of checkbox to set
valuevalue