¤ Fudget Library 0.18.4 Reference Manual ¤

Created from the Fudget Library sources on 2023-06-21 17:48

Programmer's Index

Sections


GuiElems

Button implementation:
data BMevents = ...
pushButtonF :: [(ModState, KeySym)] -> F a b -> F a (b  Click)
Buttons:
data ButtonF lbl = ...
data Click = ...
class HasLabelInside xxx where ...
buttonF :: Graphic lbl => lbl -> F Click Click
buttonF' :: Graphic lbl => Customiser (ButtonF lbl) -> lbl -> F Click Click
buttonF'' :: Graphic lbl => Customiser (ButtonF lbl) -> lbl -> PF (ButtonF lbl) Click Click
radioGroupF :: (Graphic lbl, Eq alt) => [(alt, lbl)] -> alt -> F alt alt
radioGroupF' :: (Graphic lbl, Eq alt) =>
                Customiser RadioGroupF -> [(alt, lbl)] -> alt -> F alt alt
setLabel :: lbl -> Customiser (ButtonF lbl)
setPlacer :: Placer -> Customiser RadioGroupF
toggleButtonF :: Graphic lbl => lbl -> F Bool Bool
Data entry fields:
data StringF = ...
intF :: F Int (InputMsg Int)
intF' :: Customiser StringF -> F Int (InputMsg Int)
intF'' :: Customiser StringF -> PF StringF Int (InputMsg Int)
intInputF :: F Int Int
intInputF' :: Customiser StringF -> F Int Int
passwdF :: F String (InputMsg String)
passwdF' :: (StringF -> StringF) -> F String (InputMsg String)
passwdF'' :: (StringF -> StringF) -> PF StringF String (InputMsg String)
passwdInputF :: F String String
passwdInputF' :: (StringF -> StringF) -> F String String
setAllowedChar :: (Char -> Bool) -> Customiser StringF
setCursorPos :: Int -> Customiser StringF
setInitString :: String -> Customiser StringF
setInitStringSize :: String -> Customiser StringF
setShowString :: (String -> String) -> Customiser StringF
stringF :: F String (InputMsg String)
stringF' :: Customiser StringF -> F String (InputMsg String)
stringF'' :: Customiser StringF -> PF StringF String (InputMsg String)
stringInputF :: F String String
stringInputF' :: Customiser StringF -> F String String
Decoration:
border3dF :: Bool -> Int -> F a b -> F (Bool  a) b
buttonBorderF :: Int -> F a b -> F (Bool  a) b
labAboveF :: Graphic p => p -> F c d -> F c d
labBelowF :: Graphic p => p -> F c d -> F c d
labLeftOfF :: Graphic p => p -> F c d -> F c d
labRightOfF :: Graphic p => p -> F c d -> F c d
labelF :: Graphic a1 => a1 -> F a2 b
labelF' :: Graphic a1 => Customiser (DisplayF a1) -> a1 -> F a2 b
tieLabelF :: Graphic p => Orientation -> Alignment -> p -> F c d -> F c d
Displaying and interacting with composite graphical objects:
data GraphicsF gfx = ...
hyperGraphicsF :: (Eq d, Graphic leaf) =>
                  Drawing d leaf -> F ((Drawing d leaf)  (d, Drawing d leaf)) d
hyperGraphicsF' :: (Eq d, Graphic leaf) =>
                   (GraphicsF (Drawing d leaf) -> GraphicsF (Drawing d leaf)) ->
                   Drawing d leaf -> F ((Drawing d leaf)  (d, Drawing d leaf)) d
setAdjustSize :: Bool -> Customiser (GraphicsF gfx)
Displaying and interacting with lists:
type PickListRequest a = ListRequest a
pickListF :: (a -> String) -> F (PickListRequest a) (InputMsg (Int, a))
pickListF' :: Customiser TextF ->
              (a -> String) -> F (PickListRequest a) (InputMsg (Int, a))
Displaying text:
data TextF = ...
type TextRequest = ListRequest String
moreF :: F [String] (InputMsg (Int, String))
moreF' :: Customiser TextF -> F [String] (InputMsg (Int, String))
moreFileF :: F String (InputMsg (Int, String))
moreFileShellF :: F String (InputMsg (Int, String))
moreShellF :: String -> F [String] (InputMsg (Int, String))
moreShellF' :: Customiser TextF -> String -> F [String] (InputMsg (Int, String))
textF :: F TextRequest (InputMsg (Int, String))
textF' :: Customiser TextF -> F TextRequest (InputMsg (Int, String))
Displays:
data DisplayF a = ...
displayF :: Graphic g => F g void
displayF' :: Graphic a => Customiser (DisplayF a) -> F a b
intDispF :: F Int b
intDispF' :: Customiser (DisplayF Int) -> F Int b
setSpacer :: Spacer -> Customiser (DisplayF a)
Menus:
menuF :: (Graphic mlbl, Graphic albl) => mlbl -> [(alt, albl)] -> F alt alt
popupMenuF :: (Eq b1, Graphic b1) => [(a, b1)] -> F c b2 -> F ([(a, b1)]  c) (a  b2)
Pop-up windows:
data ConfirmMsg = ...
confirmPopupF :: Graphic msg => F msg (msg, ConfirmMsg)
inputPopupF :: String ->
               InF a c -> Maybe c -> F (Maybe String, Maybe a) ((Maybe String, Maybe a), c)
