rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
log_viewer_int.h File Reference

The log viewer's private seam between log_viewer_screen.c, the state, the card's listing and paging and the screen's interface, log_viewer_load.c, a file's analysis, data and plot traces, log_viewer_draw.c, the drawing, and log_viewer_events.c, the touch events: the layout the four work on, the state, the plot's traces and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is log_viewer_screen.h. More...

#include <stdbool.h>
#include <stdint.h>
#include "card_state.h"
#include "gfx.h"
#include "log_text.h"
#include "log_viewer_screen.h"
#include "touch_types.h"
#include "ui_screen.h"
#include "ui_tabs.h"
#include "ui_text.h"
#include "ui_theme.h"

Go to the source code of this file.

Data Structures

struct  lv_state_t
 The log viewer's state: the browse list and its page of the card, the footer message, the DELETE question, the import's analysis, the plot's samples, window and cursor, and the touches tracked. More...

Macros

#define SCREEN_W   UI_PANEL_W
 The screen's width, UI_PANEL_W px.
#define SCREEN_H   UI_BODY_H
 The screen's height, UI_BODY_H px: the body under the band.
#define MAX_FBS   3
 Frame buffers the router renders into.
#define LV_FONT_LABEL   (&gfx_font_10x20)
 The faces of the 1024 x 600 type scale this screen draws in.
#define LV_FONT_BODY   UI_FONT_BODY
#define LV_FONT_FINE   UI_FONT_FINE
#define LV_L   UI_MARGIN
 The screen's columns: UI_MARGIN (8px) in from either edge, LV_W (1008px) between.
#define LV_R   (SCREEN_W - UI_MARGIN)
#define LV_W   (LV_R - LV_L)
#define FOOT_H   52
 Each view's footer row of buttons: FOOT_H (52px) tall, ending 4px above the router's alert band.
#define FOOT_Y   (SCREEN_H - UI_ALERT_H - 4 - FOOT_H)
 The footer's top.
#define FOOT_GAP   8
#define BR_PG_Y   4
 The header row, body y 4 to 52: ROOT / USER / BENCH, the folder and the card's name, and PREV and NEXT while the card holds more than one page.
#define BR_PG_H   UI_TAP_MIN
#define BR_PG_W   140
#define BR_TAB_W   110
#define BR_TAB_H   40
#define BR_TABS
 ROOT, USER, BENCH.
#define BR_HEAD_X   368
#define BR_HEAD_TY   (BR_PG_Y + (BR_PG_H - 20) / 2)
#define BR_PREV
#define BR_NEXT   gfx_rect_make(LV_R - BR_PG_W, BR_PG_Y, BR_PG_W, BR_PG_H)
 NEXT, over OPEN.
#define BR_HEAD_END   (LV_R - 2 * BR_PG_W - 8 - 8)
#define BR_HEAD_FAR   LV_R
#define BR_LIST_Y   60
 The file list under the header row, BR_ROWS rows at a pitch of BR_ROW_H under its 30px heading.
#define BR_LIST
 The list's panel.
#define BR_ROW_H   48
#define BR_ROWS   7
#define BR_BAR_W   56
 The scroll bar along the list's right edge, BR_BAR_W px wide: 8.4mm on the panel at the 0.150mm a pixel ui_layout.h assumes (not measured).
#define BR_BAR
 The track.
