Line-by-line Anatomy of Menu.c (Cont.)
FldDelete( fld, 0, FldGetTextLength( fld ) );
The function UInt16 FldGetTextLength( const FieldType *fldP ) returns the length in bytes of the field's text.
fldP: Pointer to a field object (FieldType structure)
FldCopy( fld );
This function void FldCopy( const FieldType *fldP ) copies the current selection to the text clipboard.
fldP: Pointer to a field object (FieldType structure)
FldCut( fld );
This function void FldCut( FieldType *fldP ) copies the current selection to the text clipboard, deletes the selection from the field, and redraws the field.
fldP: Pointer to a field object (FieldType structure)
FldPaste( fld );
This function void FldPaste( FieldType *fldP ) replaces the current selection in the field, if any, with the contents of the text clipboard.
fldP: Pointer to a field object (FieldType structure)
FldSetSelection( fld, 0, FldGetTextLength( fld ) );
This function void FldSetSelection( FieldType *fldP, UInt16 startPosition, UInt16 endPosition ) sets the current selection in a field and highlights the selection if the field is visible.
fldP: Pointer to a field object (FieldType structure)
startPosition: Starting offset of the character range to highlight, given as a byte offset into the field's text
endPosition: Ending offset of the character range to highlight