inputPopupOptF :: String ->
                  InF a b ->
                  Maybe b -> F (Maybe String, Maybe a) ((Maybe String, Maybe a), Maybe b)
messagePopupF :: Graphic msg => F msg (msg, Click)
passwdPopupF :: String -> F (Maybe String, Maybe String) ((Maybe String, Maybe String), String)
stringPopupF :: String -> F (Maybe String, Maybe String) ((Maybe String, Maybe String), String)
Sound:
bellF :: F ho ho
Terminating the program:
quitF :: F ans ho
quitIdF :: (ho -> Bool) -> F ho ho
Text editors:
data EDirection = ...
data EditCmd = ...
data EditEvt = ...
data EditStop = ...
data EditStopChoice = ...
type EditStopFn = String -> String -> EditStopChoice
data EditorF = ...
editorF :: F EditCmd EditEvt
editorF' :: Customiser EditorF -> F EditCmd EditEvt
loadEditor :: String -> [EditCmd]
selectall :: [EditCmd]
setEditorCursorPos :: (Int, Int) -> [EditCmd]
Miscellaneous (the rest):
type IsSelect = Bool
data PopupMenu = ...
data TerminalCmd = ...
cmdTerminalF :: FontName -> Int -> Int -> F TerminalCmd a
editF :: FontSpec -> F EditCmd EditEvt
gcWarningF :: F a b
inputEditorF :: F String (InputMsg String)
inputEditorF' :: Customiser EditorF -> F String (InputMsg String)
menuPopupF :: F b d -> F (PopupMenu  b) d
newline :: Char
oldConfirmPopupF :: F String (String, ConfirmMsg)
oldMessagePopupF :: F String (String, Click)
passwdPopupOptF :: String ->
                   F (Maybe String, Maybe String) ((Maybe String, Maybe String), Maybe String)
smallPickListF :: (d -> String) -> F [d] d
stringPopupOptF :: String ->
                   F (Maybe String, Maybe String) ((Maybe String, Maybe String), Maybe String)
terminalF :: FontName -> Int -> Int -> F String a

Combinators

Abstract fudgets: from stream processors:
absF :: SP a b -> F a b
Abstract fudgets: stateful:
mapstateF :: (t -> a -> (t, [b])) -> t -> F a b
Abstract fudgets: stateless:
concatMapF :: (a -> [b]) -> F a b
mapF :: (a -> b) -> F a b
Combining data entry fields:
inputListF :: Eq a => [(a, InF b c)] -> InF [(a, b)] [(a, c)]
inputPairF :: InF a1 b1 -> InF a2 b2 -> InF (a1, a2) (b1, b2)
inputThroughF :: InF a a -> InF a a
Data entry fields:
type InF a b = F a (InputMsg b)
Delay the activation of a stream processor or fudget:
delayF :: F hi ho -> F hi ho
Dynamic fudget creation/destruction:
type DynFMsg a b = DynMsg a (F a b)
dynF :: F a b -> F ((F a b)  a) b
dynListF :: F (Int, DynFMsg a b) (Int, b)
Monadic style:
type Cont c a = (a -> c) -> c
Plumbing: circular connections:
loopCompF :: F ((r2l  inl)  (l2r  inr)) ((l2r  outl)  (r2l  outr)) ->
             F (inl  inr) (outl  outr)
loopF :: F a a -> F a a
loopLeftF :: F (a  b) (a  c) -> F b c
loopOnlyF :: F a a -> F a b
loopRightF :: F (a  b) (c  b) -> F a c
loopThroughBothF :: F (r2l  inl) (l2r  outl) ->
                    F (l2r  inr) (r2l  outr) -> F (inl  inr) (outl  outr)
