ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
ui_viewport_t Struct Reference

For ui viewport, this is the live record that ties selected, first_visible, page_size together. The owning code creates it, updates it while work is active, and releases its handles and pointed-to storage before freeing the record. More...

#include <include/ascii-chat/ui/viewport.h>

Data Fields

size_t selected
size_t first_visible
size_t page_size

Detailed Description

For ui viewport, this is the live record that ties selected, first_visible, page_size together. The owning code creates it, updates it while work is active, and releases its handles and pointed-to storage before freeing the record.

Selection is an absolute item index; first_visible is relative to its page.

ui viewport range is intentionally a small, concrete record. Fields such as page, pages, page_first, page_count give callers the identity and current value they need. It is normally borrowed from, or owned by, the surrounding subsystem—not independently managed. A zero page_size means one page containing the complete data set.

Definition at line 10 of file viewport.h.

Field Documentation

◆ first_visible

size_t ui_viewport_t::first_visible

◆ page_size

size_t ui_viewport_t::page_size

Definition at line 11 of file viewport.h.

Referenced by ui_sync_handle_key(), ui_viewport_key(), and ui_viewport_update().

◆ selected

size_t ui_viewport_t::selected

The documentation for this struct was generated from the following file: