KiCad PCB EDA Suite
Loading...
Searching...
No Matches
cursors.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.TXT for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef CURSOR_STORE__H
25#define CURSOR_STORE__H
26
27#include <wx/cursor.h>
28
29#include <map>
30#include <vector>
31
36#if wxCHECK_VERSION( 3, 3, 0 )
37typedef wxCursorBundle WX_CURSOR_TYPE;
38#else
39typedef wxCursor WX_CURSOR_TYPE;
40#endif
41
42
101
109{
110public:
115 {
116 const char** m_xpm;
117
119 wxPoint m_hotspot;
120 };
121
128 static const WX_CURSOR_TYPE GetCursor( KICURSOR aCursorType, bool aHiDPI = false );
129
135 static wxStockCursor GetStockCursor( KICURSOR aCursorType );
136
137private:
142 CURSOR_STORE();
143
144#if wxCHECK_VERSION( 3, 3, 0 )
150 const wxCursorBundle& storeGetBundle( KICURSOR aIdKey ) const;
151#else
158 const wxCursor& storeGetCursor( KICURSOR aIdKey, bool aHiDPI = false ) const;
159#endif
160
161#if wxCHECK_VERSION( 3, 3, 0 )
163 std::map<KICURSOR, wxCursorBundle> m_bundleMap;
164#else
165 std::map<KICURSOR, wxCursor> m_standardCursorMap;
166 std::map<KICURSOR, wxCursor> m_hidpiCursorMap;
167#endif
168
169};
170
171#endif // CURSOR_STORE__H
@ ADD
Definition am_param.h:150
Store all of the related footprint information found in a netlist.
std::map< KICURSOR, wxCursor > m_hidpiCursorMap
Definition cursors.h:166
static const WX_CURSOR_TYPE GetCursor(KICURSOR aCursorType, bool aHiDPI=false)
Get a cursor bundle (wx 3.3+) or appropriate cursor (older versions)
Definition cursors.cpp:388
static wxStockCursor GetStockCursor(KICURSOR aCursorType)
Get stock cursor type for the given cursor.
Definition cursors.cpp:407
CURSOR_STORE()
Construct a store with cursors for all defined types.
Definition cursors.cpp:313
const wxCursor & storeGetCursor(KICURSOR aIdKey, bool aHiDPI=false) const
Get a cursor by its ID, automatically selecting the appropriate resolution.
Definition cursors.cpp:373
std::map< KICURSOR, wxCursor > m_standardCursorMap
Definition cursors.h:165
KICURSOR
Definition cursors.h:44
@ LINE_WIRE64
Definition cursors.h:95
@ LINE_BUS
Definition cursors.h:90
@ LINE_WIRE
Definition cursors.h:94
@ BULLSEYE64
Definition cursors.h:59
@ LABEL_GLOBAL64
Definition cursors.h:83
@ SUBTRACT
Definition cursors.h:72
@ VOLTAGE_PROBE
Definition cursors.h:60
@ PLACE64
Definition cursors.h:99
@ LINE_GRAPHIC64
Definition cursors.h:93
@ MEASURE64
Definition cursors.h:69
@ ARROW64
Definition cursors.h:47
@ SELECT_WINDOW
Definition cursors.h:86
@ SELECT_LASSO64
Definition cursors.h:89
@ ZOOM_IN64
Definition cursors.h:77
@ SUBTRACT64
Definition cursors.h:73
@ COMPONENT64
Definition cursors.h:85
@ REMOVE
Definition cursors.h:54
@ MOVING64
Definition cursors.h:49
@ MEASURE
Definition cursors.h:68
@ PLACE
Definition cursors.h:98
@ SELECT_LASSO
Definition cursors.h:88
@ LINE_BUS64
Definition cursors.h:91
@ ZOOM_IN
Definition cursors.h:76
@ ZOOM_OUT
Definition cursors.h:78
@ HAND64
Definition cursors.h:57
@ LABEL_NET64
Definition cursors.h:81
@ LABEL_GLOBAL
Definition cursors.h:82
@ MOVING
Definition cursors.h:48
@ TUNE64
Definition cursors.h:65
@ TEXT64
Definition cursors.h:67
@ CURRENT_PROBE
Definition cursors.h:62
@ XOR64
Definition cursors.h:75
@ WARNING64
Definition cursors.h:51
@ ADD64
Definition cursors.h:71
@ LABEL_NET
Definition cursors.h:80
@ LABEL_HIER64
Definition cursors.h:97
@ VOLTAGE_PROBE64
Definition cursors.h:61
@ CURRENT_PROBE64
Definition cursors.h:63
@ PENCIL64
Definition cursors.h:53
@ SELECT_WINDOW64
Definition cursors.h:87
@ LINE_GRAPHIC
Definition cursors.h:92
@ LABEL_HIER
Definition cursors.h:96
@ BULLSEYE
Definition cursors.h:58
@ PENCIL
Definition cursors.h:52
@ REMOVE64
Definition cursors.h:55
@ ZOOM_OUT64
Definition cursors.h:79
wxCursor WX_CURSOR_TYPE
Represents either a wxCursorBundle for wx 3.3+ or a wxCursor for older versions.
Definition cursors.h:39
@ XOR
Definition image.h:45
Definition of a cursor.
Definition cursors.h:115
const char ** m_xpm
The "hotspot" where the cursor "is" in the image.
Definition cursors.h:116