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. More...
 
const wxCursor & Get (KICURSOR aIdKey) const
 Get a given cursor by its ID. More...
 

Static Public Member Functions

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

Private Attributes

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

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 71 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 372 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 381 of file cursors.cpp.

References m_store.

Referenced by GetCursor().

◆ GetCursor()

const wxCursor CURSOR_STORE::GetCursor ( KICURSOR  aCursorType)
static

◆ GetStockCursor()

wxStockCursor CURSOR_STORE::GetStockCursor ( KICURSOR  aCursorType)
static

Definition at line 408 of file cursors.cpp.

References KIPLATFORM::UI::IsStockCursorOk().

Referenced by GetCursor().

Member Data Documentation

◆ m_store

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

< Internal store of cursors by ID

Definition at line 120 of file cursors.h.

Referenced by CURSOR_STORE(), and Get().


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