ContentsIndex
Graphics.UI.ObjectIO.StdIOCommon
Portabilityportable
Stabilityprovisional
Maintainerka2_mail@yahoo.com
Description
StdIOCommon defines common types and access functions for the I/O library.
Synopsis
data SelectState
= Able
| Unable
data MarkState
= Mark
| NoMark
enabled :: SelectState -> Bool
marked :: MarkState -> Bool
data KeyboardState
= CharKey Char KeyState
| SpecialKey SpecialKey KeyState Modifiers
| KeyLost
data KeyState
= KeyDown IsRepeatKey
| KeyUp
type IsRepeatKey = Bool
data Key
= IsCharKey Char
| IsSpecialKey SpecialKey
type KeyboardStateFilter = KeyboardState -> Bool
getKeyboardStateKeyState :: KeyboardState -> KeyState
getKeyboardStateKey :: KeyboardState -> Maybe Key
data MouseState
= MouseMove Point2 Modifiers
| MouseDown Point2 Modifiers Int
| MouseDrag Point2 Modifiers
| MouseUp Point2 Modifiers
| MouseLost
data ButtonState
= ButtonStillUp
| ButtonDown
| ButtonDoubleDown
| ButtonTripleDown
| ButtonStillDown
| ButtonUp
type MouseStateFilter = MouseState -> Bool
getMouseStatePos :: MouseState -> Point2
getMouseStateModifiers :: MouseState -> Modifiers
getMouseStateButtonState :: MouseState -> ButtonState
data SliderState = SliderState {
sliderMin :: !Int
sliderMax :: !Int
sliderThumb :: !Int
}
data UpdateState = UpdateState {
oldFrame :: !ViewFrame
newFrame :: !ViewFrame
updArea :: !UpdateArea
}
type ViewDomain = Rectangle
type ViewFrame = Rectangle
type UpdateArea = [ViewFrame]
rectangleToUpdateState :: Rectangle -> UpdateState
viewDomainRange :: ViewDomain
viewFrameRange :: ViewFrame
data Modifiers = Modifiers {
shiftDown :: !Bool
optionDown :: !Bool
commandDown :: !Bool
controlDown :: !Bool
altDown :: !Bool
}
type ItemPos = (ItemLoc, ItemOffset)
data ItemLoc
= Fix
| LeftTop
| RightTop
| LeftBottom
| RightBottom
| Left
| Center
| Right
| LeftOf Id
| RightTo Id
| Above Id
| Below Id
| LeftOfPrev
| RightToPrev
| AbovePrev
| BelowPrev
type ItemOffset = Vector2
data Direction
= Horizontal
| Vertical
data CursorShape
= StandardCursor
| BusyCursor
| IBeamCursor
| CrossCursor
| FatCrossCursor
| ArrowCursor
| HiddenCursor
data DocumentInterface
= NDI
| SDI
| MDI
data SliderMove
= SliderIncSmall
| SliderDecSmall
| SliderIncLarge
| SliderDecLarge
| SliderThumb Int
data ErrorReport
= ErrorViolateDI
| ErrorIdsInUse
| ErrorUnknownObject
| ErrorNotifierOpen
| ErrorUnableReceiver
| OtherError !String
handleErrorReport :: Monad m => ErrorReport -> m a
module Graphics.UI.ObjectIO.StdIOBasic
module Graphics.UI.ObjectIO.StdKey
module Data.Maybe
type Id = Unique
data R2Id mess resp
data RId mess
rIdtoId :: RId mess -> Id
r2IdtoId :: R2Id mess resp -> Id
Documentation
data SelectState
SelectState is similar to Bool but it shows whether an object is enabled or disabled.
Constructors
Able
Unable
show/hide Instances
data MarkState
MarkState is similar to Bool but it shows whether the CheckControl is marked.
Constructors
Mark
NoMark
show/hide Instances
enabled :: SelectState -> Bool
marked :: MarkState -> Bool
data KeyboardState
KeyboardState is passed to keyboard handler for every keyboard event.
Constructors
CharKey Char KeyStateASCII character input
SpecialKey SpecialKey KeyState ModifiersSpecial key input
KeyLostKey input lost while key was down
show/hide Instances
data KeyState
The KeyState type
Constructors
KeyDown IsRepeatKeyKey is down
KeyUpKey goes up
show/hide Instances
type IsRepeatKey = Bool
Flag on key down (True iff key is repeating)
data Key
Constructors
IsCharKey Char
IsSpecialKey SpecialKey
type KeyboardStateFilter = KeyboardState -> Bool
Predicate on KeyboardState
getKeyboardStateKeyState :: KeyboardState -> KeyState
getKeyboardStateKeyState gets KeyState from KeyboardState (KeyUp if KeyboardState is KeyLost)
getKeyboardStateKey :: KeyboardState -> Maybe Key
getKeyboardStateKey gets Key value from KeyboardState (Nothing if KeyboardState is KeyLost)
data MouseState
The MouseState type.
Constructors
MouseMove Point2 ModifiersMouse is up (position,modifiers)
MouseDown Point2 Modifiers IntMouse goes down (and nr down)
MouseDrag Point2 ModifiersMouse is down (position,modifiers)
MouseUp Point2 ModifiersMouse goes up (position,modifiers)
MouseLostMouse input lost while mouse was down
show/hide Instances
data ButtonState
The ButtonState type.
Constructors
ButtonStillUpMouseMove
ButtonDownMouseDown _ _ 1
ButtonDoubleDown_ _ 2
ButtonTripleDown_ _ >2
ButtonStillDownMouseDrag
ButtonUpMouseUp/MouseLost
show/hide Instances
type MouseStateFilter = MouseState -> Bool
Predicate on MouseState
getMouseStatePos :: MouseState -> Point2
getMouseStateModifiers :: MouseState -> Modifiers
getMouseStateButtonState :: MouseState -> ButtonState
data SliderState
Constructors
SliderState
sliderMin :: !Int
sliderMax :: !Int
sliderThumb :: !Int
show/hide Instances
data UpdateState
Constructors
UpdateState
oldFrame :: !ViewFrame
newFrame :: !ViewFrame
updArea :: !UpdateArea
show/hide Instances
type ViewDomain = Rectangle
ViewDomain is the Rectangle, which specifies the logical drawing area of the CompoundControl or Window.
type ViewFrame = Rectangle
ViewFrame is the current visible Rectangle of CompoundControl or Window. When there are horizontal and vertical scroll bars then the changing of the scroller thumb will change the ViewFrame.
type UpdateArea = [ViewFrame]
rectangleToUpdateState :: Rectangle -> UpdateState
viewDomainRange :: ViewDomain
viewDomainRange defines the minimum and maximum values for ViewDomains
viewFrameRange :: ViewFrame
viewFrameRange defines the minimum and maximum values for ViewFrames.
data Modifiers
Modifiers indicates the meta keys that have been pressed (True) or not (False).
Constructors
Modifiers
shiftDown :: !BoolTrue iff shift down
optionDown :: !BoolTrue iff option down
commandDown :: !BoolTrue iff command down
controlDown :: !BoolTrue iff control down
altDown :: !BoolTrue iff alt down
show/hide Instances
type ItemPos = (ItemLoc, ItemOffset)
The layout language used for windows and controls. -}
data ItemLoc
Constructors
Fix
LeftTop
RightTop
LeftBottom
RightBottom
Left
Center
Right
LeftOf Id
RightTo Id
Above Id
Below Id
LeftOfPrev
RightToPrev
AbovePrev
BelowPrev
show/hide Instances
type ItemOffset = Vector2
data Direction
Constructors
Horizontal
Vertical
show/hide Instances
data CursorShape
Constructors
StandardCursor
BusyCursor
IBeamCursor
CrossCursor
FatCrossCursor
ArrowCursor
HiddenCursor
show/hide Instances
data DocumentInterface
The document interface type of interactive processes.
Constructors
NDINo document interface
SDISingle document interface
MDIMultiple document interface
show/hide Instances
data SliderMove
Constructors
SliderIncSmall
SliderDecSmall
SliderIncLarge
SliderDecLarge
SliderThumb Int
show/hide Instances
data ErrorReport
Common error report type.
Constructors
ErrorViolateDIViolation against DocumentInterface
ErrorIdsInUseObject contains Ids that are bound
ErrorUnknownObjectObject can not be found
ErrorNotifierOpenIt was tried to open a second send notifier
ErrorUnableReceiverSending to receiver that exists, but its ReceiverSelectState is Unable.
OtherError !StringSome other kind of error
show/hide Instances
handleErrorReport :: Monad m => ErrorReport -> m a
module Graphics.UI.ObjectIO.StdIOBasic
module Graphics.UI.ObjectIO.StdKey
module Data.Maybe
type Id = Unique
data R2Id mess resp
show/hide Instances
Eq (R2Id mess resp)
data RId mess
show/hide Instances
Eq (RId mess)
rIdtoId :: RId mess -> Id
r2IdtoId :: R2Id mess resp -> Id
Produced by Haddock version 0.7