[][src]Module phetch::menu

The Menu is a View representing a Gopher menu. It renders the colorful representation, manages the cursor and selection state, and responds to input like the UP and DOWN arrows or other key combinations.

The Menu doesn't draw or perform any actions on its own, instead it returns an Action to the UI representing its intent.

Structs

Line

The Line represents a single line in a Gopher menu. It must exist in the context of a Menu struct - its link field is its index in the Menu's links Vec, and start/end/text_end point to locations in Menu's raw Gopher response.

Menu

The Menu holds our Gopher Lines, a list of links, and maintains both where the cursor is on screen and which lines need to be drawn on screen. While the main UI can be used to prompt the user for input, the Menu maintains its own input for the "quick navigation" feature using number entry and the "incremental search" (over menu links) feature using text entry.

Functions

parse

Parse gopher response into a Menu object.

parse_line

Parses a single line from a Gopher menu into a Line struct.