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 |
Widget that displays a map for a specific [classview
].
GtkSourceMap
is a widget that maps the content of a [classview
] into
a smaller view so the user can have a quick overview of the whole document.
This works by connecting a [classview
] to to the GtkSourceMap
using
the [propertymap
:view] property or [methodmap
.set_view].
GtkSourceMap
is a [classview
] object. This means that you can add a
[classgutterRenderer
] to a gutter in the same way you would for a
[classview
]. One example might be a [classgutterRenderer
] that shows
which lines have changed in the document.
Additionally, it is desirable to match the font of the GtkSourceMap
and
the [classview
] used for editing. Therefore, [propertymap
:font-desc]
should be used to set the target font. You will need to adjust this to the
desired font size for the map. A 1pt font generally seems to be an
appropriate font size. "Monospace 1" is the default. See
fontDescriptionSetSize
for how to alter the size of an existing
[structpango
.FontDescription].
When FontConfig is available, GtkSourceMap
will try to use a bundled
"block" font to make the map more legible.
Synopsis
- newtype Map = Map (ManagedPtr Map)
- class (GObject o, IsDescendantOf Map o) => IsMap o
- toMap :: (MonadIO m, IsMap o) => o -> m Map
- mapGetView :: (HasCallStack, MonadIO m, IsMap a) => a -> m (Maybe View)
- mapNew :: (HasCallStack, MonadIO m) => m Map
- mapSetView :: (HasCallStack, MonadIO m, IsMap a, IsView b) => a -> b -> m ()
- clearMapFontDesc :: (MonadIO m, IsMap o) => o -> m ()
- constructMapFontDesc :: (IsMap o, MonadIO m) => FontDescription -> m (GValueConstruct o)
- getMapFontDesc :: (MonadIO m, IsMap o) => o -> m (Maybe FontDescription)
- setMapFontDesc :: (MonadIO m, IsMap o) => o -> FontDescription -> m ()
- constructMapView :: (IsMap o, MonadIO m, IsView a) => a -> m (GValueConstruct o)
- getMapView :: (MonadIO m, IsMap o) => o -> m (Maybe View)
- setMapView :: (MonadIO m, IsMap o, IsView a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Map Source # | |
GObject Map Source # | |
Defined in GI.GtkSource.Objects.Map | |
ManagedPtrNewtype Map Source # | |
Defined in GI.GtkSource.Objects.Map toManagedPtr :: Map -> ManagedPtr Map | |
TypedObject Map Source # | |
Defined in GI.GtkSource.Objects.Map | |
HasParentTypes Map Source # | |
Defined in GI.GtkSource.Objects.Map | |
IsGValue (Maybe Map) Source # | Convert |
Defined in GI.GtkSource.Objects.Map gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Map -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Map) | |
type ParentTypes Map Source # | |
Defined in GI.GtkSource.Objects.Map |
class (GObject o, IsDescendantOf Map o) => IsMap o Source #
Instances
(GObject o, IsDescendantOf Map o) => IsMap o Source # | |
Defined in GI.GtkSource.Objects.Map |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addChildAtAnchor, addController, addCssClass, addMnemonicLabel, addOverlay, addTickCallback, allocate, backwardDisplayLine, backwardDisplayLineStart, bindProperty, bindPropertyFull, bufferToWindowCoords, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, forwardDisplayLine, forwardDisplayLineEnd, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, imContextFilterKeypress, inDestruction, indentLines, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, moveMarkOnscreen, moveOverlay, moveVisually, notify, notifyByPspec, observeChildren, observeControllers, pick, placeCursorOnscreen, pushSnippet, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetCursorBlink, resetImContext, resetProperty, resetRelation, resetState, runDispose, scrollMarkOnscreen, scrollToIter, scrollToMark, shouldLayout, show, sizeAllocate, snapshotChild, startsDisplayLine, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unindentLines, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure, windowToBufferCoords.
Getters
getAcceptsTab, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getAutoIndent, getBackgroundPattern, getBorder, getBottomMargin, getBounds, getBuffer, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCompletion, getCssClasses, getCssName, getCursor, getCursorLocations, getCursorVisible, getData, getDirection, getDisplay, getEditable, getEnableSnippets, getExtraMenu, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getGutter, getHadjustment, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHighlightCurrentLine, getHover, getHscrollPolicy, getIndent, getIndentOnTab, getIndentWidth, getIndenter, getInputHints, getInputPurpose, getInsertSpacesInsteadOfTabs, getIterAtLocation, getIterAtPosition, getIterLocation, getJustification, getLastChild, getLayoutManager, getLeftMargin, getLineAtY, getLineYrange, getLtrContext, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMarkAttributes, getMonospace, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getOverwrite, getPangoContext, getParent, getPixelsAboveLines, getPixelsBelowLines, getPixelsInsideWrap, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRightMargin, getRightMarginPosition, getRoot, getRtlContext, getScaleFactor, getSensitive, getSettings, getShowLineMarks, getShowLineNumbers, getShowRightMargin, getSize, getSizeRequest, getSmartBackspace, getSmartHomeEnd, getSpaceDrawer, getStateFlags, getStyleContext, getTabWidth, getTabs, getTemplateChild, getTooltipMarkup, getTooltipText, getTopMargin, getVadjustment, getValign, getVexpand, getVexpandSet, getView, getVisible, getVisibleRect, getVisualColumn, getVscrollPolicy, getWidth, getWrapMode.
Setters
setAcceptsTab, setAccessibleParent, setAutoIndent, setBackgroundPattern, setBottomMargin, setBuffer, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setCursorVisible, setData, setDataFull, setDirection, setEditable, setEnableSnippets, setExtraMenu, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setGutter, setHadjustment, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHighlightCurrentLine, setHscrollPolicy, setIndent, setIndentOnTab, setIndentWidth, setIndenter, setInputHints, setInputPurpose, setInsertSpacesInsteadOfTabs, setJustification, setLayoutManager, setLeftMargin, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMarkAttributes, setMonospace, setName, setOpacity, setOverflow, setOverwrite, setParent, setPixelsAboveLines, setPixelsBelowLines, setPixelsInsideWrap, setProperty, setReceivesDefault, setRightMargin, setRightMarginPosition, setSensitive, setShowLineMarks, setShowLineNumbers, setShowRightMargin, setSizeRequest, setSmartBackspace, setSmartHomeEnd, setStateFlags, setTabWidth, setTabs, setTooltipMarkup, setTooltipText, setTopMargin, setVadjustment, setValign, setVexpand, setVexpandSet, setView, setVisible, setVscrollPolicy, setWrapMode.
getView
Gets the [propertymap
:view] property, which is the view this widget is mapping.
new
setView
Sets the view that map
will be doing the mapping to.
Properties
fontDesc
No description available in the introspection data.
clearMapFontDesc :: (MonadIO m, IsMap o) => o -> m () Source #
Set the value of the “font-desc
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#fontDesc
constructMapFontDesc :: (IsMap o, MonadIO m) => FontDescription -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “font-desc
” property. This is rarely needed directly, but it is used by new
.
getMapFontDesc :: (MonadIO m, IsMap o) => o -> m (Maybe FontDescription) Source #
Get the value of the “font-desc
” property.
When overloading is enabled, this is equivalent to
get
map #fontDesc
setMapFontDesc :: (MonadIO m, IsMap o) => o -> FontDescription -> m () Source #
Set the value of the “font-desc
” property.
When overloading is enabled, this is equivalent to
set
map [ #fontDesc:=
value ]
view
No description available in the introspection data.
constructMapView :: (IsMap 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
.
getMapView :: (MonadIO m, IsMap o) => o -> m (Maybe View) Source #
Get the value of the “view
” property.
When overloading is enabled, this is equivalent to
get
map #view
setMapView :: (MonadIO m, IsMap o, IsView a) => o -> a -> m () Source #
Set the value of the “view
” property.
When overloading is enabled, this is equivalent to
set
map [ #view:=
value ]