Slide 9.7: Line-by-line anatomy of Menu.c (cont.) (cont.)
  Slide 9.9: Line-by-line anatomy of Menu.c (cont.)
  Home


Line-by-line Anatomy of Menu.c (Cont.)


case keyDownEvent:
This event keyDownEvent is sent by the system when the user enters a Graffiti or Graffiti 2 character, presses one of the buttons below the display, or taps one of the icons in the icon area; for example, the Find icon. For this event, the data field contains the structure defined below. Access the information stored in the data field in this way:
   wchar32_t = eventP->data.keyDown.chr;

   struct  _KeyDownEventType {
      WChar   chr;
      UInt16  keyCode;
      UInt16  modifiers;
   };

FormObjectKind objType;
The enum FormObjectKind specifies values for the objectType field of the FormObjListType. It specifies how to interpret the object field.
  • frmFieldObj: Text field
  • frmControlObj: Control
  • frmListObj: List
  • frmTableObj: Table
  • frmBitmapObj: Form bitmap
  • frmLineObj: Line
  • frmFrameObj: Frame
  • frmRectangleObj: Rectangle
  • frmLabelObj: Label
  • frmTitleObj: Form title
  • frmPopupObj: Popup list
  • frmGraffitiStateObj: Graffiti

focus = FrmGetFocus( frm );
This function UInt16 FrmGetFocus( const FormType *formP ) returns the item (index) number of the object that has the focus.