Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Command
- type CommandConfig = [(Command, [(Key, Maybe Modifiers)])]
- defaultCommandConfig :: CommandConfig
- data ViewState = ViewState {
- viewStateCommands :: !(Map Command [(Key, Maybe Modifiers)])
- viewStateScaleStep :: !Float
- viewStateRotateFactor :: !Float
- viewStateScaleFactor :: !Float
- viewStateTranslateMark :: !(Maybe (Float, Float))
- viewStateRotateMark :: !(Maybe (Float, Float))
- viewStateScaleMark :: !(Maybe (Float, Float))
- viewStateViewPort :: ViewPort
- viewStateInit :: ViewState
- viewStateInitWithConfig :: CommandConfig -> ViewState
- updateViewStateWithEvent :: Event -> ViewState -> ViewState
- updateViewStateWithEventMaybe :: Event -> ViewState -> Maybe ViewState
Documentation
The commands suported by the view controller.
CRestore | |
CTranslate | |
CRotate | |
CScale | |
CBumpZoomOut | |
CBumpZoomIn | |
CBumpLeft | |
CBumpRight | |
CBumpUp | |
CBumpDown | |
CBumpClockwise | |
CBumpCClockwise |
defaultCommandConfig :: CommandConfig Source #
The default commands. Left click pans, wheel zooms, right click rotates, "r" key resets.
State for controlling the viewport. These are used by the viewport control component.
ViewState | |
|
viewStateInit :: ViewState Source #
The initial view state.
viewStateInitWithConfig :: CommandConfig -> ViewState Source #
Initial view state, with user defined config.
updateViewStateWithEventMaybe :: Event -> ViewState -> Maybe ViewState Source #
Like updateViewStateWithEvent
, but returns Nothing
if no update
was needed.