Skip to content

MTextInputState

Stanislav Podolia edited this page Jul 21, 2020 · 6 revisions

Flow Wiki

MTextInputState

  • MButtonState

  • AccessRole

  • AccessDescription

  • AccessKbdShortcutString

  • AccessSelectable

  • AccessCallback

  • AccessChildSelected

  • AccessFocused

  • AccessState

      * **FAccessTabindex**<br />
      	* **tabindex** : [Transform](Transform)\<int\><br />
    
      * **FAccessEnabled**<br />
      	* **enabled** : [Transform](Transform)\<bool\><br />
    
      * **FAccessAttribute**<br />
      	* **name** : string<br />
      	* **value** : [Transform](Transform)\<string\><br />
    
      * **FAccessStyle**<br />
      	* **name** : string<br />
      	* **value** : [Transform](Transform)\<string\><br />
    
      * **FAccessTabOrder**<br />
      	* **tabOrder** : [Transform](Transform)\<\[ int \]\><br />
    
      * **FAccessZorder**<br />
      	* **zOrder** : [Transform](Transform)\<int\><br />
    
      * **FAccessVisible**<br />
      	* **visible** : [Transform](Transform)\<bool\><br />
    
  • TagName

  • LangAttribute

    • MouseOnDownAroundState
      • MOnClick
        Only one type of MOnClick* is called when several conflicting styles are used.
        For example if button has MOnClick and MOnTripleClick, only MOnTripleClick on triple click.
        If click starts some async task, then consider to use MOnClickAsync instead

        • click : () -> void
      • MOnMiddleClick

        • click : () -> void
      • MOnRightClick

        • click : () -> void
      • MMousePosition
        Mouse coordinates inside component

        • point : DynamicBehaviour<Point>
      • MOnDoubleClick

        • click : () -> void
      • MOnTripleClick

        • click : () -> void
      • MOnClickAsync
        Blocks button till the end of async action started by the click

        • click : (() -> void) -> void
      • MOnLongClick

        • click : () -> void
      • MOnLongTouch

        • touch : () -> void
      • MLongTouchDelay

        • delay : int
      • MOnTouch
        ms, 500 by default

        • delay : int
        • touch : () -> void
      • MDisableHover

      • MInteractionId
        Id used in manager.currentInteractionItemID

        • id : int
      • MPassClicks
        Pass clicks to elements below

      • MAdditionalRollOutCheck
        Additional check for roll out
        Useful in cases when your component translated to different point while mouse inside

      • MMobileForceHover
        Force hover on mobile

  • TButtonState

      * **MEnabled**<br />
      	Disables inner clickable materials in most of the components<br />
      	* **enabled** : [Transform](Transform)\<bool\><br />
    
      * **MOnMouseDown**<br />
      	* **down** : (**point** : Point, **inside** : bool) -> void<br />
    
      * **MOnMouseUp**<br />
      	* **up** : (**point** : Point, **inside** : bool) -> void<br />
    
      * **MInteractionsOnTop**<br />
      	Move interactions on top of the component<br />
    
      * **MRightDown**<br />
      	* **down** : DynamicBehaviour\<bool\><br />
    
      * **MMiddleDown**<br />
      	* **down** : DynamicBehaviour\<bool\><br />
    
    • MFocusEnabled
      Enable or disable shortcuts and keys for focus, theme changer and feedback snapshots.

    • MForceFocusEnabled
      Force focus enabled

    • MFocusOnPrevious
      Focus on previously focused item after focus is lost on current

    • MShortcut
      Keyboard shortcut to active the button

      • shortcut : string
    • MShortcutKeyCodeComparison
      Compare shortcuts by keycode instead of utf-8 character.

    • MShortcutPreventDefault
      Call preventDefault

    • MDefaultShortcutEnabled
      Enable default enter/space apply shortcut
      True by default

    • MRippleStyle

      • MRippleColor
        Color of the ripple

      • MRippleOpacity
        Opacity of the ripple

      • MRippleType
        Inspector
        Type of the ripple animation

      • MRipplePosition
        Position of top left corner of the ripple

      • MRippleShape

        • component : string
      • MRippleOverlay

        • overlay : bool
      • MRippleWidthHeight

      • MRippleFocused
        default: true

      • MRippleHovered

      • MRippleSelected

      • MEnabled
        Disables inner clickable materials in most of the components

      • MRipplePercents

        • growth : DynamicBehaviour<double>
        • fade : DynamicBehaviour<double>
    • MFocusOnDown
      Set focus to true on mouse down inside

      • enabled : ref bool
    • MKeepFocusOnDown
      Doen't drop focus on mouse down inside

      • enabled : ref bool
    • MHighlightOnFocus
      Add highlight if focused, selected or hovered

    • MHighlightOnHover

    • MHighlightOnSelect

    • MCursorShape
      Shape of the cursor inside, disabled if MEnabled is disabled too

    • MClickEnabled
      Disable any mouse interaction without making component disabled

    • MHoverEnabled
      Disable hover

    • MShortcutFilter
      Function to decide if shortcut should be handled or not

      • filterFn : (focused : bool, keyEvent : KeyEvent) -> bool
    • MTooltipText
      Simple tooltip

    • MFocused
      Shows is this component focused
      Also allows to set focus

      • focused : DynamicBehaviour<bool>
    • MSelected

      • selected : DynamicBehaviour<bool>
    • MActive

      • active : DynamicBehaviour<bool>
    • MKeepFocusOnClickOut
      Keep focus on clicks outside this component

    • IScriptBehaviour

    • IScriptId

      • id : string
    • IScriptRecordingEnabled

    • MFocusId
      Set MFocus id which acts also as taborder inside parent MFocusGroup
      Components with same MFocusId inside same parent can cause problems

    • MAddFocusGroup
      Wrap constructed MFocus and constructed content with MFocusGroup

      • add : bool
    • MGetFocus
      Get contructed inside the component MFocus

      • getFn : (MFocus) -> void
    • MElevation
      Elevation on focus (8. by default)

    • MFocusName

      • name : string
    • MButtonTitle

    • MOnFocus
      Called when component gets or loses focus

      • onFocus : (focus : bool) -> void
  • MHelperText
    Helper text displayed below the input
    If persistent is false, helper text is hidden when there is no focus on the input

    • text : Transform<Maybe<string>>
    • persistent : bool
  • TTextInputState

  • MInputError

  • MInputShowPassword
    Adds showPassword icon, added by default to PasswordType input

    • show : DynamicBehaviour<bool>
  • MInputFilter
    Helper for error without content filtering
    Also check passwordFilter and emailFilter in material_textinput_state.flow
    MInputError(text : Transform<Maybe>, style : [MInputErrorStyle]) -> MInputErrorFilter {
    MInputErrorFilter(\c, __ -> Pair(c, fselect(text, FLift(\t -> eitherMap(t, \t0 -> Some(Pair(t0, false)), None())))), style)
    };
    Can be used to filter the text itself, and get rid of stuff that is not right

    • fn : (content : string, foc : bool) -> string
  • MPositionOnFocus

    • fn : (content : string, previous : int) -> int
  • MSelectionOnFocus

    • fn : (content : string, previous : int) -> int
  • MEatKeyDown
    Style to determine should keyEvent be blocked or not for other components
    See defEatKeyDown in material_textinput_state for example

    • fn : (KeyEvent) -> bool
  • MInputProcessKeyDown
    is key to be processed by input or not

    • fn : (KeyEvent) -> bool
Clone this wiki locally