| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
NanoUI.Context
Description
Synopsis
- data Context = Context {
- ctxNodeArena :: NodeArena
- ctxDrawArena :: DrawArena
- ctxHotId :: IORef WidgetId
- ctxLastHotId :: IORef WidgetId
- ctxActiveId :: IORef WidgetId
- ctxClickedId :: IORef WidgetId
- ctxReleaseClickedId :: IORef WidgetId
- ctxPressPos :: IORef (Maybe V2)
- ctxRightPressPos :: IORef (Maybe V2)
- ctxFocusId :: IORef WidgetId
- ctxFocusVisible :: IORef Bool
- ctxStore :: IORef WidgetStore
- ctxDamageState :: IORef DamageState
- ctxOverlayState :: IORef OverlayState
- ctxAnimationState :: IORef AnimationState
- ctxScrollState :: !(IORef ScrollState)
- ctxDrawingCache :: IORef DrawingCacheState
- ctxIdContext :: IORef IdContext
- ctxFontMetrics :: FontMetrics
- ctxMonoFontMetrics :: FontMetrics
- ctxMeasureText :: Text -> IO (Float, Float)
- ctxResolveFont :: !(Float -> FontWeight -> FontStyle -> FontVariant -> IO (FontMetrics, Bool))
- ctxResolveMeasure :: !(Float -> FontWeight -> FontStyle -> FontVariant -> Text -> IO (Float, Float))
- ctxMeasureCache :: Maybe (IORef (HashMap MeasureCacheKey (Float, Float)))
- ctxSpanCache :: !(IORef (IntMap SpanCacheEntry))
- ctxWidgetTextCache :: !(IORef (IntMap WidgetTextCacheEntry))
- ctxLayoutCache :: !(IORef (Maybe (LayoutCache, Size, Int)))
- ctxMetricGen :: !(IORef Int)
- ctxMetricSource :: !MetricSource
- ctxLastMetricSource :: !(IORef (Maybe MetricSource))
- ctxPaintFull :: !(IORef Bool)
- ctxExternalText :: Bool
- ctxTheme :: !(IORef Theme)
- ctxThemeScopes :: !(IORef ThemeScopes)
- ctxContainerStack :: IORef [Int]
- ctxMessages :: IORef [FrameMsg]
- ctxFocusables :: IORef (MutablePrimArray RealWorld WidgetId)
- ctxFocusablesCount :: IORef Int
- ctxSpanBase :: SpanArena
- ctxSpanOverlay :: SpanArena
- ctxInteractionState :: !(IORef InteractionState)
- ctxClipboardGet :: IO (Maybe Text)
- ctxClipboardSet :: Text -> IO Bool
- ctxImageAtlas :: ImageAtlas
- ctxWakeLoop :: IORef (Maybe (IO ()))
- ctxHost :: IORef (Map TypeRep Dynamic)
- ctxDefaultLayout :: IORef Layout
- type MeasureCacheKey = (Text, Float)
- data TextInputMenu = TextInputMenu {}
- data TextInputDrag = TextInputDrag {}
- data TextFieldClickCell = TextFieldClickCell {}
- data WindowResizeEdge
- data WindowResizeDrag = WindowResizeDrag {}
- data DamageState = DamageState {
- dsDirty :: !Bool
- dsDamage :: !Damage
- dsRequests :: ![DamageRequest]
- dsLastWindowSize :: !Size
- dsPrevRects :: !(IntMap Rect)
- dsPrevClips :: !(IntMap Rect)
- dsPrevNodeTexts :: !(IntMap Text)
- data OverlayState = OverlayState {
- osModalWasActive :: !Bool
- osModalActive :: !Bool
- osModalDepth :: !Int
- osEscapeConsumed :: !Bool
- osPrevFloatingRects :: !(IntMap Rect)
- osPrevFloatingOrder :: ![Int]
- osTopmostCache :: !(Maybe (V2, Maybe WidgetId))
- osCurrentFloatingId :: !(Maybe WidgetId)
- osLastPointerBlocked :: !Bool
- data AnimationState = AnimationState {
- asAnimations :: !(IntMap Animation)
- asAnimRest :: !(IntMap Float)
- asAnyAnimating :: !Bool
- asAnimSettled :: !Bool
- asRectless :: !(IntMap Int)
- data DrawingCacheState = DrawingCacheState {
- dcsPopupConfigs :: !(IntMap PopupConfig)
- dcsDrawings :: !(IntMap DrawingEntry)
- dcsCustomDrawings :: !(IntMap CustomDrawingEntry)
- dcsCustomMeasures :: !(IntMap CustomMeasureFn)
- dcsCustomCursors :: !(IntMap (CustomDrawContext -> UiCursorKind))
- dcsCustomDamageSlop :: !(IntMap Float)
- dcsDrawOpCache :: !(IntMap DrawOpCacheEntry)
- dcsCustomDrawOpCache :: !(IntMap CustomDrawOpCacheEntry)
- dcsDrawFitCache :: !(IntMap DrawFitCache)
- data DrawingEntry = DrawingEntry {
- deContent :: !Int
- deBuild :: !DrawingBuild
- data DrawFitCache = DrawFitCache {}
- data SpanCacheEntry = SpanCacheEntry {}
- data WidgetTextCacheEntry = WidgetTextCacheEntry {
- wtcNodeType :: !Int
- wtcStyle :: !Int
- wtcFontSize :: !Float
- wtcText :: !Text
- wtcWidth :: !Float
- wtcHeight :: !Float
- wtcAlign :: !Int
- wtcPlacement :: !(Maybe WidgetTextPlacement)
- data WidgetTextPlacement = WidgetTextPlacement !Text !Float !Float !Float !Float
- data InteractionState = InteractionState {
- isScrollDrag :: !(Maybe (WidgetId, DirTag, Float))
- isTextInputDrag :: !(Maybe TextInputDrag)
- isTextFieldClickCell :: !(Maybe TextFieldClickCell)
- isTextInputMenu :: !(Maybe TextInputMenu)
- isTextEditLastAction :: !(Maybe (WidgetId, TextCommand))
- isSelectDropPress :: !Bool
- isOpenSelectDrop :: !(Maybe (WidgetId, Rect))
- isMenuPointerGesture :: !Bool
- isWindowDrag :: !(Maybe (WidgetId, Float, Float))
- isWindowResize :: !(Maybe WindowResizeDrag)
- initialInteractionState :: InteractionState
- initialDamageState :: DamageState
- initialOverlayState :: OverlayState
- initialAnimationState :: AnimationState
- initialScrollState :: ScrollState
- initialDrawingCacheState :: DrawingCacheState
- getsInteraction :: Context -> (InteractionState -> a) -> IO a
- modifyInteraction :: Context -> (InteractionState -> InteractionState) -> IO ()
- getsOverlay :: Context -> (OverlayState -> a) -> IO a
- modifyOverlay :: Context -> (OverlayState -> OverlayState) -> IO ()
- getsDamage :: Context -> (DamageState -> a) -> IO a
- modifyDamage :: Context -> (DamageState -> DamageState) -> IO ()
- getScrollDrag :: Context -> IO (Maybe (WidgetId, DirTag, Float))
- setTextInputDrag :: Context -> Maybe TextInputDrag -> IO ()
- getTextInputMenu :: Context -> IO (Maybe TextInputMenu)
- setTextInputMenu :: Context -> Maybe TextInputMenu -> IO ()
- takeTextEditLastAction :: Context -> IO (Maybe (WidgetId, TextCommand))
- getMenuPointerGesture :: Context -> IO Bool
- setMenuPointerGesture :: Context -> Bool -> IO ()
- getWindowDrag :: Context -> IO (Maybe (WidgetId, Float, Float))
- getWindowResize :: Context -> IO (Maybe WindowResizeDrag)
- intKey :: WidgetId -> Int
- markDirty :: Context -> IO ()
- clearDirty :: Context -> IO ()
- isDirty :: Context -> IO Bool
- setWakeLoop :: Context -> IO () -> IO ()
- takeDamage :: Context -> IO Damage
- data DamageRequest
- = ReqWidget !WidgetId !DamageBounds
- | ReqKey !Int !DamageBounds
- | ReqRect !Rect
- | ReqPeers ![WidgetId] !DamageBounds
- | ReqFull
- requestDamage :: Context -> DamageRequest -> IO ()
- damageWidget :: Context -> WidgetId -> DamageBounds -> IO ()
- damageKey :: Context -> Int -> DamageBounds -> IO ()
- damageRect :: Context -> Rect -> IO ()
- damagePeers :: Context -> [WidgetId] -> DamageBounds -> IO ()
- damageFull :: Context -> IO ()
- registerPopupConfig :: Context -> WidgetId -> PopupAnchor -> PopupPlacement -> Float -> IO ()
- lookupPopupConfig :: Context -> WidgetId -> IO (Maybe (PopupAnchor, PopupPlacement, Float))
- registerDrawing :: Context -> WidgetId -> Int -> DrawingBuild -> IO ()
- lookupDrawing :: Context -> WidgetId -> IO (Maybe DrawingEntry)
- cachedDrawingOps :: Context -> WidgetId -> Int -> Rect -> DrawingBuild -> IO (SmallArray DrawOp)
- cachedWidgetLayout :: Context -> WidgetId -> Double -> Double -> Float -> Int -> Layout -> IO Layout -> IO Layout
- lookupDrawFitEnvelope :: Context -> WidgetId -> Float -> Int -> Layout -> IO (Maybe (Double, Double))
- pruneDrawOpCache :: Context -> IO ()
- type CustomMeasureFn = FontMetrics -> (Float, Float) -> (Float, Float)
- data CustomDrawContext = CustomDrawContext {
- cdcHovered :: !Bool
- cdcPressed :: !Bool
- cdcFocused :: !Bool
- cdcActive :: !Bool
- cdcDisabled :: !Bool
- cdcTheme :: !Theme
- cdcFont :: !FontMetrics
- type CustomDrawBuild = CustomDrawContext -> Rect -> SmallArray DrawOp
- registerCustomDrawing :: Context -> WidgetId -> Int -> CustomDrawBuild -> IO ()
- lookupCustomDrawing :: Context -> WidgetId -> IO (Maybe CustomDrawingEntry)
- cachedCustomDrawingOps :: Context -> WidgetId -> Int -> Rect -> CustomDrawContext -> CustomDrawBuild -> IO (SmallArray DrawOp)
- refreshCustomDrawingOps :: Context -> WidgetId -> Int -> Rect -> CustomDrawContext -> CustomDrawBuild -> IO Bool
- drawingOpsStale :: Context -> WidgetId -> Int -> Rect -> IO Bool
- data CustomDrawingEntry = CustomDrawingEntry {
- cdrContent :: !Int
- cdrBuild :: !CustomDrawBuild
- registerCustomMeasure :: Context -> WidgetId -> CustomMeasureFn -> IO ()
- lookupCustomMeasure :: Context -> WidgetId -> IO (Maybe CustomMeasureFn)
- registerCustomCursor :: Context -> WidgetId -> (CustomDrawContext -> UiCursorKind) -> IO ()
- lookupCustomCursor :: Context -> WidgetId -> IO (Maybe (CustomDrawContext -> UiCursorKind))
- registerCustomDamageSlop :: Context -> WidgetId -> Float -> IO ()
- lookupCustomDamageSlop :: Context -> WidgetId -> IO (Maybe Float)
- resetDrawingScopeCache :: Context -> IO ()
- getStore :: Context -> IO WidgetStore
- setStore :: Context -> WidgetStore -> IO ()
- modifyStore :: Context -> (WidgetStore -> WidgetStore) -> IO ()
- getStoreBool :: Context -> WidgetId -> Bool -> IO Bool
- writeStoreInt :: Context -> WidgetId -> Int -> Int -> IO ()
- writeStoreFloat :: Context -> WidgetId -> Int -> Float -> IO ()
- writeStoreBool :: Context -> WidgetId -> Bool -> IO ()
- adoptStoreInt :: Context -> WidgetId -> Int -> Int -> IO Int
- adoptStoreFloat :: Context -> WidgetId -> Int -> Float -> IO Float
- adoptStoreText :: Context -> WidgetId -> Int -> Text -> IO Text
- recordStoreInt :: Context -> Int -> Int -> IO ()
- recordStoreFloat :: Context -> Int -> Float -> IO ()
- recordStoreText :: Context -> Int -> Text -> IO ()
- isDisabled :: Context -> WidgetId -> IO Bool
- newThemeScopes :: IO ThemeScopes
- beginThemeScopes :: Context -> Bool -> IO ()
- pushThemeScope :: Context -> Bool -> Theme -> Theme -> IO Int
- themeScopesChanged :: Context -> IO Bool
- scopeTheme :: Context -> Int -> IO Theme
- scopeRawTheme :: Context -> Int -> IO Theme
- currentTheme :: Context -> IO Theme
- nodeTheme :: Context -> NodeIdx -> IO Theme
- widgetTheme :: Context -> WidgetId -> IO Theme
- getScrollOffset :: Context -> WidgetId -> IO Float
- setScrollOffset :: Context -> WidgetId -> Float -> IO ()
- getScrollOffset2D :: Context -> WidgetId -> IO V2
- setScrollOffset2D :: Context -> WidgetId -> V2 -> IO ()
- setScrollConfig :: Context -> WidgetId -> ScrollConfig -> IO ()
- defaultScrollConfig :: ScrollConfig
- linkScrollAxes :: Context -> WidgetId -> WidgetId -> IO ()
- data ScrollTuning = ScrollTuning {}
- defaultScrollTuning :: ScrollTuning
- getScrollTuning :: Context -> IO ScrollTuning
- setScrollTuning :: Context -> ScrollTuning -> IO ()
- getScrollStep :: Context -> WidgetId -> IO Float
- setScrollStep :: Context -> WidgetId -> Float -> IO ()
- resolveScrollStep :: Context -> WidgetId -> IO Float
- data ScrollAxes
- data ScrollMetrics = ScrollMetrics {
- scrollViewport :: !Rect
- scrollRange :: !V2
- scrollOffset :: !V2
- scrollAxes :: !ScrollAxes
- getScrollMetrics :: Context -> WidgetId -> IO (Maybe ScrollMetrics)
- cacheScrollMetrics :: Context -> WidgetId -> ScrollAxes -> Rect -> V2 -> IO ()
- beginScrollMetrics :: Context -> IO ()
- getScrollOffsetIn :: Context -> WidgetId -> ScrollAxes -> IO V2
- setScrollOffsetIn :: Context -> WidgetId -> ScrollAxes -> V2 -> IO ()
- data ScrollBehavior
- data ScrollAlign
- scrollTo :: Context -> WidgetId -> V2 -> ScrollBehavior -> IO ()
- scrollBy :: Context -> WidgetId -> V2 -> ScrollBehavior -> IO ()
- scrollPages :: Context -> WidgetId -> V2 -> ScrollBehavior -> IO ()
- scrollToStart :: Context -> WidgetId -> ScrollBehavior -> IO ()
- scrollToEnd :: Context -> WidgetId -> ScrollBehavior -> IO ()
- scrollIntoView :: Context -> WidgetId -> WidgetId -> ScrollAlign -> ScrollBehavior -> IO ()
- scrollRectIntoView :: Context -> WidgetId -> Rect -> ScrollAlign -> ScrollBehavior -> IO ()
- applyScrollTarget :: Context -> WidgetId -> ScrollAxes -> V2 -> ScrollBehavior -> IO ()
- scrollTargetOffset :: Context -> WidgetId -> V2 -> IO V2
- scrollGliding :: Context -> WidgetId -> IO Bool
- clampScrollOffset :: V2 -> V2 -> V2
- cancelScrollGlide :: Context -> WidgetId -> IO ()
- stepScrollGlides :: Context -> Float -> IO ()
- getPrevRect :: Context -> WidgetId -> IO (Maybe Rect)
- getPrevClipRect :: Context -> WidgetId -> IO (Maybe Rect)
- atlasTextureId :: Int
- registerImage :: Context -> ImageId -> Int -> Int -> ByteString -> IO Bool
- registerImages :: Foldable f => Context -> f (ImageId, Int, Int, ByteString) -> IO Bool
- lookupImageUv :: Context -> ImageId -> IO (Maybe (Float, Float, Float, Float))
- atlasSnapshot :: Context -> IO (Maybe (Int, Int, ForeignPtr Word8, Int))
- withFontMetrics :: Context -> FontMetrics -> Context
- withMonoFontMetrics :: Context -> FontMetrics -> Context
- withMeasureText :: Context -> (Text -> IO (Float, Float)) -> Context
- withFontResolver :: Context -> (Float -> FontWeight -> FontStyle -> FontVariant -> IO (FontMetrics, Bool)) -> (Float -> FontWeight -> FontStyle -> FontVariant -> Text -> IO (Float, Float)) -> Context
- wrapMeasureCache :: Float -> Context -> (Text -> IO (Float, Float)) -> Context
- clearMeasureCache :: Context -> IO ()
- ensureMetricCaches :: Context -> IO ()
- hasCustomLayoutInputs :: Context -> IO Bool
- withExternalText :: Context -> Bool -> Context
- withTheme :: Context -> Theme -> IO Context
- setTheme :: Context -> Theme -> IO ()
- getTheme :: Context -> IO Theme
- withClipboard :: Context -> IO (Maybe Text) -> (Text -> IO Bool) -> Context
- enableMeasureCache :: Context -> IO Context
- setHost :: Typeable a => Context -> a -> IO ()
- setDrawSnapScale :: Context -> Float -> IO ()
- setDrawSquareGeometry :: Context -> Bool -> IO ()
- setDrawExternalText :: Context -> Bool -> IO ()
- askHostIO :: Typeable a => Context -> IO (Maybe a)
- pushMessage :: Context -> FrameMsg -> IO ()
- drainMessages :: Context -> IO [FrameMsg]
- newContext :: IO Context
- newPixelHostContext :: IO Context
- getFocusId :: Context -> IO WidgetId
- getFocusVisible :: Context -> IO Bool
- getHotId :: Context -> IO WidgetId
- registerFocusable :: Context -> WidgetId -> IO ()
- getFocusables :: Context -> IO [WidgetId]
- textInputEditActive :: Context -> IO Bool
- modalActive :: Context -> IO Bool
- overlayConsumesQuit :: Context -> Input -> IO Bool
- markEscapeConsumed :: Context -> IO ()
- pointerBlockedByModal :: Context -> IO Bool
- pointerBlockedByOverlay :: Context -> V2 -> IO Bool
- armMenuPointerCapture :: Context -> Input -> IO ()
- seedFloatingPanel :: Context -> WidgetId -> Rect -> IO ()
- beginModal :: Context -> IO ()
- endModal :: Context -> IO ()
- beginFrameModal :: Context -> IO ()
- modalDamageFlip :: Context -> IO Bool
- anyAnimating :: Context -> IO Bool
- getLiveAnimations :: Context -> IO (IntMap Animation)
- takeAnimSettled :: Context -> IO Bool
- lookupAnimation :: Context -> WidgetId -> IO (Maybe Animation)
- getAnimRectless :: Context -> IO (IntMap Int)
- setAnimRectless :: Context -> IntMap Int -> IO ()
- startAnimation :: Context -> WidgetId -> Float -> Float -> Float -> IO ()
- startAnimationEase :: Context -> WidgetId -> Float -> Float -> Float -> Ease -> IO ()
- startAnimationEaseDelay :: Context -> WidgetId -> Float -> Float -> Float -> Ease -> Float -> IO ()
- startSpring :: Context -> WidgetId -> SpringParams -> Float -> IO ()
- setAnimationValue :: Context -> WidgetId -> Float -> IO ()
- tickAnimations :: Context -> Float -> IO ()
- getAnimationValue :: Context -> WidgetId -> IO Float
- getAnimRest :: Context -> IO (IntMap Float)
- pruneAnimRest :: Context -> (Int -> Bool) -> IO ()
- data FrameMsg where
- decodeMessages :: (Foldable f, Typeable a) => f FrameMsg -> [a]
- reduceMessages :: (Foldable f, Typeable msg) => (msg -> model -> model) -> model -> f FrameMsg -> model
- reduceUpdates :: (Foldable f, Typeable model) => model -> f FrameMsg -> model
- data WidgetStore = WidgetStore {
- storeMirrorGen :: !Word64
- storeOpenSelect :: !Int
- storeInt :: !(IntMap Int)
- storeFloat :: !(IntMap Float)
- storeDouble :: !(IntMap Double)
- storePoint :: !(IntMap (Float, Float))
- storeText :: !(IntMap Text)
- storeIntSet :: !(IntMap IntSet)
- storeFloatList :: !(IntMap [Float])
- storeIntList :: !(IntMap [Int])
- storeDyn :: !(IntMap Dynamic)
- bumpMirror :: WidgetStore -> WidgetStore
- slotKey :: Slot -> Int -> Int
- data Slot
- = SlotCursor
- | SlotAnchor
- | SlotDrag
- | SlotDragW
- | SlotDrop
- | SlotDropPos
- | SlotWinSize
- | SlotMenuOpen
- | SlotMenuPos
- | SlotScrollCfg
- | SlotScrollOff
- | SlotScrollCross
- | SlotScrollLinkX
- | SlotScrollLinkY
- | SlotScrollStep
- | SlotScrollAxes
- | SlotScrollViewPos
- | SlotScrollViewSize
- | SlotScrollRange
- | SlotScrollContent
- | SlotTextAreaRow
- | SlotTextAreaCol
- | SlotTextAreaPrefCol
- | SlotTextAreaScroll
- | SlotTextAreaViewport
- | SlotTextAreaAnchorRow
- | SlotTextAreaAnchorCol
- | SlotTextAreaContentW
- | SlotTextAreaContentH
- | SlotTextAreaContentFont
- | SlotTextAreaBuffer
- | SlotTextAreaChanged
- | SlotTextHistory
- | SlotTextMode
- | SlotTextAreaWidths
- | SlotTextInputScroll
- | SlotSearchCommitted
- | SlotSearchAge
- | SlotComboHighlight
- | SlotComboScroll
- | SlotComboCount
- | SlotComboScrollX
- | SlotComboContentW
- | SlotComboDrag
- | SlotComboDragOff
- | SlotComboCommitted
- | SlotComboFocus
- | SlotComboLive
- | SlotPaneGest
- | SlotPaneGrab
- | SlotPaneFocus
- | SlotPaneMax
- | SlotPaneResize
- | SlotPaneNext
- | SlotSeen
- | SlotColorBase
- | SlotNumericHeld
- | SlotNumericRepeat
- boolInt :: Bool -> Int
- intBool :: Int -> Bool
- anySelectOpen :: WidgetStore -> Bool
- isSelectOpen :: WidgetStore -> Int -> Bool
- setSelectOpen :: WidgetStore -> Int -> Bool -> WidgetStore
- closeSelects :: WidgetStore -> WidgetStore
- data Ease
- data Animation
- data SpringParams = SpringParams {
- springStiffness :: !Float
- springDamping :: !Float
- springMass :: !Float
- presetBouncy :: SpringParams
- presetSmooth :: SpringParams
- presetStiff :: SpringParams
- applyEase :: Ease -> Float -> Float
- easeSameSpec :: Animation -> Ease -> Float -> Float -> Float -> Bool
- approxEq :: Float -> Float -> Bool
- animInProgress :: Animation -> Bool
Documentation
Constructors
type MeasureCacheKey = (Text, Float) Source #
data TextInputMenu Source #
Constructors
| TextInputMenu | |
Fields | |
Instances
| Eq TextInputMenu Source # | |
Defined in NanoUI.Context.Types Methods (==) :: TextInputMenu -> TextInputMenu -> Bool # (/=) :: TextInputMenu -> TextInputMenu -> Bool # | |
| Show TextInputMenu Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> TextInputMenu -> ShowS # show :: TextInputMenu -> String # showList :: [TextInputMenu] -> ShowS # | |
data TextInputDrag Source #
Constructors
| TextInputDrag | |
Fields | |
Instances
| Eq TextInputDrag Source # | |
Defined in NanoUI.Context.Types Methods (==) :: TextInputDrag -> TextInputDrag -> Bool # (/=) :: TextInputDrag -> TextInputDrag -> Bool # | |
| Show TextInputDrag Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> TextInputDrag -> ShowS # show :: TextInputDrag -> String # showList :: [TextInputDrag] -> ShowS # | |
data TextFieldClickCell Source #
Constructors
| TextFieldClickCell | |
Fields | |
Instances
| Eq TextFieldClickCell Source # | |
Defined in NanoUI.Context.Types Methods (==) :: TextFieldClickCell -> TextFieldClickCell -> Bool # (/=) :: TextFieldClickCell -> TextFieldClickCell -> Bool # | |
| Show TextFieldClickCell Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> TextFieldClickCell -> ShowS # show :: TextFieldClickCell -> String # showList :: [TextFieldClickCell] -> ShowS # | |
data WindowResizeEdge Source #
Instances
| Eq WindowResizeEdge Source # | |
Defined in NanoUI.Context.Types Methods (==) :: WindowResizeEdge -> WindowResizeEdge -> Bool # (/=) :: WindowResizeEdge -> WindowResizeEdge -> Bool # | |
| Show WindowResizeEdge Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> WindowResizeEdge -> ShowS # show :: WindowResizeEdge -> String # showList :: [WindowResizeEdge] -> ShowS # | |
data WindowResizeDrag Source #
Constructors
| WindowResizeDrag | |
Instances
| Eq WindowResizeDrag Source # | |
Defined in NanoUI.Context.Types Methods (==) :: WindowResizeDrag -> WindowResizeDrag -> Bool # (/=) :: WindowResizeDrag -> WindowResizeDrag -> Bool # | |
| Show WindowResizeDrag Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> WindowResizeDrag -> ShowS # show :: WindowResizeDrag -> String # showList :: [WindowResizeDrag] -> ShowS # | |
data DamageState Source #
Constructors
| DamageState | |
Fields
| |
data OverlayState Source #
Constructors
| OverlayState | |
Fields
| |
data AnimationState Source #
Constructors
| AnimationState | |
Fields
| |
data DrawingCacheState Source #
Constructors
| DrawingCacheState | |
Fields
| |
data DrawingEntry Source #
A registered drawing: content version plus the op builder. The version participates in the draw-op cache key, so a builder whose output changes without its size changing must bump the version to invalidate.
Constructors
| DrawingEntry | |
Fields
| |
data DrawFitCache Source #
data SpanCacheEntry Source #
Cached text-span layout for one arena node. Key fields are every input
that changes the produced spans; sceSpans is the shared result. The whole
cache is dropped on theme or font-scale changes.
data WidgetTextCacheEntry Source #
Constructors
| WidgetTextCacheEntry | |
Fields
| |
data WidgetTextPlacement Source #
A cacheable widget label is a single line (or absent for close buttons). Coordinates are relative to the node origin; paint translates them without rebuilding a list or invalidating the cache when a widget scrolls.
data InteractionState Source #
Constructors
| InteractionState | |
Fields
| |
Instances
| Eq InteractionState Source # | |
Defined in NanoUI.Context.Types Methods (==) :: InteractionState -> InteractionState -> Bool # (/=) :: InteractionState -> InteractionState -> Bool # | |
| Show InteractionState Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> InteractionState -> ShowS # show :: InteractionState -> String # showList :: [InteractionState] -> ShowS # | |
getsInteraction :: Context -> (InteractionState -> a) -> IO a Source #
modifyInteraction :: Context -> (InteractionState -> InteractionState) -> IO () Source #
getsOverlay :: Context -> (OverlayState -> a) -> IO a Source #
modifyOverlay :: Context -> (OverlayState -> OverlayState) -> IO () Source #
getsDamage :: Context -> (DamageState -> a) -> IO a Source #
modifyDamage :: Context -> (DamageState -> DamageState) -> IO () Source #
setTextInputDrag :: Context -> Maybe TextInputDrag -> IO () Source #
getTextInputMenu :: Context -> IO (Maybe TextInputMenu) Source #
setTextInputMenu :: Context -> Maybe TextInputMenu -> IO () Source #
takeTextEditLastAction :: Context -> IO (Maybe (WidgetId, TextCommand)) Source #
getWindowResize :: Context -> IO (Maybe WindowResizeDrag) Source #
clearDirty :: Context -> IO () Source #
data DamageRequest Source #
Explicit damage invalidation request queued during frame evaluation.
Constructors
| ReqWidget !WidgetId !DamageBounds | Invalidate widget layout bounds (old & new) |
| ReqKey !Int !DamageBounds | Invalidate widget bounds by integer key |
| ReqRect !Rect | Invalidate an explicit window-space rectangle |
| ReqPeers ![WidgetId] !DamageBounds | Invalidate a collection of widgets |
| ReqFull | Force full window invalidation |
Instances
| Eq DamageRequest Source # | |
Defined in NanoUI.Context.Types Methods (==) :: DamageRequest -> DamageRequest -> Bool # (/=) :: DamageRequest -> DamageRequest -> Bool # | |
| Show DamageRequest Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> DamageRequest -> ShowS # show :: DamageRequest -> String # showList :: [DamageRequest] -> ShowS # | |
requestDamage :: Context -> DamageRequest -> IO () Source #
damageWidget :: Context -> WidgetId -> DamageBounds -> IO () Source #
damagePeers :: Context -> [WidgetId] -> DamageBounds -> IO () Source #
damageFull :: Context -> IO () Source #
registerPopupConfig :: Context -> WidgetId -> PopupAnchor -> PopupPlacement -> Float -> IO () Source #
lookupPopupConfig :: Context -> WidgetId -> IO (Maybe (PopupAnchor, PopupPlacement, Float)) Source #
registerDrawing :: Context -> WidgetId -> Int -> DrawingBuild -> IO () Source #
lookupDrawing :: Context -> WidgetId -> IO (Maybe DrawingEntry) Source #
cachedDrawingOps :: Context -> WidgetId -> Int -> Rect -> DrawingBuild -> IO (SmallArray DrawOp) Source #
Rebuild draw ops when the content version or width/height change. A move only translates. An unversioned drawing (content 0) additionally drops its cache while the widget is animating, since it has no other invalidation signal; versioned drawings are invalidated by their content key alone.
cachedWidgetLayout :: Context -> WidgetId -> Double -> Double -> Float -> Int -> Layout -> IO Layout -> IO Layout Source #
Reuse a derived layout while envelope, font, content key, and caller layout match.
lookupDrawFitEnvelope :: Context -> WidgetId -> Float -> Int -> Layout -> IO (Maybe (Double, Double)) Source #
pruneDrawOpCache :: Context -> IO () Source #
Drop cached ops for drawings that did not rebuild this frame.
type CustomMeasureFn = FontMetrics -> (Float, Float) -> (Float, Float) Source #
Custom node measurement: font metrics and available (width, height) to the node's desired (width, height).
data CustomDrawContext Source #
Constructors
| CustomDrawContext | |
Fields
| |
type CustomDrawBuild = CustomDrawContext -> Rect -> SmallArray DrawOp Source #
registerCustomDrawing :: Context -> WidgetId -> Int -> CustomDrawBuild -> IO () Source #
lookupCustomDrawing :: Context -> WidgetId -> IO (Maybe CustomDrawingEntry) Source #
cachedCustomDrawingOps :: Context -> WidgetId -> Int -> Rect -> CustomDrawContext -> CustomDrawBuild -> IO (SmallArray DrawOp) Source #
Draw ops for a custom widget's paint: the ops refreshCustomDrawingOps
settled on this frame while every input still matches, translated if the
widget only moved, else a fresh build.
refreshCustomDrawingOps :: Context -> WidgetId -> Int -> Rect -> CustomDrawContext -> CustomDrawBuild -> IO Bool Source #
Settle a custom widget's ops for this frame and cache them for paint, returning whether what it draws changed at an unchanged rect.
A widget that declares a content key is taken at its word, as a versioned drawing is: an unchanged key with unchanged size, interaction state and metrics neither rebuilds the ops nor repaints them, animating or not, so a drawing that reads an animated value has to fold it into its key. One that only moved keeps its ops too; paint translates them. Without a key (0) the build can read anything (a sort flag, a fraction), and nothing but building it shows that its output changed, so it is rebuilt and compared.
Whatever forced a rebuild, the ops it produced decide the damage, so a key bumped without a visible change repaints nothing and a rebuild the key never mentioned still repaints. A new, moved or resized widget reports no change: rect damage covers it.
drawingOpsStale :: Context -> WidgetId -> Int -> Rect -> IO Bool Source #
Whether a versioned drawing's cached ops are for another version at the same rect. Paint rebuilds them; the pixels they covered must repaint too, and checking the version costs nothing next to building the ops here.
data CustomDrawingEntry Source #
A registered custom drawing: its content key plus the op builder. A non-zero key is the author's promise that the ops follow it, so a frame whose key is unchanged neither rebuilds nor repaints them. Key 0 means the drawing carries no key and is rebuilt every frame and compared.
Constructors
| CustomDrawingEntry | |
Fields
| |
registerCustomMeasure :: Context -> WidgetId -> CustomMeasureFn -> IO () Source #
lookupCustomMeasure :: Context -> WidgetId -> IO (Maybe CustomMeasureFn) Source #
registerCustomCursor :: Context -> WidgetId -> (CustomDrawContext -> UiCursorKind) -> IO () Source #
lookupCustomCursor :: Context -> WidgetId -> IO (Maybe (CustomDrawContext -> UiCursorKind)) Source #
resetDrawingScopeCache :: Context -> IO () Source #
modifyStore :: Context -> (WidgetStore -> WidgetStore) -> IO () Source #
Replace the store with f of it, damaging the keys whose values changed
and waking the loop when anything did.
isDisabled :: Context -> WidgetId -> IO Bool Source #
Whether wid was declared inside a disabled scope. A widget asks before
its node exists, while the scope it is declared in is still the arena's.
beginThemeScopes :: Context -> Bool -> IO () Source #
Start a view pass with no pushed themes. The first pass of a frame keeps last frame's themes to compare against; a rebuild pass keeps comparing against the same ones.
pushThemeScope :: Context -> Bool -> Theme -> Theme -> IO Int Source #
Add a scope drawn with theme, whose nested scopes modify raw and which
is disabled or not, and
return its theme index. A theme equal to last frame's at the same index
keeps last frame's value.
themeScopesChanged :: Context -> IO Bool Source #
Whether this frame's scopes look different from last frame's: a theme changed, scopes were added or dropped, or nodes moved between scopes.
scopeRawTheme :: Context -> Int -> IO Theme Source #
A scope's theme before any disabled scope faded it.
widgetTheme :: Context -> WidgetId -> IO Theme Source #
The theme of wid's node, or of the current scope before it has one.
setScrollOffset :: Context -> WidgetId -> Float -> IO () Source #
Move a scroller to an offset along its main axis. Cancels a glide in flight: whoever sets an offset outright owns it.
setScrollOffset2D :: Context -> WidgetId -> V2 -> IO () Source #
Move a scroller to an offset on both axes. Cancels a glide in flight.
defaultScrollConfig :: ScrollConfig Source #
data ScrollTuning Source #
How far one wheel notch scrolls, and how long a scroll takes to settle.
One setting for the whole context; a single scroller can take its own step
(see setScrollStep).
Constructors
| ScrollTuning | |
Fields
| |
Instances
| Eq ScrollTuning Source # | |
Defined in NanoUI.Context.Types | |
| Show ScrollTuning Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> ScrollTuning -> ShowS # show :: ScrollTuning -> String # showList :: [ScrollTuning] -> ShowS # | |
getScrollTuning :: Context -> IO ScrollTuning Source #
Wheel step and glide time for every scroller in this context.
setScrollTuning :: Context -> ScrollTuning -> IO () Source #
Set the wheel step and glide time. Raising scrollWheelStep makes the
wheel cover more ground per notch; a nonzero scrollSmoothTime turns every
wheel notch and every ScrollSmooth command into a glide.
getScrollStep :: Context -> WidgetId -> IO Float Source #
This scroller's own wheel step, or 0 when it follows the context's.
setScrollStep :: Context -> WidgetId -> Float -> IO () Source #
Give one scroller its own wheel step, in pixels per notch. 0 puts it
back on the context's step. A list whose rows are a fixed height reads best
at a whole number of rows per notch.
resolveScrollStep :: Context -> WidgetId -> IO Float Source #
Pixels one wheel notch scrolls this scroller.
data ScrollAxes Source #
Which axes a scroller moves on, and how an offset in window axes (x rightwards, y downwards) maps onto its stored offset. A 1D row scroller keeps its offset in the main-axis slot, so its horizontal offset is the one that needs swapping.
Constructors
| ScrollAxisY | |
| ScrollAxisX | |
| ScrollAxisXY |
Instances
| Eq ScrollAxes Source # | |
Defined in NanoUI.Context.Types | |
| Show ScrollAxes Source # | |
Defined in NanoUI.Context.Types Methods showsPrec :: Int -> ScrollAxes -> ShowS # show :: ScrollAxes -> String # showList :: [ScrollAxes] -> ShowS # | |
data ScrollMetrics Source #
What a scroller looked like on the frame it was last laid out on.
Offsets and ranges are in window axes: x rightwards, y downwards,
whichever way the scroller itself is built.
Constructors
| ScrollMetrics | |
Fields
| |
Instances
| Eq ScrollMetrics Source # | |
Defined in NanoUI.Context.Scroll Methods (==) :: ScrollMetrics -> ScrollMetrics -> Bool # (/=) :: ScrollMetrics -> ScrollMetrics -> Bool # | |
| Show ScrollMetrics Source # | |
Defined in NanoUI.Context.Scroll Methods showsPrec :: Int -> ScrollMetrics -> ShowS # show :: ScrollMetrics -> String # showList :: [ScrollMetrics] -> ShowS # | |
getScrollMetrics :: Context -> WidgetId -> IO (Maybe ScrollMetrics) Source #
Geometry of the scroller wid, or Nothing before it has been laid out.
Reads the last frame's layout, so it is safe to call while building the
next one.
cacheScrollMetrics :: Context -> WidgetId -> ScrollAxes -> Rect -> V2 -> IO () Source #
Record what the scroll pass measured, so the commands and the app can read it between frames. Writes nothing when nothing moved, and nothing at all for a second node sharing this one's widget id. A table's frozen pane and its body share theirs, and letting both publish would rewrite the store every frame and hand the commands a viewport that alternates between panes.
beginScrollMetrics :: Context -> IO () Source #
Start a frame's geometry pass: the first scroll node to publish under a widget id wins for that frame.
getScrollOffsetIn :: Context -> WidgetId -> ScrollAxes -> IO V2 Source #
This scroller's offset in window axes.
setScrollOffsetIn :: Context -> WidgetId -> ScrollAxes -> V2 -> IO () Source #
Move a scroller to an offset in window axes, cancelling any glide. A 1D scroller ignores the axis it does not scroll on.
data ScrollBehavior Source #
Whether a scroll lands on its target at once or glides onto it.
ScrollSmooth still lands at once when the context's scrollSmoothTime is
0, so one setting turns smooth scrolling on for the whole app.
Constructors
| ScrollInstant | |
| ScrollSmooth |
Instances
| Eq ScrollBehavior Source # | |
Defined in NanoUI.Context.Scroll Methods (==) :: ScrollBehavior -> ScrollBehavior -> Bool # (/=) :: ScrollBehavior -> ScrollBehavior -> Bool # | |
| Show ScrollBehavior Source # | |
Defined in NanoUI.Context.Scroll Methods showsPrec :: Int -> ScrollBehavior -> ShowS # show :: ScrollBehavior -> String # showList :: [ScrollBehavior] -> ShowS # | |
data ScrollAlign Source #
Where a widget ends up in the viewport once it is scrolled into view.
Constructors
| ScrollNearest | Move as little as possible: nothing at all when it is already whole. |
| ScrollStart | Against the leading edge, at the top or left. |
| ScrollCenter | |
| ScrollEnd | Against the trailing edge, at the bottom or right. |
Instances
| Eq ScrollAlign Source # | |
Defined in NanoUI.Context.Scroll | |
| Show ScrollAlign Source # | |
Defined in NanoUI.Context.Scroll Methods showsPrec :: Int -> ScrollAlign -> ShowS # show :: ScrollAlign -> String # showList :: [ScrollAlign] -> ShowS # | |
scrollTo :: Context -> WidgetId -> V2 -> ScrollBehavior -> IO () Source #
Scroll to an absolute offset, clamped to the scroller's range.
scrollBy :: Context -> WidgetId -> V2 -> ScrollBehavior -> IO () Source #
Scroll by a delta in pixels. Deltas accumulate onto a glide already in flight, so repeated calls keep up rather than fighting each other.
scrollPages :: Context -> WidgetId -> V2 -> ScrollBehavior -> IO () Source #
Scroll by whole viewports: V2 0 1 is one page down, V2 0 (-0.5) half
a page up.
scrollToStart :: Context -> WidgetId -> ScrollBehavior -> IO () Source #
Scroll back to the top (and left).
scrollToEnd :: Context -> WidgetId -> ScrollBehavior -> IO () Source #
Scroll to the end of the content.
scrollIntoView :: Context -> WidgetId -> WidgetId -> ScrollAlign -> ScrollBehavior -> IO () Source #
Scroll target into the viewport of the scroller wid it is built
inside. Both widgets are read from the last frame's layout, so a widget
that was not built then, such as a row a virtualized list left out, cannot
be found; scroll to its content rectangle with scrollRectIntoView instead.
scrollRectIntoView :: Context -> WidgetId -> Rect -> ScrollAlign -> ScrollBehavior -> IO () Source #
Scroll a rectangle of the content into view. The rectangle is in content
coordinates: the origin is where the content starts, which is where the
viewport shows it at offset 0.
applyScrollTarget :: Context -> WidgetId -> ScrollAxes -> V2 -> ScrollBehavior -> IO () Source #
Send a scroller to an offset in window axes, gliding if the caller asked for it and the context is tuned for it. The target must already be clamped to the scroller's range.
scrollTargetOffset :: Context -> WidgetId -> V2 -> IO V2 Source #
Where the scroller is headed: the glide's target if one is in flight, and
fallback (normally the current offset) if not. Deltas add onto this so
that notches arriving mid-glide are not swallowed.
clampScrollOffset :: V2 -> V2 -> V2 Source #
Hold an offset inside 0 and the scroller's range on each axis.
stepScrollGlides :: Context -> Float -> IO () Source #
Advance every glide by dt seconds. Each one covers the same fraction of
what is left every second, so a long throw starts fast and eases in, and at
least a pixel a frame so a glide cannot stall on the pixel grid the offsets
snap to.
atlasTextureId :: Int Source #
GPU texture id shared by every packed image so draw cmds batch.
registerImage :: Context -> ImageId -> Int -> Int -> ByteString -> IO Bool Source #
withFontMetrics :: Context -> FontMetrics -> Context Source #
withMonoFontMetrics :: Context -> FontMetrics -> Context Source #
withFontResolver :: Context -> (Float -> FontWeight -> FontStyle -> FontVariant -> IO (FontMetrics, Bool)) -> (Float -> FontWeight -> FontStyle -> FontVariant -> Text -> IO (Float, Float)) -> Context Source #
clearMeasureCache :: Context -> IO () Source #
ensureMetricCaches :: Context -> IO () Source #
Called once before building a frame. Context configuration remains pure; cache invalidation happens at the IO boundary, including when alternating between differently configured Contexts that share their backing stores.
hasCustomLayoutInputs :: Context -> IO Bool Source #
True when any node has a custom measure function, whose output is not captured by the arena descriptor comparison, so whole-layout reuse must be disabled for the frame.
withTheme :: Context -> Theme -> IO Context Source #
Configure a context's theme. Goes through setTheme so a theme swapped
between frames invalidates the caches keyed on it, drawing-op caches
included, instead of leaving widgets painting the previous theme.
setDrawSnapScale :: Context -> Float -> IO () Source #
Set the device pixel scale used to snap geometry origins/endpoints to whole pixels. The SDL backend calls this when the window pixel density is synced.
setDrawSquareGeometry :: Context -> Bool -> IO () Source #
Emit rounded shapes and AA strokes as flat, axis-aligned fills. Software framebuffer hosts enable this so every primitive is a solid quad.
setDrawExternalText :: Context -> Bool -> IO () Source #
Skip text quads in the draw buffer. Hosts that rasterize text from the collected text spans enable this.
newContext :: IO Context Source #
getFocusVisible :: Context -> IO Bool Source #
Whether the focused widget shows its focus ring: focus moved by keyboard since the last pointer press.
registerFocusable :: Context -> WidgetId -> IO () Source #
Add wid to this frame's keyboard focus order, unless it is declared in a
disabled scope.
markEscapeConsumed :: Context -> IO () Source #
beginModal :: Context -> IO () Source #
beginFrameModal :: Context -> IO () Source #
anyAnimating :: Context -> IO Bool Source #
Whether the frame loop has to keep drawing: an animation is running, or a scroller is still gliding onto its target.
startAnimationEaseDelay :: Context -> WidgetId -> Float -> Float -> Float -> Ease -> Float -> IO () Source #
startSpring :: Context -> WidgetId -> SpringParams -> Float -> IO () Source #
reduceMessages :: (Foldable f, Typeable msg) => (msg -> model -> model) -> model -> f FrameMsg -> model Source #
data WidgetStore Source #
Widget state for every widget, in maps by value type. Same-type fields
that share a widget key use slotKey.
Constructors
| WidgetStore | |
Fields
| |
Instances
| Eq WidgetStore Source # | |
Defined in NanoUI.Store | |
| Show WidgetStore Source # | |
Defined in NanoUI.Store Methods showsPrec :: Int -> WidgetStore -> ShowS # show :: WidgetStore -> String # showList :: [WidgetStore] -> ShowS # | |
bumpMirror :: WidgetStore -> WidgetStore Source #
Every built-in slot.
Constructors
| SlotCursor | |
| SlotAnchor | |
| SlotDrag | |
| SlotDragW | |
| SlotDrop | |
| SlotDropPos | |
| SlotWinSize | |
| SlotMenuOpen | |
| SlotMenuPos | |
| SlotScrollCfg | |
| SlotScrollOff | |
| SlotScrollCross | |
| SlotScrollLinkX | |
| SlotScrollLinkY | |
| SlotScrollStep | |
| SlotScrollAxes | |
| SlotScrollViewPos | |
| SlotScrollViewSize | |
| SlotScrollRange | |
| SlotScrollContent | |
| SlotTextAreaRow | |
| SlotTextAreaCol | |
| SlotTextAreaPrefCol | |
| SlotTextAreaScroll | |
| SlotTextAreaViewport | |
| SlotTextAreaAnchorRow | |
| SlotTextAreaAnchorCol | |
| SlotTextAreaContentW | Cached text-area content extent (max line width, line count * line height) and the node font size they were measured at. Recomputing the width scans every character of the document, so it is cached and only refreshed when the text or font changes. |
| SlotTextAreaContentH | |
| SlotTextAreaContentFont | |
| SlotTextAreaBuffer | Cached |
| SlotTextAreaChanged | Set (value 1) to signal that the text area's text changed through a path
that does not flow through |
| SlotTextHistory | A text field's undo history with the text it was recorded against, in
|
| SlotTextMode | Which kind of text field a widget id is: 1 single-line, 2 multi-line. Commands sent to the id between frames read it. |
| SlotTextAreaWidths | A text area's measured line widths, in |
| SlotTextInputScroll | |
| SlotSearchCommitted | Search-field debounce bookkeeping. Text slots on the text widget id: the last committed query and the monotonic timestamp of the last edit. |
| SlotSearchAge | |
| SlotComboHighlight | Combo box suggestion state (storeInt/storeFloat, keyed by the field widget): the highlighted option index (absolute into the filtered list), the start of the visible window slice (keyboard wheel scrollbar scrolling), and the scrollbar bookkeeping the overlay painter and the widget's thumb-drag gesture share (total filtered count, widest row, x offset, drag axis + grab offset). |
| SlotComboScroll | |
| SlotComboCount | |
| SlotComboScrollX | |
| SlotComboContentW | |
| SlotComboDrag | |
| SlotComboDragOff | |
| SlotComboCommitted | The last committed value (storeText): typing edits the live field text but only Enter, a row click, or losing focus commits it (Escape reverts). |
| SlotComboFocus | Had-focus flag (storeInt) so the widget can see the focus-lost transition on the frame after blur and commit then. |
| SlotComboLive | The field text as the widget last produced it (storeText): a frame-start value that differs from it changed externally (a frame-side row pick or a clipboard menu action), not by typing. |
| SlotPaneGest | PaneGrid gesture slot (storeInt): 0 none, positive = dragged pane id,
negative = split id being resized. Mirrors |
| SlotPaneGrab | PaneGrid drag grab offset (storePoint): (mouse - pane origin) at grab start. |
| SlotPaneFocus | PaneGrid keyboard-navigation focus: focused pane id (0 = none, auto-first). |
| SlotPaneMax | PaneGrid maximize state: maximized pane id (0 = none). |
| SlotPaneResize | PaneGrid resize start (storePoint): (ratio, main-axis mouse) captured when a divider is first grabbed, so dragging moves it by delta rather than snapping. |
| SlotPaneNext | PaneGrid id seed (storeInt): next split / pane id to allocate. Strictly monotonic per grid: ids are never reused, so per-pane state keyed by pane id cannot collide with a closed pane's state. |
| SlotSeen | The value a controlled widget last returned to its caller. |
| SlotColorBase | A colour picker's opening colour. |
| SlotNumericHeld | The stepper arrow a numeric field's press holds: 1 up, -1 down. |
| SlotNumericRepeat | When a numeric field's held stepper arrow next repeats, in monotonic seconds. |
Instances
anySelectOpen :: WidgetStore -> Bool Source #
isSelectOpen :: WidgetStore -> Int -> Bool Source #
setSelectOpen :: WidgetStore -> Int -> Bool -> WidgetStore Source #
Constructors
| EaseAnim !Float !Float !Float !Float !Ease !Float !Float | |
| SpringAnim !Float !Float !Float !SpringParams |
data SpringParams Source #
Constructors
| SpringParams | |
Fields
| |
Instances
| Eq SpringParams Source # | |
Defined in NanoUI.Animation | |
| Show SpringParams Source # | |
Defined in NanoUI.Animation Methods showsPrec :: Int -> SpringParams -> ShowS # show :: SpringParams -> String # showList :: [SpringParams] -> ShowS # | |
animInProgress :: Animation -> Bool Source #