Slide 9.5: Line-by-line anatomy of Menu.c Slide 9.7: Line-by-line anatomy of Menu.c (cont.) Home |
Menu.c
(Cont.)
case menuEvent:
Command-C
for copy, or
data
field contains the following structure:
struct menu { UInt16 itemID; // Item ID of the selected menu command } menu;
MenuEraseStatus( NULL );
menuP
: Pointer to a MenuBarType, or NULL
for the current menu
MenuEraseStatus
erases the toolbar or status message.
FldDelete( fld, 0, FldGetTextLength( fld ) );
fldP
: Pointer to the field object (FieldType structure) to delete from.
start
: The beginning of the range of characters to delete given as a valid byte offset into the field's text string.
end
: The end of the range of characters to delete given as a valid byte offset into the field's text string.
If you pass a value that is greater than the number of bytes in the field, all characters in the field are deleted.