Hoogle Search

Within LTS Haskell 24.66 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. editShowableFieldWithValidate :: (Ord n, Show n, Read a, Show a) => Lens' s a -> n -> (a -> Bool) -> s -> FormFieldState s e n

    brick Brick.Forms

    A form field using a single-line editor to edit the Show representation of a state field value of type a. This automatically uses its Read instance to validate the input, and also accepts an additional user-defined pass for validation. This field is mostly useful in cases where the user-facing representation of a value matches the Show representation exactly, such as with Int, but you don't want to accept just any Int. This field's attributes are governed by those exported from Edit. This field responds to all events handled by editor, including mouse events.

  2. formFieldExternallyValid :: FormField a b e n -> Bool

    brick Brick.Forms

    Whether the field is valid according to an external validation source. Defaults to always being True and can be set with setFieldValid. The value of this field also affects the behavior of allFieldsValid and getInvalidFields.

  3. formFieldValidate :: FormField a b e n -> b -> Maybe a

    brick Brick.Forms

    A validation function converting this field's state into a value of your choosing. Nothing indicates a validation failure. For example, this might validate an Editor state value by parsing its text contents as an integer and return Maybe Int. This is for pure value validation; if additional validation is required (e.g. via IO), use this field's state value in an external validation routine and use setFieldValid to feed the result back into the form.

  4. invalidFields :: Form s e n -> [n]

    brick Brick.Forms

    Returns the resource names associated with all form input fields that currently have invalid inputs. This is useful when we need to force the user to repair invalid inputs before moving on from a form editing session.

  5. invalidFormInputAttr :: AttrName

    brick Brick.Forms

    The attribute for form input fields with invalid values. Note that this attribute will affect any field considered invalid and will take priority over any attributes that the field uses to render itself.

  6. setFieldValid :: Eq n => Bool -> n -> Form s e n -> Form s e n

    brick Brick.Forms

    Manually indicate that a field has invalid contents. This can be useful in situations where validation beyond the form element's validator needs to be performed and the result of that validation needs to be fed back into the form state.

  7. keybindingHelpWidget :: forall k (m :: Type -> Type) n . Ord k => KeyConfig k -> [KeyEventHandler k m] -> Widget n

    brick Brick.Keybindings.Pretty

    Build a Widget displaying key binding information for a single related group of event handlers. This is provided for convenience so that basic help text for the application's event handlers can be produced and embedded in the UI. The resulting widget lists the key events (and keys) bound to the specified handlers, along with the events' names and the list of available key bindings for each handler.

  8. invalidateCache :: Ord n => EventM n s ()

    brick Brick.Main

    Invalidate the entire rendering cache.

  9. invalidateCacheEntry :: Ord n => n -> EventM n s ()

    brick Brick.Main

    Invalidate the rendering cache entry with the specified resource name.

  10. renderWidget :: Ord n => Maybe AttrMap -> [Widget n] -> DisplayRegion -> Picture

    brick Brick.Main

    This function provides a simplified interface to rendering a list of Widgets as a Picture outside of the context of an App. This can be useful in a testing setting but isn't intended to be used for normal application rendering. The API is deliberately narrower than the main interactive API and is not yet stable. Use at your own risk. Consult the Vty library documentation for details on how to output the resulting Picture.

Page 949 of many | Previous | Next