matterhorn-50200.11.0: Terminal client for the Mattermost chat system

Safe HaskellNone
LanguageHaskell2010

Matterhorn.State.ListOverlay

Synopsis

Documentation

listOverlayActivateCurrent :: Lens' ChatState (ListOverlayState a b) -> MH () Source #

Activate the specified list overlay's selected item by invoking the overlay's configured enter keypress handler function.

listOverlaySearchString :: Lens' ChatState (ListOverlayState a b) -> MH Text Source #

Get the current search string for the specified overlay.

listOverlayMove Source #

Arguments

:: Lens' ChatState (ListOverlayState a b)

Which overlay

-> (List Name a -> List Name a)

How to transform the list in the overlay

-> MH () 

Move the list cursor in the specified overlay.

exitListOverlay Source #

Arguments

:: Lens' ChatState (ListOverlayState a b)

Which overlay to reset

-> MH () 

Clear the state of the specified list overlay and return to the Main mode.

enterListOverlayMode Source #

Arguments

:: Lens' ChatState (ListOverlayState a b)

Which overlay to initialize

-> Mode

The mode to change to

-> b

The overlay's initial search scope

-> (a -> MH Bool)

The overlay's enter keypress handler

-> (b -> Session -> Text -> IO (Vector a))

The overlay's results fetcher function

-> MH () 

Initialize a list overlay with the specified arguments and switch to the specified mode.

resetListOverlaySearch :: Lens' ChatState (ListOverlayState a b) -> MH () Source #

Reset the overlay's search by initiating a new search request for the string that is currently in the overlay's editor. This does nothing if a search for this overlay is already in progress.

onEventListOverlay Source #

Arguments

:: Lens' ChatState (ListOverlayState a b)

Which overlay to dispatch to?

-> (KeyConfig -> KeyHandlerMap)

The keybinding builder

-> Event

The event

-> MH Bool 

Generically handle an event for the list overlay state targeted by the specified lens. Automatically dispatches new searches in the overlay's editor if the editor contents change.