Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Gutter object for [classview
].
The GtkSourceGutter
object represents the left or right gutter of the text
view. It is used by [classview
] to draw the line numbers and
[classmark
]s that might be present on a line. By packing
additional [classgutterRenderer
] objects in the gutter, you can extend the
gutter with your own custom drawings.
To get a GtkSourceGutter
, use the [methodview
.get_gutter] function.
The gutter works very much the same way as cells rendered in a TreeView
.
The concept is similar, with the exception that the gutter does not have an
underlying TreeModel
. The builtin line number renderer is at position
ViewGutterPositionLines
(-30) and the marks renderer is at
ViewGutterPositionMarks
(-20). The gutter sorts the renderers
in ascending order, from left to right. So the marks are displayed on the
right of the line numbers.
Synopsis
- newtype Gutter = Gutter (ManagedPtr Gutter)
- class (GObject o, IsDescendantOf Gutter o) => IsGutter o
- toGutter :: (MonadIO m, IsGutter o) => o -> m Gutter
- gutterGetView :: (HasCallStack, MonadIO m, IsGutter a) => a -> m View
- gutterInsert :: (HasCallStack, MonadIO m, IsGutter a, IsGutterRenderer b) => a -> b -> Int32 -> m Bool
- gutterRemove :: (HasCallStack, MonadIO m, IsGutter a, IsGutterRenderer b) => a -> b -> m ()
- gutterReorder :: (HasCallStack, MonadIO m, IsGutter a, IsGutterRenderer b) => a -> b -> Int32 -> m ()
- constructGutterView :: (IsGutter o, MonadIO m, IsView a) => a -> m (GValueConstruct o)
- getGutterView :: (MonadIO m, IsGutter o) => o -> m View
- constructGutterWindowType :: (IsGutter o, MonadIO m) => TextWindowType -> m (GValueConstruct o)
- getGutterWindowType :: (MonadIO m, IsGutter o) => o -> m TextWindowType
Exported types
Memory-managed wrapper type.
Instances
Eq Gutter Source # | |
GObject Gutter Source # | |
Defined in GI.GtkSource.Objects.Gutter | |
ManagedPtrNewtype Gutter Source # | |
Defined in GI.GtkSource.Objects.Gutter toManagedPtr :: Gutter -> ManagedPtr Gutter | |
TypedObject Gutter Source # | |
Defined in GI.GtkSource.Objects.Gutter | |
HasParentTypes Gutter Source # | |
Defined in GI.GtkSource.Objects.Gutter | |
IsGValue (Maybe Gutter) Source # | Convert |
Defined in GI.GtkSource.Objects.Gutter gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Gutter -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Gutter) | |
type ParentTypes Gutter Source # | |
Defined in GI.GtkSource.Objects.Gutter type ParentTypes Gutter = '[Widget, Object, Accessible, Buildable, ConstraintTarget] |
class (GObject o, IsDescendantOf Gutter o) => IsGutter o Source #
Instances
(GObject o, IsDescendantOf Gutter o) => IsGutter o Source # | |
Defined in GI.GtkSource.Objects.Gutter |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insert, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, reorder, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getView, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getView
:: (HasCallStack, MonadIO m, IsGutter a) | |
=> a |
|
-> m View | Returns: the associated |
No description available in the introspection data.
insert
:: (HasCallStack, MonadIO m, IsGutter a, IsGutterRenderer b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m Bool |
Insert renderer
into the gutter. If renderer
is yet unowned then gutter
claims its ownership. Otherwise just increases renderer's reference count.
renderer
cannot be already inserted to another gutter.
remove
gutterRemove :: (HasCallStack, MonadIO m, IsGutter a, IsGutterRenderer b) => a -> b -> m () Source #
No description available in the introspection data.
reorder
:: (HasCallStack, MonadIO m, IsGutter a, IsGutterRenderer b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
Reorders renderer
in gutter
to new position
.
Properties
view
The View
of the gutter.
constructGutterView :: (IsGutter o, MonadIO m, IsView a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “view
” property. This is rarely needed directly, but it is used by new
.
getGutterView :: (MonadIO m, IsGutter o) => o -> m View Source #
Get the value of the “view
” property.
When overloading is enabled, this is equivalent to
get
gutter #view
windowType
The text window type on which the window is placed.
constructGutterWindowType :: (IsGutter o, MonadIO m) => TextWindowType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “window-type
” property. This is rarely needed directly, but it is used by new
.
getGutterWindowType :: (MonadIO m, IsGutter o) => o -> m TextWindowType Source #
Get the value of the “window-type
” property.
When overloading is enabled, this is equivalent to
get
gutter #windowType