loopThroughRightF :: F (a  b) (c  d) -> F c a -> F b d
Plumbing: common patterns of serial and parallel compositions:
bypassF :: F a a -> F a a
idLeftF :: F c d -> F (b  c) (b  d)
idRightF :: F a b -> F (a  c) (b  c)
stubF :: F a b -> F c d
throughF :: F c b -> F c (b  c)
toBothF :: F b (b  b)
Plumbing: tagged parallel composition:
listF :: Eq a => [(a, F b c)] -> F (a, b) (a, c)
Plumbing: turn parallel compositions into loops:
loopCompThroughLeftF :: F (a  (b  c)) (b  (a  d)) -> F c d
loopCompThroughRightF :: F ((a  b)  c) ((c  d)  a) -> F b d
Plumbing: turning parallel compositions into serial compositions:
serCompLeftToRightF :: F (a  b) (b  c) -> F a c
serCompRightToLeftF :: F (a  b) (c  a) -> F b c
Plumbing: untagged parallel composition:
untaggedListF :: [F a b] -> F a b
Stream processor combinators that create circular connections:
loopCompSP :: SP ((a1  b1)  (a2  b2)) ((a2  a3)  (a1  b3)) -> SP (b1  b2) (a3  b3)
loopThroughBothSP :: SP (a1  b1) (a2  a3) ->
                     SP (a2  b2) (a1  b3) -> SP (b1  b2) (a3  b3)
Stream processor type class:
class StreamProcIO sp where ...
The Fudget type:
data F hi ho = ...
The identity fudget:
idF :: F b b
Miscellaneous (the rest):
class FudgetIO f where ...
appendStartF :: [ho] -> F hi ho -> F hi ho
contDynF :: F a b -> Cont (F a d) b
getF :: Cont (F a ho) a
nullF :: F hi ho
parF :: F c ho -> F c ho -> F c ho
prepostMapHigh :: (hi -> b) -> (c -> ho) -> F b c -> F hi ho
prodF :: F a b -> F c d -> F (a, c) (b  d)
putF :: ho -> F hi ho -> F hi ho
putsF :: [b] -> F a b -> F a b
startupF :: [hi] -> F hi ho -> F hi ho

InfixOps

Plumbing: serial composition:
>==< :: F a1 b -> F a2 a1 -> F a2 b
Plumbing: tagged parallel composition:
>+< :: F a b -> F c d -> F (a  c) (b  d)
Plumbing: untagged parallel composition:
>*< :: F c ho -> F c ho -> F c ho
Stream processor combinators:
-*- :: SP a b -> SP a b -> SP a b
-+- :: SP a1 a2 -> SP a3 b -> SP (a1  a3) (a2  b)
-==- :: SP a1 b -> SP a2 a1 -> SP a2 b
Miscellaneous (the rest):
>=^< :: F c d -> (e -> c) -> F e d
>=^^< :: F c d -> SP e c -> F e d
>^=< :: (a -> b) -> F e a -> F e b
>^^=< :: SP a b -> F e a -> F e b

Layout

