Skip to content

Commit

Permalink
refactored InputKeypad for mobile<->desktop compatibility
Browse files Browse the repository at this point in the history
  * improved compatibility for mobile devices and desktop
   * adjusted and re-use for larger font using existing App definitions
   * re-layout largely following common numeric keyboard layout (ISO/IEC 9995-1)
   * added support for scientific notation
   * added support for portrait- and landscape keypad-layout
   * added support for directly editing display field (i.e. if used on a desktop, N.B. yes, the InputKeypad is equally usable also with a keyboard, added missing mouse-button<->key mappings)
   * derive button labels directly from enum (via toString(..)) function that should fail if new/unmapped enum values are added. possible improvement: use compile-time-reflection)
   * broke-up functions into popup-handling, drawing keypad (x2), and handling key/input logic
   * added dual-function Backspace button: double-clicking clears the whole field
   * added function that entering the first number clears the previous field value (N.B. field is still only committed if it parses correctly)
   * added alt '2nd' and inverse function 'Inv' overloading of some buttons to switch e.g. between 'sinh'<->'asinh', 'sin'<->'asin', 'x^2' <-> 'x^3', 'Log'<->'Ln', ...
   * N.B. not all functions are (yet) enabled in the backing calculator implementation (-> future improvement/PR) as this PR focuses primarily on the UL layout

 * general improvements/changes:
   * refactored & renamed according to coding-style guidelines: https://github.com/fair-acc/opencmw-cpp/blob/main/README.developers.md
   * added type-safe structures where possible/applicable
   * added merging of fonts to the font loader to allow transplanting characters -- usually extended ascii-ranges -- fonts to receiving fonts that do not have definitions for these (e.g. frames, x², ... to xkcd). Could be further generalised (thinking of combining normal ascii Characters with FontAwesome font)

Signed-off-by: Ralph J. Steinhagen <[email protected]>
  • Loading branch information
RalphSteinhagen committed Jul 31, 2023
1 parent eb69d34 commit b966367
Show file tree
Hide file tree
Showing 2 changed files with 822 additions and 325 deletions.
Loading

0 comments on commit b966367

Please sign in to comment.