module NanoUI.Testing
(
runFrame
, runFrameEff
, runFrameReduce
, runFrameReduceEff
, needsRedraw
, pointerDragActive
, textFieldActive
, floatingPanelActive
, floatingPanelRects
, debugPanelOpen
, widgetNodeCount
, pointerCursorWanted
, cursorKindIs
, uiCursorKind
, UiCursorKind (..)
, computePopupPosition
, scrollBarLayout
, ScrollBarLayout (..)
, sliderTrackBounds
, colorPickerSvSquare
, widgetStoreBaseColor
, widgetStoreColor
, collectTextSpans
, collectRasterSpans
, collectOverlayTextSpans
, ctxSpanBase
, ctxSpanOverlay
, SpanArena
, spanArenaCount
, foldSpanArena
, Context
, newContext
, newPixelContext
, ctxTheme
, ctxPaintFull
, ctxFontMetrics
, setHost
, askHost
, withFontMetrics
, withMonoFontMetrics
, withMeasureText
, withFontResolver
, wrapMeasureCache
, withExternalText
, enableMeasureCache
, withTheme
, setTheme
, getTheme
, markDirty
, clearDirty
, clearMeasureCache
, isDirty
, setWakeLoop
, DamageRequest (..)
, requestDamage
, damageWidget
, damageKey
, damageRect
, damagePeers
, damageFull
, getHotId
, getFocusId
, getPrevRect
, getPrevClipRect
, getStore
, getScrollOffset
, setScrollOffset
, textInputEditActive
, modalActive
, overlayConsumesQuit
, withClipboard
, getAnimationValue
, setAnimationValue
, startAnimation
, startAnimationEase
, startAnimationEaseDelay
, startSpring
, anyAnimating
, registerImage
, registerImages
, atlasTextureId
, atlasSnapshot
, FrameMsg (..)
, decodeMessages
, reduceMessages
, reduceUpdates
, DrawData (..)
, DrawCmd (..)
, DrawOp (..)
, drawTextBox
, Layer (..)
, LayerSlice (..)
, drawCmdNull
, drawCmdElems
, forDrawCmdsInLayer_
, drawCmdCount
, vertexSize
, indexSize
, backdropDimTextureId
, glyphAtlasTextureId
, Damage (..)
, takeDamage
, damageIsEmpty
, Eff
, runEff
, IOE
, type (:>)
, askContext
, askInput
, Ui
, uiIO
, Compact
, compactHost
, askCompact
, lineWidth
, textIndexAtX
, caretX
, selectionSpans
, textNodeFontWeight
, textNodeFontStyle
, textNodeTextDecoration
) where
import NanoUI.Compact (Compact, askCompact, compactHost)
import NanoUI.Context
( Context (..)
, FrameMsg (..)
, anyAnimating
, atlasSnapshot
, atlasTextureId
, clearDirty
, clearMeasureCache
, ctxTheme
, DamageRequest (..)
, damageFull
, damageKey
, damagePeers
, damageRect
, damageWidget
, decodeMessages
, enableMeasureCache
, getAnimationValue
, getFocusId
, getHotId
, getPrevRect
, getPrevClipRect
, getScrollOffset
, setScrollOffset
, getStore
, isDirty
, markDirty
, modalActive
, overlayConsumesQuit
, reduceMessages
, reduceUpdates
, registerImage
, registerImages
, requestDamage
, setAnimationValue
, setHost
, setWakeLoop
, startAnimation
, startAnimationEase
, startAnimationEaseDelay
, startSpring
, takeDamage
, textInputEditActive
, withClipboard
, withExternalText
, withFontMetrics
, withMeasureText
, withFontResolver
, withMonoFontMetrics
, withTheme
, setTheme
, getTheme
, wrapMeasureCache
)
import NanoUI.Context (newContext, newPixelHostContext)
import NanoUI.Frame.SpanArena (SpanArena, foldSpanArena, spanArenaCount)
import NanoUI.Draw
( DrawCmd (..)
, DrawData (..)
, DrawOp (..)
, Layer (..)
, LayerSlice (..)
, backdropDimTextureId
, glyphAtlasTextureId
, drawCmdElems
, forDrawCmdsInLayer_
, drawCmdNull
, drawCmdCount
, drawTextBox
, drawVertices
, indexSize
, vertexSize
)
import NanoUI.Damage (floatingPanelRects)
import NanoUI.Font (caretX, lineWidth, selectionSpans, sliderTrackBounds, textIndexAtX)
import NanoUI.Widgets.ColorPicker
( colorPickerSvSquare
, widgetStoreBaseColor
, widgetStoreColor
)
import NanoUI.Frame
( UiCursorKind (..)
, collectOverlayTextSpans
, collectRasterSpans
, collectTextSpans
, cursorKindIs
, debugPanelOpen
, floatingPanelActive
, needsRedraw
, pointerCursorWanted
, pointerDragActive
, runFrame
, runFrameEff
, runFrameReduce
, runFrameReduceEff
, textFieldActive
, uiCursorKind
, widgetNodeCount
)
import NanoUI.Frame.Scroll (ScrollBarLayout (..), scrollBarLayout)
import NanoUI.Layout.Solve (computePopupPosition)
import NanoUI.Monad (Ui, askContext, askHost, askInput, uiIO)
import NanoUI.WidgetText (textNodeFontStyle, textNodeFontWeight, textNodeTextDecoration)
import NanoUI.Types (Damage (..), damageIsEmpty)
import Effectful (Eff, IOE, runEff, type (:>))
newPixelContext :: IO Context
newPixelContext :: IO Context
newPixelContext = IO Context
newPixelHostContext