A spacer that centers a box in the available space:
centerS :: Spacer
GUI fudget placement:
data Placer = ...
alignF :: Size -> Size -> Alignment -> Alignment -> F a b -> F a b
hBoxF :: F a b -> F a b
marginHVAlignF :: Distance -> Alignment -> Alignment -> F a b -> F a b
matrixF :: Int -> F a b -> F a b
noStretchF :: Bool -> Bool -> F a b -> F a b
placerF :: Placer -> F a b -> F a b
revHBoxF :: F a b -> F a b
revVBoxF :: F a b -> F a b
tableF :: Int -> F a b -> F a b
vBoxF :: F a b -> F a b
GUI fudget placement: dynamic:
dynPlacerF :: F c ho -> F (Placer  c) ho
dynSpacerF :: F c ho -> F (Spacer  c) ho
GUI fudget spacing:
data Spacer = ...
marginF :: Distance -> F a b -> F a b
sepF :: Size -> F a b -> F a b
spacer1F :: Spacer -> F a b -> F a b
spacerF :: Spacer -> F a b -> F a b
Name layout:
type LName = String
data NameLayout = ...
leafNL :: LName -> NameLayout
nameF :: LName -> F a b -> F a b
nameLayoutF :: NameLayout -> F a b -> F a b
nullNL :: NameLayout
placeNL :: Placer -> [NameLayout] -> NameLayout
spaceNL :: Spacer -> NameLayout -> NameLayout
Name layout convenience:
hBoxNL :: [NameLayout] -> NameLayout
hBoxNL' :: Distance -> [NameLayout] -> NameLayout
hvAlignNL :: Alignment -> Alignment -> NameLayout -> NameLayout
marginHVAlignNL :: Distance -> Alignment -> Alignment -> NameLayout -> NameLayout
marginNL :: Distance -> NameLayout -> NameLayout
modNL :: (Placer -> Placer) -> NameLayout -> NameLayout
sepNL :: Size -> NameLayout -> NameLayout
vBoxNL :: [NameLayout] -> NameLayout
vBoxNL' :: Distance -> [NameLayout] -> NameLayout
Placer modifying combinators:
flipP :: Placer -> Placer
permuteP :: [Int] -> Placer -> Placer
revP :: Placer -> Placer
spacerP :: Spacer -> Placer -> Placer
Placers: automatic layout:
autoP :: Placer
Placers: linear layouts:
horizontalP :: Placer
horizontalP' :: Distance -> Placer
verticalP :: Placer
verticalP' :: Distance -> Placer
Placers: matrixes and tables:
data LayoutDir = ...
matrixP :: Int -> Placer
matrixP' :: Int -> LayoutDir -> Distance -> Placer
tableP :: Int -> Placer
tableP' :: Int -> LayoutDir -> Distance -> Placer
Placers: paragraphs:
paragraphP :: Placer
paragraphP' :: Size -> Placer
paragraphP'' :: (Int -> Placer) -> Size -> Placer
Spacer combinators:
compS :: Spacer -> Spacer -> Spacer
flipS :: Spacer -> Spacer
idS :: Spacer
Spacers that add margins to boxes:
type Distance = Int
hMarginS :: Distance -> Distance -> Spacer
hvMarginS :: Size -> Size -> Spacer
marginHVAlignS :: Distance -> Alignment -> Alignment -> Spacer
marginS :: Distance -> Spacer
sepS :: Size -> Spacer
vMarginS :: Distance -> Distance -> Spacer
Spacers that add space instead of stretching a box when there is extra space:
hAlignS :: Alignment -> Spacer
hvAlignS :: Alignment -> Alignment -> Spacer
vAlignS :: Alignment -> Spacer
Spacers that align boxes with edges:
bottomS :: Spacer
hCenterS :: Spacer
leftS :: Spacer
rightS :: Spacer
topS :: Spacer
vCenterS :: Spacer
Spacers: alignment:
type Alignment = Double
aBottom :: Alignment
aCenter :: Alignment
aLeft :: Alignment
aRight :: Alignment
aTop :: Alignment
Spacers: put limits on the allowed size of a box:
maxSizeS :: Size -> Spacer
minSizeS :: Size -> Spacer
sizeS :: Size -> Spacer
Miscellaneous (the rest):
data LayoutRequest = ...
data Sizing = ...
center :: Point -> Rect -> Rect
center' :: Point -> Size -> Rect -> Rect
dynListLF :: Placer -> F (Int, DynFMsg a b) (Int, b)
flipPoint :: Point -> Point
flipRect :: Rect -> Rect
flipReq :: LayoutRequest -> LayoutRequest
holeF :: F hi ho
idP :: Placer
layoutModifierF :: (LayoutRequest -> LayoutRequest) -> F a b -> F a b
listNF :: (Eq a, Show a) => [(a, F b c)] -> F (a, b) (a, c)
noStretchS :: Bool -> Bool -> Spacer
nullLF :: F hi ho

Containers

Scroll bars:
hScrollF :: F b d -> F b d
scrollF :: F b d -> F b d
vScrollF :: F b d -> F b d
Shell (top level) windows:
data DeleteWindowAction = ...
class HasClickToType xxx where ...
class HasVisible xxx where ...
data ShellF = ...
setDeleteQuit :: Bool -> Customiser ShellF
setDeleteWindowAction :: Maybe DeleteWindowAction -> Customiser ShellF
setInitPos :: Maybe Point -> Customiser ShellF
shellF :: String -> F c d -> F c d
shellF' :: Customiser ShellF -> String -> F c d -> F c d
unmappedSimpleShellF :: String -> F i o -> F i o
Miscellaneous (the rest):
data ESelCmd a = ...
data ESelEvt a = ...
data PotRequest = ...
type PotState = (Int, Int, Int)
data SelCmd a = ...
data SelEvt a = ...
bubbleF :: F a b -> F a b
bubblePopupF :: F b2 d2 -> F (PopupMsg b2) d2
bubbleRootPopupF :: F b2 d2 -> F (PopupMsg b2) d2
containerGroupF :: Rect ->
                   Rect ->
                   Int -> Button -> ModState -> F c b -> F ((Rect, Rect)  c) (Rect  b)
eselectionF :: F (ESelCmd String) (ESelEvt String)
hPotF :: F PotRequest PotState
popupShellF :: String -> Maybe Point -> F a b -> F a (a, b)
popupShellF' :: Customiser ShellF -> String -> Maybe Point -> F a b -> F a (a, b)
posPopupShellF :: String -> [WindowAttributes] -> F c a -> F (c, Maybe Point) (c, a)
selectionF :: F (SelCmd String) (SelEvt String)
unmappedSimpleShellF' :: Customiser ShellF -> String -> F i o -> F i o
vPotF :: F PotRequest PotState

Filters

Miscellaneous (the rest):
allcacheF :: F i o -> F i o
doubleClickF :: Time -> F a b -> F a b

DrawingModules

