|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The feature menu: a grid of tiles under the band. More...
#include "overview_screen.h"#include <string.h>#include "ui_icons.h"#include "link_pages.h"#include "ui_text.h"#include "ui_theme.h"#include "ui_widgets.h"Data Structures | |
| struct | tile_t |
| struct | [struct].s |
| Driver state of the UART: the claimed machines and the pins. More... | |
Macros | |
| #define | W UI_PANEL_W |
| The panel's width, UI_PANEL_W px. | |
| #define | H UI_BODY_H |
| The body's height under the band, UI_BODY_H px. | |
| #define | COLS 4 |
| The grid: four columns by two rows of 243 x 255px tiles (36.5 x 38.3mm at 0.150mm a pixel) with 10px margins under the 60px band. COLS and ROWS are the grid, M its margin, TW and TH a tile's size. | |
| #define | ROWS 2 |
| #define | M 10 |
| #define | TW ((W - (COLS + 1) * M) / COLS) |
| #define | TH ((H - (ROWS + 1) * M) / ROWS) |
| #define | T_ICON_DY 30 |
| Inside a tile, from its top: the 40px icon box at 30, the name in the head face (20 x 36) at 84, the line in the label face (10 x 20) at 128, a broken line's second row 24px under it. A row of the line holds 22 characters, 220 of the 227px inside the tile's UI_TILE_PAD. | |
| #define | T_ICON 40 |
| #define | T_NAME_DY 84 |
| #define | T_LINE_DY 128 |
| #define | T_LINE_PITCH 24 |
| #define | MARK_W 120 |
| The SIMULATED mark: at least 120 x 32px, 184px under the tile's top, its word in the label face (10 x 20) MARK_INSET px from its left edge, past the dot, and 8px from its right edge. On the lower row it ends at panel y 551, 5px above the alert band, so an alert hides no mark. | |
| #define | MARK_H 32 |
| #define | MARK_INSET UI_PILL_INSET |
| #define | MARK_DY 184 |
| #define | N_OF(a) |
| #define | SLOTS (COLS * ROWS) |
Functions | |
| static const tile_t * | tile_in (int i) |
| ui_screen_id_t | overview_screen_tile (int slot) |
| const char * | overview_screen_tile_name (int slot) |
| const char * | overview_screen_tile_line (int slot) |
| int | overview_screen_columns (void) |
| void | overview_invalidate (void) |
| void | overview_screen_set_supply_real (bool real) |
| static void | reset (void) |
| static gfx_rect_t | tile_rect (int i) |
| gfx_rect_t | overview_screen_tile_rect (int slot) |
| static int | tile_at (int x, int y) |
| static void | event (const touch_event_t *evt) |
| static void | render (gfx_canvas_t *c, int buffer_index) |
| static void | cancel (void) |
| const ui_screen_t * | overview_screen (void) |
Variables | |
| static const ui_tile_look_t | k_look |
| The menu tile's look, from the figures above. | |
| static const tile_t | k_workbenches [] |
| static const tile_t | k_instruments [] |
| static const tile_t | k_last_column [] |
| static struct | s |
| static bool | s_supply_real |
| static const ui_screen_t | k_screen |
The feature menu: a grid of tiles under the band.
SPDX-License-Identifier: MIT
| #define COLS 4 |
The grid: four columns by two rows of 243 x 255px tiles (36.5 x 38.3mm at 0.150mm a pixel) with 10px margins under the 60px band. COLS and ROWS are the grid, M its margin, TW and TH a tile's size.
the grid's columns
| #define M 10 |
the margin around and between tiles, px
| #define MARK_DY 184 |
its top from the tile's, px
| #define MARK_H 32 |
its height, px
| #define MARK_INSET UI_PILL_INSET |
its word's start, past the dot, px
| #define MARK_W 120 |
The SIMULATED mark: at least 120 x 32px, 184px under the tile's top, its word in the label face (10 x 20) MARK_INSET px from its left edge, past the dot, and 8px from its right edge. On the lower row it ends at panel y 551, 5px above the alert band, so an alert hides no mark.
its least width, px
| #define N_OF | ( | a | ) |
| #define ROWS 2 |
the grid's rows
| #define T_ICON 40 |
the icon box's side, px
| #define T_ICON_DY 30 |
Inside a tile, from its top: the 40px icon box at 30, the name in the head face (20 x 36) at 84, the line in the label face (10 x 20) at 128, a broken line's second row 24px under it. A row of the line holds 22 characters, 220 of the 227px inside the tile's UI_TILE_PAD.
the icon box's top, px
| #define T_LINE_DY 128 |
the line's top, px
| #define T_LINE_PITCH 24 |
a second row under the first, px
| #define T_NAME_DY 84 |
the name's top, px
| int overview_screen_columns | ( | void | ) |
The grid's columns: 4.
| void overview_screen_set_supply_real | ( | bool | real | ) |
Whether SUPPLY drives the PD mini; the tile is marked MODELLED while it does not.
| ui_screen_id_t overview_screen_tile | ( | int | slot | ) |
The screen the tile in slot slot opens, row by row from the top left, or SCREEN_COUNT for an empty slot or one past the grid.
| const char * overview_screen_tile_name | ( | int | slot | ) |
The tile's name and its line in the language in force, NULL for an empty slot.
| gfx_rect_t overview_screen_tile_rect | ( | int | slot | ) |
The slot's rectangle in the screen's own coordinates.
|
static |
|
static |
|
static |
The menu tile's look, from the figures above.
|
static |
|
static |