|
| static void | kp_button (gfx_canvas_t *c, gfx_rect_t r, const char *label, gfx_color_t fill, bool pressed, bool enabled) |
| | A button of the overlay, its label in KP_FONT.
|
|
static gfx_color_t | level_color (unsigned level) |
| | Returns the text colour of a warning level: danger, warning or plain.
|
|
static int | note (note_t *n, int i, int slot, const char *s, gfx_color_t color) |
| | Writes note i of n and returns the next index.
|
|
static int | standing (const char *out[2], bool *warn) |
| | What stands until it is dealt with: up to two lines on the SERVO tab. Returns the lines used; warn is set for amber, cleared for red.
|
| const char * | kst_panel_standing_line (int i) |
|
static int | message_shown (char text[KST_PANEL_MSG_LINES][KST_PANEL_LINE]) |
| | The lines of the last message the overlay shows. One that only repeats what stands on the SERVO tab is left out.
|
|
static void | state_line (char *out, size_t n) |
| | Writes the programmer's state, with the port, into out.
|
|
static const char * | state_second (bool *type) |
| | The line under the state: what the state needs, or the servo's type.
|
| const char * | kst_panel_status_line (int i) |
|
static int | notes_standing (note_t *n, int i) |
| | What stands until it is dealt with, over the last message.
|
|
static int | page_notes (note_t *n) |
| | The notes of the page shown, in their order down the page. Their text is static: the caller draws it after this returns.
|
| int | kst_panel_pack_notes (const int *rows, const bool *standing, int count, int room, int *page) |
| | The page each of count notes takes in room rows.
|
|
static void | plan_notes (notes_plan_t *p) |
| | Plans the notes of the page shown: their rows, pages and places, and the message's.
|
| static int | rows_foot (void) |
| | The highest a note rises to: 4px under the lowest row of the tab shown, the area's top for a tab with none.
|
|
static void | layout_notes (notes_plan_t *p) |
| | The page's notes from the top, each at its place or under the one above, and the last message from the area's last row up: three rows for one that takes fewer. Notes that need more rows than there are above the message take pages: the standing notes are on the first, whole, the other notes page after them, the area's last notes row counts the pages, and a tap on the notes shows the next. Where the standing notes and the message leave no row for the count, the other notes wait for the message to go. Where the standing notes leave no row for the count beside the message, they yield to it: they page with the others, first, and one taller than a page waits for the message to go. Every line of the message is drawn: the longest takes 5 rows of the 7 under the SERVO tab's last row on SERVO's left card, which end 4px above the alert band (kpn_notes_foot()). No note rises above 4px under the tab's last row.
|
|
static void | draw_notes (gfx_canvas_t *c) |
| | Draws the notes and the message of the page shown.
|
|
static gfx_rect_t | notes_rect (const notes_plan_t *p) |
| | Returns the area the notes take, for the page-turning press.
|
| bool | kpn_notes_paged_at (int x, int y) |
| | Whether (x, y) is on notes that take more than one page.
|
| gfx_rect_t | kst_panel_notes_rect (void) |
| int | kst_panel_note_pages (void) |
| int | kst_panel_note_page (void) |
| const char * | kst_panel_shown_note (int i) |
| int | kst_panel_shown_message_lines (void) |
| gfx_rect_t | kst_panel_notes_drawn (void) |
|
static void | act_value (const row_t *r, char *out, size_t n) |
| | Writes the value of an action row, from the programmer's state, into out.
|
| const char * | kst_panel_button (int page, int row, int col) |
|
static void | draw_row (gfx_canvas_t *c, int i) |
| | Draws row i of the page shown: its label and its control, highlighted while pressed.
|
|
static void | draw_page (gfx_canvas_t *c) |
| | Draws the page shown: the tabs, CLOSE, its rows and its notes.
|
|
static void | draw_choice (gfx_canvas_t *c) |
| | Draws the list of choices: its title, an entry per value and CANCEL.
|
|
static void | draw_warning (gfx_canvas_t *c) |
| | Draws the warning page: the title, its lines and the hold button.
|
| void | kst_panel_render (gfx_canvas_t *c) |
| | Draws the overlay: the keypad or the keyboard alone while one is open, else the warning, the list of choices or the page.
|
The drawing of the programmer's overlay.
The drawing of the programmer's overlay for KST and Chaservo servos: the notes under a page – the standing message, the state line, a page of notes and the message – and the pages, their rows, the list of choices and the warning pages. The state and the seam are kst_panel_int.h.
SPDX-License-Identifier: MIT