Bitmaps:
data BitmapFile = ...
Drawing:
data Drawing lbl leaf = ...
atomicD :: leaf -> Drawing lbl leaf
attribD :: GCSpec -> Drawing lbl leaf -> Drawing lbl leaf
fgD :: (Show a, ColorGen a) => a -> Drawing lbl leaf -> Drawing lbl leaf
fontD :: (Show a, FontGen a) => a -> Drawing lbl leaf -> Drawing lbl leaf
hardAttribD :: GCtx -> Drawing lbl leaf -> Drawing lbl leaf
hboxD :: [Drawing lbl leaf] -> Drawing lbl leaf
hboxD' :: Distance -> [Drawing lbl leaf] -> Drawing lbl leaf
labelD :: lbl -> Drawing lbl leaf -> Drawing lbl leaf
matrixD :: Int -> [Drawing lbl leaf] -> Drawing lbl leaf
matrixD' :: Distance -> Int -> [Drawing lbl leaf] -> Drawing lbl leaf
softAttribD :: [GCAttributes ColorSpec FontSpec] -> Drawing lbl leaf -> Drawing lbl leaf
tableD :: Int -> [Drawing lbl leaf] -> Drawing lbl leaf
tableD' :: Distance -> Int -> [Drawing lbl leaf] -> Drawing lbl leaf
vboxD :: [Drawing lbl leaf] -> Drawing lbl leaf
vboxD' :: Distance -> [Drawing lbl leaf] -> Drawing lbl leaf
Drawing attributes:
class ColorGen a where ...
data ColorSpec = ...
class FontGen a where ...
data FontSpec = ...
data GCtx = ...
colorSpec :: (Show a, ColorGen a) => a -> ColorSpec
createGCtx :: (ColorGen a1, FudgetIO f, FontGen a2, Show a1, Show a2) =>
              Drawable -> GCtx -> [GCAttributes a1 a2] -> (GCtx -> f i o) -> f i o
fontSpec :: (Show a, FontGen a) => a -> FontSpec
gcBgA :: c -> [GCAttributes c FontSpec]
gcFgA :: c -> [GCAttributes c FontSpec]
gcFontA :: f -> [GCAttributes ColorSpec f]
gctx2gc :: GCtx -> GCId
rootGCtx :: GCtx
wCreateGCtx :: (ColorGen a1, FudgetIO f, FontGen a2, Show a1, Show a2) =>
               GCtx -> [GCAttributes a1 a2] -> (GCtx -> f i o) -> f i o
Drawing manipulation:
type DPath = [Int]
up :: DPath -> DPath
Fixed size drawings:
data FixedColorDrawing = ...
data FixedDrawing = ...
Flexible line drawings:
data FlexibleDrawing = ...
arc :: Int -> Int -> FlexibleDrawing
arc' :: Size -> Int -> Int -> FlexibleDrawing
ellipse :: FlexibleDrawing
ellipse' :: Size -> FlexibleDrawing
filledEllipse :: FlexibleDrawing
filledEllipse' :: Size -> FlexibleDrawing
filledTriangleDown :: FlexibleDrawing
filledTriangleUp :: FlexibleDrawing
filledarc :: Int -> Int -> FlexibleDrawing
filledarc' :: Size -> Int -> Int -> FlexibleDrawing
filler :: Bool -> Bool -> Int -> FlexibleDrawing
flex :: (Rect -> [DrawCommand]) -> FlexibleDrawing
flex' :: Size -> (Rect -> [DrawCommand]) -> FlexibleDrawing
frame :: FlexibleDrawing
frame' :: Size -> FlexibleDrawing
hFiller :: Int -> FlexibleDrawing
lbrace :: FlexibleDrawing
lbrack :: FlexibleDrawing
lpar :: FlexibleDrawing
rbrace :: FlexibleDrawing
rbrack :: FlexibleDrawing
rpar :: FlexibleDrawing
triangleDown :: FlexibleDrawing
triangleUp :: FlexibleDrawing
vFiller :: Int -> FlexibleDrawing
Font metrics:
type FontStruct = FontStructF (Array Char CharStruct)
Graphics:
data Gfx = ...
class Graphic a where ...
g :: Graphic a => a -> Drawing lbl Gfx
Monadic style:
type Cont c a = (a -> c) -> c
Miscellaneous (the rest):
blankD :: Size -> Drawing lbl Gfx
boxD :: [Drawing lbl leaf] -> Drawing lbl leaf
filledRectD :: Size -> Drawing lbl Gfx
hboxcD :: [Drawing lbl leaf] -> Drawing lbl leaf
hboxcD' :: Distance -> [Drawing lbl leaf] -> Drawing lbl leaf
placedD :: Placer -> Drawing lbl leaf -> Drawing lbl leaf
rectD :: Size -> Drawing lbl Gfx
spacedD :: Spacer -> Drawing lbl leaf -> Drawing lbl leaf
stackD :: [Drawing lbl leaf] -> Drawing lbl leaf
vboxlD :: [Drawing lbl leaf] -> Drawing lbl leaf
vboxlD' :: Distance -> [Drawing lbl leaf] -> Drawing lbl leaf

