ParentContentsIndex
Graphics.UI.ObjectIO.StdIOCommon
Portability portable
Stability provisional
Maintainer ka2_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
Instances
Toggle SelectState
data MarkState
MarkState is similar to Bool but it shows whether the CheckControl is marked.
Constructors
Mark
NoMark
Instances
Toggle MarkState
enabled :: SelectState -> Bool
marked :: MarkState -> Bool
data KeyboardState
KeyboardState is passed to keyboard handler for every keyboard event.
Constructors
CharKey Char KeyState ASCII character input
SpecialKey SpecialKey KeyState Modifiers Special key input
KeyLost Key input lost while key was down
data KeyState
The KeyState type
Constructors
KeyDown IsRepeatKey Key is down
KeyUp Key goes up
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 Modifiers Mouse is up (position,modifiers)
MouseDown Point2 Modifiers Int Mouse goes down (and nr down)
MouseDrag Point2 Modifiers Mouse is down (position,modifiers)
MouseUp Point2 Modifiers Mouse goes up (position,modifiers)
MouseLost Mouse input lost while mouse was down
data ButtonState
The ButtonState type.
Constructors
ButtonStillUp MouseMove
ButtonDown MouseDown _ _ 1
ButtonDoubleDown _ _ 2
ButtonTripleDown _ _ >2
ButtonStillDown MouseDrag
ButtonUp MouseUp/MouseLost
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
data UpdateState
Constructors
UpdateState
oldFrame :: !ViewFrame
newFrame :: !ViewFrame
updArea :: !UpdateArea
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 :: !Bool True iff shift down
optionDown :: !Bool True iff option down
commandDown :: !Bool True iff command down
controlDown :: !Bool True iff control down
altDown :: !Bool True iff alt down
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
type ItemOffset = Vector2
data Direction
Constructors
Horizontal
Vertical
data CursorShape
Constructors
StandardCursor
BusyCursor
IBeamCursor
CrossCursor
FatCrossCursor
ArrowCursor
HiddenCursor
data DocumentInterface
The document interface type of interactive processes.
Constructors
NDI No document interface
SDI Single document interface
MDI Multiple document interface
data SliderMove
Constructors
SliderIncSmall
SliderDecSmall
SliderIncLarge
SliderDecLarge
SliderThumb Int
data ErrorReport
Common error report type.
Constructors
ErrorViolateDI Violation against DocumentInterface
ErrorIdsInUse Object contains Ids that are bound
ErrorUnknownObject Object can not be found
ErrorNotifierOpen It was tried to open a second send notifier
ErrorUnableReceiver Sending to receiver that exists, but its ReceiverSelectState is Unable.
OtherError !String Some other kind of error
Instances
Typeable ErrorReport
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
Instances
Eq (R2Id mess resp)
data RId mess
Instances
Eq (RId mess)
rIdtoId :: RId mess -> Id
r2IdtoId :: R2Id mess resp -> Id
Produced by Haddock version 0.3