[][src]Module phetch::ui

The UI is what drives the interactive phetch application: it spawns threads to fetch Gopher pages and download binary files, it manages the opened pages (Views), it asks the focused View to respond to user input, and it performs actions based on what the View returns - like opening a telnet client, or displaying an error on the status line.

The UI also directly responds to user input on its own, such as ctrl-q to quit the app or keyboard entry during an input prompt.

Finally, the UI is what prints to the screen - each View just renders its content to a String. The UI is what draws it.

Structs

UI

UI is mainly concerned with drawing to the screen, managing the active views, and responding to user input.

Enums

Action

Views generate Actions in response to user input, which are processed by the UI.

Mode

The mode our text UI is in. Run mode is the default while Print doesn't show the cursor, among other things.

Constants

MAX_COLS

How big the longest line can be, for the purposes of calculating margin sizes. We often draw longer lines than this and allow wrapping in text views.

SCROLL_LINES

How many lines to jump by when using page up/down.

Traits

View

Views represent what's on screen, a Gopher Menu/Text/etc item.

Type Definitions

Key

Alias for a termion Key event.

KeyReceiver

Channel to receive Key events on.