StreamProc

Data entry field postprocessors:
inputDoneSP :: SP (InputMsg b) b
inputLeaveDoneSP :: SP (InputMsg b) b
inputListSP :: Eq p1 => [p1] -> SP (p1, InputMsg p2) (InputMsg [(p1, p2)])
inputPairSP :: SP ((InputMsg a)  (InputMsg b)) (InputMsg (a, b))
stripInputSP :: SP (InputMsg b) b
Delay the activation of a stream processor or fudget:
delaySP :: SP a b -> SP a b
Monadic style:
type Cont c a = (a -> c) -> c
Stream processor basics:
data SP a b = ...
getSP :: Cont (SP a b) a
nullSP :: SP a b
putSP :: b -> SP a b -> SP a b
putsSP :: [b] -> SP a b -> SP a b
runSP :: SP a1 a2 -> [a1] -> [a2]
Stream processor combinators:
compEitherSP :: SP a1 a2 -> SP a3 b -> SP (a1  a3) (a2  b)
idLeftSP :: SP a1 b -> SP (a2  a1) (a2  b)
idRightSP :: SP a1 a2 -> SP (a1  b) (a2  b)
parSP :: SP a b -> SP a b -> SP a b
postMapSP :: (t -> b) -> SP a t -> SP a b
preMapSP :: SP a b -> (t -> a) -> SP t b
prepostMapSP :: (t1 -> a) -> (t2 -> b) -> SP a t2 -> SP t1 b
serCompSP :: SP a1 b -> SP a2 a1 -> SP a2 b
Stream processor combinators that create circular connections:
loopLeftSP :: SP (a  b1) (a  b2) -> SP b1 b2
loopOnlySP :: SP a a -> SP a b
loopSP :: SP a a -> SP a a
loopThroughRightSP :: SP (a1  b1) (a2  b2) -> SP a2 a1 -> SP b1 b2
Stream processor equivalents of some common list processing functions:
chopSP :: ((b -> SP a b) -> SP a b) -> SP a b
concatMapAccumlSP :: (t -> a -> (t, [b])) -> t -> SP a b
concatMapSP :: (t -> [b]) -> SP t b
concatSP :: SP [b] b
filterJustSP :: SP (Maybe b) b
filterLeftSP :: SP (b1  b2) b1
filterRightSP :: SP (a1  b) b
filterSP :: (b -> Bool) -> SP b b
idSP :: SP b b
mapAccumlSP :: (t -> a -> (t, b)) -> t -> SP a b
mapFilterSP :: (t -> Maybe b) -> SP t b
mapSP :: (t -> b) -> SP t b
splitAtElemSP :: (a -> Bool) -> Cont (SP a b) [a]
zipSP :: [a] -> SP b (a, b)
Stream processor manipulation:
appendStartSP :: [b] -> SP a b -> SP a b
feedSP :: a -> [a] -> SP a b -> SP a b
pullSP :: SP a1 a2 -> ([a2], SP a1 a2)
startupSP :: [a] -> SP a b -> SP a b
stepSP :: [b] -> Cont (SP a b) a
walkSP :: SP a1 a2 -> a1 -> ([a2], SP a1 a2)
Stream processor that splits a stream of pairs:
splitSP :: SP (a, b) (a  b)
Stream processor type class:
class StreamProcIO sp where ...
Miscellaneous (the rest):
data DynMsg a b = ...
seqSP :: SP a b -> SP a b -> SP a b
toBothSP :: SP b (b  b)

InOut

A fudget that outputs ticks after specific delays and/or at specific intervals:
data Tick = ...
timerF :: F (Maybe (Int, Int)) Tick
File system access:
appStorageF :: (Read a, Show a) => String -> a -> F a a
readDirF :: F String (String, IOError  [String])
readFileF :: F String (String, IOError  String)
writeFileF :: F (String, String) (String, IOError  ())
Haskell Dialogue IO:
hIOF :: Request -> (Response -> F a b) -> F a b
hIOSuccF :: Request -> F a b -> F a b
hIOerrF :: Request -> (IOError -> F a b) -> (Response -> F a b) -> F a b
haskellIOF :: Request -> (Response -> F a b) -> F a b
Sockets:
asyncTransceiverF :: Socket -> F String String
asyncTransmitterF :: Socket -> F String b
openLSocketF :: FudgetIO f => Port -> (LSocket -> f hi ho) -> f hi ho
openSocketF :: FudgetIO f => Host -> Port -> (Socket -> f hi ho) -> f hi ho
receiverF :: Socket -> F e String
transceiverF :: Socket -> F String String
transmitterF :: Socket -> F String b
Stdio:
inputLinesSP :: SP String String
linesSP :: SP Char String
outputF :: String -> F String a
stderrF :: F String a
stdinF :: F hi String
stdioF :: F String String
stdoutF :: F String a
Miscellaneous (the rest):
getLocalTime :: FudgetIO f => (CalendarTime -> f hi ho) -> f hi ho
getTime :: FudgetIO f => (ClockTime -> f hi ho) -> f hi ho
subProcessF :: String -> F String (String  String)

