Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Generic editor-viewport functionality.
Synopsis
- class FixedFontViewer a c | a -> c where
- setViewSize :: a -> (Int, Int) -> a
- getViewSize :: a -> (Int, Int)
- getVisible :: a -> [[c]]
- type ViewerAction c = forall a. FixedFontViewer a c => a -> a
- viewerResizeAction :: (Int, Int) -> ViewerAction c
Documentation
class FixedFontViewer a c | a -> c where Source #
Generic editor viewport for fixed-width fonts.
setViewSize :: a -> (Int, Int) -> a Source #
Sets the (width,height) size of the viewport. A width < 0 must disable line wrapping, and a height < 0 must disable vertical bounding.
getViewSize :: a -> (Int, Int) Source #
Gets the (width,height) size of the viewport.
getVisible :: a -> [[c]] Source #
Gets the visible lines in the viewport. This does not need to completely fill the viewport area, but it must not exceed it.
Instances
FixedFontViewer (EditingDocument c) c Source # | |
Defined in WEditor.Document setViewSize :: EditingDocument c -> (Int, Int) -> EditingDocument c Source # getViewSize :: EditingDocument c -> (Int, Int) Source # getVisible :: EditingDocument c -> [[c]] Source # |
type ViewerAction c = forall a. FixedFontViewer a c => a -> a Source #
Any action that updates a FixedFontViewer
.
viewerResizeAction :: (Int, Int) -> ViewerAction c Source #
Action to resize the viewport.