restman-0.7.7.0: Web request TUI program.
Safe HaskellNone
LanguageGHC2024

Types

Description

Core data types for the RESTman TUI.

AppS is the top-level application state. It is threaded through the Brick event loop and holds all mutable information: the focused widget, editor contents, the HTTP connection manager, and the last rendered response image.

AppR is the resource name type used to identify named Brick widgets (editors, viewports, etc.).

See also Lib for the functions that manipulate these types.

Synopsis

Global Types for TUI manipulation

data AppS Source #

Application State

Single URL editor widget.

Widget names are all Text values.

Constructors

AppS 

Fields

data OverlayS Source #

State of the UI overlay, which is currently just the "pop-up" for the method selector.

Constructors

OverlayS 

Fields

data AppR Source #

Application Resource Name — identifies every named widget in the Brick widget tree.

Constructors

MethodEditor

The single-line editor for the HTTP method string.

UrlEditor

The single-line editor for the target URL.

DefaultHeadersToggle

The checkbox-like widget for toggling default header use.

ExistingCustomHeader CustomHeaderR

One cell within the custom-headers table.

AddCustomHeader

The + button that creates a new custom header row.

ResponseBodyView

The scrollable viewport that shows the response body.

MethodSelector

The pop-up list used to pick an HTTP method.

Instances

Instances details
Show AppR Source # 
Instance details

Defined in Types

Methods

showsPrec :: Int -> AppR -> ShowS #

show :: AppR -> String #

showList :: [AppR] -> ShowS #

Eq AppR Source # 
Instance details

Defined in Types

Methods

(==) :: AppR -> AppR -> Bool #

(/=) :: AppR -> AppR -> Bool #

Ord AppR Source # 
Instance details

Defined in Types

Methods

compare :: AppR -> AppR -> Ordering #

(<) :: AppR -> AppR -> Bool #

(<=) :: AppR -> AppR -> Bool #

(>) :: AppR -> AppR -> Bool #

(>=) :: AppR -> AppR -> Bool #

max :: AppR -> AppR -> AppR #

min :: AppR -> AppR -> AppR #

data CustomHeaderR Source #

Resource name for a single cell in the custom-headers table.

listIndex selects the row (0-based index into customHeaders of AppS) and column selects which of the three cells in that row has focus.

Constructors

MkCustomHeaderR 

data CustomHeaderColumn Source #

Which column of a custom-header row has focus.

Constructors

ActiveToggle

The enabled/disabled checkbox column.

NameEditor

The header-name editor column.

ValueEditor

The header-value editor column.

Range Ord-like types and helpers

data RangeInAlign Source #

Alignment of one range strictly within another range both over a discete, totally ordered set.

Constructors

Min

min of both ranges match

MidL

inner midpoint as close as possible to, but less than or equal to outer midpoint

MidG

inner midpoint as close as possible to, but greater than or equal to outer midpoint

Max

max of both ranges match

type VertAlign = RangeInAlign Source #

Vertical alignment

type WideAlign = RangeInAlign Source #

Wide-ways ("horizonal") alignment

left :: VertAlign Source #

Align on the left, matching min wide coordinates.

top :: VertAlign Source #

Align at the top, matching min vert corodinates.