= FORM_INIT = Initializes a display form. {{{ void FORM_INIT(formName name, EVENT_FNC eventShow, EVENT_FNC eventProcess, EVENT_FNC eventHide, EVENT_FNC eventDone, int nFlag); }}} == Parameters == * formName - name of the form. * eventShow - event function that is called to display additional items such as titles. * eventProcess - event function that is called every few milliseconds to do any application processing desired. May be NULL. * eventHide - event function that is called when the form is hidden. May be NULL. * eventDone - event function that is called when the form is exiting. May be NULL. If a done event is specified it may return 0 to stay in the form or non-zero to exit the form. * nFlag - form flags, may be combination of items in table below using the bitwise OR operator | ||=Flag=||=Description=|| ||nFormFlgNone||Use only when no other flags are to be used|| ||nFormFlgShowHelp||The form will show help text of the currently selected item|| ||nFormFlgKeepPrevCurItem||Upon return to the form from another screen the form will not reset current item to top|| ||nFormFlgReadOnly||The form will not allow editing|| ||nFormFlgKeepBottomLine||The form will not clear the bottom text line|| ||nFormFlgClearItemsOnly||When the form is hidden it will only clear its form items, and not the entire screen|| ||nFormFlgCaseInsensitiveHotkeys||Hotkeys for menu button presses will not be case sensitive|| == Return Value == This function does not return any value == Remarks == FORM_INIT is a macro to simplify the initialization of forms. The preprocessor will convert this to a CForm initialization of the specified form name. {{{ #define FORM_INIT(f, show, process, hide, done, flg) CForm form##f((show), (process), (hide), (done), (flg)) }}} == Examples == {{{ void IDScreen(void) { string strID1; string strID2; FORM_INIT(ID, EventIDShow, NULL, NULL, NULL, nFormFlgShowHelp); FORM_ADD_INPUT(ID, ID1, 0, 50, "ID 1: ", 10, 0, 0, NULL, strID1, 0, NULL, "Enter the ID 1"); FORM_ADD_INPUT(ID, ID2, 0, 80, "ID 2: ", 10, 0, 0, NULL, strID2, 0, NULL, "Enter the ID 2"); FORM_SHOW(ID); FORM_RUN(ID); FORM_HIDE(ID); // strID1 and strID2 now contain the entered data } EVENT(IDShow) { ClearLCD(); DisplayText(0, 0, "ID Input Screen"); return 0; } }}} == See Also == * [wiki:FORM_ADD_INPUT FORM_ADD_INPUT] * [wiki:FORM_HIDE FORM_HIDE] * [wiki:FORM_SHOW FORM_SHOW] * [wiki:FORM_RUN FORM_RUN]