Changes between Version 84 and Version 85 of Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook


Ignore:
Timestamp:
07/11/25 13:53:00 (2 weeks ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook

    v84 v85  
    248248}
    249249}}}
    250 The !EnableFullScreenMode() is optional but recommended for new apps. When this is included the app will stay in the zoomed state and only show a keypad as needed. This is easier for users of the app. However, this will require a little more work to make the app fully functional. All menu screens must have an //Exit// button provided. Input screens should have //Cancel// or //ESC// and //Ok// buttons. The apphelpers.cpp/.h provides helpers to simplify these changes.
     250The !EnableFullScreenMode() is optional but recommended for new apps. When this is included the app will stay in the zoomed state and only show a keypad as needed for input fields. This is easier for users of the app. However, this may require a little more work to make the app fully functional. All menu screens must have an //Exit// button provided since there is no always shown there arrow buttons. Input screens should have //Cancel// or //ESC// and //Ok// buttons. The apphelpers.cpp/.h provides helpers to simplify these changes.
    251251
    25225210. Modify all the references to the Show//XXXX// show as ShowGTN() to add the weightScreen instance such as:
     
    329329}}}
    330330
    331 In the above example FORM_INIT has additional flags //nFormFlgAutoPresentPopup | nFormFlgShowPopupTabKeypad//. This is to show the popup keypad automatically and include the tab keypad.
    332 
    333 The FORM_ADD_INPUT2 statements have the rectKeypad for the second rectangle parameter. The is defined in apphelpers to specify that the keypad will be near the bottom of the screen. An additional flag //FORM_POPUP_LEFT_PROMPT//. This specifies that the prompt text for the input items will be left of the input fields.
    334 
    335 The // formSetup.LeftAlignPromptInputs(inpThresh, inpViol1)// Statement is used to align the input fields. This function scans the input fields from //Thresh// through //Viol// and finds the longest prompt text. It then sets all the input field coordinates all of these inputs so that the input prompts are lined up based on the longest prompt.
     331In the above example FORM_INIT has additional flags //nFormFlgAutoPresentPopup | nFormFlgShowPopupTabKeypad//. This is to show the popup keypad automatically and include the small tab keypad to navigate between input fields.
     332
     333The FORM_ADD_INPUT2 statements have the rectKeypad for the second rectangle parameter. This is defined in apphelpers.cpp to specify that the keypad will be near the bottom of the screen. An additional flag //FORM_POPUP_LEFT_PROMPT// is used for inputs to specify that the prompt text will be left of the input field.
     334
     335The //formSetup.LeftAlignPromptInputs(inpThresh, inpViol1)// Statement is used to align the input fields. This function scans the input fields from //Thresh// through //Viol1// and finds the longest prompt text. It then sets all the input field coordinates all of these inputs so that the input prompts are lined up based on the longest prompt.
    336336
    337337The function !SetupInputFormToUseFontSet is called. !SetupInputFormToUseFontSet is a helper function defined in apphelpers.cpp. This gives the form a pointer to the fonts that were initialized previously. The function also sets the starting positions of the rectInpBtn rectangle that is used to define where to show the prompts and input fields. The following parameter is a value that is a percentage of the display area to set the width of the input fields. The optional forth parameter is the height of the input fields based on the font height.