32 #ifndef TBX_KEYLISTENER_H_ 33 #define TBX_KEYLISTENER_H_ 36 #include "eventinfo.h" 58 EventInfo(id_block, poll_block), _used(false)
136 Print = 0x180, Shift_Print = 0x190, Control_Print = 0x1A0, ControlShift_Print = 0x1B0,
137 F1 = 0x181, Shift_F1 = 0x191, Control_F1 = 0x1A1, ControlShift_F1 = 0x1B1,
138 F2 = 0x182, Shift_F2 = 0x192, Control_F2 = 0x1A2, ControlShift_F2 = 0x1B2,
139 F3 = 0x183, Shift_F3 = 0x193, Control_F3 = 0x1A3, ControlShift_F3 = 0x1B3,
140 F4 = 0x184, Shift_F4 = 0x194, Control_F4 = 0x1A4, ControlShift_F4 = 0x1B4,
141 F5 = 0x185, Shift_F5 = 0x195, Control_F5 = 0x1A5, ControlShift_F5 = 0x1B5,
142 F6 = 0x186, Shift_F6 = 0x196, Control_F6 = 0x1A6, ControlShift_F6 = 0x1B6,
143 F7 = 0x187, Shift_F7 = 0x197, Control_F7 = 0x1A7, ControlShift_F7 = 0x1B7,
144 F8 = 0x188, Shift_F8 = 0x198, Control_F8 = 0x1A8, ControlShift_F8 = 0x1B8,
145 F9 = 0x189, Shift_F9 = 0x199, Control_F9 = 0x1A9, ControlShift_F9 = 0x1B9,
146 Tab = 0x18A, Shift_Tab = 0x19A, Control_Tab = 0x1AA, ControlShift_Tab = 0x1BA,
147 Copy = 0x18B, Shift_Copy = 0x19B, Control_Copy = 0x1AB, ControlShift_Copy = 0x1BB,
148 LeftArrow = 0x18C, Shift_LeftArrow = 0x19C, Control_LeftArrow = 0x1AC, ControlShift_LeftArrow = 0x1BC,
149 RightArrow = 0x18D, Shift_RightArrow = 0x19D, Control_RightArrow = 0x1AD, ControlShift_RightArrow = 0x1BD,
150 DownArrow = 0x18E, Shift_DownArrow = 0x19E, Control_DownArrow = 0x1AE, ControlShift_DownArrow = 0x1BE,
151 UpArrow = 0x18F, Shift_UpArrow = 0x19F, Control_UpArrow = 0x1AF, ControlShift_UpArrow = 0x1BF,
152 PageDown = 0x19E, Shift_PageDown = 0x18E, Control_PageDown = 0x1BE, ControlShift_PageDown = 0x1AE,
153 PageUp = 0x19F, Shift_PageUp = 0x18F, Control_PageUp = 0x1BF, ControlShift_PageUp = 0x1AF,
154 F10 = 0x1CA, Shift_F10 = 0x1DA, Control_F10 = 0x1EA, ControlShift_F10 = 0x1FA,
155 F11 = 0x1CB, Shift_F11 = 0x1DB, Control_F11 = 0x1EB, ControlShift_F11 = 0x1FB,
156 F12 = 0x1CC, Shift_F12 = 0x1DC, Control_F12 = 0x1EC, ControlShift_F12 = 0x1FC,
157 Insert = 0x1CD, Shift_Insert = 0x1DD, Control_Insert = 0x1ED, ControlShift_Insert = 0x1FD
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
int key() const
key code of character press.
Definition: keylistener.h:128
This is the base class for all Gadgets.
Definition: gadget.h:48
PollBlock & _data
raw data from the event
Definition: eventinfo.h:53
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
Object self_object() const
Get the object the event occured on.
Definition: eventrouter.cc:1615
SpecialKeys
Enumeration for special key codes passed from the WIMP.
Definition: keylistener.h:133
int colour() const
Get caret colour - if colour set.
Definition: keylistener.h:93
Gadget gadget() const
Get the gadget that the key is pressed in.
Definition: keylistener.h:71
bool is_key_used() const
Returns true if a listener has used the key.
Definition: keylistener.h:168
int x_offset() const
Get the current x offset of the caret relative to the window origin.
Definition: keylistener.h:77
int y_offset() const
Get the current y offset of the caret relative to the window origin.
Definition: keylistener.h:83
Component self_component() const
Get the component the event occured on.
Definition: eventrouter.cc:1626
const IdBlock & id_block() const
IdBlock for the current event.
Definition: eventinfo.h:71
bool vdu() const
Is it a vdu caret.
Definition: keylistener.h:99
int index() const
The index of the caret into the writeable field or -1 if not in a writeable field.
Definition: keylistener.h:120
bool invisible() const
Invisible caret.
Definition: keylistener.h:104
The Window object represents a toolbox window.
Definition: window.h:69
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
Window window() const
Get Window that the key is pressed in.
Definition: keylistener.h:64
Base class for all toolbox event listeners.
Definition: listener.h:33
int height() const
Get the height of the caret.
Definition: keylistener.h:88
int word[64]
Array containing information return from Wimp_Poll.
Definition: pollinfo.h:76
bool colour_untranslated() const
Colour is untranslated, otherwise they are a Wimp colour.
Definition: keylistener.h:114
void key_used()
Call if the key has been used by the listener.
Definition: keylistener.h:163
bool uses_colour() const
caret_color is used for the colour otherwise caret is Wimp colour 11
Definition: keylistener.h:109
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:41
Event data for lose or gain caret listener.
Definition: keylistener.h:45
Listener for KeyPressed WIMP event.
Definition: keylistener.h:178
KeyEvent(IdBlock &id_block, PollBlock &poll_block)
Construct KeyEvent from information returned from the WIMP.
Definition: keylistener.h:57