The module interface_module
The interface package as a module (docs/INTERFACE.md, section 7; the test of the claim "the functions are written so the package can become a module later with the same calls"). Each export calls one function of support/interface over two tables in memory of the caller: the draw table (Table of Draw_Record, Append) and the text table (Bytes, Append). The module holds no state of the program: a frame of the package is made over the two tables for the time of one call.
| Fact | Value |
|---|---|
| Source | modules/interface_module |
| Boot image | in the boot image; the image is not built, so its size is not known |
| Imports | none |
| Imported by | interface_through_module |
Exports
| Export | What it does |
|---|---|
| draw_background(drawn: Table(Draw_Record, Append), area: Area) -> Integer | appends the background of the rules on an area: one color and the grid of points |
| draw_card(drawn: Table(Draw_Record, Append), text: Bytes(Append), area: Table(Area, Change), title: Text, caption: Text, accent: Integer) -> Integer | appends the frame of one subject: its border, its surface, its title in the accent and its caption |
| draw_cell_text(drawn: Table(Draw_Record, Append), text: Bytes(Append), cell: Area, words: Text, color: Integer, right: Integer) -> Integer | appends a text in a cell of a line, at the left, or at the right when `right` is not 0 |
| draw_label_value_line(drawn: Table(Draw_Record, Append), text: Bytes(Append), line: Label_Value, label: Text, value: Text) -> Integer | appends a name in the dim color and its value |
| draw_table_band(drawn: Table(Draw_Record, Append), area: Area, index: Integer) -> Integer | appends the band under line `index` of a table: every second line has the surface of a card |
| draw_bar(drawn: Table(Draw_Record, Append), bar: Bar_Value) -> Integer | appends a value against a maximum: the track and the full part |
| damage_by_difference(before: Table(Draw_Record, Read), before_text: Bytes(Read), now: Table(Draw_Record, Read), now_text: Bytes(Read)) -> Table(Damage_Rectangle) | gives the rectangles of the surface that differ between the draw table before and the draw table now |
| execute_in_rectangles(now: Table(Draw_Record, Read), now_text: Bytes(Read), rectangles: Table(Damage_Rectangle, Read), pixels: Bytes(Change), shape: Canvas_Shape) -> Integer | draws the records of a draw table into the pixels of a canvas, in each rectangle, cut to it |
Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).
