Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
formFieldExternallyValid :: FormField a b e n -> Boolbrick 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.
formFieldHandleEvent :: FormField a b e n -> BrickEvent n e -> EventM n b ()brick Brick.Forms An event handler for this field.
formFieldName :: FormField a b e n -> nbrick Brick.Forms The name identifying this form field.
formFieldRender :: FormField a b e n -> Bool -> b -> Widget nbrick Brick.Forms A function to render this form field. Parameters are whether the field is currently focused, followed by the field state.
formFieldValidate :: FormField a b e n -> b -> Maybe abrick 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.
formFocus :: Form s e n -> FocusRing nbrick Brick.Forms The focus ring for the form, indicating which form field has input focus.
-
brick Brick.Forms The current state of the form. Forms guarantee that only valid inputs ever get stored in the state, and that after each input event on a form field, if that field contains a valid state value then the value is immediately saved to its corresponding field in this state value using the form field's lens over s.
forceAttr :: AttrName -> Widget n -> Widget nbrick Brick.Widgets.Core When rendering the specified widget, force all attribute lookups in the attribute map to use the value currently assigned to the specified attribute name. This means that the attribute lookups will behave as if they all used the name specified here. That further means that the resolved attribute will still inherit from its parent entry in the attribute map as would normally be the case. If you want to have more control over the resulting attribute, consider modifyDefAttr. For example:
... appAttrMap = attrMap (white on blue) [ ("highlight", fg yellow) , ("notice", fg red) ] ... renderA :: (String, String) -> [Widget n] renderA (a,b) = hBox [ withAttr "highlight" (str a) , str " is " , withAttr "highlight" (str b) ] render1 = renderA (Brick, "fun") render2 = forceAttr "notice" render1In the above, render1 will show "Brick is fun" where the first and last words are yellow on a blue background and the middle word is white on a blue background. However, render2 will show all words in red on a blue background. In both versions, the middle word will be in white on a blue background.forceAttrAllowStyle :: AttrName -> Widget n -> Widget nbrick Brick.Widgets.Core Like forceAttr, except that the style of attribute lookups in the attribute map is preserved and merged with the forced attribute. This allows for situations where forceAttr would otherwise ignore style information that is important to preserve.
forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)classy-prelude ClassyPrelude forM is mapM with its arguments flipped. For a version that ignores the results see forM_.