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
99
107{
108public:
113 {
114 const char** m_xpm;
115
117 wxPoint m_hotspot;
118 };
119
126 static const WX_CURSOR_TYPE GetCursor( KICURSOR aCursorType, bool aHiDPI = false );
127
133 static wxStockCursor GetStockCursor( KICURSOR aCursorType );
134
135private:
140 CURSOR_STORE();
141
142#if wxCHECK_VERSION( 3, 3, 0 )
148 const wxCursorBundle& storeGetBundle( KICURSOR aIdKey ) const;
149#else
156 const wxCursor& storeGetCursor( KICURSOR aIdKey, bool aHiDPI = false ) const;
157#endif
158
159#if wxCHECK_VERSION( 3, 3, 0 )
161 std::map<KICURSOR, wxCursorBundle> m_bundleMap;
162#else
163 std::map<KICURSOR, wxCursor> m_standardCursorMap;
164 std::map<KICURSOR, wxCursor> m_hidpiCursorMap;
165#endif
166
167};
168
169#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:164
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:363
static wxStockCursor GetStockCursor(KICURSOR aCursorType)
Get stock cursor type for the given cursor.
Definition cursors.cpp:382
CURSOR_STORE()
Construct a store with cursors for all defined types.
Definition cursors.cpp:288
const wxCursor & storeGetCursor(KICURSOR aIdKey, bool aHiDPI=false) const
Get a cursor by its ID, automatically selecting the appropriate resolution.
Definition cursors.cpp:348
std::map< KICURSOR, wxCursor > m_standardCursorMap
Definition cursors.h:163
KICURSOR
Definition cursors.h:44
@ LINE_WIRE64
Definition cursors.h:93
@ LINE_BUS
Definition cursors.h:88
@ LINE_WIRE
Definition cursors.h:92
@ BULLSEYE64
Definition cursors.h:57
@ LABEL_GLOBAL64
Definition cursors.h:81
@ SUBTRACT
Definition cursors.h:70
@ VOLTAGE_PROBE
Definition cursors.h:58
@ PLACE64
Definition cursors.h:97
@ LINE_GRAPHIC64
Definition cursors.h:91
@ MEASURE64
Definition cursors.h:67
@ ARROW64
Definition cursors.h:47
@ SELECT_WINDOW
Definition cursors.h:84
@ SELECT_LASSO64
Definition cursors.h:87
@ ZOOM_IN64
Definition cursors.h:75
@ SUBTRACT64
Definition cursors.h:71
@ COMPONENT64
Definition cursors.h:83
@ REMOVE
Definition cursors.h:52
@ MOVING64
Definition cursors.h:49
@ MEASURE
Definition cursors.h:66
@ PLACE
Definition cursors.h:96
@ SELECT_LASSO
Definition cursors.h:86
@ LINE_BUS64
Definition cursors.h:89
@ ZOOM_IN
Definition cursors.h:74
@ ZOOM_OUT
Definition cursors.h:76
@ HAND64
Definition cursors.h:55
@ LABEL_NET64
Definition cursors.h:79
@ LABEL_GLOBAL
Definition cursors.h:80
@ MOVING
Definition cursors.h:48
@ TUNE64
Definition cursors.h:63
@ TEXT64
Definition cursors.h:65
@ CURRENT_PROBE
Definition cursors.h:60
@ XOR64
Definition cursors.h:73
@ ADD64
Definition cursors.h:69
@ LABEL_NET
Definition cursors.h:78
@ LABEL_HIER64
Definition cursors.h:95
@ VOLTAGE_PROBE64
Definition cursors.h:59
@ CURRENT_PROBE64
Definition cursors.h:61
@ PENCIL64
Definition cursors.h:51
@ SELECT_WINDOW64
Definition cursors.h:85
@ LINE_GRAPHIC
Definition cursors.h:90
@ LABEL_HIER
Definition cursors.h:94
@ BULLSEYE
Definition cursors.h:56
@ PENCIL
Definition cursors.h:50
@ REMOVE64
Definition cursors.h:53
@ ZOOM_OUT64
Definition cursors.h:77
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:113
const char ** m_xpm
The "hotspot" where the cursor "is" in the image.
Definition cursors.h:114