Commit c953ba22 authored by Peter Achten's avatar Peter Achten
Browse files

(PA) public state component removed from PSt/IOSt

parent 86e750ec
...@@ -25,8 +25,8 @@ import bounceDraw ...@@ -25,8 +25,8 @@ import bounceDraw
} }
:: NoState // NoState is a simple singleton type constructor :: NoState // NoState is a simple singleton type constructor
= NoState = NoState
:: *Bounce x :: *Bounce
:== PSt Local x // Synonym for PSt :== PSt Local // Synonym for PSt
// Create the initial interactive process: // Create the initial interactive process:
...@@ -43,9 +43,9 @@ Start world ...@@ -43,9 +43,9 @@ Start world
, bounce wIdA tIdA rIdA rIdB "Bounce A" LeftTop leftBarrelSetUp , bounce wIdA tIdA rIdA rIdB "Bounce A" LeftTop leftBarrelSetUp
] world ] world
bounce :: Id Id (RId Message) (RId Message) Title ItemLoc (Barrel,[Ball]) -> ProcessGroup Process bounce :: Id Id (RId Message) (RId Message) Title ItemLoc (Barrel,[Ball]) -> Process
bounce wId tId me you name itemLoc (barrel,balls) bounce wId tId me you name itemLoc (barrel,balls)
= ProcessGroup 0 (Process SDI initLocal initIO [ProcessClose quit]) = Process SDI initLocal initIO [ProcessClose quit]
where where
barrelDomain = barrel.bDomain barrelDomain = barrel.bDomain
barrelSize = rectangleSize barrelDomain barrelSize = rectangleSize barrelDomain
...@@ -97,7 +97,7 @@ where ...@@ -97,7 +97,7 @@ where
:+: MenuItem "Quit" [MenuFunction (noLS quit),MenuShortKey 'q'] :+: MenuItem "Quit" [MenuFunction (noLS quit),MenuShortKey 'q']
) [] ) []
quit :: (Bounce .x) -> Bounce .x quit :: Bounce -> Bounce
quit bounce=:{ls={talkTo}} quit bounce=:{ls={talkTo}}
= closeProcess (snd (syncSend talkTo QuitBounce bounce)) = closeProcess (snd (syncSend talkTo QuitBounce bounce))
...@@ -107,7 +107,7 @@ where ...@@ -107,7 +107,7 @@ where
, TimerFunction (noLS1 (bounceBalls splitWalls)) , TimerFunction (noLS1 (bounceBalls splitWalls))
] ]
where where
bounceBalls :: !(![SingleWall],![SingleWall]) NrOfIntervals (Bounce .x) -> Bounce .x bounceBalls :: !(![SingleWall],![SingleWall]) NrOfIntervals Bounce -> Bounce
bounceBalls splitWalls _ bounce=:{ls=local=:{talkTo,balls,barrel},io} bounceBalls splitWalls _ bounce=:{ls=local=:{talkTo,balls,barrel},io}
# (windowSize,io) = getWindowViewSize wId io # (windowSize,io) = getWindowViewSize wId io
scale = scaleSize windowSize barrelSize scale = scaleSize windowSize barrelSize
...@@ -128,10 +128,10 @@ where ...@@ -128,10 +128,10 @@ where
(ins,outs) = splitBallsInBarrel domain ballsMoved (ins,outs) = splitBallsInBarrel domain ballsMoved
// receiver defines the receiver that will receive new balls and termination requests. // receiver defines the receiver that will receive new balls and termination requests.
receiver :: *Receiver Message .ls (Bounce .x) receiver :: *Receiver Message .ls Bounce
receiver = Receiver me (noLS1 (receive splitWalls)) [] receiver = Receiver me (noLS1 (receive splitWalls)) []
where where
receive :: !(![SingleWall],![SingleWall]) !Message !(Bounce .x) -> Bounce .x receive :: !(![SingleWall],![SingleWall]) !Message !Bounce -> Bounce
receive (horizontal,vertical) (BallsArrive newBalls) bounce=:{ls} receive (horizontal,vertical) (BallsArrive newBalls) bounce=:{ls}
#! newBalls = map correctBall newBalls #! newBalls = map correctBall newBalls
= {bounce & ls={ls & balls=newBalls++ls.balls}} = {bounce & ls={ls & balls=newBalls++ls.balls}}
...@@ -149,7 +149,7 @@ where ...@@ -149,7 +149,7 @@ where
= closeProcess bounce = closeProcess bounce
// bounceHelp opens a dialog that tells something about this application. // bounceHelp opens a dialog that tells something about this application.
bounceHelp :: (Bounce .x) -> Bounce .x bounceHelp :: Bounce -> Bounce
bounceHelp bounce bounceHelp bounce
# (okId, bounce) = accPIO openId bounce # (okId, bounce) = accPIO openId bounce
# ((error,_),bounce)= openModalDialog undef (dDef okId) bounce # ((error,_),bounce)= openModalDialog undef (dDef okId) bounce
...@@ -168,7 +168,7 @@ where ...@@ -168,7 +168,7 @@ where
] ]
center = (Center,NoOffset) center = (Center,NoOffset)
close :: (Bounce .x) -> Bounce .x close :: Bounce -> Bounce
close bounce close bounce
# (Just id,bounce) = accPIO getActiveWindow bounce # (Just id,bounce) = accPIO getActiveWindow bounce
# bounce = closeWindow id bounce # bounce = closeWindow id bounce
......
...@@ -19,7 +19,6 @@ Start world ...@@ -19,7 +19,6 @@ Start world
# (ids,world) = openIds 3 world // Create 3 Id values # (ids,world) = openIds 3 world // Create 3 Id values
= startIO NDI // Evaluate an interactive process with: = startIO NDI // Evaluate an interactive process with:
NoState // no local process state NoState // no local process state
NoState // no public process state
(initialise ids) // the initialisation action (initialise ids) // the initialisation action
[] // only default attributes [] // only default attributes
world world
......
...@@ -24,9 +24,9 @@ noFilesSelected ...@@ -24,9 +24,9 @@ noFilesSelected
Start :: *World -> *World Start :: *World -> *World
Start world Start world
= startIO NDI noFilesSelected 0 initIO [] world = startIO NDI noFilesSelected initIO [] world
initIO :: (PSt Local .p) -> PSt Local .p initIO :: (PSt Local) -> PSt Local
initIO pst initIO pst
# (showid,pst) = accPIO openId pst # (showid,pst) = accPIO openId pst
# (_,pst) = openDialog undef (dialog showid) pst # (_,pst) = openDialog undef (dialog showid) pst
...@@ -48,7 +48,7 @@ where ...@@ -48,7 +48,7 @@ where
] ]
) [] ) []
where where
compare :: (PSt Local .p) -> PSt Local .p compare :: (PSt Local) -> PSt Local
compare pst compare pst
# (maybeFirstFile,pst) = selectInputFile pst # (maybeFirstFile,pst) = selectInputFile pst
| isNothing maybeFirstFile | isNothing maybeFirstFile
...@@ -60,12 +60,12 @@ where ...@@ -60,12 +60,12 @@ where
# pst = {pst & ls={name1=fromJust maybeFirstFile,name2=fromJust maybeSecondFile}} # pst = {pst & ls={name1=fromJust maybeFirstFile,name2=fromJust maybeSecondFile}}
= showdifference pst = showdifference pst
again :: (PSt Local .p) -> PSt Local .p again :: (PSt Local) -> PSt Local
again pst=:{ls={name1,name2}} again pst=:{ls={name1,name2}}
| name1=="" || name2=="" = compare pst | name1=="" || name2=="" = compare pst
| otherwise = showdifference pst | otherwise = showdifference pst
showdifference :: (PSt Local .p) -> PSt Local .p showdifference :: (PSt Local) -> PSt Local
showdifference pst=:{ls={name1,name2}} showdifference pst=:{ls={name1,name2}}
# pst = closeWindow showid pst # pst = closeWindow showid pst
# (files,pst) = accFiles (openfilepair (name1,name2)) pst # (files,pst) = accFiles (openfilepair (name1,name2)) pst
......
...@@ -14,7 +14,7 @@ import StdEnv, StdIO ...@@ -14,7 +14,7 @@ import StdEnv, StdIO
Start :: *World -> *World Start :: *World -> *World
Start world Start world
= startIO NDI NoState NoState initIO [] world = startIO NDI NoState initIO [] world
initIO pst initIO pst
# (dialogid, pst) = accPIO openId pst # (dialogid, pst) = accPIO openId pst
...@@ -49,7 +49,7 @@ where ...@@ -49,7 +49,7 @@ where
displayheight = 1 displayheight = 1
init = 0 init = 0
upd :: Int (Int,PSt .l .p) -> (Int,PSt .l .p) upd :: Int (Int,PSt .l) -> (Int,PSt .l)
upd dx (count,pst) upd dx (count,pst)
# count = count+dx # count = count+dx
= (count,appPIO (setControlTexts [(displayId,toString count)]) pst) = (count,appPIO (setControlText displayId (toString count)) pst)
...@@ -11,7 +11,7 @@ definition module Help ...@@ -11,7 +11,7 @@ definition module Help
from StdString import String from StdString import String
from StdPSt import PSt, IOSt from StdPSt import PSt, IOSt
showAbout :: String String (PSt .l .p) -> PSt .l .p showAbout :: String String (PSt .l) -> PSt .l
/* showAbout opens a window: /* showAbout opens a window:
- it has the title of the application name (argument 1), - it has the title of the application name (argument 1),
- it displays the about information of the application (found in the helpfile, argument 2), - it displays the about information of the application (found in the helpfile, argument 2),
...@@ -20,7 +20,7 @@ showAbout :: String String (PSt .l .p) -> PSt .l .p ...@@ -20,7 +20,7 @@ showAbout :: String String (PSt .l .p) -> PSt .l .p
*/ */
showHelp :: String (PSt .l .p) -> PSt .l .p showHelp :: String (PSt .l) -> PSt .l
/* showHelp opens a SDI process that displays the help information found in the helpfile /* showHelp opens a SDI process that displays the help information found in the helpfile
(argument 1). (argument 1).
*/ */
...@@ -53,7 +53,7 @@ fopen2 fileName mode files ...@@ -53,7 +53,7 @@ fopen2 fileName mode files
- it has an Ok button that closes this window, - it has an Ok button that closes this window,
- it has a Help button that displays the help information (see showHelp). - it has a Help button that displays the help information (see showHelp).
*/ */
showAbout :: String String (PSt .l .p) -> PSt .l .p showAbout :: String String (PSt .l) -> PSt .l
showAbout appname helpfile pState showAbout appname helpfile pState
# (okId, pState) = accPIO openId pState # (okId, pState) = accPIO openId pState
# (fonts,pState) = accPIO (accScreenPicture infoFonts) pState # (fonts,pState) = accPIO (accScreenPicture infoFonts) pState
...@@ -74,7 +74,7 @@ showAbout appname helpfile pState ...@@ -74,7 +74,7 @@ showAbout appname helpfile pState
/* showHelp opens a SDI process that displays the help information found in the helpfile. /* showHelp opens a SDI process that displays the help information found in the helpfile.
*/ */
showHelp :: String (PSt .l .p) -> PSt .l .p showHelp :: String (PSt .l) -> PSt .l
showHelp helpfile pState showHelp helpfile pState
# (fonts,pState) = accPIO (accScreenPicture infoFonts) pState # (fonts,pState) = accPIO (accScreenPicture infoFonts) pState
# ((size,text),pState) = readInfo Help fonts HelpBegin HelpEnd helpfile pState # ((size,text),pState) = readInfo Help fonts HelpBegin HelpEnd helpfile pState
...@@ -87,7 +87,7 @@ showHelp helpfile pState ...@@ -87,7 +87,7 @@ showHelp helpfile pState
, WindowClose (noLS closeProcess) , WindowClose (noLS closeProcess)
, WindowViewDomain {zero & corner2={x=size.w,y=size.h}} , WindowViewDomain {zero & corner2={x=size.w,y=size.h}}
] ]
= openProcesses (ProcessGroup NoState (Process SDI NoState (snd o openWindow undef window) [ProcessClose closeProcess])) pState = openProcesses (Process SDI NoState (snd o openWindow undef window) [ProcessClose closeProcess]) pState
where where
hscroll curViewFrame {sliderThumb} move hscroll curViewFrame {sliderThumb} move
= case move of = case move of
...@@ -133,7 +133,7 @@ where ...@@ -133,7 +133,7 @@ where
// Determine the line height and leading of a given font: // Determine the line height and leading of a given font:
getFontHeightAndAscent :: Fonts (PSt .l .p) -> (((Int,Int),(Int,Int)),PSt .l .p) getFontHeightAndAscent :: Fonts (PSt .l) -> (((Int,Int),(Int,Int)),PSt .l)
getFontHeightAndAscent fonts pState getFontHeightAndAscent fonts pState
# ((normal,large),pState) = accPIO (accScreenPicture (getmetrics fonts)) pState # ((normal,large),pState) = accPIO (accScreenPicture (getmetrics fonts)) pState
= (((fontLineHeight normal,normal.fAscent), (fontLineHeight large,large.fAscent)),pState) = (((fontLineHeight normal,normal.fAscent), (fontLineHeight large,large.fAscent)),pState)
...@@ -147,7 +147,7 @@ where ...@@ -147,7 +147,7 @@ where
// Reading and pre-processing of the file containing the about- and help-info. */ // Reading and pre-processing of the file containing the about- and help-info. */
readInfo :: Bool Fonts String String String (PSt .l .p) -> ((Size,[InfoLine]),PSt .l .p) readInfo :: Bool Fonts String String String (PSt .l) -> ((Size,[InfoLine]),PSt .l)
readInfo help fonts begin end filename pState readInfo help fonts begin end filename pState
# (metrics, pState) = getFontHeightAndAscent fonts pState # (metrics, pState) = getFontHeightAndAscent fonts pState
# ((succes,file),pState) = accFiles (fopen2 (applicationpath filename) FReadText) pState # ((succes,file),pState) = accFiles (fopen2 (applicationpath filename) FReadText) pState
...@@ -166,14 +166,14 @@ readInfo help fonts begin end filename pState ...@@ -166,14 +166,14 @@ readInfo help fonts begin end filename pState
where where
errpref = "The help file \'"+++filename+++"\' " errpref = "The help file \'"+++filename+++"\' "
processInfoStrings :: Fonts ((Int,Int),(Int,Int)) [String] (PSt .l .p) -> (InfoDef,PSt .l .p) processInfoStrings :: Fonts ((Int,Int),(Int,Int)) [String] (PSt .l) -> (InfoDef,PSt .l)
processInfoStrings fonts ((normalHeight,normalAscent),(largeHeight,largeAscent)) lines pState processInfoStrings fonts ((normalHeight,normalAscent),(largeHeight,largeAscent)) lines pState
# ((size,lines),pState) = addFontToInfoLines fonts (normalHeight,largeHeight) 0 (Margin+largeAscent) lines pState # ((size,lines),pState) = addFontToInfoLines fonts (normalHeight,largeHeight) 0 (Margin+largeAscent) lines pState
width = Margin+size.w+Margin width = Margin+size.w+Margin
# (lines,pState) = seqList (map (centerInfoLine fonts.normal width) lines) pState # (lines,pState) = seqList (map (centerInfoLine fonts.normal width) lines) pState
= (({w=width,h=size.h+Margin-largeAscent},lines),pState) = (({w=width,h=size.h+Margin-largeAscent},lines),pState)
where where
addFontToInfoLines :: Fonts Heights Int Int [String] (PSt .l .p) -> (InfoDef,PSt .l .p) addFontToInfoLines :: Fonts Heights Int Int [String] (PSt .l) -> (InfoDef,PSt .l)
addFontToInfoLines fonts heights maxx maxy [line:rest] pState addFontToInfoLines fonts heights maxx maxy [line:rest] pState
# ((font,wid,hgt,line),pState) = parseInfoLine fonts heights line pState # ((font,wid,hgt,line),pState) = parseInfoLine fonts heights line pState
# ((size,rest), pState) = addFontToInfoLines fonts heights (max maxx wid) (maxy+hgt) rest pState # ((size,rest), pState) = addFontToInfoLines fonts heights (max maxx wid) (maxy+hgt) rest pState
...@@ -183,7 +183,7 @@ where ...@@ -183,7 +183,7 @@ where
If line == '\{L,b,B,c,C,d,D}'+++line1 then a special font is used, otherwise the default font is used. If line == '\{L,b,B,c,C,d,D}'+++line1 then a special font is used, otherwise the default font is used.
parseInfoLine also calculates the width and height of the line. parseInfoLine also calculates the width and height of the line.
*/ */
parseInfoLine :: Fonts Heights String (PSt .l .p) -> ((InfoFontDef,Int,Int,String),PSt .l .p) parseInfoLine :: Fonts Heights String (PSt .l) -> ((InfoFontDef,Int,Int,String),PSt .l)
parseInfoLine fonts=:{normal,large,bold,large_bold} heights=:(nhgt,lhgt) line pState parseInfoLine fonts=:{normal,large,bold,large_bold} heights=:(nhgt,lhgt) line pState
# linelen = size line # linelen = size line
| linelen<2 || line.[0]<>'\\' | linelen<2 || line.[0]<>'\\'
...@@ -205,7 +205,7 @@ where ...@@ -205,7 +205,7 @@ where
addFontToInfoLines _ _ maxx maxy _ pState addFontToInfoLines _ _ maxx maxy _ pState
= (({w=maxx,h=maxy},[]),pState) = (({w=maxx,h=maxy},[]),pState)
centerInfoLine :: Font Int InfoLine (PSt .l .p) -> (InfoLine,PSt .l .p) centerInfoLine :: Font Int InfoLine (PSt .l) -> (InfoLine,PSt .l)
centerInfoLine nft maxx info=:(inft=:NoFont centered,x,y,line) pState centerInfoLine nft maxx info=:(inft=:NoFont centered,x,y,line) pState
| not centered | not centered
= (info,pState) = (info,pState)
......
...@@ -20,17 +20,17 @@ from StdId import Id ...@@ -20,17 +20,17 @@ from StdId import Id
, score :: !Int , score :: !Int
} }
readHiScores :: !String !*Files -> (!(!*File,!HiScores),!*Files) readHiScores :: !String !*Files -> (!(!*File,!HiScores),!*Files)
// Reads high score file from disk. // Reads high score file from disk.
writeHiScores :: !*File !HiScores !*Files -> *Files writeHiScores :: !*File !HiScores !*Files -> *Files
// Writes high scores to disk. // Writes high scores to disk.
itsAHighScore :: !Int !Int !HiScores -> Bool itsAHighScore :: !Int !Int !HiScores -> Bool
// Determines whether, given the number of high scores, a given score is actually a new high score. // Determines whether, given the number of high scores, a given score is actually a new high score.
addScore :: !Int !HiScore !HiScores -> HiScores addScore :: !Int !HiScore !HiScores -> HiScores
// Add, given the number of high scores, a HiScore to the current list of high scores. // Add, given the number of high scores, a HiScore to the current list of high scores.
showHiScores :: String !HiScores !(PSt .l .p) -> PSt .l .p showHiScores :: String !HiScores !(PSt .l) -> PSt .l
// Display current high scores to user in a modal dialog with given Id. // Display current high scores to user in a modal dialog with given Id.
...@@ -91,7 +91,7 @@ where ...@@ -91,7 +91,7 @@ where
// Display high scores in a modal dialog to the user: // Display high scores in a modal dialog to the user:
showHiScores :: String !HiScores !(PSt .l .p) -> PSt .l .p showHiScores :: String !HiScores !(PSt .l) -> PSt .l
showHiScores header highs pState=:{io} showHiScores header highs pState=:{io}
# (okId,io) = openId io # (okId,io) = openId io
# (wId, io) = openId io # (wId, io) = openId io
......
...@@ -40,13 +40,13 @@ instance Controls ListBoxControl ...@@ -40,13 +40,13 @@ instance Controls ListBoxControl
openListBoxId :: !*env -> (!ListBoxId,!*env) | Ids env openListBoxId :: !*env -> (!ListBoxId,!*env) | Ids env
getListBoxSelection :: !ListBoxId !(PSt .l .p) -> (!(!Bool,![(String,!Index)]),!PSt .l .p) getListBoxSelection :: !ListBoxId !(PSt .l) -> (!(!Bool,![(String,!Index)]),!PSt .l)
setListBoxSelection :: !ListBoxId ![Index] !(PSt .l .p) -> PSt .l .p setListBoxSelection :: !ListBoxId ![Index] !(PSt .l) -> PSt .l
getListBoxItems :: !ListBoxId !(PSt .l .p) -> (!(!Bool,![String]),!PSt .l .p) getListBoxItems :: !ListBoxId !(PSt .l) -> (!(!Bool,![String]),!PSt .l)
openListBoxItems :: !ListBoxId !Index ![String] !(PSt .l .p) -> PSt .l .p openListBoxItems :: !ListBoxId !Index ![String] !(PSt .l) -> PSt .l
closeListBoxItems :: !ListBoxId ![Index] !(PSt .l .p) -> PSt .l .p closeListBoxItems :: !ListBoxId ![Index] !(PSt .l) -> PSt .l
showListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p showListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
hideListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p hideListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
enableListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p enableListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
disableListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p disableListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
...@@ -87,7 +87,7 @@ where ...@@ -87,7 +87,7 @@ where
isListBoxControlAttribute _ = False isListBoxControlAttribute _ = False
instance Controls ListBoxControl where instance Controls ListBoxControl where
controlToHandles :: !(ListBoxControl .ls (PSt .l .p)) (PSt .l .p) -> ([ControlState .ls (PSt .l .p)],PSt .l .p) controlToHandles :: !(ListBoxControl .ls (PSt .l)) (PSt .l) -> ([ControlState .ls (PSt .l)],PSt .l)
controlToHandles {listboxState=listboxState=:{items,size,listboxId,fontInfo},listboxAtts} pst controlToHandles {listboxState=listboxState=:{items,size,listboxId,fontInfo},listboxAtts} pst
= controlToHandles imp pst = controlToHandles imp pst
where where
...@@ -198,7 +198,7 @@ instance Controls ListBoxControl where ...@@ -198,7 +198,7 @@ instance Controls ListBoxControl where
mouseFilter _ = False mouseFilter _ = False
// The mouse either sets, adds, or removes items to the selection: // The mouse either sets, adds, or removes items to the selection:
mouse :: (IdFun *(.x,PSt .l .p)) MouseState *(*(ListBoxState,.x),PSt .l .p) -> *(*(ListBoxState,.x),PSt .l .p) mouse :: (IdFun *(.x,PSt .l)) MouseState *(*(ListBoxState,.x),PSt .l) -> *(*(ListBoxState,.x),PSt .l)
mouse f (MouseDown pos {shiftDown} _) ((listboxState,ls),pState) mouse f (MouseDown pos {shiftDown} _) ((listboxState,ls),pState)
# listboxState = {listboxState & selection=okSelection} # listboxState = {listboxState & selection=okSelection}
# newLook = customlook listboxState # newLook = customlook listboxState
...@@ -220,7 +220,7 @@ instance Controls ListBoxControl where ...@@ -220,7 +220,7 @@ instance Controls ListBoxControl where
// The receiver function: // The receiver function:
receiver :: MessageIn *(*(ListBoxState,.x),PSt .l .p) -> (MessageOut,*(*(ListBoxState,.x),PSt .l .p)) receiver :: MessageIn *(*(ListBoxState,.x),PSt .l) -> (MessageOut,*(*(ListBoxState,.x),PSt .l))
// Return the current selection: // Return the current selection:
receiver InGetSelection ((listboxState=:{items,selection},ls),pState) receiver InGetSelection ((listboxState=:{items,selection},ls),pState)
...@@ -290,7 +290,7 @@ openListBoxId env ...@@ -290,7 +290,7 @@ openListBoxId env
// The functions below take care of the proper communication with the receiver that // The functions below take care of the proper communication with the receiver that
// belongs to the listbox control. // belongs to the listbox control.
getListBoxSelection :: !ListBoxId !(PSt .l .p) -> (!(!Bool,![(String,!Index)]),!PSt .l .p) getListBoxSelection :: !ListBoxId !(PSt .l) -> (!(!Bool,![(String,!Index)]),!PSt .l)
getListBoxSelection {r2Id} pState getListBoxSelection {r2Id} pState
# ((_,maybe_out),pState) = syncSend2 r2Id InGetSelection pState # ((_,maybe_out),pState) = syncSend2 r2Id InGetSelection pState
| isNothing maybe_out | isNothing maybe_out
...@@ -301,11 +301,11 @@ getListBoxSelection {r2Id} pState ...@@ -301,11 +301,11 @@ getListBoxSelection {r2Id} pState
| otherwise | otherwise
= (result,pState) = (result,pState)
setListBoxSelection :: !ListBoxId ![Index] !(PSt .l .p) -> PSt .l .p setListBoxSelection :: !ListBoxId ![Index] !(PSt .l) -> PSt .l
setListBoxSelection {r2Id} selection pState setListBoxSelection {r2Id} selection pState
= snd (syncSend2 r2Id (InSetSelection selection) pState) = snd (syncSend2 r2Id (InSetSelection selection) pState)
getListBoxItems :: !ListBoxId !(PSt .l .p) -> (!(!Bool,![String]),!PSt .l .p) getListBoxItems :: !ListBoxId !(PSt .l) -> (!(!Bool,![String]),!PSt .l)
getListBoxItems {r2Id} pState getListBoxItems {r2Id} pState
# ((_,maybe_out),pState) = syncSend2 r2Id InGetItems pState # ((_,maybe_out),pState) = syncSend2 r2Id InGetItems pState
| isNothing maybe_out | isNothing maybe_out
...@@ -316,24 +316,24 @@ getListBoxItems {r2Id} pState ...@@ -316,24 +316,24 @@ getListBoxItems {r2Id} pState
| otherwise | otherwise
= (result,pState) = (result,pState)
openListBoxItems :: !ListBoxId !Index ![String] !(PSt .l .p) -> PSt .l .p openListBoxItems :: !ListBoxId !Index ![String] !(PSt .l) -> PSt .l
openListBoxItems {r2Id} index items pState openListBoxItems {r2Id} index items pState
= snd (syncSend2 r2Id (InOpenItems index items) pState) = snd (syncSend2 r2Id (InOpenItems index items) pState)
closeListBoxItems :: !ListBoxId ![Index] !(PSt .l .p) -> PSt .l .p closeListBoxItems :: !ListBoxId ![Index] !(PSt .l) -> PSt .l
closeListBoxItems {r2Id} items pState closeListBoxItems {r2Id} items pState
= snd (syncSend2 r2Id (InCloseItems items) pState) = snd (syncSend2 r2Id (InCloseItems items) pState)
showListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p showListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
showListBoxControl {outerCompoundId} ioState = showControls [outerCompoundId] ioState showListBoxControl {outerCompoundId} ioState = showControls [outerCompoundId] ioState
hideListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p hideListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
hideListBoxControl {outerCompoundId} ioState = hideControls [outerCompoundId] ioState hideListBoxControl {outerCompoundId} ioState = hideControls [outerCompoundId] ioState
enableListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p enableListBoxControl :: !ListBoxId !(IOSt .l) -> IOSt .l
enableListBoxControl {outerCompoundId} ioState = enableControls [outerCompoundId] ioState enableListBoxControl {outerCompoundId} ioState = enableControls [outerCompoundId] ioState
disableListBoxControl :: !ListBoxId !(IOSt .l .p) -> IOSt .l .p