colorpickcontrol.dcl 1.18 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1 2 3 4 5
definition module colorpickcontrol

import StdControl, StdControlClass, StdReceiver, StdId

:: In l
6
	= InGet ((Maybe Colour) l -> l)
Diederik van Arkel's avatar
Diederik van Arkel committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
	| InSetI Id
	| InSetC Colour
	| InSetC` Colour

::	RGBId l	:==	RId (In l)

openRGBId :: !*env -> (!RGBId .l,!*env) | Ids env

::	RGBColourPickControl ls ps
	= RGBColourPickControl (RGBId ps) Colour (Maybe ItemPos)

instance Controls RGBColourPickControl

::	RGBColourPickControl` ls ps
	= RGBColourPickControl` (RGBId ps) Colour Id (Maybe ItemPos)

instance Controls RGBColourPickControl`

:: ColourBoxControl ls ps
	= ColourBoxControl RGBColour Id (Maybe ItemPos)

instance Controls ColourBoxControl

SetColourBox :: Id RGBColour !*(IOSt .l) -> *IOSt .l

:: ColourBoxControl` ls ps
	= ColourBoxControl` RGBColour Id (MouseStateFilter,MouseFunction *(ls,ps)) (Maybe ItemPos)

instance Controls ColourBoxControl`

SetColourBox` :: Id RGBColour !*(IOSt .l) -> *IOSt .l

setColourBoxColour	:: !(RGBId (PSt .l)) Colour !*(PSt .l) -> *PSt .l
setColourBoxColour`	:: !(RGBId (PSt .l)) Colour !*(PSt .l) -> *PSt .l
41
getColourBoxColour	:: !(RGBId (PSt .l`)) ((Maybe Colour) *(PSt .l`) -> PSt .l`) !*(PSt .l) -> *PSt .l
Diederik van Arkel's avatar
Diederik van Arkel committed
42
setColourBoxId		:: !(RGBId (PSt .l)) Id !*(PSt .l) -> *PSt .l