|
| #define | SCREEN_W UI_PANEL_W |
|
#define | SCREEN_H UI_BODY_H |
| | The body's height, 540px: the router owns the band and hands this screen the body.
|
| #define | MAX_FBS 3 |
|
#define | FS_FONT_LABEL (&gfx_font_10x20) |
| | The faces: FS_FONT_LABEL (10 x 20) for names, sizes, buttons and INFO's rows; FS_FONT_FINE (8 x 16) for a row's kind line; FS_FONT_BODY (12 x 24) for the message line and the questions' sentences.
|
| #define | FS_FONT_FINE (&gfx_font_8x16) |
| #define | FS_FONT_BODY (&gfx_font_12x24) |
|
#define | FS_L UI_MARGIN |
| | The screen's columns: UI_MARGIN (8px) in from either edge.
|
| #define | FS_R (SCREEN_W - UI_MARGIN) |
| #define | FS_W (FS_R - FS_L) |
| #define | FS_PANE_W 500 |
| | The two panes, 500px wide at x 8 and x 516, 8px apart.
|
| #define | FS_PANE_GAP 8 |
| #define | FS_PANE_X(i) |
| | Pane i's left edge: 8 or 516.
|
| #define | FS_HDR_Y 4 |
| #define | FS_HDR_H UI_TAP_MIN |
| #define | FS_PG_W 88 |
| #define | FS_UP_W 312 |
| #define | FS_UP(i) |
| | Pane i's UP.
|
| #define | FS_PREV(i) |
| | Pane i's PREV.
|
| #define | FS_NEXT(i) |
| | Pane i's NEXT.
|
| #define | FS_LIST_Y 60 |
| #define | FS_HEAD_H 30 |
| #define | FS_ROW_H 48 |
| #define | FS_ROWS 6 |
| #define | FS_LIST(i) |
| | Pane i's list panel: its heading and its rows.
|
| #define | FS_BAR_W 56 |
| #define | FS_BAR_MIN 32 |
| #define | FS_BAR(i) |
| | Pane i's scroll bar's track.
|
| #define | FS_ROW_IN 8 |
|
#define | FS_ROW_W (FS_PANE_W - FS_ROW_IN - 8 - FS_BAR_W - 8) |
| | A row's width: from the inset to 8px short of the bar.
|
| #define | FS_ICON 24 |
| #define | FS_SIZE_W 90 |
|
#define | FS_MSG_Y 388 |
| | The message line under the panes: two lines of the 12 x 24 face, 84 cells each, 24px apart, ending 4px above the footer.
|
| #define | FS_MSG_LH 24 |
| #define | FOOT_H 52 |
| | The footer, body y 440 to 492, ending 4px above the router's alert band (y 496), in LOGS' order: RESCAN at the left, 140px for its German AKTUALISIEREN, then COPY, MOVE, RENAME, DELETE, NEW, INFO and OPEN at the right, 118px wide, 6px apart, 52px tall.
|
| #define | FOOT_Y (SCREEN_H - UI_ALERT_H - 4 - FOOT_H) |
| #define | FOOT_W 118 |
| #define | FOOT_W_FIRST 140 |
| #define | FOOT_GAP 6 |
| #define | FOOT_PAD 6 |
| #define | FOOT_N 8 |
| #define | FS_FOOT_X(i) |
| | Footer button i's left edge: x 8 for the first, then 146px on and 124px a button after it.
|
| #define | FS_FOOT(i) |
| | Footer button i: 0 RESCAN to 7 OPEN (fs_foot_t).
|
| #define | FS_BOX_Y 100 |
| | The DELETE question and the progress box, in place of the panes and the footer: 700 x 280px, the buttons 300 x 56px at its foot, as LOGS' question.
|
| #define | FS_BOX_H 280 |
|
#define | FS_BOX gfx_rect_make(162, FS_BOX_Y, 700, FS_BOX_H) |
| | The box, 700 x 280px.
|
| #define | FS_Q_CANCEL gfx_rect_make(186, 304, 300, 56) |
| #define | FS_Q_DELETE gfx_rect_make(538, 304, 300, 56) |
|
#define | FS_JOB_CANCEL gfx_rect_make(362, 304, 300, 56) |
| | The progress box's CANCEL, in the middle of its foot.
|
|
#define | FS_JOB_BAR gfx_rect_make(186, 228, 652, 24) |
| | The progress box's bar.
|
| #define | FS_INFO_Y 20 |
| | The INFO box: 800 x 420px, its rows in the 10 x 20 face at a pitch of FS_INFO_LH under the heading, the key in FS_INFO_KEY_W px, CLOSE 300 x 56px at its foot.
|
| #define | FS_INFO_H 420 |
|
#define | FS_INFO_BOX gfx_rect_make(112, FS_INFO_Y, 800, FS_INFO_H) |
| | The box, 800 x 420px.
|
| #define | FS_INFO_LH 32 |
| #define | FS_INFO_KEY_W 160 |
| #define | FS_INFO_CLOSE gfx_rect_make(362, 364, 300, 56) |
| #define | FS_NEW_W 300 |
| | NEW's choice: a list of two rows of 56px (UI_CHOICE_ROW_H) over the panes, its right edge NEW's, its foot 8px above the footer.
|
| #define | FS_NEW_ROW_H UI_CHOICE_ROW_H |
| #define | FS_NEW_H (2 * FS_NEW_ROW_H + 8) |
|
#define | FS_NEW_X (FS_FOOT_X(FS_NEW) + FOOT_W - FS_NEW_W) |
| | Its left edge, x 468: NEW's right edge less its width.
|
| #define | FS_NEW_Y (FOOT_Y - 8 - FS_NEW_H) |
|
#define | FS_NEW_LIST gfx_rect_make(FS_NEW_X, FS_NEW_Y, FS_NEW_W, FS_NEW_H) |
| | The list.
|
| #define | FS_NEW_ROW(i) |
| | Its row i: 0 FOLDER, 1 TEXT FILE.
|
|
#define | FS_TK_AREA gfx_rect_make(FS_L, 4, FS_W, FOOT_Y + FOOT_H - 4) |
| | The keyboard for a name: over the body from y 4 to the footer's foot, 1008px wide; its keys end at UI_KEYS_FOOT.
|
|
#define | FS_JOB_BOX_S 0.25f |
| | A single call's progress box waits this long, s: a rename that is done at once shows no box.
|
|
#define | DRAG_SLOP 8 |
| | A press that moves further than this, px, in x or in y, is not a tap; on a list, vertical travel past it is a scroll.
|
|
#define | FS_MSG_MAX 192 |
| | The message line's longest text, bytes with its NUL.
|
| #define | s fs_s |
|
| const fm_entry_t * | fs_selected (void) |
| | The selected entry of the active pane.
|
| bool | fs_foot_live (fs_foot_t b, fm_err_t *why) |
| | Whether footer button b takes a press now, and why not.
|
| bool | fs_paged (int i) |
| | Whether a pane's folder holds more than its page.
|
| void | fs_foot (fs_foot_t b) |
| | Act on footer button b: a tap on it, live or dimmed.
|
| void | fs_turn (int i, fm_go_t go, bool up) |
| | Read another page of pane i, or the folder above it.
|
| void | fs_row_tap (int i, int row) |
| | A tap on row row of pane i: the pane active and the row selected; a tap on the selected row of the active pane opens it.
|
|
void | fs_delete_doomed (void) |
| | The DELETE question's DELETE: the job that deletes it.
|
| void | fs_new_name (bool folder) |
| | NEW's choice: the keyboard for the new entry's name.
|
| void | fs_name_typed (const char *name) |
| | The keyboard closed with name: the job that makes or renames.
|
|
void | fs_job_cancel (void) |
| | CANCEL on the progress box.
|
| void | fs_say (bool ok, ui_text_id_t id, const char *a, const char *b) |
| | The message line says id, with up to two names.
|
| void | fs_say_err (fm_err_t err, const char *name) |
| | The message line says why err, for name (fs_err_text()).
|
|
void | fs_quiet (void) |
| | The message line says nothing.
|
| const char * | fs_message (char *buf, size_t n) |
| | The message line in the language showing.
|
| void | fs_err_text (fm_err_t err, const char *name, char *out, size_t n) |
| | The words of a refusal or a failure, for name.
|
| void | fs_bar_thumb (int i, int *y, int *h) |
| | The scroll bar's thumb of pane i.
|
| int | fs_bar_scroll_at (int i, int top) |
| | The scroll of pane i that puts the thumb's top nearest top.
|
| void | fs_clamp_scroll (int i) |
| | Pane i's scroll held to its rows.
|
| void | fs_render (gfx_canvas_t *c, int buffer_index) |
| | FILES drawn: the panes and the footer, or a box over them, and the keyboard on top.
|
| const char * | fs_kind_word (int kind) |
| | The words of entry kind kind.
|
| void | fs_event (const touch_event_t *e) |
| | One touch event, in the screen's coordinates.
|
|
void | fs_cancel_press (void) |
| | Drop a press under way: the touch stream lost an event.
|
FILES' private seam between files_screen.c, the state, the requests to the card's task and the screen's interface, files_draw.c, the drawing, and files_events.c, the touch events: the layout the three work on, the state and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is files_screen.h.
Included last: its layout macros have short names (FS_ROW_H, FOOT_Y) and it names the state s, which no header included after it may meet. What one file calls or reads in another carries the prefix fs_.
SPDX-License-Identifier: MIT
The footer, body y 440 to 492, ending 4px above the router's alert band (y 496), in LOGS' order: RESCAN at the left, 140px for its German AKTUALISIEREN, then COPY, MOVE, RENAME, DELETE, NEW, INFO and OPEN at the right, 118px wide, 6px apart, 52px tall.
fs_foot_t is the one place that orders them: a button's number is its place, so the drawing (FS_FOOT()) and the hit test take the same one.
The two panes, 500px wide at x 8 and x 516, 8px apart.
A pane's header row, body y 4 to 52, holds UP: a button with the folder's path that goes up one folder, 312px wide; and while the folder holds more than one page, PREV and NEXT, 88 x 48px, at the pane's right end. The list's panel from y 60 holds FS_ROWS rows at a pitch of FS_ROW_H (48px, UI_TAP_MIN) under its 30px heading, the rows drawn 44px tall, and the scroll bar, FS_BAR_W (56px) wide, at its right edge.