- Button implementation:
data BMevents = ...
pushButtonF :: [(ModState, KeySym)] -> F b1 b2 -> F b1 (b2 ⊕ 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 g => g -> F c d -> F c d
labBelowF :: Graphic g => g -> F c d -> F c d
labLeftOfF :: Graphic g => g -> F c d -> F c d
labRightOfF :: Graphic g => g -> F c d -> F c d
labelF :: Graphic g => g -> F a b
labelF' :: Graphic g => Customiser (DisplayF g) -> g -> F a b
tieLabelF :: Graphic g => Orientation -> Double -> g -> 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' :: (EditorF -> 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' :: (EditorF -> 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
- 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)
- The Fudget type:
data F hi ho = ...
- The identity fudget:
idF :: F b b
- Miscellaneous (the rest):
class FudgetIO f where ...
class StreamProcIO sp 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
- 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
- Data entry field postprocessors:
inputDoneSP :: SP (InputMsg b) b
inputLeaveDoneSP :: SP (InputMsg b) 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 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)
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 (a1 ⊕ a2) (a1 ⊕ b) -> SP a2 b
loopSP :: SP a a -> SP a a
- Stream processor construction:
getSP :: Cont (SP a b) a
nullSP :: SP a b
putSP :: b -> SP a b -> SP a b
- 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
filterSP :: (b -> Bool) -> SP b b
idSP :: SP b b
mapAccumlSP :: (t -> a -> (t, b)) -> t -> SP a b
mapSP :: (t -> b) -> SP t b
splitAtElemSP :: (a -> Bool) -> Cont (SP a b) [a]
zipSP :: [a] -> SP b (a, b)
- Stream processor manipulation:
startupSP :: [a] -> SP a b -> SP a b
- Stream processor that splits a stream of pairs:
splitSP :: SP (a, b) (a ⊕ b)
- The function that turns a stream processor into a list processing function:
runSP :: SP a1 a2 -> [a1] -> [a2]
- The type of plain stream processors:
data SP a b = ...
- Miscellaneous (the rest):
data DynMsg a b = ...
class StreamProcIO sp where ...
appendStartSP :: [b] -> SP a b -> SP a b
feedSP :: a -> [a] -> SP a b -> SP a b
filterJustSP :: SP (Maybe b) b
filterLeftSP :: SP (b1 ⊕ b2) b1
filterRightSP :: SP (a1 ⊕ b) b
inputListSP :: Eq a => [a] -> SP (a, InputMsg b) (InputMsg [(a, b)])
inputPairSP :: SP ((InputMsg a) ⊕ (InputMsg b)) (InputMsg (a, b))
loopOnlySP :: SP a a -> SP a b
loopThroughRightSP :: SP (a1 ⊕ a2) (a3 ⊕ b) -> SP a3 a1 -> SP a2 b
mapFilterSP :: (t -> Maybe b) -> SP t b
parSP :: SP a b -> SP a b -> SP a b
pullSP :: SP a1 a2 -> ([a2], SP a1 a2)
putsSP :: [b] -> SP a b -> SP a b
seqSP :: SP a b -> SP a b -> SP a b
stepSP :: [b] -> Cont (SP a b) a
toBothSP :: SP b (b ⊕ b)
walkSP :: SP a1 a2 -> a1 -> ([a2], SP a1 a2)
- 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 :: p ⊕ p -> p
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 => (a -> Bool) -> t (a, b) -> Maybe b
- Miscellaneous (the rest):
argKeyList :: String -> [String] -> [String]
version :: String
version_0_18_2 :: String