|
Graphics.UI.Gtk.SourceView.SourceView | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
|
Description
|
|
SourceView is the main object of the gtksourceview library. It provides a text view which syntax
highlighting, undo/redo and text marks. Use a SourceBuffer to display text with a SourceView.
|
|
Types
|
|
|
Instances | |
|
|
|
| Instances | |
|
|
Enums
|
|
data SourceSmartHomeEndType | Source |
|
Constructors | SourceSmartHomeEndDisabled | | SourceSmartHomeEndBefore | | SourceSmartHomeEndAfter | | SourceSmartHomeEndAlways | |
| Instances | |
|
|
data SourceDrawSpacesFlags | Source |
|
Constructors | SourceDrawSpacesSpace | | SourceDrawSpacesTab | | SourceDrawSpacesNewline | | SourceDrawSpacesNbsp | | SourceDrawSpacesLeading | | SourceDrawSpacesText | | SourceDrawSpacesTrailing | | SourceDrawSpacesAll | |
| Instances | |
|
|
data SourceViewGutterPosition | Source |
|
Constructors | SourceViewGutterPositionLines | | SourceViewGutterPositionMarks | |
| Instances | |
|
|
Methods
|
|
|
|
|
Create a new SourceView widget with a default SourceBuffer.
|
|
|
Create a new SourceView
widget with the given SourceBuffer.
|
|
|
|
|
|
:: SourceViewClass sv | | => sv | | -> IO Bool | returns True if auto indentation is enabled.
| Returns whether auto indentation of text is enabled.
|
|
|
sourceViewSetIndentOnTab | Source |
|
:: SourceViewClass sv | | => sv | | -> Bool | enable whether to indent a block when tab is pressed.
| -> IO () | | If True, when the tab key is pressed and there is a selection, the selected text is indented of one
level instead of being replaced with the t characters. Shift+Tab unindents the selection.
|
|
|
sourceViewGetIndentOnTab | Source |
|
:: SourceViewClass sv | | => sv | | -> IO Bool | returns True if the selection is indented when tab is pressed.
| Returns whether when the tab key is pressed the current selection should get indented instead of
replaced with the t character.
|
|
|
sourceViewSetIndentWidth | Source |
|
:: SourceViewClass sv | | => sv | | -> Int | width indent width in characters.
| -> IO () | | Sets the number of spaces to use for each step of indent. If width is -1, the value of the
tabWidth property will be used.
|
|
|
sourceViewGetIndentWidth | Source |
|
|
|
sourceViewSetInsertSpacesInsteadOfTabs | Source |
|
:: SourceViewClass sv | | => sv | | -> Bool | enable whether to insert spaces instead of tabs.
| -> IO () | | If True any tabulator character inserted is replaced by a group of space characters.
|
|
|
sourceViewGetInsertSpacesInsteadOfTabs | Source |
|
:: SourceViewClass sv | | => sv | | -> IO Bool | returns True if spaces are inserted instead of tabs.
| Returns whether when inserting a tabulator character it should be replaced by a group of space
characters.
|
|
|
sourceViewSetSmartHomeEnd | Source |
|
|
|
sourceViewGetSmartHomeEnd | Source |
|
|
|
sourceViewSetMarkCategoryPriority | Source |
|
:: SourceViewClass sv | | => sv | | -> String | category a mark category.
| -> Int | priority the priority for the category
| -> IO () | | Set the priority for the given mark category. When there are multiple marks on the same line, marks
of categories with higher priorities will be drawn on top.
|
|
|
sourceViewGetMarkCategoryPriority | Source |
|
:: SourceViewClass sv | | => sv | | -> String | category a mark category.
| -> IO Int | returns the priority or if category exists but no priority was set, it defaults to 0.
| Gets the priority which is associated with the given category.
|
|
|
sourceViewSetMarkCategoryIconFromPixbuf | Source |
|
|
|
sourceViewSetMarkCategoryIconFromStock | Source |
|
|
|
sourceViewSetMarkCategoryIconFromIconName | Source |
|
|
|
sourceViewSetMarkCategoryBackground | Source |
|
|
|
sourceViewGetMarkCategoryBackground | Source |
|
:: SourceViewClass sv | | => sv | | -> String | category a mark category.
| -> Color | dest destination Color structure to fill in.
| -> IO Bool | returns True if background color for category was set and dest is set to a valid color, or False otherwise.
| Gets the background color associated with given category.
|
|
|
sourceViewSetHighlightCurrentLine | Source |
|
|
|
sourceViewGetHighlightCurrentLine | Source |
|
:: SourceViewClass sv | | => sv | | -> IO Bool | returns True if the current line is highlighted.
| Returns whether the current line is highlighted
|
|
|
sourceViewSetShowLineMarks | Source |
|
:: SourceViewClass sv | | => sv | | -> Bool | show whether line marks should be displayed.
| -> IO () | | If True line marks will be displayed beside the text.
|
|
|
sourceViewGetShowLineMarks | Source |
|
:: SourceViewClass sv | | => sv | | -> IO Bool | returns True if the line marks are displayed.
| Returns whether line marks are displayed beside the text.
|
|
|
sourceViewSetShowLineNumbers | Source |
|
:: SourceViewClass sv | | => sv | | -> Bool | show whether line numbers should be displayed.
| -> IO () | | If True line numbers will be displayed beside the text.
|
|
|
sourceViewGetShowLineNumbers | Source |
|
:: SourceViewClass sv | | => sv | | -> IO Bool | returns True if the line numbers are displayed.
| Returns whether line numbers are displayed beside the text.
|
|
|
sourceViewSetShowRightMargin | Source |
|
|
|
sourceViewGetShowRightMargin | Source |
|
|
|
sourceViewSetRightMarginPosition | Source |
|
:: SourceViewClass sv | | => sv | | -> Word | pos the width in characters where to position the right margin.
| -> IO () | | Sets the position of the right margin in the given view.
|
|
|
sourceViewGetRightMarginPosition | Source |
|
:: SourceViewClass sv | | => sv | | -> IO Int | returns the position of the right margin.
| Gets the position of the right margin in the given view.
|
|
|
|
:: SourceViewClass sv | | => sv | | -> Int | width width of tab in characters.
| -> IO () | | Sets the width of tabulation in characters.
|
|
|
|
:: SourceViewClass sv | | => sv | | -> IO Int | returns width of tab.
| Returns the width of tabulation in characters.
|
|
|
|
|
|
|
|
|
|
|
|
Attributes
|
|
|
Whether to enable auto indentation.
Default value: False
|
|
|
The completion object associated with the view.
|
|
|
Set if and how the spaces should be visualized.
|
|
|
Whether to highlight the current line.
Default value: False
|
|
|
Whether to indent the selected text when the tab key is pressed.
Default value: True
|
|
|
Width of an indentation step expressed in number of spaces.
Allowed values: [GMaxulong,32]
Default value: -1
|
|
|
Whether to insert spaces instead of tabs.
Default value: False
|
|
|
Position of the right margin.
Allowed values: [1,200]
Default value: 80
|
|
|
Whether to display line numbers
Default value: False
|
|
|
Whether to display line mark pixbufs
Default value: False
|
|
|
Set the behavior of the HOME and END keys.
Default value: SourceSmartHomeEndDisabled
Since 2.0
|
|
|
Width of an tab character expressed in number of spaces.
Allowed values: [1,32]
Default value: 8
|
|
Signals
|
|
|
|
|
|
|
The moveLines 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 by count. For the moment, only count of -1 or 1 is valid.
|
|
|
The showCompletion signal is a keybinding signal which gets emitted when the user initiates a
completion in default mode.
Applications should not connect to it, but may emit it with gSignalEmitByName if they need to
control the default mode completion activation.
|
|
|
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.
|
|
Deprecated
|
|
|
sourceViewSetMarkCategoryPixbuf is deprecated and should not be used in newly-written
code. Use sourceViewSetMarkCategoryIconFromPixbuf instead
|
|
|
sourceViewGetMarkCategoryPixbuf is deprecated and should not be used in newly-written code.
|
|
Produced by Haddock version 2.6.1 |