MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
consoleInput.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2011 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 #include <vlutil/vlString.h>
11 #include <deque>
12 
13 // Process command line input into a command.
15 {
16 public:
19 
23  virtual bool keyboardTick(char* command);
24 
26  virtual void forceInput();
27 
29  virtual void restoreCommand(int index);
30 
32  virtual void eraseLastCommand();
33 
35  virtual void printHistory(unsigned int start=0, unsigned int end=65535) const;
36 
37 protected:
38 
40  virtual bool processInput(unsigned int x, char* command);
41 
43  virtual int isEndOfLine(unsigned int x);
44 
46  virtual void append(char x);
47 
49  virtual void unAppend(void);
50 
52  virtual bool isEmpty() const;
53 
55  virtual void saveCommand();
56 
58  virtual void restorePreviousCommand();
59 
61  virtual void restoreNextCommand();
62 
64  virtual void clearCommand();
65 
66 protected:
67 
68  char myCommandLine[1024];
69  std::deque<DtString>myPreviousCommands;
72  char myClearLine[1024];
76 };
77 
78 
79 /* Keyboard values */
80 /* These are the scan codes for the keyboard */
81 
82 #define NUM_OF_FKEYS 12
83 
84 /* Direction Keys, Insert, Delete, Backspace, and Control Return. */
85 #define HOME 0x4700
86 #define END 0x4F00
87 #define PGUP 0x4900
88 #define PGDN 0x5100
89 #define LEFT 0x4B00
90 #define RIGHT 0x4D00
91 #define UP 0x4800
92 #define DOWN 0x5000
93 #define INS 0x5200
94 #define DEL 0x5300
95 #define BACKSPACE 0x08
96 #define NEW_LINE 0x0A
97 #define C_RET 0x0D
98 
99 
100 /* Escape Key */
101 #define ESCAPE 0x001B
102 #define ESC ESCAPE
103 
104 /* Control + Direction Key */
105 #define CTRL_LEFT 0x7300
106 #define CTRL_RIGHT 0x7400
107 #define CTRL_UP 0x8D00
108 #define CTRL_DOWN 0x9100
109 #define CTRL_HOME 0x7700
110 #define CTRL_END 0x7500
111 #define CTRL_PGUP 0x8400
112 #define CTRL_PGDN 0x7600
113 #define CTRL_INS 0x9200
114 #define CTRL_DEL 0x9300
115 
116 /* Number Pad Numeric Operation Keys */
117 #define GRAYDIV 0x352F
118 #define GRAYSTAR 0x3720
119 #define GRAYMINUS 0x4A2D
120 #define GRAYPLUS 0x4E2B
121 
122 /* Function Keys */
123 #define F1 0x3B00
124 #define F2 0x3C00
125 #define F3 0x3D00
126 #define F4 0x3E00
127 #define F5 0x3F00
128 #define F6 0x4000
129 #define F7 0x4100
130 #define F8 0x4200
131 #define F9 0x4300
132 #define F10 0x4400
133 #define F11 0x8500
134 #define F12 0x8600
135 
136 /* Shift + Function Key */
137 #define SHIFTF1 0x5400
138 #define SHIFTF2 0x5500
139 #define SHIFTF3 0x5600
140 #define SHIFTF4 0x5700
141 #define SHIFTF5 0x5800
142 #define SHIFTF6 0x5900
143 #define SHIFTF7 0x5A00
144 #define SHIFTF8 0x5B00
145 #define SHIFTF9 0x5C00
146 #define SHIFTF10 0x5D00
147 
148 /* Alt + Function Key */
149 #define ALTF1 0x6800
150 #define ALTF2 0x6900
151 #define ALTF3 0x6A00
152 #define ALTF4 0x6B00
153 #define ALTF5 0x6C00
154 #define ALTF6 0x6D00
155 #define ALTF7 0x6E00
156 #define ALTF8 0x6F00
157 #define ALTF9 0x7000
158 #define ALTF10 0x7100
159 
160 /* Control + Function Key */
161 #define CTRLF1 0x5E00
162 #define CTRLF2 0x5F00
163 #define CTRLF3 0x6000
164 #define CTRLF4 0x6100
165 #define CTRLF5 0x6200
166 #define CTRLF6 0x6300
167 #define CTRLF7 0x6400
168 #define CTRLF8 0x6500
169 #define CTRLF9 0x6600
170 #define CTRLF10 0x6700
171 
172 /* Alt + Numeric Key, "-", or "=" */
173 #define ALT1 0x7800
174 #define ALT2 0x7900
175 #define ALT3 0x7A00
176 #define ALT4 0x7B00
177 #define ALT5 0x7C00
178 #define ALT6 0x7D00
179 #define ALT7 0x7E00
180 #define ALT8 0x7F00
181 #define ALT9 0x8000
182 #define ALT0 0x8100
183 #define ALT_MINUS 0x8200
184 #define ALT_EQUALS 0x8300
185 
186 /* Alt + Alphabetic Key */
187 #define ALTQ 0x1000
188 #define ALTW 0x1100
189 #define ALTE 0x1200
190 #define ALTR 0x1300
191 #define ALTT 0x1400
192 #define ALTY 0x1500
193 #define ALTU 0x1600
194 #define ALTI 0x1700
195 #define ALTO 0x1800
196 #define ALTP 0x1900
197 
198 #define ALTA 0x1E00
199 #define ALTS 0x1F00
200 #define ALTD 0x2000
201 #define ALTF 0x2100
202 #define ALTG 0x2200
203 #define ALTH 0x2300
204 #define ALTJ 0x2400
205 #define ALTK 0x2500
206 #define ALTL 0x2600
207 
208 #define ALTZ 0x2C00
209 #define ALTX 0x2D00
210 #define ALTC 0x2E00
211 #define ALTV 0x2F00
212 #define ALTB 0x3000
213 #define ALTN 0x3100
214 #define ALTM 0x3200
215 
216 /* Special Keys */
217 #define BACKTAB 0x0F00
218 #define SYSRQ 0x7200
219 #define BREAK 0x0000
220 #define CTRLBACKSLASH 0x2B1C
221 #define ENTER 0x1C0D
222 #define CTRLENTER 0x1C0A
223 
224 /* Immediate Action Keys */
225 #define CTRL_D 0x0004
226 #define CTRL_F 0x0006
227 #define CTRL_R 0x0012
228 #define CTRL_S 0x0013
229 #define CTRL_U 0x0015
230 #define CTRL_ENTER 0x000A

Document ID: Generated on Tue Aug 1 09:00:26 EDT 2017 from SVN revision 179128
Copyright © 2017 VT MÄK. All Rights Reserved (www.mak.com)