Rev 7823 | Rev 7924 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7823 | Rev 7863 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | int MouseOver(int xx, yy); |
24 | int MouseOver(int xx, yy); |
25 | int MouseScroll(dword scroll_state); |
25 | int MouseScroll(dword scroll_state); |
26 | int KeyDown(); |
26 | int KeyDown(); |
27 | int KeyUp(); |
27 | int KeyUp(); |
28 | int KeyHome(); |
28 | int KeyHome(); |
- | 29 | int KeyHomeHor(); |
|
29 | int KeyEnd(); |
30 | int KeyEnd(); |
- | 31 | int KeyEndHor(); |
|
30 | int KeyPgDown(); |
32 | int KeyPgDown(); |
31 | int KeyPgUp(); |
33 | int KeyPgUp(); |
32 | int KeyLeft(); |
34 | int KeyLeft(); |
33 | int KeyRight(); |
35 | int KeyRight(); |
34 | void CheckDoesValuesOkey(); |
36 | void CheckDoesValuesOkey(); |
Line 122... | Line 124... | ||
122 | return ret; |
124 | return ret; |
123 | } |
125 | } |
Line 124... | Line 126... | ||
124 | 126 | ||
125 | :int llist::ProcessKey(dword key) |
127 | :int llist::ProcessKey(dword key) |
- | 128 | { |
|
- | 129 | if (horisontal_selelection) switch(key) |
|
- | 130 | { |
|
- | 131 | case SCAN_CODE_LEFT: return KeyLeft(); |
|
- | 132 | case SCAN_CODE_RIGHT: return KeyRight(); |
|
- | 133 | case SCAN_CODE_HOME: return KeyHomeHor(); |
|
- | 134 | case SCAN_CODE_END: return KeyEndHor(); |
|
126 | { |
135 | } |
127 | switch(key) |
136 | switch(key) |
128 | { |
137 | { |
129 | case SCAN_CODE_DOWN: return KeyDown(); |
138 | case SCAN_CODE_DOWN: return KeyDown(); |
130 | case SCAN_CODE_UP: return KeyUp(); |
139 | case SCAN_CODE_UP: return KeyUp(); |
131 | case SCAN_CODE_HOME: return KeyHome(); |
140 | case SCAN_CODE_HOME: return KeyHome(); |
132 | case SCAN_CODE_END: return KeyEnd(); |
141 | case SCAN_CODE_END: return KeyEnd(); |
133 | case SCAN_CODE_PGUP: return KeyPgUp(); |
142 | case SCAN_CODE_PGUP: return KeyPgUp(); |
134 | case SCAN_CODE_PGDN: return KeyPgDown(); |
143 | case SCAN_CODE_PGDN: return KeyPgDown(); |
135 | } |
- | |
136 | if (horisontal_selelection) switch(key) |
- | |
137 | { |
- | |
138 | case SCAN_CODE_LEFT: return KeyLeft(); |
- | |
139 | case SCAN_CODE_RIGHT: return KeyRight(); |
- | |
140 | } |
144 | } |
141 | return 0; |
145 | return 0; |
Line 142... | Line 146... | ||
142 | } |
146 | } |
143 | 147 | ||
Line 162... | Line 166... | ||
162 | cur_y++; |
166 | cur_y++; |
163 | } |
167 | } |
164 | if (cur_y < first) || (cur_y >= first + visible) |
168 | if (cur_y < first) || (cur_y >= first + visible) |
165 | { |
169 | { |
166 | first = cur_y; |
170 | first = cur_y; |
167 | CheckDoesValuesOkey(); |
- | |
168 | } |
171 | } |
- | 172 | CheckDoesValuesOkey(); |
|
169 | return 1; |
173 | return 1; |
170 | } |
174 | } |
Line 171... | Line 175... | ||
171 | 175 | ||
172 | :int llist::KeyUp() |
176 | :int llist::KeyUp() |
Line 194... | Line 198... | ||
194 | CheckDoesValuesOkey(); |
198 | CheckDoesValuesOkey(); |
195 | } |
199 | } |
196 | return 1; |
200 | return 1; |
197 | } |
201 | } |
Line -... | Line 202... | ||
- | 202 | ||
- | 203 | :int llist::KeyHomeHor() |
|
- | 204 | { |
|
- | 205 | if (cur_x==0) return 0; |
|
- | 206 | cur_x = 0; |
|
- | 207 | return 1; |
|
- | 208 | } |
|
- | 209 | ||
- | 210 | :int llist::KeyEndHor() |
|
- | 211 | { |
|
- | 212 | if (cur_x==column_max) return 0; |
|
- | 213 | cur_x = column_max; |
|
- | 214 | CheckDoesValuesOkey(); |
|
- | 215 | return 1; |
|
- | 216 | } |
|
198 | 217 | ||
199 | :int llist::KeyHome() |
218 | :int llist::KeyHome() |
200 | { |
219 | { |
201 | if (cur_y==0) && (first==0) return 0; |
220 | if (cur_y==0) && (first==0) return 0; |
202 | cur_y = first = 0; |
221 | cur_y = first = 0; |
Line 235... | Line 254... | ||
235 | :void llist::CheckDoesValuesOkey() |
254 | :void llist::CheckDoesValuesOkey() |
236 | { |
255 | { |
237 | if (visible + first > count) first = count - visible; |
256 | if (visible + first > count) first = count - visible; |
238 | if (first < 0) first = 0; |
257 | if (first < 0) first = 0; |
239 | if (cur_y >= count) cur_y = count - 1; |
258 | if (cur_y >= count) cur_y = count - 1; |
- | 259 | if (cur_x >= column_max) cur_x = column_max; |
|
240 | if (cur_y < 0) cur_y = 0; |
260 | if (cur_y < 0) cur_y = 0; |
241 | if (cur_x < 0) cur_x = 0; |
261 | if (cur_x < 0) cur_x = 0; |
242 | } |
262 | } |
Line 243... | Line 263... | ||
243 | 263 |