comparison dwt/accessibility/Accessible.d @ 151:0ba75290f8ce

Added a bunch of missing defaults to switch statements
author Jacob Carlborg <doob@me.com>
date Wed, 10 Jun 2009 21:52:31 +0200
parents ad4e1fe71a5a
children
comparison
equal deleted inserted replaced
150:1ec7c20355bd 151:0ba75290f8ce
256 case ACC.ROLE_RADIOBUTTON: 256 case ACC.ROLE_RADIOBUTTON:
257 case ACC.ROLE_CHECKBUTTON: 257 case ACC.ROLE_CHECKBUTTON:
258 case ACC.ROLE_TABITEM: 258 case ACC.ROLE_TABITEM:
259 returnValue.addObject(OS.NSAccessibilityPressAction); 259 returnValue.addObject(OS.NSAccessibilityPressAction);
260 break; 260 break;
261 default:
261 } 262 }
262 263
263 switch (event.detail) { 264 switch (event.detail) {
264 case ACC.ROLE_COMBOBOX: 265 case ACC.ROLE_COMBOBOX:
265 returnValue.addObject(OS.NSAccessibilityConfirmAction); 266 returnValue.addObject(OS.NSAccessibilityConfirmAction);
266 break; 267 break;
268 default:
267 } 269 }
268 270
269 271
270 if (childID is ACC.CHILDID_SELF) { 272 if (childID is ACC.CHILDID_SELF) {
271 actionNames = returnValue; 273 actionNames = returnValue;
323 case ACC.ROLE_LABEL: 325 case ACC.ROLE_LABEL:
324 case ACC.ROLE_TABITEM: 326 case ACC.ROLE_TABITEM:
325 case ACC.ROLE_TABFOLDER: 327 case ACC.ROLE_TABFOLDER:
326 returnValue.addObject(OS.NSAccessibilityValueAttribute); 328 returnValue.addObject(OS.NSAccessibilityValueAttribute);
327 break; 329 break;
330 default:
328 } 331 }
329 332
330 // The following are expected to report their enabled status (AXEnabled) 333 // The following are expected to report their enabled status (AXEnabled)
331 switch (event.detail) { 334 switch (event.detail) {
332 case ACC.ROLE_CHECKBUTTON: 335 case ACC.ROLE_CHECKBUTTON:
335 case ACC.ROLE_TABITEM: 338 case ACC.ROLE_TABITEM:
336 case ACC.ROLE_PUSHBUTTON: 339 case ACC.ROLE_PUSHBUTTON:
337 case ACC.ROLE_COMBOBOX: 340 case ACC.ROLE_COMBOBOX:
338 returnValue.addObject(OS.NSAccessibilityEnabledAttribute); 341 returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
339 break; 342 break;
343 default:
340 } 344 }
341 345
342 // The following are expected to report a title (AXTitle) 346 // The following are expected to report a title (AXTitle)
343 switch (event.detail) { 347 switch (event.detail) {
344 case ACC.ROLE_CHECKBUTTON: 348 case ACC.ROLE_CHECKBUTTON:
345 case ACC.ROLE_RADIOBUTTON: 349 case ACC.ROLE_RADIOBUTTON:
346 case ACC.ROLE_PUSHBUTTON: 350 case ACC.ROLE_PUSHBUTTON:
347 case ACC.ROLE_TABITEM: 351 case ACC.ROLE_TABITEM:
348 returnValue.addObject(OS.NSAccessibilityTitleAttribute); 352 returnValue.addObject(OS.NSAccessibilityTitleAttribute);
349 break; 353 break;
354 default:
350 } 355 }
351 356
352 // Accessibility verifier says these attributes must be reported for combo boxes. 357 // Accessibility verifier says these attributes must be reported for combo boxes.
353 if (event.detail is ACC.ROLE_COMBOBOX) { 358 if (event.detail is ACC.ROLE_COMBOBOX) {
354 returnValue.addObject(OS.NSAccessibilityExpandedAttribute); 359 returnValue.addObject(OS.NSAccessibilityExpandedAttribute);
745 returnValue = NSString.stringWith(e.result); 750 returnValue = NSString.stringWith(e.result);
746 } else { 751 } else {
747 if (value !is null) returnValue = NSString.stringWith(value); 752 if (value !is null) returnValue = NSString.stringWith(value);
748 } 753 }
749 break; 754 break;
755 default:
750 } 756 }
751 757
752 return returnValue; 758 return returnValue;
753 } 759 }
754 760
1182 if (text.charAt (i + 1) is '\n') ++i; 1188 if (text.charAt (i + 1) is '\n') ++i;
1183 } 1189 }
1184 // FALL THROUGH 1190 // FALL THROUGH
1185 case '\n': 1191 case '\n':
1186 lineNumber++; 1192 lineNumber++;
1193 default:
1187 } 1194 }
1188 } 1195 }
1189 return lineNumber; 1196 return lineNumber;
1190 } 1197 }
1191 1198
1207 case '\r': 1214 case '\r':
1208 if (i + 1 < length && text.charAt (i + 1) is '\n') i++; 1215 if (i + 1 < length && text.charAt (i + 1) is '\n') i++;
1209 // FALL THROUGH 1216 // FALL THROUGH
1210 case '\n': 1217 case '\n':
1211 line++; 1218 line++;
1219 default:
1212 } 1220 }
1213 } 1221 }
1214 range.length = count; 1222 range.length = count;
1215 return range; 1223 return range;
1216 } 1224 }
1452 case ACC.ROLE_TABFOLDER: nsReturnValue = OS.NSAccessibilityTabGroupRole; break; 1460 case ACC.ROLE_TABFOLDER: nsReturnValue = OS.NSAccessibilityTabGroupRole; break;
1453 case ACC.ROLE_TABITEM: nsReturnValue = OS.NSAccessibilityRadioButtonRole; break; 1461 case ACC.ROLE_TABITEM: nsReturnValue = OS.NSAccessibilityRadioButtonRole; break;
1454 case ACC.ROLE_PROGRESSBAR: nsReturnValue = OS.NSAccessibilityProgressIndicatorRole; break; 1462 case ACC.ROLE_PROGRESSBAR: nsReturnValue = OS.NSAccessibilityProgressIndicatorRole; break;
1455 case ACC.ROLE_SLIDER: nsReturnValue = OS.NSAccessibilitySliderRole; break; 1463 case ACC.ROLE_SLIDER: nsReturnValue = OS.NSAccessibilitySliderRole; break;
1456 case ACC.ROLE_LINK: nsReturnValue = OS.NSAccessibilityLinkRole; break; 1464 case ACC.ROLE_LINK: nsReturnValue = OS.NSAccessibilityLinkRole; break;
1465 default:
1457 } 1466 }
1458 1467
1459 return nsReturnValue.getString(); 1468 return nsReturnValue.getString();
1460 } 1469 }
1461 1470