PICK A PIN's geometry: the box the board takes, where each pad sits, the buttons above and below the board, the marks inside it, and the protocol list's rows. picker_screen.c holds the state, the touch handling and the screen's interface (picker_screen.h); picker_draw.c draws; picker_screen_int.h is what the three share.
More...
|
| void | picker_board_fit (uint16_t ow, uint16_t oh, int *w, int *h) |
| | The size in pixels a board outline draws at.
|
| void | pk_board_box (int *x, int *y, int *w, int *h) |
| | Gives the box the board occupies: the drawing's outline or else the shape's, centred across the screen between the body's top and FOOT.
|
| bool | pk_pad_xy (uint8_t pad, int *px, int *py) |
| | Gives where a pad sits on screen, from the drawing's pad record or else the shape's grid.
|
| bool | pk_pad_is_top (uint8_t pad) |
| | Returns which of the two pad rows a pad is in.
|
| bool | pk_button_at (int i, gfx_rect_t *out, int *tier_out) |
| | Gives the button of catalogue entry i and its tier; only a pin an output may have gets one.
|
| bool | picker_screen_button_rect (uint8_t index, gfx_rect_t *out) |
| bool | pk_marker_at (uint8_t e, int *mx, int *my, int *r) |
| | Gives the centre and radius of the marker of pad-list entry e.
|
| bool | picker_screen_marker_rect (uint8_t entry, gfx_rect_t *out) |
| gfx_rect_t | picker_screen_area (picker_area_t area) |
| | Gives the rectangle of one of the screen's tables.
|
| gfx_rect_t | picker_screen_list_face (void) |
| int | pk_pop_rows (void) |
| | Returns the rows of the protocol list: the protocols, then one PROG PORT entry per port.
|
| gfx_rect_t | pk_pop_rect (void) |
| | Returns the protocol list's rectangle: one column of POP_W px, two with PROG PORT entries.
|
| gfx_rect_t | picker_screen_list_row (uint8_t proto) |
| | Row proto: a protocol in the first column, PROG PORT entry proto - OUTBIND_PROTOS in the second, from the same top.
|
| bool | picker_screen_list_open (void) |
| | Returns whether the protocol list is open.
|
PICK A PIN's geometry: the box the board takes, where each pad sits, the buttons above and below the board, the marks inside it, and the protocol list's rows. picker_screen.c holds the state, the touch handling and the screen's interface (picker_screen.h); picker_draw.c draws; picker_screen_int.h is what the three share.
SPDX-License-Identifier: MIT
◆ picker_board_fit()
| void picker_board_fit |
( |
uint16_t | ow, |
|
|
uint16_t | oh, |
|
|
int * | w, |
|
|
int * | h ) |
The size in pixels a board outline draws at.
600 wide and the height its aspect gives, or, when that is taller than 240, 240 high and the width its aspect gives. A zero side gives 600 x 240.
- Parameters
-
| ow | The outline's width, any unit. |
| oh | Its height, in the same unit. |
| w | The width drawn, px. |
| h | The height drawn, px. |
◆ picker_screen_area()
Gives the rectangle of one of the screen's tables.
- Parameters
-
- Returns
- its rectangle
◆ picker_screen_button_rect()
| bool picker_screen_button_rect |
( |
uint8_t | index, |
|
|
gfx_rect_t * | out ) |
The rectangle of the button of catalogue entry index; false for a pin with none.
◆ picker_screen_list_face()
The protocol list: its face, and the row of proto when it is open.
◆ picker_screen_list_open()
| bool picker_screen_list_open |
( |
void | | ) |
|
Returns whether the protocol list is open.
- Returns
- true when open
◆ picker_screen_list_row()
| gfx_rect_t picker_screen_list_row |
( |
uint8_t | proto | ) |
|
Row proto: a protocol in the first column, PROG PORT entry proto - OUTBIND_PROTOS in the second, from the same top.
- Parameters
-
| proto | the protocol index, or OUTBIND_PROTOS + n for PROG PORT entry n |
- Returns
- the row's rectangle
◆ picker_screen_marker_rect()
| bool picker_screen_marker_rect |
( |
uint8_t | entry, |
|
|
gfx_rect_t * | out ) |
The round marker of entry entry of the board's pad list (outbind_pads()), with its dark ring: a G for a ground, the voltage for a rail. False for a pad with no marker.
◆ pk_board_box()
| void pk_board_box |
( |
int * | x, |
|
|
int * | y, |
|
|
int * | w, |
|
|
int * | h ) |
Gives the box the board occupies: the drawing's outline or else the shape's, centred across the screen between the body's top and FOOT.
- Parameters
-
| x | takes the left edge, px |
| y | takes the top edge, px |
| w | takes the width, px |
| h | takes the height, px |
◆ pk_button_at()
| bool pk_button_at |
( |
int | i, |
|
|
gfx_rect_t * | out, |
|
|
int * | tier_out ) |
Gives the button of catalogue entry i and its tier; only a pin an output may have gets one.
- Parameters
-
| i | catalogue entry |
| out | takes the button's rectangle |
| tier_out | takes the tier, 0 for the row nearer the board |
- Returns
- true when the entry has a button
◆ pk_marker_at()
| bool pk_marker_at |
( |
uint8_t | e, |
|
|
int * | mx, |
|
|
int * | my, |
|
|
int * | r ) |
Gives the centre and radius of the marker of pad-list entry e.
- Parameters
-
| e | pad-list entry |
| mx | takes the centre x, px |
| my | takes the centre y, px |
| r | takes the radius, px |
- Returns
- true when the pad has a marker
◆ pk_pad_is_top()
| bool pk_pad_is_top |
( |
uint8_t | pad | ) |
|
Returns which of the two pad rows a pad is in.
- Parameters
-
- Returns
- true for the upper row
◆ pk_pad_xy()
| bool pk_pad_xy |
( |
uint8_t | pad, |
|
|
int * | px, |
|
|
int * | py ) |
Gives where a pad sits on screen, from the drawing's pad record or else the shape's grid.
- Parameters
-
| pad | the pad |
| px | takes the x of the pad's ring centre, px |
| py | takes the y of the pad's ring centre, px |
- Returns
- true when the pad is on the board
◆ pk_pop_rect()
Returns the protocol list's rectangle: one column of POP_W px, two with PROG PORT entries.
- Returns
- the rectangle
◆ pk_pop_rows()
Returns the rows of the protocol list: the protocols, then one PROG PORT entry per port.
- Returns
- the row count