module NanoUI
(
NanoUI
, Ui
, runUi
, runNanoUI
, uiIO
, whenM
, unlessM
, ifM
, windowSize
, windowWidth
, windowHeight
, uiMousePos
, scope
, keyed
, keyedTag
, withKey
, nextId
, currentId
, burstNextIds
, WidgetId (..)
, IdContext
, initialIdContext
, widgetId
, hashWidgetId
, mix64
, mixFnv
, Response (..)
, HasResponse (..)
, respId
, respRect
, respHovered
, respPressed
, respClicked
, respChanged
, respSubmitted
, respRightPressed
, respRightClicked
, setChanged
, setClicked
, setSubmitted
, row
, rowWith
, column
, columnWith
, hstack
, vstack
, grid
, gridWith
, panel
, panelWith
, card
, callout
, calloutWith
, toolbar
, center
, responsive
, responsiveRowCol
, scroll
, scrollWith
, scroll2D
, scroll2DWith
, scrollArea
, scrollArea2D
, separator
, spacer
, flex
, label
, label'
, labelWith
, labelWith'
, heading
, muted
, mono
, danger
, bold
, italic
, underline
, kv
, kvMono
, kvBlock
, selectableText
, selectableText'
, selectableTextWith
, selectableTextWith'
, button
, button'
, buttonWith
, buttonWith'
, menuButton
, menuButton'
, menuItem
, menuItem'
, menuItemShortcut
, menuItemDisabled
, menuSeparator
, menuHeader
, contextMenu
, contextMenuArea
, useContextMenu
, checkbox
, checkbox'
, toggleSwitch
, toggleSwitch'
, toggleSwitchWith
, toggleSwitchWith'
, radio
, radio'
, boundedRadio
, boundedRadio'
, enumRadio
, enumRadio'
, select
, select'
, selectWith
, selectWith'
, boundedSelect
, boundedSelect'
, enumSelect
, enumSelect'
, slider
, slider'
, sliderWith
, sliderWith'
, knob
, knob'
, knobWith
, knobWith'
, TextInputConfig (..)
, defaultTextInputConfig
, textInput
, textInput'
, textInputConfigured
, textInputConfigured'
, NumericInputConfig (..)
, defaultNumericInputConfig
, numericInput
, numericInput'
, numericInputConfigured
, numericInputConfigured'
, SearchFieldConfig (..)
, defaultSearchFieldConfig
, searchField
, searchField'
, searchFieldConfigured
, searchFieldConfigured'
, comboBox
, comboBox'
, textArea
, textArea'
, textAreaWith
, textAreaWith'
, colorPicker
, colorPicker'
, colorPickerRGBA
, colorPickerRGBA'
, colorToHex
, colorToHexA
, colorFromHex
, TextCommand (..)
, TextMotion (..)
, Cursor (..)
, runTextCommand
, textCanUndo
, textCanRedo
, Tab (..)
, TabStyle (..)
, TabOrientation (..)
, TabResponse (..)
, TabsConfig (..)
, defaultTabsConfig
, tab
, closableTab
, tabs
, tabs'
, tabsConfigured
, tabsConfigured'
, tabBar
, tabBar'
, tabBarConfigured
, tabBarConfigured'
, TreeItem (..)
, tree
, tree'
, SortDir (..)
, SortCol (..)
, ColSize (..)
, TableConfig (..)
, TableResponse (..)
, defaultTableConfig
, table
, tableWith
, tableConfigured
, simpleTable
, useTableSort
, tableHiddenIndices
, sortRows
, Colonnade
, Headed (..)
, headed
, headless
, modal
, window
, PopupAnchor (..)
, PopupPlacement (..)
, PopupConfig (..)
, defaultPopupConfig
, popup
, popupWith
, tooltip
, tooltipAt
, tooltipWidget
, withTooltip
, PaneGridConfig (..)
, defaultPaneGridConfig
, PaneGridCtx (..)
, PaneView (..)
, PaneGridResponse (..)
, GridAxis (..)
, paneGrid
, progressBar
, progressBar'
, progressBarWith
, progressBarWith'
, circularProgress
, circularProgress'
, circularProgressWith
, circularProgressWith'
, spinner
, spinner'
, spinnerWith
, spinnerWith'
, Inline
, inlineText
, inlineWith
, restyle
, strong
, emphasis
, inlineCode
, hyperlink
, richText
, richText'
, richTextWith
, richTextWith'
, sparkline
, sparkline'
, sparklineWith
, sparklineWith'
, ImageId (..)
, image
, image'
, freshImageId
, registerImageRgba
, Svg
, parseSvg
, loadSvg
, svgIcon
, svgIconWith
, svgIconWith'
, svgSize
, box
, drawing
, drawingVersioned
, drawingCached
, DrawOp (..)
, TextFont (..)
, defaultTextFont
, DrawingBuild
, drawTextBox
, shiftDrawOp
, CustomWidgetSpec (..)
, defaultCustomWidgetSpec
, customWidget
, customWidgetWithId
, contentKey
, CustomDrawContext (..)
, CustomMeasureFn
, CustomDrawBuild
, CanvasM
, runCanvas
, canvas
, drawRect
, drawRoundedRect
, drawCircle
, drawStroke
, drawStrokeRoundedRect
, drawStrokeCircle
, drawStrokeAA
, drawQuadGradient
, drawLinearGradientH
, drawLinearGradientV
, drawImage
, drawImageUV
, drawText
, useDrag2D
, Drag2D (..)
, useWheelDelta
, DropType (..)
, DropEvent (..)
, emptyDropEvents
, DropTarget (..)
, useDrop
, dropZone
, useState
, useFlag
, useToggle
, useInt
, useFloat
, useEnum
, useText
, ScrollTuning (..)
, defaultScrollTuning
, getScrollTuning
, setScrollTuning
, getScrollStep
, setScrollStep
, ScrollMetrics (..)
, ScrollAxes (..)
, getScrollMetrics
, ScrollBehavior (..)
, ScrollAlign (..)
, scrollTo
, scrollBy
, scrollPages
, scrollToStart
, scrollToEnd
, scrollIntoView
, scrollRectIntoView
, scrollGliding
, getScrollOffset
, setScrollOffset
, getScrollOffset2D
, setScrollOffset2D
, Transition (..)
, animate
, animateTo
, animateToA
, pulse
, keepAnimating
, Animatable (..)
, Ease (..)
, applyEase
, SpringParams (..)
, presetBouncy
, presetSmooth
, presetStiff
, Layout (..)
, LayoutModifier
, Sizing (..)
, Direction (..)
, AlignX (..)
, AlignY (..)
, Padding (..)
, defaultLayout
, askDefaultLayout
, withDefaultLayout
, padAll
, padXY
, gap
, fillW
, fillH
, grow
, minW
, maxW
, fixedW
, minH
, maxH
, fixedH
, fixedWH
, alignMid
, alignEnd
, alignStart
, alignCenter
, alignTop
, alignBottom
, alignBaseline
, tight
, percent
, gridMinColW
, gridCols
, fixedAspectW
, fixedAspectH
, FontVariant (..)
, FontWeight (..)
, FontStyle (..)
, TextDecoration (..)
, fontRegular
, fontHeading
, fontMuted
, fontMono
, fontDanger
, fontSize
, fontSizeScale
, fontColor
, fontWeight
, fontBold
, fontLight
, fontMedium
, fontSemiBold
, fontExtraBold
, fontBlack
, fontStyle
, fontItalic
, fontOblique
, textDecoration
, fontUnderline
, fontStrike
, styled
, themed
, disabledWhen
, uiTheme
, background
, foreground
, borderColor
, borderWidth
, cornerRadius
, hoverBackground
, pressBackground
, fillColor
, buttonStyle
, inputStyle
, panelStyle
, windowStyle
, everyStyle
, accentColor
, textColor
, mutedColor
, linkColor
, selectionColor
, windowColor
, rounded
, primary
, destructive
, success
, subtle
, tinted
, readableOn
, disabledTheme
, Theme (..)
, Style (..)
, defaultTheme
, tomorrowNightMinDarkTheme
, tomorrowMinLightTheme
, tomorrowMidnightMinDarkTheme
, Base16 (..)
, themeFromBase16
, themeFromBase16Dark
, themeFromBase16Light
, base16TomorrowNight
, base16TomorrowLight
, withTheme
, setTheme
, getTheme
, setUiTheme
, themeSeries
, scrollBarTrackColor
, scrollBarThumbColor
, V2 (..)
, Rect (..)
, Size (..)
, Color (..)
, colorRGBA
, colorToWord32
, colorLuminance
, colorR
, colorG
, colorB
, colorA
, lerpColor
, contrastRatio
, rectContains
, rectInflate
, rectIntersect
, rectUnion
, v2Add
, v2Sub
, onGrid
, roundHalfUp
, Input (..)
, Key (..)
, Modifiers (..)
, emptyInput
, inputInteracted
, inputPointerHeld
, appendInputKey
, appendDropEvent
, emptyInputKeys
, inputKeysElem
, inputKeysFromList
, inputKeysNull
, foldInputKeys
, Damage (..)
, DamageBounds (..)
, defaultDamageSlop
, sliderDamageSlop
, haloDamageSlop
, resolveDamageRect
, damageWidgetNow
, damageKeyNow
, damageRectNow
, damageGroupNow
, damageFullNow
, FontMetrics (..)
, FontBackend (..)
, prepareFontMetrics
, prepareFontMetricsMany
, measureTextIO
, lineWidthIO
, lineWidth
, drawShaped
, drawGlyph
, GlyphQuad (..)
, ShapedText (..)
, ShapedGlyphs (..)
, scaleFontMetrics
, monospaceMetrics
, uiFontMetrics
, widgetContentInset
, widgetPadding
, treeItemPadding
, ScrollBarSlot (..)
, scrollBarGutter
, scrollBarWidth
, windowPad
, windowMargin
, Compact
, compactHost
, askCompact
)
where
import NanoUI.Animatable (Animatable (..))
import NanoUI.Animation
( SpringParams (..)
, presetBouncy
, presetSmooth
, presetStiff
)
import NanoUI.Compact (Compact, askCompact, compactHost)
import NanoUI.Context
( Ease (..)
, ScrollAlign (..)
, ScrollAxes (..)
, ScrollBehavior (..)
, ScrollMetrics (..)
, ScrollTuning (..)
, applyEase
, defaultScrollTuning
, getScrollMetrics
, getScrollOffset
, getScrollOffset2D
, getScrollStep
, getScrollTuning
, getTheme
, scrollBy
, scrollGliding
, scrollIntoView
, scrollPages
, scrollRectIntoView
, scrollTo
, scrollToEnd
, scrollToStart
, setScrollOffset
, setScrollOffset2D
, setScrollStep
, setScrollTuning
, setTheme
, withTheme
)
import NanoUI.Draw (TextFont (..), defaultTextFont, drawTextBox, shiftDrawOp)
import NanoUI.Font
( FontBackend (..)
, FontMetrics (..)
, GlyphQuad (..)
, ShapedText (..)
, ShapedGlyphs (..)
, ScrollBarSlot (..)
, drawGlyph
, drawShaped
, lineWidth
, lineWidthIO
, measureTextIO
, monospaceMetrics
, prepareFontMetrics
, prepareFontMetricsMany
, scaleFontMetrics
, scrollBarGutter
, scrollBarWidth
, treeItemPadding
, widgetContentInset
, widgetPadding
)
import NanoUI.Hooks (useEnum, useFlag, useFloat, useInt, useState, useText, useToggle)
import NanoUI.Id
( IdContext
, WidgetId (..)
, hashWidgetId
, initialIdContext
, mix64
, mixFnv
, widgetId
)
import NanoUI.Input
( DropEvent (..)
, DropType (..)
, Input (..)
, Key (..)
, Modifiers (..)
, appendInputKey
, appendDropEvent
, emptyDropEvents
, emptyInput
, emptyInputKeys
, foldInputKeys
, inputInteracted
, inputKeysElem
, inputKeysFromList
, inputKeysNull
, inputPointerHeld
)
import NanoUI.Monad
( NanoUI
, Ui
, askDefaultLayout
, burstNextIds
, currentId
, damageFullNow
, disabledWhen
, styled
, themed
, damageGroupNow
, damageKeyNow
, damageRectNow
, damageWidgetNow
, ifM
, keyed
, keyedTag
, nextId
, runNanoUI
, runUi
, scope
, setUiTheme
, uiFontMetrics
, uiIO
, uiMousePos
, uiTheme
, unlessM
, whenM
, windowHeight
, windowSize
, windowWidth
, withDefaultLayout
, withKey
)
import NanoUI.Style
( AlignX (..)
, AlignY (..)
, Base16 (..)
, Direction (..)
, FontStyle (..)
, FontVariant (..)
, FontWeight (..)
, Layout (..)
, LayoutModifier
, Padding (..)
, Sizing (..)
, Style (..)
, TextDecoration (..)
, Theme (..)
, accentColor
, background
, borderColor
, borderWidth
, buttonStyle
, cornerRadius
, destructive
, disabledTheme
, everyStyle
, fillColor
, foreground
, hoverBackground
, inputStyle
, linkColor
, mutedColor
, panelStyle
, pressBackground
, primary
, readableOn
, rounded
, selectionColor
, subtle
, success
, textColor
, tinted
, windowColor
, windowStyle
, alignBaseline
, alignBottom
, alignCenter
, alignEnd
, alignMid
, alignStart
, alignTop
, base16TomorrowLight
, base16TomorrowNight
, defaultLayout
, defaultTheme
, fillH
, fillW
, fixedAspectH
, fixedAspectW
, fixedH
, fixedW
, fixedWH
, fontBlack
, fontBold
, fontColor
, fontDanger
, fontExtraBold
, fontHeading
, fontItalic
, fontLight
, fontMedium
, fontMono
, fontMuted
, fontOblique
, fontRegular
, fontSemiBold
, fontSize
, fontSizeScale
, fontStrike
, fontStyle
, fontUnderline
, fontWeight
, gap
, gridCols
, gridMinColW
, grow
, maxH
, maxW
, minH
, minW
, padAll
, padXY
, percent
, scrollBarThumbColor
, scrollBarTrackColor
, textDecoration
, themeFromBase16
, themeFromBase16Dark
, themeFromBase16Light
, themeSeries
, tight
, tomorrowMidnightMinDarkTheme
, tomorrowMinLightTheme
, tomorrowNightMinDarkTheme
, windowMargin
, windowPad
)
import NanoUI.Svg (Svg, parseSvg, svgSize)
import NanoUI.Types
( Color (..)
, Damage (..)
, DamageBounds (..)
, ImageId (..)
, Rect (..)
, Size (..)
, V2 (..)
, colorA
, colorB
, colorG
, colorLuminance
, colorR
, colorRGBA
, colorToWord32
, contrastRatio
, defaultDamageSlop
, haloDamageSlop
, lerpColor
, onGrid
, rectContains
, rectInflate
, rectIntersect
, rectUnion
, resolveDamageRect
, roundHalfUp
, sliderDamageSlop
, v2Add
, v2Sub
)
import NanoUI.WidgetText (colorFromHex, colorToHex, colorToHexA)
import NanoUI.Widgets.Animate (Transition (..), animate, animateTo, animateToA, keepAnimating, pulse)
import NanoUI.Widgets.Button (button, button', buttonWith, buttonWith')
import NanoUI.Widgets.Checkbox (checkbox, checkbox')
import NanoUI.Widgets.ColorPicker (colorPicker, colorPicker', colorPickerRGBA, colorPickerRGBA')
import NanoUI.Widgets.Combo (comboBox, comboBox')
import NanoUI.Widgets.Custom
( CanvasM
, CustomDrawBuild
, CustomDrawContext (..)
, CustomMeasureFn
, CustomWidgetSpec (..)
, Drag2D (..)
, canvas
, circularProgress
, circularProgress'
, circularProgressWith
, circularProgressWith'
, spinner
, spinner'
, spinnerWith
, spinnerWith'
, customWidget
, customWidgetWithId
, contentKey
, defaultCustomWidgetSpec
, drawCircle
, drawImage
, drawImageUV
, drawLinearGradientH
, drawLinearGradientV
, drawQuadGradient
, drawRect
, drawRoundedRect
, drawStroke
, drawStrokeAA
, drawStrokeCircle
, drawStrokeRoundedRect
, drawText
, knob
, knob'
, knobWith
, knobWith'
, progressBar
, progressBar'
, progressBarWith
, progressBarWith'
, runCanvas
, sparkline
, sparkline'
, sparklineWith
, sparklineWith'
, toggleSwitch
, toggleSwitch'
, toggleSwitchWith
, toggleSwitchWith'
, useDrag2D
, useWheelDelta
)
import NanoUI.Widgets.Display
( bold
, box
, card
, danger
, freshImageId
, heading
, image
, image'
, italic
, kv
, kvBlock
, kvMono
, mono
, muted
, registerImageRgba
, loadSvg
, svgIcon
, svgIconWith
, svgIconWith'
, toolbar
, underline
)
import NanoUI.Widgets.Drawing (DrawOp (..), DrawingBuild, drawing, drawingCached, drawingVersioned)
import NanoUI.Widgets.Drop (DropTarget (..), dropZone, useDrop)
import NanoUI.Widgets.Layout
( callout
, calloutWith
, center
, column
, columnWith
, flex
, grid
, gridWith
, hstack
, label
, label'
, vstack
, labelWith
, labelWith'
, panel
, panelWith
, responsive
, responsiveRowCol
, row
, rowWith
, scroll
, scroll2D
, scroll2DWith
, scrollArea
, scrollArea2D
, scrollWith
, separator
, spacer
)
import NanoUI.Widgets.Menu
( contextMenu
, contextMenuArea
, menuButton
, menuButton'
, menuHeader
, menuItem
, menuItem'
, menuItemDisabled
, menuItemShortcut
, menuSeparator
, useContextMenu
)
import NanoUI.Widgets.Node
( HasResponse (..)
, Response (..)
, respChanged
, respClicked
, respHovered
, respId
, respPressed
, respRect
, respRightClicked
, respRightPressed
, respSubmitted
, setChanged
, setClicked
, setSubmitted
)
import NanoUI.Widgets.NumericInput (NumericInputConfig (..), defaultNumericInputConfig, numericInput, numericInput', numericInputConfigured, numericInputConfigured')
import NanoUI.Widgets.Overlay (modal, window)
import NanoUI.Widgets.PaneGrid
( GridAxis (..)
, PaneGridConfig (..)
, PaneGridCtx (..)
, PaneGridResponse (..)
, PaneView (..)
, defaultPaneGridConfig
, paneGrid
)
import NanoUI.Widgets.Popup
( PopupAnchor (..)
, PopupConfig (..)
, PopupPlacement (..)
, defaultPopupConfig
, popup
, popupWith
, tooltip
, tooltipAt
, tooltipWidget
, withTooltip
)
import NanoUI.Widgets.Radio (boundedRadio, boundedRadio', enumRadio, enumRadio', radio, radio')
import NanoUI.Widgets.RichText (Inline, emphasis, hyperlink, inlineCode, inlineText, inlineWith, restyle, richText, richText', richTextWith, richTextWith', strong)
import NanoUI.Widgets.Select
( boundedSelect
, boundedSelect'
, enumSelect
, enumSelect'
, select
, select'
, selectWith
, selectWith'
)
import NanoUI.Widgets.Slider (slider, slider', sliderWith, sliderWith')
import NanoUI.Widgets.Table
( ColSize (..)
, Colonnade
, Headed (..)
, SortCol (..)
, SortDir (..)
, TableConfig (..)
, TableResponse (..)
, defaultTableConfig
, headed
, headless
, simpleTable
, sortRows
, table
, tableConfigured
, tableHiddenIndices
, tableWith
, useTableSort
)
import NanoUI.Widgets.Tabs
( Tab (..)
, TabOrientation (..)
, TabResponse (..)
, TabStyle (..)
, TabsConfig (..)
, closableTab
, defaultTabsConfig
, tab
, tabBar
, tabBar'
, tabBarConfigured
, tabBarConfigured'
, tabs
, tabs'
, tabsConfigured
, tabsConfigured'
)
import NanoUI.Widgets.TextArea (textArea, textArea', textAreaWith, textAreaWith')
import NanoUI.Widgets.TextBuffer (Cursor (..))
import NanoUI.Widgets.TextCommand (TextCommand (..), TextMotion (..))
import NanoUI.Widgets.TextField (runTextCommand, textCanRedo, textCanUndo)
import NanoUI.Widgets.TextInput
( SearchFieldConfig (..)
, TextInputConfig (..)
, defaultSearchFieldConfig
, defaultTextInputConfig
, searchField
, searchField'
, searchFieldConfigured
, searchFieldConfigured'
, selectableText
, selectableText'
, selectableTextWith
, selectableTextWith'
, textInput
, textInput'
, textInputConfigured
, textInputConfigured'
)
import NanoUI.Widgets.Tree (TreeItem (..), tree, tree')