#define BR_ROW_X   (LV_L + 8)
#define BR_ROW_W   (LV_R - 8 - BR_BAR_W - 8 - BR_ROW_X)
#define BR_SIZE_W   100
 A row's three columns of the 10 x 20 face, as offsets from the row's left: the name from 16px, the date in a box of 16 cells ("2026-10-26 09:41"), and the size right-aligned in a box of 10 cells (LOG_DIR's) ending 16px short of the row's end. 16px stand between the columns, so the name takes 604px, LOG_VIEWER_NAME_CELLS (60) cells.
#define BR_DATE_W   160
#define BR_NAME_IN   16
#define BR_SIZE_IN   (BR_ROW_W - 16 - BR_SIZE_W)
#define BR_DATE_IN   (BR_SIZE_IN - 16 - BR_DATE_W)
#define BR_RESCAN   gfx_rect_make(LV_L, FOOT_Y, BR_PG_W, FOOT_H)
 The footer's buttons, 52px tall, in the order browse_event() hit-tests them: RESCAN, DELETE and OPEN 140px wide, DELETE and OPEN under PREV and NEXT; WI-FI and FILES BR_SMALL_W (100px) wide after RESCAN.
#define BR_SMALL_W   100
#define BR_WIFI   gfx_rect_make(LV_L + BR_PG_W + 8, FOOT_Y, BR_SMALL_W, FOOT_H)
 WI-FI.
#define BR_FILES
 FILES, the card's folders and files (files_screen.h).
#define BR_OPEN   gfx_rect_make(LV_R - BR_PG_W, FOOT_Y, BR_PG_W, FOOT_H)
 OPEN.
#define BR_DELETE
#define BR_MSG_X   (LV_L + BR_PG_W + 8 + 2 * (BR_SMALL_W + 8) + 8)
 A message's left edge in the footer: two lines of 28 cells of the 12 x 24 face from FILES to DELETE, the 28 a message about a file declares and the file's name. BR_MSG_LH is a line's pitch.
#define BR_MSG_LH   24
#define BR_EMPTY   gfx_rect_make(104, 150, 816, 160)
 The box an empty list shows in its place: two lines of 64 cells of the 12 x 24 face inside 24px margins.
#define TX_ROW_H   22
 The TEXT view: a report's rows in the browse list's panel, TX_ROW_H px apart under its 30px heading, beside its scroll bar.
#define TX_ROWS   15
#define TX_COLS   92
#define TX_ROW_X   (BR_ROW_X + 8)
#define TX_BACK   gfx_rect_make(LV_L, FOOT_Y, 140, FOOT_H)
 BACK under the text, 140 x 52px.
#define BR_BAR_MIN   32
#define DQ_BOX   gfx_rect_make(162, 100, 700, 280)
 The DELETE question, drawn in place of the list and the footer: a box of 700 x 280px, CANCEL and DELETE 300 x 56px at its foot.
#define DQ_CANCEL   gfx_rect_make(186, 304, 300, 56)
#define DQ_DELETE   gfx_rect_make(538, 304, 300, 56)
#define IM_TOP   44
 The import: the file's name over two panels, DETECTED 400px wide and the column list 600px, and four footer buttons of 246px.
#define IM_LEFT   gfx_rect_make(LV_L, IM_TOP, 400, FOOT_Y - FOOT_GAP - IM_TOP)
 DETECTED.
#define IM_RIGHT
 The column list.
#define IM_ROW_H   48
#define IM_ROWS   7
#define IM_KEY_LH   24
#define IM_WARN_LH   22
#define IM_BTN_Y   FOOT_Y
#define IM_BTN_H   FOOT_H
#define IM_BTN_W   ((LV_W - 3 * 8) / 4)
#define IM_BTN(i)
 The import's footer button i: 0 SEP, 1 NUM, 2 BACK, 3 PLOT.
#define IM_FAIL   gfx_rect_make(44, 150, 936, 160)
 The box a file that cannot be read shows: 74 cells of the 12 x 24 face inside 24px margins.
#define PV_SUM_Y   4
 The plot: the summary line, the series' chips, the plot's panel and under it a 16px row of time labels 4px down, above the footer.
#define CHIP_Y   28
#define CHIP_H   44
#define CHIP_X   LV_L
#define CHIP_W   240
#define CHIP_GAP   16
#define PV_TOP   (CHIP_Y + CHIP_H + 8)
#define PV_PANEL_H   (FOOT_Y - FOOT_GAP - 16 - 4 - PV_TOP)
#define PV_PANEL   gfx_rect_make(LV_L, PV_TOP, LV_W, PV_PANEL_H)
 The panel.
#define PV_X   (LV_L + 8)
#define PV_Y   (PV_TOP + 8)
#define PV_W   (LV_W - 16)
#define PV_H   (PV_PANEL_H - 16)
#define PV_BAND   10
#define PV_DIV_X   6
#define PV_DIV_Y   4
#define PV_POS_Y   (PV_Y + PV_H + 2)
 The bar under the plot that shows where a zoomed view sits.
#define PV_POS_H   4
#define PV_MIN_WIN   8
 The narrowest window two fingers can zoom to, in samples.
#define PV_PAN_SLOP   10
 With SET_PLOT_PAN on, a finger that moves further than this many pixels from where it touched down pans the zoomed view instead of selecting.
#define PV_EMPTY   (-1)
 A pixel column with no number in it: drawn as nothing.
#define PV_BACK   gfx_rect_make(LV_L, FOOT_Y, 140, FOOT_H)
 The plot's footer: BACK, then < and >, 52px tall; the cursor's line in 10 x 20 from PV_LINE_X.
#define PV_PREV   gfx_rect_make(LV_L + 148, FOOT_Y, 96, FOOT_H)
#define PV_NEXT   gfx_rect_make(LV_L + 252, FOOT_Y, 96, FOOT_H)
#define PV_LINE_X   (LV_L + 364)
#define PV_NONE   gfx_rect_make(104, 150, 816, 120)
 The box the plot shows with nothing loaded: 64 cells of the 12 x 24 face inside 24px margins.
#define LV_MSG_MAX   160
 The footer message's longest text, bytes with its NUL: a text of the table with a LOG_VIEWER_NAME_MAX name in it.
#define s   lv_s
 Short name for lv_s inside the viewer's files.

Enumerations

enum  view_t { VIEW_BROWSE = 0 , VIEW_IMPORT , VIEW_PLOT , VIEW_TEXT }
 The view on screen.
enum  lv_msg_kind_t { LV_MSG_NONE = 0 , LV_MSG_TEXT , LV_MSG_ERR }
 What the footer message holds. More...

Functions

void lv_point (log_viewer_tab_t tab)
 Points the I/O at the folder of tab, for the call that follows.
const char * lv_volume_now (void)
 Returns the card's name as the I/O reports it now.
unsigned lv_mounts_now (void)
 Returns the I/O's mount number now.
const char * lv_page_edge (int sign)
 Returns the entry on the page that log_name_rank() puts first or last: the edges PREV, NEXT and RESCAN name.
void lv_read_page (log_page_dir_t dir, const char *key)
 Read the page dir and key name, and select its newest run.
void lv_rescan (void)
 Reads the page on screen again: the first page from the top, any other from its first entry; another card's name reads from its first page.
bool lv_paged (void)
 Returns whether the card holds more than the page shows, either side of it.
bool lv_can_prev (void)
 Returns whether a page precedes this one.
bool lv_can_next (void)
 Returns whether a page follows this one.
void lv_drop_data (void)
 Frees the plot's samples and clears the cursor.
bool lv_can_delete (void)
 Returns whether DELETE is offered: the I/O can delete and a file is selected.
void lv_bar_thumb (int *y, int *h)
 The browse list's thumb (lv_bar_thumb_of()).
int lv_bar_scroll_at (int top)
 The browse list's scroll for a thumb at top (lv_bar_scroll_of()).
void lv_bar_thumb_of (int total, int visible, int scroll, int *y, int *h)
 The thumb of a scroll bar on BR_BAR: the whole track while every row shows.
int lv_bar_scroll_of (int total, int visible, int top)
 The scroll that puts a thumb's top on BR_BAR nearest top.
int lv_text_total (void)
 Rows the TEXT view scrolls through: the text's, and the line that says it was cut.
void lv_close_text (void)
 Leave the TEXT view for the list and free the report's text.
void lv_say (ui_text_id_t id, const char *name)
 The footer message says id, a refusal or a failure.
void lv_say_err (log_err_t err)
 The footer message says the reader's verdict err, a failure.
void lv_quiet (void)
 The footer message says nothing.
const char * lv_message (char *buf, size_t n)
 The footer message in the language showing.
const char * lv_delim_text (char delimiter)
 Returns a delimiter's name in the language showing.
void lv_run_analysis (void)
 Analyses the open file with the chosen delimiter and number convention, keeping the picked columns by name.
void lv_compute_spans (void)
 Reduces the window's samples to a minimum and maximum row per pixel column and series, and the series' ranges.
void lv_load_data (void)
 Loads the picked columns of the open file into the plot's samples.
void lv_open_selected (void)
 Opens the selected row: a CSV file to the import view, a report to the TEXT view; a folder or an oversized file is refused with a message.
void lv_render (gfx_canvas_t *c, int buffer_index)
 Draws the view on screen into frame buffer buffer_index.
void lv_event (const touch_event_t *e)
 Takes a touch event for the view on screen.

Variables

lv_state_t lv_s
 The viewer's state, in log_viewer_screen.c.
const ui_color_id_t lv_series_color [LOG_MAX_SERIES]
 Colour id of each plot series.
int16_t lv_span [LOG_MAX_SERIES][PV_W][2]
 Per series and pixel column, the plot's minimum and maximum row, filled by lv_compute_spans().
gfx_color_t lv_band [PV_W *PV_BAND]
 One band of PV_BAND rows of the plot, drawn at a time.
float lv_lo [LOG_MAX_SERIES]
 Per series, the lowest value in the window.
float lv_hi [LOG_MAX_SERIES]
 Per series, the highest value in the window.
const log_viewer_tab_t lv_tab_at [LOG_TAB_COUNT]
 Folder tab shown for each tab index.

Detailed Description

The log viewer's private seam between log_viewer_screen.c, the state, the card's listing and paging and the screen's interface, log_viewer_load.c, a file's analysis, data and plot traces, log_viewer_draw.c, the drawing, and log_viewer_events.c, the touch events: the layout the four work on, the state, the plot's traces and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is log_viewer_screen.h.

Included last: its layout macros have short names (FOOT_Y, PV_W) 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 lv_.

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ BR_BAR

#define BR_BAR
Value:
gfx_rect_make(LV_R - 8 - BR_BAR_W, BR_LIST_Y + 30, \
#define LV_R
Definition log_viewer_int.h:61
#define BR_ROWS
Definition log_viewer_int.h:123
#define BR_BAR_W
The scroll bar along the list's right edge, BR_BAR_W px wide: 8.4mm on the panel at the 0....
Definition log_viewer_int.h:134
#define BR_LIST_Y
The file list under the header row, BR_ROWS rows at a pitch of BR_ROW_H under its 30px heading.
Definition log_viewer_int.h:118
#define BR_ROW_H
Definition log_viewer_int.h:122

The track.

◆ BR_BAR_MIN

#define BR_BAR_MIN   32

the scroll bar thumb's least height, px

◆ BR_BAR_W

#define BR_BAR_W   56

The scroll bar along the list's right edge, BR_BAR_W px wide: 8.4mm on the panel at the 0.150mm a pixel ui_layout.h assumes (not measured).

The track runs the height of the rows, and the thumb's share of it is the rows' share of the page. A row runs from the list's left inset to 8px short of the bar.

◆ BR_DATE_IN

#define BR_DATE_IN   (BR_SIZE_IN - 16 - BR_DATE_W)

date's left

◆ BR_DATE_W

#define BR_DATE_W   160

16 cells.

◆ BR_DELETE

#define BR_DELETE
Value:
gfx_rect_make(LV_R - 2 * BR_PG_W - 8, FOOT_Y, BR_PG_W, \
#define FOOT_Y
Definition files_int.h:118
#define FOOT_H
The footer, body y 440 to 492, ending 4px above the router's alert band (y 496), in LOGS' order: RESC...
Definition files_int.h:117
#define BR_PG_W
Definition log_viewer_int.h:94

DELETE.

◆ BR_FILES

#define BR_FILES
Value:
gfx_rect_make(LV_L + BR_PG_W + 8 + BR_SMALL_W + 8, FOOT_Y, \
#define BR_SMALL_W
Definition log_viewer_int.h:161
#define LV_L
The screen's columns: UI_MARGIN (8px) in from either edge, LV_W (1008px) between.
Definition log_viewer_int.h:60

FILES, the card's folders and files (files_screen.h).

◆ BR_HEAD_END

#define BR_HEAD_END   (LV_R - 2 * BR_PG_W - 8 - 8)

8px short of PREV.

◆ BR_HEAD_FAR

#define BR_HEAD_FAR   LV_R

The row's right end.

◆ BR_HEAD_TY

#define BR_HEAD_TY   (BR_PG_Y + (BR_PG_H - 20) / 2)

Its text's top.

◆ BR_HEAD_X

#define BR_HEAD_X   368

The folder's left.

◆ BR_LIST

#define BR_LIST
Value:
gfx_rect_make(LV_L, BR_LIST_Y, LV_W, \
#define FOOT_GAP
Definition files_int.h:121
#define LV_W
Definition log_viewer_int.h:62

The list's panel.

◆ BR_LIST_Y

#define BR_LIST_Y   60

The file list under the header row, BR_ROWS rows at a pitch of BR_ROW_H under its 30px heading.

A row is drawn BR_ROW_H - 4 (44) px tall; the pitch, 48px, is what a finger hits, UI_TAP_MIN. The list is 372px tall: seven rows under the heading take 366px of it. A row shows the file's name, its date and, right-aligned, its size.

◆ BR_MSG_LH

#define BR_MSG_LH   24

A line's pitch.

◆ BR_NAME_IN

#define BR_NAME_IN   16

name's left

◆ BR_PG_H

#define BR_PG_H   UI_TAP_MIN

PREV and NEXT, 48px.

◆ BR_PG_W

#define BR_PG_W   140

Their width.

◆ BR_PG_Y

#define BR_PG_Y   4

The header row, body y 4 to 52: ROOT / USER / BENCH, the folder and the card's name, and PREV and NEXT while the card holds more than one page.

PREV and NEXT are 140 x 48px over DELETE and OPEN. The tabs are 110 x 40px, 4px apart, centred on the row; ui_tabs draws its trough 3px round them. The folder follows from BR_HEAD_X and the card's name ends the row, right-aligned: at BR_HEAD_END with PREV and NEXT showing, at BR_HEAD_FAR without them. BR_HEAD_X to BR_HEAD_END is 352px, 35 cells of the 10 x 20 face: an 11-character volume label and a 17-character folder with the 16px between them.

◆ BR_PREV

#define BR_PREV
Value:
gfx_rect_make(LV_R - 2 * BR_PG_W - 8, BR_PG_Y, BR_PG_W, \
#define BR_PG_Y
The header row, body y 4 to 52: ROOT / USER / BENCH, the folder and the card's name,...
Definition log_viewer_int.h:92
#define BR_PG_H
Definition log_viewer_int.h:93

PREV, over DELETE.

◆ BR_ROW_H

#define BR_ROW_H   48

A row's pitch, UI_TAP_MIN.

◆ BR_ROW_W

#define BR_ROW_W   (LV_R - 8 - BR_BAR_W - 8 - BR_ROW_X)

Its width.

◆ BR_ROW_X

#define BR_ROW_X   (LV_L + 8)

A row's left.

◆ BR_ROWS

#define BR_ROWS   7

The rows the list shows at once.

◆ BR_SIZE_IN

#define BR_SIZE_IN   (BR_ROW_W - 16 - BR_SIZE_W)

size's left

◆ BR_SMALL_W

#define BR_SMALL_W   100

WI-FI's and FILES' width.

◆ BR_TAB_H

#define BR_TAB_H   40

Its height.

◆ BR_TAB_W

#define BR_TAB_W   110

A folder tab's width.

◆ BR_TABS

#define BR_TABS
Value:
gfx_rect_make(LV_L + 3, BR_PG_Y + 4, \
3 * BR_TAB_W + 2 * 4, BR_TAB_H)
#define BR_TAB_H
Definition log_viewer_int.h:96
#define BR_TAB_W
Definition log_viewer_int.h:95

ROOT, USER, BENCH.

◆ CHIP_GAP

#define CHIP_GAP   16

Between two chips.

◆ CHIP_H

#define CHIP_H   44

A chip's height.

◆ CHIP_W

#define CHIP_W   240

A chip's width.

◆ CHIP_X

#define CHIP_X   LV_L

The first chip's left.

◆ CHIP_Y

#define CHIP_Y   28

The chips' top.

◆ DQ_CANCEL

#define DQ_CANCEL   gfx_rect_make(186, 304, 300, 56)

CANCEL.

◆ DQ_DELETE

#define DQ_DELETE   gfx_rect_make(538, 304, 300, 56)

DELETE.

◆ FOOT_GAP

#define FOOT_GAP   8

Above the footer, px.

◆ FOOT_H

#define FOOT_H   52

Each view's footer row of buttons: FOOT_H (52px) tall, ending 4px above the router's alert band.

The alert band covers the bottom UI_ALERT_H (44) px of the 540px body while an alert shows and takes the touches there: nothing that acts sits under it. The footer is body y 440 to 491; the band starts at 496. FOOT_GAP is the room between what a view shows above the footer and the footer.

◆ IM_BTN

#define IM_BTN ( i)
Value:
gfx_rect_make(LV_L + (i) * (IM_BTN_W + 8), IM_BTN_Y, \
#define IM_BTN_Y
Definition log_viewer_int.h:228
#define IM_BTN_H
Definition log_viewer_int.h:229
#define IM_BTN_W
Definition log_viewer_int.h:230

The import's footer button i: 0 SEP, 1 NUM, 2 BACK, 3 PLOT.

◆ IM_BTN_H

#define IM_BTN_H   FOOT_H

Its height.

◆ IM_BTN_W

#define IM_BTN_W   ((LV_W - 3 * 8) / 4)

246px.

◆ IM_BTN_Y

#define IM_BTN_Y   FOOT_Y

The footer's top.

◆ IM_KEY_LH

#define IM_KEY_LH   24

DETECTED's key rows' pitch.

◆ IM_RIGHT

#define IM_RIGHT
Value:
gfx_rect_make(LV_L + 408, IM_TOP, LV_W - 408, \
#define IM_TOP
The import: the file's name over two panels, DETECTED 400px wide and the column list 600px,...
Definition log_viewer_int.h:218

The column list.

◆ IM_ROW_H

#define IM_ROW_H   48

A column row's pitch.

◆ IM_ROWS

#define IM_ROWS   7

(388 - 30) / 48: seven rows.

◆ IM_TOP

#define IM_TOP   44

The import: the file's name over two panels, DETECTED 400px wide and the column list 600px, and four footer buttons of 246px.

DETECTED holds a 16-character key and a 20-cell value on one row of the 10 x 20 face, and its warnings break into lines of 36 cells. The column list shows IM_ROWS rows at a pitch of IM_ROW_H, drawn 4px shorter.

◆ IM_WARN_LH

#define IM_WARN_LH   22

A warning line's pitch.

◆ LV_FONT_BODY

#define LV_FONT_BODY   UI_FONT_BODY

12 x 24: prose.

◆ LV_FONT_FINE

#define LV_FONT_FINE   UI_FONT_FINE

8 x 16: the plot's figures.

◆ LV_FONT_LABEL

#define LV_FONT_LABEL   (&gfx_font_10x20)

The faces of the 1024 x 600 type scale this screen draws in.

LV_FONT_LABEL (10 x 20) for every label, button, row, value, warning and the cursor line; LV_FONT_BODY (12 x 24) for prose read at a distance: the empty list's lines, the DELETE question, the file messages in the footer and the boxes that say why nothing shows; LV_FONT_FINE (8 x 16) for the plot's data figures: the time axis and the series' ranges.

◆ LV_R

#define LV_R   (SCREEN_W - UI_MARGIN)

The right edge, x 1016.

◆ LV_W

#define LV_W   (LV_R - LV_L)

The width between, 1008px.

◆ PV_BAND

#define PV_BAND   10

Rows drawn at a time.

◆ PV_DIV_X

#define PV_DIV_X   6

Grid columns.

◆ PV_DIV_Y

#define PV_DIV_Y   4

Grid rows.

◆ PV_H

#define PV_H   (PV_PANEL_H - 16)

Its height, 316px.

◆ PV_LINE_X

#define PV_LINE_X   (LV_L + 364)

The cursor's line.

◆ PV_NEXT

#define PV_NEXT   gfx_rect_make(LV_L + 252, FOOT_Y, 96, FOOT_H)

>.

◆ PV_PANEL_H

#define PV_PANEL_H   (FOOT_Y - FOOT_GAP - 16 - 4 - PV_TOP)

Its height.

◆ PV_POS_H

#define PV_POS_H   4

Its height.

◆ PV_PREV

#define PV_PREV   gfx_rect_make(LV_L + 148, FOOT_Y, 96, FOOT_H)

<.

◆ PV_SUM_Y

#define PV_SUM_Y   4

The plot: the summary line, the series' chips, the plot's panel and under it a 16px row of time labels 4px down, above the footer.

The chips are CHIP_W x CHIP_H (240 x 44) px, CHIP_GAP apart, from y CHIP_Y. The plot is PV_W x PV_H (992 x 316) px inside its panel; PV_BAND rows of it are drawn at a time. The summary line's top.

◆ PV_TOP

#define PV_TOP   (CHIP_Y + CHIP_H + 8)

The plot's panel's top.

◆ PV_W

#define PV_W   (LV_W - 16)

Its width, 992px.

◆ PV_X

#define PV_X   (LV_L + 8)

The plot's left column.

◆ PV_Y

#define PV_Y   (PV_TOP + 8)

Its top row.

◆ TX_COLS

#define TX_COLS   92

cells a text row holds

◆ TX_ROW_H

#define TX_ROW_H   22

The TEXT view: a report's rows in the browse list's panel, TX_ROW_H px apart under its 30px heading, beside its scroll bar.

A row is TX_COLS cells of the 10 x 20 face, 920px, from 8px into the browse row's box to 8px short of the bar. The thumb is BR_BAR_MIN px at least: a report of 400 rows would make it 12. BACK stands where the plot's BACK does. the pitch of a text row, px

◆ TX_ROW_X

#define TX_ROW_X   (BR_ROW_X + 8)

a text row's left edge

◆ TX_ROWS

#define TX_ROWS   15

text rows on screen

Enumeration Type Documentation

◆ lv_msg_kind_t

What the footer message holds.

Enumerator
LV_MSG_NONE 

nothing

LV_MSG_TEXT 

a text of the table: msg_id

LV_MSG_ERR 

the reader's verdict: msg_err

Function Documentation

◆ lv_bar_scroll_at()

int lv_bar_scroll_at ( int top)

The browse list's scroll for a thumb at top (lv_bar_scroll_of()).

Parameters
topThe thumb's top the finger asks for.
Returns
The first row on screen.

◆ lv_bar_scroll_of()

int lv_bar_scroll_of ( int total,
int visible,
int top )

The scroll that puts a thumb's top on BR_BAR nearest top.

Parameters
totalRows of the list.
visibleRows on screen.
topThe thumb's top the finger asks for.
Returns
The first row on screen, 0 to total - visible.

◆ lv_bar_thumb()

void lv_bar_thumb ( int * y,
int * h )

The browse list's thumb (lv_bar_thumb_of()).

Parameters
yTakes the thumb's top.
hTakes its height.

◆ lv_bar_thumb_of()

void lv_bar_thumb_of ( int total,
int visible,
int scroll,
int * y,
int * h )

The thumb of a scroll bar on BR_BAR: the whole track while every row shows.

Parameters
totalRows of the list.
visibleRows on screen.
scrollThe first row on screen.
yTakes the thumb's top.
hTakes its height, BR_BAR_MIN px at least.

◆ lv_can_delete()

bool lv_can_delete ( void )

Returns whether DELETE is offered: the I/O can delete and a file is selected.

Returns
true when DELETE is enabled

◆ lv_can_next()

bool lv_can_next ( void )

Returns whether a page follows this one.

Returns
true when NEXT is enabled

◆ lv_can_prev()

bool lv_can_prev ( void )

Returns whether a page precedes this one.

Returns
true when PREV is enabled

◆ lv_close_text()

void lv_close_text ( void )

Leave the TEXT view for the list and free the report's text.

The text is up to 32KiB of the file; the list does not need it, and OPEN reads it again.

◆ lv_delim_text()

const char * lv_delim_text ( char delimiter)

Returns a delimiter's name in the language showing.

Parameters
delimiter';', ',', tab or '|'
Returns
the name, "?" for any other

◆ lv_event()

void lv_event ( const touch_event_t * e)

Takes a touch event for the view on screen.

Parameters
ethe event

◆ lv_message()

const char * lv_message ( char * buf,
size_t n )

The footer message in the language showing.

Word the footer message into buf (log_viewer_int.h).

Parameters
buftakes the message; never NULL
nbytes at buf, 1 or more, LV_MSG_MAX for the longest
Returns
buf, "" for no message

The footer message in the language showing.

◆ lv_mounts_now()

unsigned lv_mounts_now ( void )

Returns the I/O's mount number now.

Returns
the mount number, 0 without one

◆ lv_page_edge()

const char * lv_page_edge ( int sign)

Returns the entry on the page that log_name_rank() puts first or last: the edges PREV, NEXT and RESCAN name.

Parameters
sign1 for the first entry, -1 for the last
Returns
the entry's name, "" with an empty page

◆ lv_paged()

bool lv_paged ( void )

Returns whether the card holds more than the page shows, either side of it.

Returns
true when the list is paged

◆ lv_point()

void lv_point ( log_viewer_tab_t tab)

Points the I/O at the folder of tab, for the call that follows.

Parameters
tabthe folder tab

◆ lv_quiet()

void lv_quiet ( void )

The footer message says nothing.

Clear the footer message (log_viewer_int.h).

The footer message says nothing.

◆ lv_read_page()

void lv_read_page ( log_page_dir_t dir,
const char * key )

Read the page dir and key name, and select its newest run.

Pages are cut from the top, LOG_VIEWER_MAX_FILES at a time. A page before the key that starts less than a page from the top is the first page, read again from the top: a run recorded since the key was read stands ahead of it, and so does nothing when everything ahead of the key has gone. A page that comes back empty from a card that is not, is a page past the end: the card has fewer entries than when the key was read, after a DELETE or behind the screen's back. The last page is read instead, as the pages from the first one cut it: what is left of the count after whole pages. The newest is the highest number on the page, a report included.

Parameters
dirWhich side of key the page is on.
keyThe name at the page's edge; "" or NULL for the top.

◆ lv_render()

void lv_render ( gfx_canvas_t * c,
int buffer_index )

Draws the view on screen into frame buffer buffer_index.

Parameters
ccanvas drawn on
buffer_indexthe frame buffer, 0 to MAX_FBS - 1

◆ lv_say()

void lv_say ( ui_text_id_t id,
const char * name )

The footer message says id, a refusal or a failure.

Keep id and name as the footer message (log_viewer_int.h).

The message keeps the ID and the name, and lv_message() words it in the language showing, so a change of SET_LANGUAGE rewords it.

Parameters
idthe text: LOG_CANNOT_OPEN, LOG_IS_FOLDER, LOG_TOO_BIG, LOG_CANNOT_DELETE and LOG_DELETED format name; any other is shown as it is
namethe file's name, or NULL

The footer message says id, a refusal or a failure.

◆ lv_say_err()

void lv_say_err ( log_err_t err)

The footer message says the reader's verdict err, a failure.

Keep err as the footer message (log_viewer_int.h).

Parameters
errthe verdict of log_csv_analyse(), log_csv_build() or log_text_load()

The footer message says the reader's verdict err, a failure.

◆ lv_text_total()

int lv_text_total ( void )

Rows the TEXT view scrolls through: the text's, and the line that says it was cut.

Returns
The rows.

◆ lv_volume_now()

const char * lv_volume_now ( void )

Returns the card's name as the I/O reports it now.

Returns
the name, "" when there is none