gi-gtksource-5.0.0: GtkSource bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GtkSource.Objects.Map

Description

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

Exported types

newtype Map Source #

Memory-managed wrapper type.

Constructors

Map (ManagedPtr Map) 

Instances

Instances details
Eq Map Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

Methods

(==) :: Map -> Map -> Bool #

(/=) :: Map -> Map -> Bool #

GObject Map Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

ManagedPtrNewtype Map Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

Methods

toManagedPtr :: Map -> ManagedPtr Map

TypedObject Map Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

Methods

glibType :: IO GType

HasParentTypes Map Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

IsGValue (Maybe Map) Source #

Convert Map to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GtkSource.Objects.Map

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Map -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Map)

type ParentTypes Map Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

type ParentTypes Map = '[View, TextView, Widget, Object, Accessible, Buildable, ConstraintTarget, Scrollable]

class (GObject o, IsDescendantOf Map o) => IsMap o Source #

Type class for types which can be safely cast to Map, for instance with toMap.

Instances

Instances details
(GObject o, IsDescendantOf Map o) => IsMap o Source # 
Instance details

Defined in GI.GtkSource.Objects.Map

toMap :: (MonadIO m, IsMap o) => o -> m Map Source #

Cast to Map, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

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

mapGetView Source #

Arguments

:: (HasCallStack, MonadIO m, IsMap a) 
=> a

map: a Map.

-> m (Maybe View)

Returns: a View or Nothing.

Gets the [propertymap:view] property, which is the view this widget is mapping.

new

mapNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Map

Returns: a new Map.

Creates a new GtkSourceMap.

setView

mapSetView Source #

Arguments

:: (HasCallStack, MonadIO m, IsMap a, IsView b) 
=> a

map: a Map

-> b

view: a View

-> m () 

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 ]