KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CURSOR_STORE Class Reference

Simple class to construct and store cursors against unique ID keys. More...

#include <cursors.h>

Classes

struct  CURSOR_DEF
 Definition of a cursor. More...
 

Public Member Functions

 CURSOR_STORE (const std::vector< CURSOR_DEF > &aDefs)
 Construct a store with a pre-set list of cursors.
 
const wxCursor & Get (KICURSOR aIdKey) const
 Get a given cursor by its ID.
 

Static Public Member Functions

static const wxCursor GetCursor (KICURSOR aCursorType)
 
static const wxCursor GetHiDPICursor (KICURSOR aCursorType)
 
static wxStockCursor GetStockCursor (KICURSOR aCursorType)
 

Private Attributes

std::map< KICURSOR, wxCursor > m_store
 < Internal store of cursors by ID
 

Detailed Description

Simple class to construct and store cursors against unique ID keys.

This can be used to lazily construct cursors as needed for specific applications.

Definition at line 98 of file cursors.h.

Constructor & Destructor Documentation

◆ CURSOR_STORE()

CURSOR_STORE::CURSOR_STORE ( const std::vector< CURSOR_DEF > &  aDefs)

Construct a store with a pre-set list of cursors.

In future, an "Add()" function could be added if stores need to dynamically add cursors.

Parameters
aDefsthe list of pre-set cursor definitions

Definition at line 566 of file cursors.cpp.

References constructCursor(), and m_store.

Member Function Documentation

◆ Get()

const wxCursor & CURSOR_STORE::Get ( KICURSOR  aIdKey) const

Get a given cursor by its ID.

Parameters
aIdKeythe ID key to look up
Returns
the cursor, if found, else wxNullCursor

Definition at line 575 of file cursors.cpp.

References m_store.

Referenced by GetCursor(), and GetHiDPICursor().

◆ GetCursor()

const wxCursor CURSOR_STORE::GetCursor ( KICURSOR  aCursorType)
static

◆ GetHiDPICursor()

const wxCursor CURSOR_STORE::GetHiDPICursor ( KICURSOR  aCursorType)
static

◆ GetStockCursor()

wxStockCursor CURSOR_STORE::GetStockCursor ( KICURSOR  aCursorType)
static

Definition at line 616 of file cursors.cpp.

References KIPLATFORM::UI::IsStockCursorOk().

Referenced by GetCursor(), and GetHiDPICursor().

Member Data Documentation

◆ m_store

std::map<KICURSOR, wxCursor> CURSOR_STORE::m_store
private

< Internal store of cursors by ID

Definition at line 149 of file cursors.h.

Referenced by CURSOR_STORE(), and Get().


The documentation for this class was generated from the following files: