KiCad PCB EDA Suite
|
Simple class to construct and store cursors against unique ID keys. More...
#include <cursors.h>
Classes | |
struct | CURSOR_DEF |
Definition of a cursor. More... | |
Static Public Member Functions | |
static const WX_CURSOR_TYPE | GetCursor (KICURSOR aCursorType, bool aHiDPI=false) |
Get a cursor bundle (wx 3.3+) or appropriate cursor (older versions) | |
static wxStockCursor | GetStockCursor (KICURSOR aCursorType) |
Get stock cursor type for the given cursor. | |
Private Member Functions | |
CURSOR_STORE () | |
Construct a store with cursors for all defined types. | |
const wxCursor & | storeGetCursor (KICURSOR aIdKey, bool aHiDPI=false) const |
Get a cursor by its ID, automatically selecting the appropriate resolution. | |
Private Attributes | |
std::map< KICURSOR, wxCursor > | m_standardCursorMap |
std::map< KICURSOR, wxCursor > | m_hidpiCursorMap |
Simple class to construct and store cursors against unique ID keys.
This can be used to lazily construct cursors as needed for specific applications.
|
private |
Construct a store with cursors for all defined types.
The store will automatically contain both standard and HiDPI cursors.
Definition at line 288 of file cursors.cpp.
References cursors_defs, m_hidpiCursorMap, and m_standardCursorMap.
|
static |
Get a cursor bundle (wx 3.3+) or appropriate cursor (older versions)
aCursorType | the cursor type to get |
aHiDPI | whether to prefer HiDPI version for older wx versions |
Definition at line 363 of file cursors.cpp.
References GetStockCursor(), and storeGetCursor().
Referenced by KIGFX::CAIRO_GAL::SetNativeCursorStyle(), and KIGFX::OPENGL_GAL::SetNativeCursorStyle().
|
static |
Get stock cursor type for the given cursor.
aCursorType | the cursor type |
Definition at line 382 of file cursors.cpp.
References KIPLATFORM::UI::IsStockCursorOk().
Referenced by GetCursor().
|
private |
Get a cursor by its ID, automatically selecting the appropriate resolution.
aIdKey | the ID key to look up |
aHiDPI | whether to prefer HiDPI version if available |
Definition at line 348 of file cursors.cpp.
References m_hidpiCursorMap, and m_standardCursorMap.
Referenced by GetCursor().
|
private |
Definition at line 164 of file cursors.h.
Referenced by CURSOR_STORE(), and storeGetCursor().
|
private |
Definition at line 163 of file cursors.h.
Referenced by CURSOR_STORE(), and storeGetCursor().