LowLevel

Monadic style:
type Cont c a = (a -> c) -> c
The combinator that connects the main fudget to the Haskell I/O system:
data Fudlogue = ...
fudlogue :: F a b -> IO ()
fudlogue' :: Customiser Fudlogue -> F a b -> IO ()
Miscellaneous (the rest):
class FudgetIO f where ...
class HasCache xxx where ...
cmdContSP :: a -> (b -> Maybe c) -> Cont (SP b a) c
contMap :: StreamProcIO sp => (i -> (o -> sp i o) -> sp i o) -> sp i o
conts :: (a -> Cont c b) -> [a] -> Cont c [b]
dropSP :: (t1 -> Maybe t2) -> (t2 -> SP t1 b) -> SP t1 b
getLeftSP :: (t -> SP (t  b1) b2) -> SP (t  b1) b2
getRightSP :: (t -> SP (a1  t) b) -> SP (a1  t) b
waitForF :: (a -> Maybe b) -> Cont (F a c) b
waitForSP :: (a -> Maybe t) -> (t -> SP a b) -> SP a b

XTypesModules

Drawing commands:
data DrawCommand = ...
drawCircle :: Point -> Int -> DrawCommand
fillCircle :: Point -> Int -> DrawCommand
Drawing: auxiliary types:
data CoordMode = ...
data GCAttributes a b = ...
data GCCapStyle = ...
data GCFillStyle = ...
data GCFunction = ...
data GCLineStyle = ...
data Shape = ...
Drawing: colors:
data RGB = ...
Events:
data XEvent = ...
Events: auxiliary types:
data Button = ...
type ModState = [Modifiers]
data Modifiers = ...
type Time = Int
Font metrics:
type FontStruct = FontStructF (Array Char CharStruct)
Fudget low-level stream types:
data XCommand = ...
Window configuration:
data WindowAttributes = ...
Miscellaneous (the rest):
type ColorName = String
type FontName = String
type Host = String
type KeySym = String
data LSocket = ...
type Peer = Host
type Port = Int
data Socket = ...
type Width = Int

Types

Buttons:
data Click = ...
Displaying text:
data ListRequest a = ...
appendItems :: [a] -> ListRequest a
applyListRequest :: ListRequest a -> [a] -> [a]
changeItems :: Int -> [a] -> ListRequest a
deleteItems :: Int -> Int -> ListRequest a
highlightItems :: [Int] -> ListRequest a
insertItems :: Int -> [a] -> ListRequest a
pickItem :: Int -> ListRequest a
replaceAll :: [a] -> ListRequest a
replaceAllFrom :: Int -> [a] -> ListRequest a
replaceItems :: Int -> Int -> [a] -> ListRequest a
Pop-up windows:
data ConfirmMsg = ...
Stream processor basics:
data SP a b = ...
The Fudget type:
data F hi ho = ...
type Fudget a b = F a b
Types for messages from data entry fields:
data InputMsg a = ...
inputChange :: a -> InputMsg a
inputDone :: InputMsg a -> Maybe a
inputLeaveDone :: InputMsg a -> Maybe a
inputMsg :: a -> InputMsg a
mapInp :: (t -> a) -> InputMsg t -> InputMsg a
stripInputMsg :: InputMsg a -> a
tstInp :: (t1 -> t2) -> InputMsg t1 -> t2
Miscellaneous (the rest):
type Path = [Direction]
data PopupMsg a = ...
inputButtonKey :: KeySym
inputLeaveKey :: KeySym

FudUtilities

