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

Offers a collection of art, mapping window id's to art id's. More...

#include <wex/ui/art.h>

Public Types

enum class  art_t { BOTH , MATERIAL , STOCK , USER }
 The kind of art that will be used by the wex lib. More...
 

Public Member Functions

 art (wxWindowID id)
 Constructor, provide the window id.
 
const wxBitmapBundle get_bitmap (const wxArtClient &client=wxART_OTHER, const wxSize &bitmap_size=wxDefaultSize, const wxColour &colour=wxNullColour) const
 If the window id is a stock id, returns stock bitmap bundle from the stock art map.
 

Static Public Member Functions

static bool default_client (const wxArtClient &c)
 Sets the default bitmap client (for material art).
 
static bool default_colour (const wxColour &c)
 Sets the default bitmap colour (for material art).
 
static void insert (const std::unordered_map< wxWindowID, wxArtID > &ids)
 Inserts art ids.
 
static void type (art_t t)
 Specify the art to use.
 

Detailed Description

Offers a collection of art, mapping window id's to art id's.

Default the stock art and material design art is used. You can also choose to use your own art only.

Member Enumeration Documentation

◆ art_t

enum class wex::art::art_t
strong

The kind of art that will be used by the wex lib.

Enumerator
BOTH 

use stock and material art

MATERIAL 

use material art

STOCK 

use stock art

USER 

use none, add you own art

Member Function Documentation

◆ default_client()

static bool wex::art::default_client ( const wxArtClient & c)
static

Sets the default bitmap client (for material art).

Returns false if client if not valid for material art.

◆ default_colour()

static bool wex::art::default_colour ( const wxColour & c)
static

Sets the default bitmap colour (for material art).

Returns false if colour is not valid.

◆ get_bitmap()

const wxBitmapBundle wex::art::get_bitmap ( const wxArtClient & client = wxART_OTHER,
const wxSize & bitmap_size = wxDefaultSize,
const wxColour & colour = wxNullColour ) const

If the window id is a stock id, returns stock bitmap bundle from the stock art map.

Check IsOk for valid bitmap.

◆ type()

static void wex::art::type ( art_t t)
static

Specify the art to use.

If USER is used, the current art ids are cleared, and you should insert your new ones to get bitmaps.