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 |
- Exported types
- Methods
- getAutoIndent
- getBackgroundPattern
- getCompletion
- getEnableSnippets
- getGutter
- getHighlightCurrentLine
- getHover
- getIndentOnTab
- getIndentWidth
- getIndenter
- getInsertSpacesInsteadOfTabs
- getMarkAttributes
- getRightMarginPosition
- getShowLineMarks
- getShowLineNumbers
- getShowRightMargin
- getSmartBackspace
- getSmartHomeEnd
- getSpaceDrawer
- getTabWidth
- getVisualColumn
- indentLines
- new
- newWithBuffer
- pushSnippet
- setAutoIndent
- setBackgroundPattern
- setEnableSnippets
- setHighlightCurrentLine
- setIndentOnTab
- setIndentWidth
- setIndenter
- setInsertSpacesInsteadOfTabs
- setMarkAttributes
- setRightMarginPosition
- setShowLineMarks
- setShowLineNumbers
- setShowRightMargin
- setSmartBackspace
- setSmartHomeEnd
- setTabWidth
- unindentLines
- Properties
- Signals
Subclass of TextView
.
GtkSourceView
is the main class of the GtkSourceView library.
Use a [classbuffer
] to display text with a GtkSourceView
.
This class provides:
- Show the line numbers;
- Show a right margin;
- Highlight the current line;
- Indentation settings;
- Configuration for the Home and End keyboard keys;
- Configure and show line marks;
- And a few other things.
An easy way to test all these features is to use the test-widget mini-program provided in the GtkSourceView repository, in the tests/ directory.
GtkSourceView as GtkBuildable
The GtkSourceView implementation of the Buildable
interface exposes the
[propertyview
:completion] object with the internal-child "completion".
An example of a UI definition fragment with GtkSourceView:
xml code
<object class="GtkSourceView" id="source_view"> <property name="tab-width">4</property> <property name="auto-indent">True</property> <child internal-child="completion"> <object class="GtkSourceCompletion"> <property name="select-on-show">False</property> </object> </child> </object>
Changing the Font
Gtk CSS provides the best way to change the font for a GtkSourceView
in a
manner that allows for components like [classmap
] to scale the desired
font.
c code
GtkCssProvider *provider = gtk_css_provider_new (); gtk_css_provider_load_from_data (provider, "textview { font-family: Monospace; font-size: 8pt; }", -1, NULL); gtk_style_context_add_provider (gtk_widget_get_style_context (view), GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (provider);
If you need to adjust the font or size of font within a portion of the
document only, you should use a TextTag
with the TextTag:family or
TextTag:scale set so that the font size may be scaled relative to
the default font set in CSS.
Synopsis
- newtype View = View (ManagedPtr View)
- class (GObject o, IsDescendantOf View o) => IsView o
- toView :: (MonadIO m, IsView o) => o -> m View
- viewGetAutoIndent :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetBackgroundPattern :: (HasCallStack, MonadIO m, IsView a) => a -> m BackgroundPatternType
- viewGetCompletion :: (HasCallStack, MonadIO m, IsView a) => a -> m Completion
- viewGetEnableSnippets :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetGutter :: (HasCallStack, MonadIO m, IsView a) => a -> TextWindowType -> m Gutter
- viewGetHighlightCurrentLine :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetHover :: (HasCallStack, MonadIO m, IsView a) => a -> m Hover
- viewGetIndentOnTab :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetIndentWidth :: (HasCallStack, MonadIO m, IsView a) => a -> m Int32
- viewGetIndenter :: (HasCallStack, MonadIO m, IsView a) => a -> m (Maybe Indenter)
- viewGetInsertSpacesInsteadOfTabs :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetMarkAttributes :: (HasCallStack, MonadIO m, IsView a) => a -> Text -> Int32 -> m MarkAttributes
- viewGetRightMarginPosition :: (HasCallStack, MonadIO m, IsView a) => a -> m Word32
- viewGetShowLineMarks :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetShowLineNumbers :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetShowRightMargin :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetSmartBackspace :: (HasCallStack, MonadIO m, IsView a) => a -> m Bool
- viewGetSmartHomeEnd :: (HasCallStack, MonadIO m, IsView a) => a -> m SmartHomeEndType
- viewGetSpaceDrawer :: (HasCallStack, MonadIO m, IsView a) => a -> m SpaceDrawer
- viewGetTabWidth :: (HasCallStack, MonadIO m, IsView a) => a -> m Word32
- viewGetVisualColumn :: (HasCallStack, MonadIO m, IsView a) => a -> TextIter -> m Word32
- viewIndentLines :: (HasCallStack, MonadIO m, IsView a) => a -> TextIter -> TextIter -> m ()
- viewNew :: (HasCallStack, MonadIO m) => m View
- viewNewWithBuffer :: (HasCallStack, MonadIO m, IsBuffer a) => a -> m View
- viewPushSnippet :: (HasCallStack, MonadIO m, IsView a, IsSnippet b) => a -> b -> Maybe TextIter -> m ()
- viewSetAutoIndent :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetBackgroundPattern :: (HasCallStack, MonadIO m, IsView a) => a -> BackgroundPatternType -> m ()
- viewSetEnableSnippets :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetHighlightCurrentLine :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetIndentOnTab :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetIndentWidth :: (HasCallStack, MonadIO m, IsView a) => a -> Int32 -> m ()
- viewSetIndenter :: (HasCallStack, MonadIO m, IsView a, IsIndenter b) => a -> Maybe b -> m ()
- viewSetInsertSpacesInsteadOfTabs :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetMarkAttributes :: (HasCallStack, MonadIO m, IsView a, IsMarkAttributes b) => a -> Text -> b -> Int32 -> m ()
- viewSetRightMarginPosition :: (HasCallStack, MonadIO m, IsView a) => a -> Word32 -> m ()
- viewSetShowLineMarks :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetShowLineNumbers :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetShowRightMargin :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetSmartBackspace :: (HasCallStack, MonadIO m, IsView a) => a -> Bool -> m ()
- viewSetSmartHomeEnd :: (HasCallStack, MonadIO m, IsView a) => a -> SmartHomeEndType -> m ()
- viewSetTabWidth :: (HasCallStack, MonadIO m, IsView a) => a -> Word32 -> m ()
- viewUnindentLines :: (HasCallStack, MonadIO m, IsView a) => a -> TextIter -> TextIter -> m ()
- constructViewAutoIndent :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewAutoIndent :: (MonadIO m, IsView o) => o -> m Bool
- setViewAutoIndent :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewBackgroundPattern :: (IsView o, MonadIO m) => BackgroundPatternType -> m (GValueConstruct o)
- getViewBackgroundPattern :: (MonadIO m, IsView o) => o -> m BackgroundPatternType
- setViewBackgroundPattern :: (MonadIO m, IsView o) => o -> BackgroundPatternType -> m ()
- getViewCompletion :: (MonadIO m, IsView o) => o -> m Completion
- constructViewEnableSnippets :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewEnableSnippets :: (MonadIO m, IsView o) => o -> m Bool
- setViewEnableSnippets :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewHighlightCurrentLine :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewHighlightCurrentLine :: (MonadIO m, IsView o) => o -> m Bool
- setViewHighlightCurrentLine :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewIndentOnTab :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewIndentOnTab :: (MonadIO m, IsView o) => o -> m Bool
- setViewIndentOnTab :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewIndentWidth :: (IsView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getViewIndentWidth :: (MonadIO m, IsView o) => o -> m Int32
- setViewIndentWidth :: (MonadIO m, IsView o) => o -> Int32 -> m ()
- clearViewIndenter :: (MonadIO m, IsView o) => o -> m ()
- constructViewIndenter :: (IsView o, MonadIO m, IsIndenter a) => a -> m (GValueConstruct o)
- getViewIndenter :: (MonadIO m, IsView o) => o -> m (Maybe Indenter)
- setViewIndenter :: (MonadIO m, IsView o, IsIndenter a) => o -> a -> m ()
- constructViewInsertSpacesInsteadOfTabs :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewInsertSpacesInsteadOfTabs :: (MonadIO m, IsView o) => o -> m Bool
- setViewInsertSpacesInsteadOfTabs :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewRightMarginPosition :: (IsView o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getViewRightMarginPosition :: (MonadIO m, IsView o) => o -> m Word32
- setViewRightMarginPosition :: (MonadIO m, IsView o) => o -> Word32 -> m ()
- constructViewShowLineMarks :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewShowLineMarks :: (MonadIO m, IsView o) => o -> m Bool
- setViewShowLineMarks :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewShowLineNumbers :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewShowLineNumbers :: (MonadIO m, IsView o) => o -> m Bool
- setViewShowLineNumbers :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewShowRightMargin :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewShowRightMargin :: (MonadIO m, IsView o) => o -> m Bool
- setViewShowRightMargin :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewSmartBackspace :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewSmartBackspace :: (MonadIO m, IsView o) => o -> m Bool
- setViewSmartBackspace :: (MonadIO m, IsView o) => o -> Bool -> m ()
- constructViewSmartHomeEnd :: (IsView o, MonadIO m) => SmartHomeEndType -> m (GValueConstruct o)
- getViewSmartHomeEnd :: (MonadIO m, IsView o) => o -> m SmartHomeEndType
- setViewSmartHomeEnd :: (MonadIO m, IsView o) => o -> SmartHomeEndType -> m ()
- getViewSpaceDrawer :: (MonadIO m, IsView o) => o -> m SpaceDrawer
- constructViewTabWidth :: (IsView o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getViewTabWidth :: (MonadIO m, IsView o) => o -> m Word32
- setViewTabWidth :: (MonadIO m, IsView o) => o -> Word32 -> m ()
- type ViewChangeCaseCallback = ChangeCaseType -> IO ()
- afterViewChangeCase :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeCaseCallback) -> m SignalHandlerId
- onViewChangeCase :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeCaseCallback) -> m SignalHandlerId
- type ViewChangeNumberCallback = Int32 -> IO ()
- afterViewChangeNumber :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeNumberCallback) -> m SignalHandlerId
- onViewChangeNumber :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeNumberCallback) -> m SignalHandlerId
- type ViewJoinLinesCallback = IO ()
- afterViewJoinLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewJoinLinesCallback) -> m SignalHandlerId
- onViewJoinLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewJoinLinesCallback) -> m SignalHandlerId
- type ViewLineMarkActivatedCallback = TextIter -> Word32 -> [ModifierType] -> Int32 -> IO ()
- afterViewLineMarkActivated :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewLineMarkActivatedCallback) -> m SignalHandlerId
- onViewLineMarkActivated :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewLineMarkActivatedCallback) -> m SignalHandlerId
- type ViewMoveLinesCallback = Bool -> IO ()
- afterViewMoveLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveLinesCallback) -> m SignalHandlerId
- onViewMoveLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveLinesCallback) -> m SignalHandlerId
- type ViewMoveToMatchingBracketCallback = Bool -> IO ()
- afterViewMoveToMatchingBracket :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveToMatchingBracketCallback) -> m SignalHandlerId
- onViewMoveToMatchingBracket :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveToMatchingBracketCallback) -> m SignalHandlerId
- type ViewMoveWordsCallback = Int32 -> IO ()
- afterViewMoveWords :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveWordsCallback) -> m SignalHandlerId
- onViewMoveWords :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveWordsCallback) -> m SignalHandlerId
- type ViewPushSnippetCallback = Snippet -> TextIter -> IO TextIter
- afterViewPushSnippet :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewPushSnippetCallback) -> m SignalHandlerId
- onViewPushSnippet :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewPushSnippetCallback) -> m SignalHandlerId
- type ViewShowCompletionCallback = IO ()
- afterViewShowCompletion :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewShowCompletionCallback) -> m SignalHandlerId
- onViewShowCompletion :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewShowCompletionCallback) -> m SignalHandlerId
- type ViewSmartHomeEndCallback = TextIter -> Int32 -> IO ()
- afterViewSmartHomeEnd :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewSmartHomeEndCallback) -> m SignalHandlerId
- onViewSmartHomeEnd :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewSmartHomeEndCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq View Source # | |
GObject View Source # | |
Defined in GI.GtkSource.Objects.View | |
ManagedPtrNewtype View Source # | |
Defined in GI.GtkSource.Objects.View toManagedPtr :: View -> ManagedPtr View | |
TypedObject View Source # | |
Defined in GI.GtkSource.Objects.View | |
HasParentTypes View Source # | |
Defined in GI.GtkSource.Objects.View | |
IsGValue (Maybe View) Source # | Convert |
Defined in GI.GtkSource.Objects.View gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe View -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe View) | |
type ParentTypes View Source # | |
Defined in GI.GtkSource.Objects.View type ParentTypes View = '[TextView, Widget, Object, Accessible, Buildable, ConstraintTarget, Scrollable] |
class (GObject o, IsDescendantOf View o) => IsView o Source #
Instances
(GObject o, IsDescendantOf View o) => IsView o Source # | |
Defined in GI.GtkSource.Objects.View |
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, 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, setVisible, setVscrollPolicy, setWrapMode.
getAutoIndent
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether auto-indentation of text is enabled.
getBackgroundPattern
viewGetBackgroundPattern Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m BackgroundPatternType | Returns: the |
Returns the BackgroundPatternType
specifying if and how
the background pattern should be displayed for this view
.
getCompletion
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Completion | Returns: the |
Gets the [classcompletion
] associated with view
.
The returned object is guaranteed to be the same for the lifetime of view
.
Each GtkSourceView
object has a different [classcompletion
].
getEnableSnippets
viewGetEnableSnippets Source #
Gets the [propertyview
:enable-snippets] property.
If True
, matching snippets found in the [classsnippetManager
]
may be expanded when the user presses Tab after a word in the [classview
].
getGutter
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> TextWindowType |
|
-> m Gutter | Returns: the |
Returns the [classgutter
] object associated with windowType
for view
.
Only TextWindowTypeLeft
and TextWindowTypeRight
are supported,
respectively corresponding to the left and right gutter. The line numbers
and mark category icons are rendered in the left gutter.
getHighlightCurrentLine
viewGetHighlightCurrentLine Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the current line is highlighted.
getHover
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Hover | Returns: a |
Gets the [classhover
] associated with view
.
The returned object is guaranteed to be the same for the lifetime of view
.
Each [classview
] object has a different [classhover
].
getIndentOnTab
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether when the tab key is pressed the current selection
should get indented instead of replaced with the \t
character.
getIndentWidth
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Int32 | Returns: indent width. |
Returns the number of spaces to use for each step of indent.
See [methodview
.set_indent_width] for details.
getIndenter
Gets the [propertyview
:indenter] property.
getInsertSpacesInsteadOfTabs
viewGetInsertSpacesInsteadOfTabs Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
getMarkAttributes
viewGetMarkAttributes Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m MarkAttributes | Returns: |
Gets attributes and priority for the category
.
getRightMarginPosition
viewGetRightMarginPosition Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Word32 | Returns: the position of the right margin. |
Gets the position of the right margin in the given view
.
getShowLineMarks
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether line marks are displayed beside the text.
getShowLineNumbers
viewGetShowLineNumbers Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether line numbers are displayed beside the text.
getShowRightMargin
viewGetShowRightMargin Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether a right margin is displayed.
getSmartBackspace
viewGetSmartBackspace Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if pressing the Backspace key will try to delete spaces
up to the previous tab stop.
getSmartHomeEnd
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m SmartHomeEndType | Returns: a |
Returns a [enumsmartHomeEndType
] end value specifying
how the cursor will move when HOME and END keys are pressed.
getSpaceDrawer
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m SpaceDrawer | Returns: the |
Gets the [classspaceDrawer
] associated with view
.
The returned object is guaranteed to be the same for the lifetime of view
.
Each [classview
] object has a different [classspaceDrawer
].
getTabWidth
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m Word32 | Returns: width of tab. |
Returns the width of tabulation in characters.
getVisualColumn
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> TextIter |
|
-> m Word32 | Returns: the visual column at |
Determines the visual column at iter
taking into consideration the
[propertyview
:tab-width] of view
.
indentLines
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Inserts one indentation level at the beginning of the specified lines. The empty lines are not indented.
new
:: (HasCallStack, MonadIO m) | |
=> m View | Returns: a new |
Creates a new GtkSourceView
.
By default, an empty [classbuffer
] will be lazily created and can be
retrieved with textViewGetBuffer
.
If you want to specify your own buffer, either override the
TextView
.create_buffer
() factory method, or use
[ctorview
.new_with_buffer].
newWithBuffer
Creates a new View
widget displaying the buffer buffer
.
One buffer can be shared among many widgets.
pushSnippet
:: (HasCallStack, MonadIO m, IsView a, IsSnippet b) | |
=> a |
|
-> b |
|
-> Maybe TextIter | |
-> m () |
Inserts a new snippet at location
If another snippet was already active, it will be paused and the new
snippet will become active. Once the focus positions of snippet
have
been exhausted, editing will return to the previous snippet.
setAutoIndent
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If True
auto-indentation of text is enabled.
When Enter is pressed to create a new line, the auto-indentation inserts the same indentation as the previous line. This is **not** a "smart indentation" where an indentation level is added or removed depending on the context.
setBackgroundPattern
viewSetBackgroundPattern Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> BackgroundPatternType |
|
-> m () |
Set if and how the background pattern should be displayed.
setEnableSnippets
viewSetEnableSnippets Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the [propertyview
:enable-snippets] property.
If enableSnippets
is True
, matching snippets found in the
[classsnippetManager
] may be expanded when the user presses
Tab after a word in the [classview
].
setHighlightCurrentLine
viewSetHighlightCurrentLine Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If highlight
is True
the current line will be highlighted.
setIndentOnTab
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If True
, when the tab key is pressed when several lines are selected, the
selected lines are indented of one level instead of being replaced with a \t
character. Shift+Tab unindents the selection.
If the first or last line is not selected completely, it is also indented or unindented.
When the selection doesn't span several lines, the tab key always replaces
the selection with a normal \t
character.
setIndentWidth
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the number of spaces to use for each step of indent when the tab key is pressed.
If width
is -1, the value of the [propertyview
:tab-width] property
will be used.
The [propertyview
:indent-width] interacts with the
[propertyview
:insert-spaces-instead-of-tabs] property and
[propertyview
:tab-width]. An example will be clearer:
If the [propertyview
:indent-width] is 4 and [propertyview
:tab-width] is 8 and
[propertyview
:insert-spaces-instead-of-tabs] is False
, then pressing the tab
key at the beginning of a line will insert 4 spaces. So far so good. Pressing
the tab key a second time will remove the 4 spaces and insert a \t
character
instead (since [propertyview
:tab-width] is 8). On the other hand, if
[propertyview
:insert-spaces-instead-of-tabs] is True
, the second tab key
pressed will insert 4 more spaces for a total of 8 spaces in the
TextBuffer
.
The test-widget program (available in the GtkSourceView repository) may be useful to better understand the indentation settings (enable the space drawing!).
setIndenter
:: (HasCallStack, MonadIO m, IsView a, IsIndenter b) | |
=> a |
|
-> Maybe b | |
-> m () |
Sets the indenter for view
to indenter
.
Note that the indenter will not be used unless View:autoIndent
has been set to True
.
setInsertSpacesInsteadOfTabs
viewSetInsertSpacesInsteadOfTabs Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If True
a tab key pressed is replaced by a group of space characters.
Of course it is still possible to insert a real \t
programmatically with the
TextBuffer
API.
setMarkAttributes
viewSetMarkAttributes Source #
:: (HasCallStack, MonadIO m, IsView a, IsMarkAttributes b) | |
=> a |
|
-> Text |
|
-> b |
|
-> Int32 |
|
-> m () |
Sets attributes and priority for the category
.
setRightMarginPosition
viewSetRightMarginPosition Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the position of the right margin in the given view
.
setShowLineMarks
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If True
line marks will be displayed beside the text.
setShowLineNumbers
viewSetShowLineNumbers Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If True
line numbers will be displayed beside the text.
setShowRightMargin
viewSetShowRightMargin Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
If True
a right margin is displayed.
setSmartBackspace
viewSetSmartBackspace Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Bool |
|
-> m () |
When set to True
, pressing the Backspace key will try to delete spaces
up to the previous tab stop.
setSmartHomeEnd
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> SmartHomeEndType |
|
-> m () |
Set the desired movement of the cursor when HOME and END keys are pressed.
setTabWidth
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the width of tabulation in characters.
The TextBuffer
still contains \t
characters,
but they can take a different visual width in a [classview
] widget.
unindentLines
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Removes one indentation level at the beginning of the specified lines.
Properties
autoIndent
No description available in the introspection data.
constructViewAutoIndent :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “auto-indent
” property. This is rarely needed directly, but it is used by new
.
getViewAutoIndent :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “auto-indent
” property.
When overloading is enabled, this is equivalent to
get
view #autoIndent
setViewAutoIndent :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “auto-indent
” property.
When overloading is enabled, this is equivalent to
set
view [ #autoIndent:=
value ]
backgroundPattern
Draw a specific background pattern on the view.
constructViewBackgroundPattern :: (IsView o, MonadIO m) => BackgroundPatternType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “background-pattern
” property. This is rarely needed directly, but it is used by new
.
getViewBackgroundPattern :: (MonadIO m, IsView o) => o -> m BackgroundPatternType Source #
Get the value of the “background-pattern
” property.
When overloading is enabled, this is equivalent to
get
view #backgroundPattern
setViewBackgroundPattern :: (MonadIO m, IsView o) => o -> BackgroundPatternType -> m () Source #
Set the value of the “background-pattern
” property.
When overloading is enabled, this is equivalent to
set
view [ #backgroundPattern:=
value ]
completion
The completion object associated with the view
getViewCompletion :: (MonadIO m, IsView o) => o -> m Completion Source #
Get the value of the “completion
” property.
When overloading is enabled, this is equivalent to
get
view #completion
enableSnippets
The property denotes if snippets should be
expanded when the user presses Tab after having typed a word
matching the snippets found in [classsnippetManager
].
The user may tab through focus-positions of the snippet if any are available by pressing Tab repeatedly until the desired focus position is selected.
constructViewEnableSnippets :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “enable-snippets
” property. This is rarely needed directly, but it is used by new
.
getViewEnableSnippets :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “enable-snippets
” property.
When overloading is enabled, this is equivalent to
get
view #enableSnippets
setViewEnableSnippets :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “enable-snippets
” property.
When overloading is enabled, this is equivalent to
set
view [ #enableSnippets:=
value ]
highlightCurrentLine
No description available in the introspection data.
constructViewHighlightCurrentLine :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “highlight-current-line
” property. This is rarely needed directly, but it is used by new
.
getViewHighlightCurrentLine :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “highlight-current-line
” property.
When overloading is enabled, this is equivalent to
get
view #highlightCurrentLine
setViewHighlightCurrentLine :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “highlight-current-line
” property.
When overloading is enabled, this is equivalent to
set
view [ #highlightCurrentLine:=
value ]
indentOnTab
No description available in the introspection data.
constructViewIndentOnTab :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “indent-on-tab
” property. This is rarely needed directly, but it is used by new
.
getViewIndentOnTab :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “indent-on-tab
” property.
When overloading is enabled, this is equivalent to
get
view #indentOnTab
setViewIndentOnTab :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “indent-on-tab
” property.
When overloading is enabled, this is equivalent to
set
view [ #indentOnTab:=
value ]
indentWidth
Width of an indentation step expressed in number of spaces.
constructViewIndentWidth :: (IsView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “indent-width
” property. This is rarely needed directly, but it is used by new
.
getViewIndentWidth :: (MonadIO m, IsView o) => o -> m Int32 Source #
Get the value of the “indent-width
” property.
When overloading is enabled, this is equivalent to
get
view #indentWidth
setViewIndentWidth :: (MonadIO m, IsView o) => o -> Int32 -> m () Source #
Set the value of the “indent-width
” property.
When overloading is enabled, this is equivalent to
set
view [ #indentWidth:=
value ]
indenter
The property is a [ifaceindenter
] to use to indent
as the user types into the [classview
].
clearViewIndenter :: (MonadIO m, IsView o) => o -> m () Source #
Set the value of the “indenter
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#indenter
constructViewIndenter :: (IsView o, MonadIO m, IsIndenter a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “indenter
” property. This is rarely needed directly, but it is used by new
.
getViewIndenter :: (MonadIO m, IsView o) => o -> m (Maybe Indenter) Source #
Get the value of the “indenter
” property.
When overloading is enabled, this is equivalent to
get
view #indenter
setViewIndenter :: (MonadIO m, IsView o, IsIndenter a) => o -> a -> m () Source #
Set the value of the “indenter
” property.
When overloading is enabled, this is equivalent to
set
view [ #indenter:=
value ]
insertSpacesInsteadOfTabs
No description available in the introspection data.
constructViewInsertSpacesInsteadOfTabs :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “insert-spaces-instead-of-tabs
” property. This is rarely needed directly, but it is used by new
.
getViewInsertSpacesInsteadOfTabs :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “insert-spaces-instead-of-tabs
” property.
When overloading is enabled, this is equivalent to
get
view #insertSpacesInsteadOfTabs
setViewInsertSpacesInsteadOfTabs :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “insert-spaces-instead-of-tabs
” property.
When overloading is enabled, this is equivalent to
set
view [ #insertSpacesInsteadOfTabs:=
value ]
rightMarginPosition
Position of the right margin.
constructViewRightMarginPosition :: (IsView o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “right-margin-position
” property. This is rarely needed directly, but it is used by new
.
getViewRightMarginPosition :: (MonadIO m, IsView o) => o -> m Word32 Source #
Get the value of the “right-margin-position
” property.
When overloading is enabled, this is equivalent to
get
view #rightMarginPosition
setViewRightMarginPosition :: (MonadIO m, IsView o) => o -> Word32 -> m () Source #
Set the value of the “right-margin-position
” property.
When overloading is enabled, this is equivalent to
set
view [ #rightMarginPosition:=
value ]
showLineMarks
Whether to display line mark pixbufs
constructViewShowLineMarks :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-line-marks
” property. This is rarely needed directly, but it is used by new
.
getViewShowLineMarks :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “show-line-marks
” property.
When overloading is enabled, this is equivalent to
get
view #showLineMarks
setViewShowLineMarks :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “show-line-marks
” property.
When overloading is enabled, this is equivalent to
set
view [ #showLineMarks:=
value ]
showLineNumbers
Whether to display line numbers
constructViewShowLineNumbers :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-line-numbers
” property. This is rarely needed directly, but it is used by new
.
getViewShowLineNumbers :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “show-line-numbers
” property.
When overloading is enabled, this is equivalent to
get
view #showLineNumbers
setViewShowLineNumbers :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “show-line-numbers
” property.
When overloading is enabled, this is equivalent to
set
view [ #showLineNumbers:=
value ]
showRightMargin
Whether to display the right margin.
constructViewShowRightMargin :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-right-margin
” property. This is rarely needed directly, but it is used by new
.
getViewShowRightMargin :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “show-right-margin
” property.
When overloading is enabled, this is equivalent to
get
view #showRightMargin
setViewShowRightMargin :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “show-right-margin
” property.
When overloading is enabled, this is equivalent to
set
view [ #showRightMargin:=
value ]
smartBackspace
Whether smart Backspace should be used.
constructViewSmartBackspace :: (IsView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “smart-backspace
” property. This is rarely needed directly, but it is used by new
.
getViewSmartBackspace :: (MonadIO m, IsView o) => o -> m Bool Source #
Get the value of the “smart-backspace
” property.
When overloading is enabled, this is equivalent to
get
view #smartBackspace
setViewSmartBackspace :: (MonadIO m, IsView o) => o -> Bool -> m () Source #
Set the value of the “smart-backspace
” property.
When overloading is enabled, this is equivalent to
set
view [ #smartBackspace:=
value ]
smartHomeEnd
Set the behavior of the HOME and END keys.
constructViewSmartHomeEnd :: (IsView o, MonadIO m) => SmartHomeEndType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “smart-home-end
” property. This is rarely needed directly, but it is used by new
.
getViewSmartHomeEnd :: (MonadIO m, IsView o) => o -> m SmartHomeEndType Source #
Get the value of the “smart-home-end
” property.
When overloading is enabled, this is equivalent to
get
view #smartHomeEnd
setViewSmartHomeEnd :: (MonadIO m, IsView o) => o -> SmartHomeEndType -> m () Source #
Set the value of the “smart-home-end
” property.
When overloading is enabled, this is equivalent to
set
view [ #smartHomeEnd:=
value ]
spaceDrawer
The [classspaceDrawer
] object associated with the view.4
getViewSpaceDrawer :: (MonadIO m, IsView o) => o -> m SpaceDrawer Source #
Get the value of the “space-drawer
” property.
When overloading is enabled, this is equivalent to
get
view #spaceDrawer
tabWidth
Width of a tab character expressed in number of spaces.
constructViewTabWidth :: (IsView o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tab-width
” property. This is rarely needed directly, but it is used by new
.
getViewTabWidth :: (MonadIO m, IsView o) => o -> m Word32 Source #
Get the value of the “tab-width
” property.
When overloading is enabled, this is equivalent to
get
view #tabWidth
setViewTabWidth :: (MonadIO m, IsView o) => o -> Word32 -> m () Source #
Set the value of the “tab-width
” property.
When overloading is enabled, this is equivalent to
set
view [ #tabWidth:=
value ]
Signals
changeCase
type ViewChangeCaseCallback Source #
= ChangeCaseType |
|
-> IO () |
Keybinding signal to change case of the text at the current cursor position.
afterViewChangeCase :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeCaseCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changeCase signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #changeCase callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewChangeCase :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeCaseCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changeCase signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #changeCase callback
changeNumber
type ViewChangeNumberCallback Source #
Keybinding signal to edit a number at the current cursor position.
afterViewChangeNumber :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeNumberCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changeNumber signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #changeNumber callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewChangeNumber :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewChangeNumberCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changeNumber signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #changeNumber callback
joinLines
type ViewJoinLinesCallback = IO () Source #
Keybinding signal to join the lines currently selected.
afterViewJoinLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewJoinLinesCallback) -> m SignalHandlerId Source #
Connect a signal handler for the joinLines signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #joinLines callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewJoinLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewJoinLinesCallback) -> m SignalHandlerId Source #
Connect a signal handler for the joinLines signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #joinLines callback
lineMarkActivated
type ViewLineMarkActivatedCallback Source #
= TextIter |
|
-> Word32 |
|
-> [ModifierType] |
|
-> Int32 |
|
-> IO () |
Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).
You can use iter
to determine on which line the activation took place.
afterViewLineMarkActivated :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewLineMarkActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the lineMarkActivated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #lineMarkActivated callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewLineMarkActivated :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewLineMarkActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the lineMarkActivated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #lineMarkActivated callback
moveLines
type ViewMoveLinesCallback Source #
The signal is a keybinding which gets emitted when the user initiates moving a line.
The default binding key is Alt+Up/Down arrow. And moves the currently selected lines, or the current line up or down by one line.
afterViewMoveLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveLinesCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveLines signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #moveLines callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewMoveLines :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveLinesCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveLines signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #moveLines callback
moveToMatchingBracket
type ViewMoveToMatchingBracketCallback Source #
Keybinding signal to move the cursor to the matching bracket.
afterViewMoveToMatchingBracket :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveToMatchingBracketCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveToMatchingBracket signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #moveToMatchingBracket callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewMoveToMatchingBracket :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveToMatchingBracketCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveToMatchingBracket signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #moveToMatchingBracket callback
moveWords
type ViewMoveWordsCallback Source #
The signal is a keybinding which gets emitted when the user initiates moving a word.
The default binding key is Alt+Left/Right Arrow and moves the current selection, or the current word by one word.
afterViewMoveWords :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveWordsCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveWords signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #moveWords callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewMoveWords :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewMoveWordsCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveWords signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #moveWords callback
pushSnippet
type ViewPushSnippetCallback Source #
The signal is emitted to insert a new snippet into the view.
If another snippet was active, it will be paused until all focus positions of snippet
have been exhausted.
location
will be updated to point at the end of the snippet.
afterViewPushSnippet :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewPushSnippetCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pushSnippet signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #pushSnippet callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewPushSnippet :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewPushSnippetCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pushSnippet signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #pushSnippet callback
showCompletion
type ViewShowCompletionCallback = IO () Source #
The signal is a key binding signal which gets emitted when the user requests a completion, by pressing <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
This will create a [classcompletionContext
] with the activation
type as CompletionActivationUserRequested
.
Applications should not connect to it, but may emit it with
GObject.signal_emit_by_name
if they need to activate the completion by
another means, for example with another key binding or a menu entry.
afterViewShowCompletion :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewShowCompletionCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showCompletion signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #showCompletion callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewShowCompletion :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewShowCompletionCallback) -> m SignalHandlerId Source #
Connect a signal handler for the showCompletion signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #showCompletion callback
smartHomeEnd
type ViewSmartHomeEndCallback Source #
Emitted when a the cursor was moved according to the smart home end setting.
The signal is emitted after the cursor is moved, but during the TextView::moveCursor action. This can be used to find out whether the cursor was moved by a normal home/end or by a smart home/end.
afterViewSmartHomeEnd :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewSmartHomeEndCallback) -> m SignalHandlerId Source #
Connect a signal handler for the smartHomeEnd signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
view #smartHomeEnd callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onViewSmartHomeEnd :: (IsView a, MonadIO m) => a -> ((?self :: a) => ViewSmartHomeEndCallback) -> m SignalHandlerId Source #
Connect a signal handler for the smartHomeEnd signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
view #smartHomeEnd callback