Environment:
argFlag :: String -> Bool -> Bool
argKey :: String -> String -> String
argReadKey :: (Read p, Show p) => String -> p -> p
args :: [String]
bgColor :: ColorName
buttonFont :: FontName
defaultFont :: FontName
defaultPosition :: Maybe Point
defaultSep :: Num a => a
defaultSize :: Maybe Point
edgeWidth :: Int
fgColor :: ColorName
labelFont :: FontName
look3d :: Bool
menuFont :: FontName
options :: [(String, String)]
paperColor :: ColorName
progName :: String
shadowColor :: ColorName
shineColor :: ColorName
Geometry, part 1:
data Line = ...
data Point = ...
data Rect = ...
type Size = Point
diag :: Int -> Point
lL :: Int -> Int -> Int -> Int -> Line
origin :: Point
pP :: Int -> Int -> Point
rR :: Int -> Int -> Int -> Int -> Rect
Geometry, part 2:
class Move a where ...
=.> :: Point -> Point -> Bool
confine :: Rect -> Rect -> Rect
freedom :: Rect -> Rect -> Point
growrect :: Rect -> Point -> Rect
inRect :: Point -> Rect -> Bool
line2rect :: Line -> Rect
moveline :: Line -> Point -> Line
moverect :: Rect -> Point -> Rect
pMax :: [Point] -> Point
pMin :: [Point] -> Point
padd :: Point -> Point -> Point
plim :: Point -> Point -> Point -> Point
pmax :: Point -> Point -> Point
pmin :: Point -> Point -> Point
posrect :: Rect -> Point -> Rect
psub :: Point -> Point -> Point
rect2line :: Rect -> Line
rectMiddle :: Rect -> Point
rmax :: Rect -> Rect -> Rect
rsub :: Rect -> Rect -> Point
scale :: (RealFrac a1, Integral b, Integral a2) => a1 -> a2 -> b
scalePoint :: RealFrac a => a -> Point -> Point
sizerect :: Rect -> Size -> Rect
Monadic style:
type Cont c a = (a -> c) -> c
Various utility functions for pairs and lists:
aboth :: (t -> b) -> (t, t) -> (b, b)
anth :: Int -> (a -> a) -> [a] -> [a]
gmap :: Foldable t1 => (t2 -> [a] -> [a]) -> (t3 -> t2) -> t1 t3 -> [a]
issubset :: (Foldable t1, Foldable t2, Eq a) => t1 a -> t2 a -> Bool
lhead :: [a1] -> [a2] -> [a2]
loop :: (t -> t) -> t
lsplit :: [a1] -> [a2] -> ([a2], [a2])
ltail :: [a1] -> [a2] -> [a2]
mapPair :: (t1 -> a, t2 -> b) -> (t1, t2) -> (a, b)
number :: Int -> [a] -> [(Int, a)]
oo :: (t1 -> t2) -> (t3 -> t4 -> t1) -> t3 -> t4 -> t2
pair :: a -> b -> (a, b)
pairwith :: (t -> b) -> t -> (t, b)
part :: (a -> Bool) -> [a] -> ([a], [a])
remove :: Eq t => t -> [t] -> [t]
replace :: Eq a => (a, b) -> [(a, b)] -> [(a, b)]
swap :: (b, a) -> (a, b)
unionmap :: (Foldable t1, Eq a) => (t2 -> [a]) -> t1 t2 -> [a]
Various utility functions for the Either type:
filterLeft :: [b1  b2] -> [b1]
filterRight :: [a  b] -> [b]
fromLeft :: a  b -> a
fromRight :: a  b -> b
isLeft :: a  b -> Bool
isRight :: a  b -> Bool
mapEither :: (t1 -> a) -> (t2 -> b) -> t1  t2 -> a  b
splitEitherList :: [a1  a2] -> ([a1], [a2])
stripEither :: a  a -> a
stripLeft :: a  b -> Maybe a
stripRight :: a1  a2 -> Maybe a2
swapEither :: b  a -> a  b
Various utility functions for the Maybe type.:
plookup :: Foldable t => (b1 -> Bool) -> t (b1, b2) -> Maybe b2
Miscellaneous (the rest):
argKeyList :: String -> [String] -> [String]
version :: String
version_0_18_4 :: String

Debug

A fudget that shows the high level input and output of a fudget on the standard error output:
spyF :: (Show b, Show a1) => F a1 b -> F a1 b
An identity fudget that copies messages to the standard error output:
teeF :: (b -> String) -> String -> F b b
Miscellaneous (the rest):
ctrace :: Show a1 => String -> a1 -> a2 -> a2
showCommandF :: String -> F a b -> F a b

DefaultParams

Displaying text:
class HasInitText xxx where ...
Spacers: alignment:
type Alignment = Double
Miscellaneous (the rest):
type Customiser a = a -> a
class HasAlign xxx where ...
class HasBgColorSpec xxx where ...
class HasBorderWidth xxx where ...
class HasFgColorSpec xxx where ...
class HasFontSpec xxx where ...
class HasInitDisp xxx where ...
class HasInitSize xxx where ...
class HasKeys xxx where ...
class HasMargin xxx where ...
class HasSizing xxx where ...
class HasStretchable xxx where ...
class HasWinAttr xxx where ...
type PF p a b = F ((Customiser p)  a) b
setBgColor :: (HasBgColorSpec xxx, Show p, ColorGen p) => p -> Customiser xxx
setFgColor :: (HasFgColorSpec xxx, Show p, ColorGen p) => p -> Customiser xxx
setFont :: (HasFontSpec xxx, Show a, FontGen a) => a -> Customiser xxx
standard :: Customiser a

ContribFudgets

Menus:
menuF :: Eq a => Menu a -> F a a