Calculator demo widget application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | app_calculator_t |
Calculator context. More... | |
Macros | |
#define | BT_H 40 |
Height (in pixels) of a normal sized button. More... | |
#define | BT_POS_X(col) (W_SP + (BT_W * (col))) |
Calculate button X coordinate. More... | |
#define | BT_POS_Y(row) (W_SP + T_H + T_SP + (BT_H * (row))) |
Calculate button Y coordinate. More... | |
#define | BT_W 40 |
Width (in pixels) of a normal sized button. More... | |
#define | BT_X 4 |
Number of buttons in one column. More... | |
#define | BT_Y 5 |
Number of buttons in one row. More... | |
#define | MAX_DIGITS 9 |
Maximum number of digits on display. More... | |
#define | MAX_VALUE 999999999L |
Maximum value we can show on display. More... | |
#define | MIN_VALUE -999999999L |
Minimum value we can show on display. More... | |
#define | T_H 16 |
Height of the static text field. More... | |
#define | T_SP 16 |
Spacing between static text and button pad. More... | |
#define | T_W (BT_W * BT_X) |
Width of the static text field. More... | |
#define | W_SP 16 |
Spacing between widget frame and components. More... | |
Functions | |
static bool | app_calc_handler (struct wtk_basic_frame *frame, win_command_t command_data) |
Frame handler for the application. More... | |
static void | app_calc_update_disp (struct app_calculator_t *calc) |
Update calculator display with new value. More... | |
bool | app_widget_launch (void) |
Setup widget demo. More... | |
static void | calc_perform_operation (struct app_calculator_t *calc) |
Perform calculation. More... | |