Match tiInputForm helper methods #31

Merged
coah80 merged 2 commits from codex/ti-input-form-remaining-20260921 into main 2026-09-21 21:42:26 +00:00
coah80 commented 2026-09-21 21:41:37 +00:00 (Migrated from github.com)

Adds source-backed helper implementations in src/keyboard/tiInputForm.cpp.

Measured on 43U from origin/main 27ce4969:

  • tiInputForm: 25/221 -> 30/221 exact functions
  • exact code: 536/50,656 -> 828/50,656 bytes
  • fuzzy match: 1.0581175% -> 1.7845073%
  • pool_diff.py: identical, 20 strings
  • ctxdiff.py: makeUpCursorPos, setFont, getGlobalLeftTopPos, setRootPaneScaleFor16x9, and setRootPaneScaleFor4x3 all report diffs 0
  • full 43U build passed
  • DOL SHA1 remains 26116613f624061ba99c8d1a299aaa6efa85670d

clear is source-backed and builds with one remaining vtable-slot difference, so it is included as progress but is not counted exact.

Note

Add tiInputForm helper methods for cursor, font, clear, and aspect-ratio setup

  • Adds makeUpCursorPos which temporarily swaps the word-wrap counter to a supplied position, delegates to the text-drawer base, and restores the saved counter.
  • Adds setFont delegating to the text-drawer base, and clear which resets both the command sender and the backing string.
  • Adds getGlobalLeftTopPos computing the form's transformed left-top position with a negated y coordinate, using the newly added matrix header.
  • Adds LayoutByNW4R.setRootPaneScaleFor16x9 and setRootPaneScaleFor4x3, each invoking the NW4R layout-manager scaling and setting the text-drawer aspect-ratio mode (false for 16:9, true for 4:3).
  • Behavioral Change: clear now also clears the stored backing string; callers expecting prior contents to persist after clear will be affected.

Macroscope summarized 8113aa6.

Adds source-backed helper implementations in `src/keyboard/tiInputForm.cpp`. Measured on 43U from `origin/main` `27ce4969`: - `tiInputForm`: 25/221 -> 30/221 exact functions - exact code: 536/50,656 -> 828/50,656 bytes - fuzzy match: 1.0581175% -> 1.7845073% - `pool_diff.py`: identical, 20 strings - `ctxdiff.py`: `makeUpCursorPos`, `setFont`, `getGlobalLeftTopPos`, `setRootPaneScaleFor16x9`, and `setRootPaneScaleFor4x3` all report `diffs 0` - full 43U build passed - DOL SHA1 remains `26116613f624061ba99c8d1a299aaa6efa85670d` `clear` is source-backed and builds with one remaining vtable-slot difference, so it is included as progress but is not counted exact. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Add `tiInputForm` helper methods for cursor, font, clear, and aspect-ratio setup > - Adds `makeUpCursorPos` which temporarily swaps the word-wrap counter to a supplied position, delegates to the text-drawer base, and restores the saved counter. > - Adds `setFont` delegating to the text-drawer base, and `clear` which resets both the command sender and the backing string. > - Adds `getGlobalLeftTopPos` computing the form's transformed left-top position with a negated y coordinate, using the newly added matrix header. > - Adds `LayoutByNW4R.setRootPaneScaleFor16x9` and `setRootPaneScaleFor4x3`, each invoking the NW4R layout-manager scaling and setting the text-drawer aspect-ratio mode (false for 16:9, true for 4:3). > - Behavioral Change: `clear` now also clears the stored backing string; callers expecting prior contents to persist after clear will be affected. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 8113aa6.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
Sign in to join this conversation.