1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13class wxKeyboardState
14{
15    %Docstring
16        KeyboardState(controlDown=False, shiftDown=False, altDown=False, metaDown=False)
17
18        Provides methods for testing the state of the keyboard modifier keys.
19    %End
20    %TypeHeaderCode
21        #include <wx/kbdstate.h>
22    %End
23
24public:
25    wxKeyboardState(
26        bool controlDown = false,
27        bool shiftDown = false,
28        bool altDown = false,
29        bool metaDown = false
30    );
31
32    int GetModifiers() const;
33    %Docstring
34        GetModifiers() -> int
35
36        Return the bit mask of all pressed modifier keys.
37    %End
38
39    bool HasAnyModifiers() const;
40    %Docstring
41        HasAnyModifiers() -> bool
42
43        Returns true if any modifiers at all are pressed.
44    %End
45
46    bool HasModifiers() const;
47    %Docstring
48        HasModifiers() -> bool
49
50        Returns true if Control or Alt are pressed.
51    %End
52
53    bool ControlDown() const;
54    %Docstring
55        ControlDown() -> bool
56
57        Returns true if the Control key or Apple/Command key under OS X is
58        pressed.
59    %End
60
61    bool RawControlDown() const;
62    %Docstring
63        RawControlDown() -> bool
64
65        Returns true if the Control key (also under OS X).
66    %End
67
68    bool ShiftDown() const;
69    %Docstring
70        ShiftDown() -> bool
71
72        Returns true if the Shift key is pressed.
73    %End
74
75    bool MetaDown() const;
76    %Docstring
77        MetaDown() -> bool
78
79        Returns true if the Meta/Windows/Apple key is pressed.
80    %End
81
82    bool AltDown() const;
83    %Docstring
84        AltDown() -> bool
85
86        Returns true if the Alt key is pressed.
87    %End
88
89    bool CmdDown() const;
90    %Docstring
91        CmdDown() -> bool
92
93        Returns true if the key used for command accelerators is pressed.
94    %End
95
96    void SetControlDown(
97        bool down
98    );
99    %Docstring
100        SetControlDown(down)
101    %End
102
103    void SetRawControlDown(
104        bool down
105    );
106    %Docstring
107        SetRawControlDown(down)
108    %End
109
110    void SetShiftDown(
111        bool down
112    );
113    %Docstring
114        SetShiftDown(down)
115    %End
116
117    void SetAltDown(
118        bool down
119    );
120    %Docstring
121        SetAltDown(down)
122    %End
123
124    void SetMetaDown(
125        bool down
126    );
127    %Docstring
128        SetMetaDown(down)
129    %End
130
131    %Property(name=controlDown, get=ControlDown, set=SetControlDown)
132    %Property(name=rawControlDown, get=RawControlDown, set=SetRawControlDown)
133    %Property(name=shiftDown, get=ShiftDown, set=SetShiftDown)
134    %Property(name=altDown, get=AltDown, set=SetAltDown)
135    %Property(name=metaDown, get=MetaDown, set=SetMetaDown)
136    %Property(name=cmdDown, get=CmdDown)
137};  // end of class wxKeyboardState
138
139
140%Extract(id=pycode_core)
141# For 2.8 compatibility
142KeyboardState.m_controlDown = wx.deprecated(KeyboardState.controlDown, "Use controlDown instead.")
143KeyboardState.m_shiftDown   = wx.deprecated(KeyboardState.shiftDown, "Use shiftDown instead.")
144KeyboardState.m_altDown     = wx.deprecated(KeyboardState.altDown, "Use altDown instead.")
145KeyboardState.m_metaDown    = wx.deprecated(KeyboardState.metaDown, "Use metaDown instead.")
146
147%End
148
149
150//---------------------------------------------------------------------------
151
152