TextViewProtocol
public protocol TextViewProtocol : ScrollableProtocol, WidgetProtocol
A widget that displays the contents of a [classGtk.TextBuffer].

You may wish to begin by reading the conceptual overview, which gives an overview of all the objects and data types related to the text widget and how they work together.
CSS nodes
textview.view
├── border.top
├── border.left
├── text
│ ╰── [selection]
├── border.right
├── border.bottom
╰── [window.popup]
GtkTextView has a main css node with name textview and style class .view,
and subnodes for each of the border windows, and the main text area,
with names border and text, respectively. The border nodes each get
one of the style classes .left, .right, .top or .bottom.
A node representing the selection will appear below the text node.
If a context menu is opened, the window node will appear as a subnode of the main node.
Accessibility
GtkTextView uses the GTK_ACCESSIBLE_ROLE_TEXT_BOX role.
The TextViewProtocol protocol exposes the methods and properties of an underlying GtkTextView instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see TextView.
Alternatively, use TextViewRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkTextViewinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
text_view_ptrDefault implementationTyped pointer to the underlying
GtkTextViewinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkTextViewinstance.Declaration
Swift
var text_view_ptr: UnsafeMutablePointer<GtkTextView>! { get } -
Required Initialiser for types conforming to
TextViewProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
TextViewPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: TextViewPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a TextView property
Declaration
Swift
@inlinable func get(property: TextViewPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a TextView property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: TextViewPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
TextViewSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: TextViewSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
TextViewSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: TextViewSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onBackspace(flags:Extension methodhandler: ) Gets emitted when the user asks for it.
The
backspacesignal is a keybinding signal.The default bindings for this signal are <kbd>Backspace</kbd> and <kbd>Shift</kbd>-<kbd>Backspace</kbd>.
Note
This represents the underlyingbackspacesignalDeclaration
Swift
@discardableResult @inlinable func onBackspace(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
backspacesignal is emitted -
backspaceSignalExtension methodTyped
backspacesignal for using theconnect(signal:)methodsDeclaration
Swift
static var backspaceSignal: TextViewSignalName { get } -
onCopyClipboard(flags:Extension methodhandler: ) Gets emitted to copy the selection to the clipboard.
The
copy-clipboardsignal is a keybinding signal.The default bindings for this signal are <kbd>Ctrl</kbd>-<kbd>c</kbd> and <kbd>Ctrl</kbd>-<kbd>Insert</kbd>.
Note
This represents the underlyingcopy-clipboardsignalDeclaration
Swift
@discardableResult @inlinable func onCopyClipboard(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
copyClipboardsignal is emitted -
copyClipboardSignalExtension methodTyped
copy-clipboardsignal for using theconnect(signal:)methodsDeclaration
Swift
static var copyClipboardSignal: TextViewSignalName { get } -
onCutClipboard(flags:Extension methodhandler: ) Gets emitted to cut the selection to the clipboard.
The
cut-clipboardsignal is a keybinding signal.The default bindings for this signal are <kbd>Ctrl</kbd>-<kbd>x</kbd> and <kbd>Shift</kbd>-<kbd>Delete</kbd>.
Note
This represents the underlyingcut-clipboardsignalDeclaration
Swift
@discardableResult @inlinable func onCutClipboard(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
cutClipboardsignal is emitted -
cutClipboardSignalExtension methodTyped
cut-clipboardsignal for using theconnect(signal:)methodsDeclaration
Swift
static var cutClipboardSignal: TextViewSignalName { get } -
onDeleteFromCursor(flags:Extension methodhandler: ) Gets emitted when the user initiates a text deletion.
The
delete-from-cursorsignal is a keybinding signal.If the
typeisGTK_DELETE_CHARS, GTK deletes the selection if there is one, otherwise it deletes the requested number of characters.The default bindings for this signal are <kbd>Delete</kbd> for deleting a character, <kbd>Ctrl</kbd>-<kbd>Delete</kbd> for deleting a word and <kbd>Ctrl</kbd>-<kbd>Backspace</kbd> for deleting a word backwards.
Note
This represents the underlyingdelete-from-cursorsignalDeclaration
Swift
@discardableResult @inlinable func onDeleteFromCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ type: DeleteType, _ count: Int) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
typethe granularity of the deletion, as a
GtkDeleteTypecountthe number of
typeunits to deletehandlerThe signal handler to call Run the given callback whenever the
deleteFromCursorsignal is emitted -
deleteFromCursorSignalExtension methodTyped
delete-from-cursorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var deleteFromCursorSignal: TextViewSignalName { get } -
onExtendSelection(flags:Extension methodhandler: ) Emitted when the selection needs to be extended at
location.Note
This represents the underlyingextend-selectionsignalDeclaration
Swift
@discardableResult @inlinable func onExtendSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ granularity: TextExtendSelection, _ location: TextIterRef, _ start: TextIterRef, _ end: TextIterRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
granularitythe granularity type
locationthe location where to extend the selection
startwhere the selection should start
endwhere the selection should end
handlerGDK_EVENT_STOPto stop other handlers from being invoked for the event.GDK_EVENT_PROPAGATEto propagate the event further. Run the given callback whenever theextendSelectionsignal is emitted -
extendSelectionSignalExtension methodTyped
extend-selectionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var extendSelectionSignal: TextViewSignalName { get } -
onInsertAtCursor(flags:Extension methodhandler: ) Gets emitted when the user initiates the insertion of a fixed string at the cursor.
The
insert-at-cursorsignal is a keybinding signal.This signal has no default bindings.
Note
This represents the underlyinginsert-at-cursorsignalDeclaration
Swift
@discardableResult @inlinable func onInsertAtCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ string: String) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
stringthe string to insert
handlerThe signal handler to call Run the given callback whenever the
insertAtCursorsignal is emitted -
insertAtCursorSignalExtension methodTyped
insert-at-cursorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var insertAtCursorSignal: TextViewSignalName { get } -
onInsertEmoji(flags:Extension methodhandler: ) Gets emitted to present the Emoji chooser for the
text_view.The
insert-emojisignal is a keybinding signal.The default bindings for this signal are <kbd>Ctrl</kbd>-<kbd>.</kbd> and <kbd>Ctrl</kbd>-<kbd>;</kbd>
Note
This represents the underlyinginsert-emojisignalDeclaration
Swift
@discardableResult @inlinable func onInsertEmoji(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
insertEmojisignal is emitted -
insertEmojiSignalExtension methodTyped
insert-emojisignal for using theconnect(signal:)methodsDeclaration
Swift
static var insertEmojiSignal: TextViewSignalName { get } -
onMoveCursor(flags:Extension methodhandler: ) Gets emitted when the user initiates a cursor movement.
The
move-cursorsignal is a keybinding signal. If the cursor is not visible intext_view, this signal causes the viewport to be moved instead.Applications should not connect to it, but may emit it with
g_signal_emit_by_name()if they need to control the cursor programmatically.The default bindings for this signal come in two variants, the variant with the <kbd>Shift</kbd> modifier extends the selection, the variant without it does not. There are too many key combinations to list them all here.
- <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> move by individual characters/lines
- <kbd>Ctrl</kbd>-<kbd>→</kbd>, etc. move by words/paragraphs
- <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the buffer
- <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages
- <kbd>Ctrl</kbd>-<kbd>PgUp</kbd>, <kbd>Ctrl</kbd>-<kbd>PgDn</kbd> move horizontally by pages
Note
This represents the underlyingmove-cursorsignalDeclaration
Swift
@discardableResult @inlinable func onMoveCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ step: MovementStep, _ count: Int, _ extendSelection: Bool) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
stepthe granularity of the move, as a
GtkMovementStepcountthe number of
stepunits to moveextendSelectiontrueif the move should extend the selectionhandlerThe signal handler to call Run the given callback whenever the
moveCursorsignal is emitted -
moveCursorSignalExtension methodTyped
move-cursorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var moveCursorSignal: TextViewSignalName { get } -
onMoveViewport(flags:Extension methodhandler: ) Gets emitted to move the viewport.
The
move-viewportsignal is a keybinding signal, which can be bound to key combinations to allow the user to move the viewport, i.e. change what part of the text view is visible in a containing scrolled window.There are no default bindings for this signal.
Note
This represents the underlyingmove-viewportsignalDeclaration
Swift
@discardableResult @inlinable func onMoveViewport(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ step: ScrollStep, _ count: Int) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
stepthe granularity of the movement, as a
GtkScrollStepcountthe number of
stepunits to movehandlerThe signal handler to call Run the given callback whenever the
moveViewportsignal is emitted -
moveViewportSignalExtension methodTyped
move-viewportsignal for using theconnect(signal:)methodsDeclaration
Swift
static var moveViewportSignal: TextViewSignalName { get } -
onPasteClipboard(flags:Extension methodhandler: ) Gets emitted to paste the contents of the clipboard into the text view.
The
paste-clipboardsignal is a keybinding signal.The default bindings for this signal are <kbd>Ctrl</kbd>-<kbd>v</kbd> and <kbd>Shift</kbd>-<kbd>Insert</kbd>.
Note
This represents the underlyingpaste-clipboardsignalDeclaration
Swift
@discardableResult @inlinable func onPasteClipboard(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
pasteClipboardsignal is emitted -
pasteClipboardSignalExtension methodTyped
paste-clipboardsignal for using theconnect(signal:)methodsDeclaration
Swift
static var pasteClipboardSignal: TextViewSignalName { get } -
onPreeditChanged(flags:Extension methodhandler: ) Emitted when preedit text of the active IM changes.
If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal.
This signal is only emitted if the text at the given position is actually editable.
Note
This represents the underlyingpreedit-changedsignalDeclaration
Swift
@discardableResult @inlinable func onPreeditChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ preedit: String) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
preeditthe current preedit string
handlerThe signal handler to call Run the given callback whenever the
preeditChangedsignal is emitted -
preeditChangedSignalExtension methodTyped
preedit-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var preeditChangedSignal: TextViewSignalName { get } -
onSelectAll(flags:Extension methodhandler: ) Gets emitted to select or unselect the complete contents of the text view.
The
select-allsignal is a keybinding signal.The default bindings for this signal are <kbd>Ctrl</kbd>-<kbd>a</kbd> and <kbd>Ctrl</kbd>-<kbd>/</kbd> for selecting and <kbd>Shift</kbd>-<kbd>Ctrl</kbd>-<kbd>a</kbd> and <kbd>Ctrl</kbd>-<kbd></kbd> for unselecting.
Note
This represents the underlyingselect-allsignalDeclaration
Swift
@discardableResult @inlinable func onSelectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ select: Bool) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
selecttrueto select,falseto unselecthandlerThe signal handler to call Run the given callback whenever the
selectAllsignal is emitted -
selectAllSignalExtension methodTyped
select-allsignal for using theconnect(signal:)methodsDeclaration
Swift
static var selectAllSignal: TextViewSignalName { get } -
onSetAnchor(flags:Extension methodhandler: ) Gets emitted when the user initiates settings the “anchor” mark.
The
set-anchorsignal is a keybinding signal which gets emitted when the user initiates setting the “anchor” mark. The “anchor” mark gets placed at the same position as the “insert” mark.This signal has no default bindings.
Note
This represents the underlyingset-anchorsignalDeclaration
Swift
@discardableResult @inlinable func onSetAnchor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
setAnchorsignal is emitted -
setAnchorSignalExtension methodTyped
set-anchorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var setAnchorSignal: TextViewSignalName { get } -
onToggleCursorVisible(flags:Extension methodhandler: ) Gets emitted to toggle the
cursor-visibleproperty.The
toggle-cursor-visiblesignal is a keybinding signal.The default binding for this signal is <kbd>F7</kbd>.
Note
This represents the underlyingtoggle-cursor-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onToggleCursorVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
toggleCursorVisiblesignal is emitted -
toggleCursorVisibleSignalExtension methodTyped
toggle-cursor-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var toggleCursorVisibleSignal: TextViewSignalName { get } -
onToggleOverwrite(flags:Extension methodhandler: ) Gets emitted to toggle the overwrite mode of the text view.
The
toggle-overwritesignal is a keybinding signal.The default binding for this signal is <kbd>Insert</kbd>.
Note
This represents the underlyingtoggle-overwritesignalDeclaration
Swift
@discardableResult @inlinable func onToggleOverwrite(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
toggleOverwritesignal is emitted -
toggleOverwriteSignalExtension methodTyped
toggle-overwritesignal for using theconnect(signal:)methodsDeclaration
Swift
static var toggleOverwriteSignal: TextViewSignalName { get } -
onNotifyAcceptsTab(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::accepts-tabsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptsTab(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAcceptsTabsignal is emitted -
notifyAcceptsTabSignalExtension methodTyped
notify::accepts-tabsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAcceptsTabSignal: TextViewSignalName { get } -
onNotifyBottomMargin(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::bottom-marginsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyBottomMargin(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyBottomMarginsignal is emitted -
notifyBottomMarginSignalExtension methodTyped
notify::bottom-marginsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyBottomMarginSignal: TextViewSignalName { get } -
onNotifyBuffer(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::buffersignalDeclaration
Swift
@discardableResult @inlinable func onNotifyBuffer(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyBuffersignal is emitted -
notifyBufferSignalExtension methodTyped
notify::buffersignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyBufferSignal: TextViewSignalName { get } -
onNotifyCursorVisible(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::cursor-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCursorVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCursorVisiblesignal is emitted -
notifyCursorVisibleSignalExtension methodTyped
notify::cursor-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCursorVisibleSignal: TextViewSignalName { get } -
onNotifyEditable(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::editablesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyEditable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyEditablesignal is emitted -
notifyEditableSignalExtension methodTyped
notify::editablesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyEditableSignal: TextViewSignalName { get } -
onNotifyExtraMenu(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::extra-menusignalDeclaration
Swift
@discardableResult @inlinable func onNotifyExtraMenu(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyExtraMenusignal is emitted -
notifyExtraMenuSignalExtension methodTyped
notify::extra-menusignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyExtraMenuSignal: TextViewSignalName { get } -
onNotifyImModule(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::im-modulesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyImModule(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyImModulesignal is emitted -
notifyImModuleSignalExtension methodTyped
notify::im-modulesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyImModuleSignal: TextViewSignalName { get } -
onNotifyIndent(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::indentsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIndent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIndentsignal is emitted -
notifyIndentSignalExtension methodTyped
notify::indentsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIndentSignal: TextViewSignalName { get } -
onNotifyInputHints(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::input-hintssignalDeclaration
Swift
@discardableResult @inlinable func onNotifyInputHints(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyInputHintssignal is emitted -
notifyInputHintsSignalExtension methodTyped
notify::input-hintssignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyInputHintsSignal: TextViewSignalName { get } -
onNotifyInputPurpose(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::input-purposesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyInputPurpose(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyInputPurposesignal is emitted -
notifyInputPurposeSignalExtension methodTyped
notify::input-purposesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyInputPurposeSignal: TextViewSignalName { get } -
onNotifyJustification(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::justificationsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyJustification(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyJustificationsignal is emitted -
notifyJustificationSignalExtension methodTyped
notify::justificationsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyJustificationSignal: TextViewSignalName { get } -
onNotifyLeftMargin(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::left-marginsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyLeftMargin(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyLeftMarginsignal is emitted -
notifyLeftMarginSignalExtension methodTyped
notify::left-marginsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyLeftMarginSignal: TextViewSignalName { get } -
onNotifyMonospace(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::monospacesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMonospace(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMonospacesignal is emitted -
notifyMonospaceSignalExtension methodTyped
notify::monospacesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMonospaceSignal: TextViewSignalName { get } -
onNotifyOverwrite(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::overwritesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyOverwrite(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyOverwritesignal is emitted -
notifyOverwriteSignalExtension methodTyped
notify::overwritesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyOverwriteSignal: TextViewSignalName { get } -
onNotifyPixelsAboveLines(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::pixels-above-linessignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPixelsAboveLines(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPixelsAboveLinessignal is emitted -
notifyPixelsAboveLinesSignalExtension methodTyped
notify::pixels-above-linessignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPixelsAboveLinesSignal: TextViewSignalName { get } -
onNotifyPixelsBelowLines(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::pixels-below-linessignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPixelsBelowLines(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPixelsBelowLinessignal is emitted -
notifyPixelsBelowLinesSignalExtension methodTyped
notify::pixels-below-linessignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPixelsBelowLinesSignal: TextViewSignalName { get } -
onNotifyPixelsInsideWrap(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::pixels-inside-wrapsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPixelsInsideWrap(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPixelsInsideWrapsignal is emitted -
notifyPixelsInsideWrapSignalExtension methodTyped
notify::pixels-inside-wrapsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPixelsInsideWrapSignal: TextViewSignalName { get } -
onNotifyRightMargin(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::right-marginsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyRightMargin(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyRightMarginsignal is emitted -
notifyRightMarginSignalExtension methodTyped
notify::right-marginsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyRightMarginSignal: TextViewSignalName { get } -
onNotifyTabs(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::tabssignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTabs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTabssignal is emitted -
notifyTabsSignalExtension methodTyped
notify::tabssignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTabsSignal: TextViewSignalName { get } -
onNotifyTopMargin(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::top-marginsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTopMargin(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTopMarginsignal is emitted -
notifyTopMarginSignalExtension methodTyped
notify::top-marginsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTopMarginSignal: TextViewSignalName { get } -
onNotifyWrapMode(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::wrap-modesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyWrapMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TextViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyWrapModesignal is emitted -
notifyWrapModeSignalExtension methodTyped
notify::wrap-modesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyWrapModeSignal: TextViewSignalName { get }
-
addChildAtAnchor(child:Extension methodanchor: ) Adds a child widget in the text buffer, at the given
anchor.Declaration
Swift
@inlinable func addChildAtAnchor<TextChildAnchorT, WidgetT>(child: WidgetT, anchor: TextChildAnchorT) where TextChildAnchorT : TextChildAnchorProtocol, WidgetT : WidgetProtocol -
addOverlay(child:Extension methodxpos: ypos: ) Adds
childat a fixed coordinate in theGtkTextView‘s text window.The
xposandyposmust be in buffer coordinates (see [methodGtk.TextView.get_iter_location] to convert to buffer coordinates).childwill scroll with the text view.If instead you want a widget that will not move with the
GtkTextViewcontents seeGtkOverlay.Declaration
Swift
@inlinable func addOverlay<WidgetT>(child: WidgetT, xpos: Int, ypos: Int) where WidgetT : WidgetProtocol -
backwardDisplayLine(iter:Extension method) Moves the given
iterbackward by one display (wrapped) line.A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.Declaration
Swift
@inlinable func backwardDisplayLine<TextIterT>(iter: TextIterT) -> Bool where TextIterT : TextIterProtocol -
backwardDisplayLineStart(iter:Extension method) Moves the given
iterbackward to the next display line start.A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.Declaration
Swift
@inlinable func backwardDisplayLineStart<TextIterT>(iter: TextIterT) -> Bool where TextIterT : TextIterProtocol -
bufferToWindowCoords(win:Extension methodbufferX: bufferY: windowX: windowY: ) Converts buffer coordinates to window coordinates.
Declaration
Swift
@inlinable func bufferToWindowCoords(win: GtkTextWindowType, bufferX: Int, bufferY: Int, windowX: UnsafeMutablePointer<gint>! = nil, windowY: UnsafeMutablePointer<gint>! = nil) -
forwardDisplayLine(iter:Extension method) Moves the given
iterforward by one display (wrapped) line.A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.Declaration
Swift
@inlinable func forwardDisplayLine<TextIterT>(iter: TextIterT) -> Bool where TextIterT : TextIterProtocol -
forwardDisplayLineEnd(iter:Extension method) Moves the given
iterforward to the next display line end.A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.Declaration
Swift
@inlinable func forwardDisplayLineEnd<TextIterT>(iter: TextIterT) -> Bool where TextIterT : TextIterProtocol -
getAcceptsTab()Extension methodReturns whether pressing the <kbd>Tab</kbd> key inserts a tab characters.
See [method
Gtk.TextView.set_accepts_tab].Declaration
Swift
@inlinable func getAcceptsTab() -> Bool -
getBottomMargin()Extension methodGets the bottom margin for text in the
text_view.Declaration
Swift
@inlinable func getBottomMargin() -> Int -
getBuffer()Extension methodReturns the
GtkTextBufferbeing displayed by this text view.The reference count on the buffer is not incremented; the caller of this function won’t own a new reference.
Declaration
Swift
@inlinable func getBuffer() -> TextBufferRef! -
getCursorLocations(iter:Extension methodstrong: weak: ) Determine the positions of the strong and weak cursors if the insertion point is at
iter.The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the paragraph are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the paragraph are inserted.
If
iterisnil, the actual cursor position is used.Note that if
iterhappens to be the actual cursor position, and there is currently an IM preedit sequence being entered, the returned locations will be adjusted to account for the preedit cursor’s offset within the preedit sequence.The rectangle position is in buffer coordinates; use [method
Gtk.TextView.buffer_to_window_coords] to convert these coordinates to coordinates for one of the windows in the text view.Declaration
Swift
@inlinable func getCursorLocations(iter: TextIterRef? = nil, strong: Gdk.RectangleRef? = nil, weak: Gdk.RectangleRef? = nil) -
getCursorLocations(iter:Extension methodstrong: weak: ) Determine the positions of the strong and weak cursors if the insertion point is at
iter.The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the paragraph are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the paragraph are inserted.
If
iterisnil, the actual cursor position is used.Note that if
iterhappens to be the actual cursor position, and there is currently an IM preedit sequence being entered, the returned locations will be adjusted to account for the preedit cursor’s offset within the preedit sequence.The rectangle position is in buffer coordinates; use [method
Gtk.TextView.buffer_to_window_coords] to convert these coordinates to coordinates for one of the windows in the text view.Declaration
Swift
@inlinable func getCursorLocations<RectangleT, TextIterT>(iter: TextIterT?, strong: RectangleT?, weak: RectangleT?) where RectangleT : RectangleProtocol, TextIterT : TextIterProtocol -
getCursorVisible()Extension methodFind out whether the cursor should be displayed.
Declaration
Swift
@inlinable func getCursorVisible() -> Bool -
getEditable()Extension methodReturns the default editability of the
GtkTextView.Tags in the buffer may override this setting for some ranges of text.
Declaration
Swift
@inlinable func getEditable() -> Bool -
getExtraMenu()Extension methodGets the menu model that gets added to the context menu or
nilif none has been set.Declaration
Swift
@inlinable func getExtraMenu() -> GIO.MenuModelRef! -
getGutter(win:Extension method) Gets a
GtkWidgetthat has previously been set as gutter.See [method
Gtk.TextView.set_gutter].winmust be one ofGTK_TEXT_WINDOW_LEFT,GTK_TEXT_WINDOW_RIGHT,GTK_TEXT_WINDOW_TOP, orGTK_TEXT_WINDOW_BOTTOM.Declaration
Swift
@inlinable func getGutter(win: GtkTextWindowType) -> WidgetRef! -
getIndent()Extension methodGets the default indentation of paragraphs in
text_view.Tags in the view’s buffer may override the default. The indentation may be negative.
Declaration
Swift
@inlinable func getIndent() -> Int -
getInputHints()Extension methodGets the
input-hintsof theGtkTextView.Declaration
Swift
@inlinable func getInputHints() -> InputHints -
getInputPurpose()Extension methodGets the
input-purposeof theGtkTextView.Declaration
Swift
@inlinable func getInputPurpose() -> GtkInputPurpose -
getIterAtLocation(iter:Extension methodx: y: ) Retrieves the iterator at buffer coordinates
xandy.Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with [method
Gtk.TextView.window_to_buffer_coords].Declaration
Swift
@inlinable func getIterAtLocation<TextIterT>(iter: TextIterT, x: Int, y: Int) -> Bool where TextIterT : TextIterProtocol -
getIterAtPosition(iter:Extension methodtrailing: x: y: ) Retrieves the iterator pointing to the character at buffer coordinates
xandy.Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with [method
Gtk.TextView.window_to_buffer_coords].Note that this is different from [method
Gtk.TextView.get_iter_at_location], which returns cursor locations, i.e. positions between characters.Declaration
Swift
@inlinable func getIterAtPosition<TextIterT>(iter: TextIterT, trailing: UnsafeMutablePointer<gint>! = nil, x: Int, y: Int) -> Bool where TextIterT : TextIterProtocol -
getIterLocation(iter:Extension methodlocation: ) Gets a rectangle which roughly contains the character at
iter.The rectangle position is in buffer coordinates; use [method
Gtk.TextView.buffer_to_window_coords] to convert these coordinates to coordinates for one of the windows in the text view.Declaration
Swift
@inlinable func getIterLocation<RectangleT, TextIterT>(iter: TextIterT, location: RectangleT) where RectangleT : RectangleProtocol, TextIterT : TextIterProtocol -
getJustification()Extension methodGets the default justification of paragraphs in
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable func getJustification() -> GtkJustification -
getLeftMargin()Extension methodGets the default left margin size of paragraphs in the
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable func getLeftMargin() -> Int -
getLineAtY(targetIter:Extension methody: lineTop: ) Gets the
GtkTextIterat the start of the line containing the coordinatey.yis in buffer coordinates, convert from window coordinates with [methodGtk.TextView.window_to_buffer_coords]. If non-nil,line_topwill be filled with the coordinate of the top edge of the line.Declaration
Swift
@inlinable func getLineAtY<TextIterT>(targetIter: TextIterT, y: Int, lineTop: UnsafeMutablePointer<gint>!) where TextIterT : TextIterProtocol -
getLineYrange(iter:Extension methody: height: ) Gets the y coordinate of the top of the line containing
iter, and the height of the line.The coordinate is a buffer coordinate; convert to window coordinates with [method
Gtk.TextView.buffer_to_window_coords].Declaration
Swift
@inlinable func getLineYrange<TextIterT>(iter: TextIterT, y: UnsafeMutablePointer<gint>!, height: UnsafeMutablePointer<gint>!) where TextIterT : TextIterProtocol -
getLtrContext()Extension methodGets the
PangoContextthat is used for rendering LTR directed text layouts.The context may be replaced when CSS changes occur.
Declaration
Swift
@inlinable func getLtrContext() -> Pango.ContextRef! -
getMonospace()Extension methodGets whether the
GtkTextViewuses monospace styling.Declaration
Swift
@inlinable func getMonospace() -> Bool -
getOverwrite()Extension methodReturns whether the
GtkTextViewis in overwrite mode or not.Declaration
Swift
@inlinable func getOverwrite() -> Bool -
getPixelsAboveLines()Extension methodGets the default number of pixels to put above paragraphs.
Adding this function with [method
Gtk.TextView.get_pixels_below_lines] is equal to the line space between each paragraph.Declaration
Swift
@inlinable func getPixelsAboveLines() -> Int -
getPixelsBelowLines()Extension methodGets the default number of pixels to put below paragraphs.
The line space is the sum of the value returned by this function and the value returned by [method
Gtk.TextView.get_pixels_above_lines].Declaration
Swift
@inlinable func getPixelsBelowLines() -> Int -
getPixelsInsideWrap()Extension methodGets the default number of pixels to put between wrapped lines inside a paragraph.
Declaration
Swift
@inlinable func getPixelsInsideWrap() -> Int -
getRightMargin()Extension methodGets the default right margin for text in
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable func getRightMargin() -> Int -
getRtlContext()Extension methodGets the
PangoContextthat is used for rendering RTL directed text layouts.The context may be replaced when CSS changes occur.
Declaration
Swift
@inlinable func getRtlContext() -> Pango.ContextRef! -
getTabs()Extension methodGets the default tabs for
text_view.Tags in the buffer may override the defaults. The returned array will be
nilif “standard” (8-space) tabs are used. Free the return value with [methodPango.TabArray.free].Declaration
Swift
@inlinable func getTabs() -> Pango.TabArrayRef! -
getTopMargin()Extension methodGets the top margin for text in the
text_view.Declaration
Swift
@inlinable func getTopMargin() -> Int -
get(visibleRect:Extension method) Fills
visible_rectwith the currently-visible region of the buffer, in buffer coordinates.Convert to window coordinates with [method
Gtk.TextView.buffer_to_window_coords].Declaration
Swift
@inlinable func get<RectangleT>(visibleRect: RectangleT) where RectangleT : RectangleProtocol -
getWrapMode()Extension methodGets the line wrapping for the view.
Declaration
Swift
@inlinable func getWrapMode() -> GtkWrapMode -
imContextFilterKeypress(event:Extension method) Allow the
GtkTextViewinput method to internally handle key press and release events.If this function returns
true, then no further processing should be done for this key event. See [methodGtk.IMContext.filter_keypress].Note that you are expected to call this function from your handler when overriding key event handling. This is needed in the case when you need to insert your own key handling between the input method and the default key event handling of the
GtkTextView.static gboolean gtk_foo_bar_key_press_event (GtkWidget *widget, GdkEvent *event) { guint keyval; gdk_event_get_keyval ((GdkEvent*)event, &keyval); if (keyval == GDK_KEY_Return || keyval == GDK_KEY_KP_Enter) { if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (widget), event)) return TRUE; } // Do some stuff return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event); }Declaration
Swift
@inlinable func imContextFilterKeypress<EventT>(event: EventT) -> Bool where EventT : EventProtocol -
moveMarkOnscreen(mark:Extension method) Moves a mark within the buffer so that it’s located within the currently-visible text area.
Declaration
Swift
@inlinable func moveMarkOnscreen<TextMarkT>(mark: TextMarkT) -> Bool where TextMarkT : TextMarkProtocol -
moveOverlay(child:Extension methodxpos: ypos: ) Updates the position of a child.
See [method
Gtk.TextView.add_overlay].Declaration
Swift
@inlinable func moveOverlay<WidgetT>(child: WidgetT, xpos: Int, ypos: Int) where WidgetT : WidgetProtocol -
moveVisually(iter:Extension methodcount: ) Move the iterator a given number of characters visually, treating it as the strong cursor position.
If
countis positive, then the new strong cursor position will becountpositions to the right of the old cursor position. Ifcountis negative then the new strong cursor position will becountpositions to the left of the old cursor position.In the presence of bi-directional text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run.
Declaration
Swift
@inlinable func moveVisually<TextIterT>(iter: TextIterT, count: Int) -> Bool where TextIterT : TextIterProtocol -
placeCursorOnscreen()Extension methodMoves the cursor to the currently visible region of the buffer.
Declaration
Swift
@inlinable func placeCursorOnscreen() -> Bool -
remove(child:Extension method) Removes a child widget from
text_view.Declaration
Swift
@inlinable func remove<WidgetT>(child: WidgetT) where WidgetT : WidgetProtocol -
resetCursorBlink()Extension methodEnsures that the cursor is shown.
This also resets the time that it will stay blinking (or visible, in case blinking is disabled).
This function should be called in response to user input (e.g. from derived classes that override the textview’s event handlers).
Declaration
Swift
@inlinable func resetCursorBlink() -
resetImContext()Extension methodReset the input method context of the text view if needed.
This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.
Declaration
Swift
@inlinable func resetImContext() -
scrollMarkOnscreen(mark:Extension method) Scrolls
text_viewthe minimum distance such thatmarkis contained within the visible area of the widget.Declaration
Swift
@inlinable func scrollMarkOnscreen<TextMarkT>(mark: TextMarkT) where TextMarkT : TextMarkProtocol -
scrollTo(iter:Extension methodwithin: useAlign: xalign: yalign: ) Scrolls
text_viewso thatiteris on the screen in the position indicated byxalignandyalign.An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If
use_alignisfalse, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of sizewithin_margin.Note that this function uses the currently-computed height of the lines in the text buffer. Line heights are computed in an idle handler; so this function may not have the desired effect if it’s called before the height computations. To avoid oddness, consider using [method
Gtk.TextView.scroll_to_mark] which saves a point to be scrolled to after line validation.Declaration
Swift
@inlinable func scrollTo<TextIterT>(iter: TextIterT, within margin: CDouble, useAlign: Bool, xalign: CDouble, yalign: CDouble) -> Bool where TextIterT : TextIterProtocol -
scrollTo(mark:Extension methodwithin: useAlign: xalign: yalign: ) Scrolls
text_viewso thatmarkis on the screen in the position indicated byxalignandyalign.An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If
use_alignisfalse, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of sizewithin_margin.Declaration
Swift
@inlinable func scrollTo<TextMarkT>(mark: TextMarkT, within margin: CDouble, useAlign: Bool, xalign: CDouble, yalign: CDouble) where TextMarkT : TextMarkProtocol -
set(acceptsTab:Extension method) Sets the behavior of the text widget when the <kbd>Tab</kbd> key is pressed.
If
accepts_tabistrue, a tab character is inserted. Ifaccepts_tabisfalsethe keyboard focus is moved to the next widget in the focus chain.Declaration
Swift
@inlinable func set(acceptsTab: Bool) -
set(bottomMargin:Extension method) Sets the bottom margin for text in
text_view.Note that this function is confusingly named. In CSS terms, the value set here is padding.
Declaration
Swift
@inlinable func set(bottomMargin: Int) -
set(buffer:Extension method) Sets
bufferas the buffer being displayed bytext_view.The previous buffer displayed by the text view is unreferenced, and a reference is added to
buffer. If you owned a reference tobufferbefore passing it to this function, you must remove that reference yourself;GtkTextViewwill not “adopt” it.Declaration
Swift
@inlinable func set(buffer: TextBufferRef? = nil) -
set(buffer:Extension method) Sets
bufferas the buffer being displayed bytext_view.The previous buffer displayed by the text view is unreferenced, and a reference is added to
buffer. If you owned a reference tobufferbefore passing it to this function, you must remove that reference yourself;GtkTextViewwill not “adopt” it.Declaration
Swift
@inlinable func set<TextBufferT>(buffer: TextBufferT?) where TextBufferT : TextBufferProtocol -
setCursorVisible(setting:Extension method) Toggles whether the insertion point should be displayed.
A buffer with no editable text probably shouldn’t have a visible cursor, so you may want to turn the cursor off.
Note that this property may be overridden by the [property
GtkSettings:gtk-keynav-use-caret] setting.Declaration
Swift
@inlinable func setCursorVisible(setting: Bool) -
setEditable(setting:Extension method) Sets the default editability of the
GtkTextView.You can override this default setting with tags in the buffer, using the “editable” attribute of tags.
Declaration
Swift
@inlinable func setEditable(setting: Bool) -
setExtraMenu(model:Extension method) Sets a menu model to add when constructing the context menu for
text_view.You can pass
nilto remove a previously set extra menu.Declaration
Swift
@inlinable func setExtraMenu(model: GIO.MenuModelRef? = nil) -
setExtraMenu(model:Extension method) Sets a menu model to add when constructing the context menu for
text_view.You can pass
nilto remove a previously set extra menu.Declaration
Swift
@inlinable func setExtraMenu<MenuModelT>(model: MenuModelT?) where MenuModelT : MenuModelProtocol -
setGutter(win:Extension methodwidget: ) Places
widgetinto the gutter specified bywin.winmust be one ofGTK_TEXT_WINDOW_LEFT,GTK_TEXT_WINDOW_RIGHT,GTK_TEXT_WINDOW_TOP, orGTK_TEXT_WINDOW_BOTTOM.Declaration
Swift
@inlinable func setGutter(win: GtkTextWindowType, widget: WidgetRef? = nil) -
setGutter(win:Extension methodwidget: ) Places
widgetinto the gutter specified bywin.winmust be one ofGTK_TEXT_WINDOW_LEFT,GTK_TEXT_WINDOW_RIGHT,GTK_TEXT_WINDOW_TOP, orGTK_TEXT_WINDOW_BOTTOM.Declaration
Swift
@inlinable func setGutter<WidgetT>(win: GtkTextWindowType, widget: WidgetT?) where WidgetT : WidgetProtocol -
set(indent:Extension method) Sets the default indentation for paragraphs in
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable func set(indent: Int) -
setInput(hints:Extension method) Sets the
input-hintsof theGtkTextView.The
input-hintsallow input methods to fine-tune their behaviour.Declaration
Swift
@inlinable func setInput(hints: InputHints) -
setInput(purpose:Extension method) Sets the
input-purposeof theGtkTextView.The
input-purposecan be used by on-screen keyboards and other input methods to adjust their behaviour.Declaration
Swift
@inlinable func setInput(purpose: GtkInputPurpose) -
set(justification:Extension method) Sets the default justification of text in
text_view.Tags in the view’s buffer may override the default.
Declaration
Swift
@inlinable func set(justification: GtkJustification) -
set(leftMargin:Extension method) Sets the default left margin for text in
text_view.Tags in the buffer may override the default.
Note that this function is confusingly named. In CSS terms, the value set here is padding.
Declaration
Swift
@inlinable func set(leftMargin: Int) -
set(monospace:Extension method) Sets whether the
GtkTextViewshould display text in monospace styling.Declaration
Swift
@inlinable func set(monospace: Bool) -
set(overwrite:Extension method) Changes the
GtkTextViewoverwrite mode.Declaration
Swift
@inlinable func set(overwrite: Bool) -
set(pixelsAboveLines:Extension method) Sets the default number of blank pixels above paragraphs in
text_view.Tags in the buffer for
text_viewmay override the defaults.Declaration
Swift
@inlinable func set(pixelsAboveLines: Int) -
set(pixelsBelowLines:Extension method) Sets the default number of pixels of blank space to put below paragraphs in
text_view.May be overridden by tags applied to
text_view’s buffer.Declaration
Swift
@inlinable func set(pixelsBelowLines: Int) -
set(pixelsInsideWrap:Extension method) Sets the default number of pixels of blank space to leave between display/wrapped lines within a paragraph.
May be overridden by tags in
text_view’s buffer.Declaration
Swift
@inlinable func set(pixelsInsideWrap: Int) -
set(rightMargin:Extension method) Sets the default right margin for text in the text view.
Tags in the buffer may override the default.
Note that this function is confusingly named. In CSS terms, the value set here is padding.
Declaration
Swift
@inlinable func set(rightMargin: Int) -
set(tabs:Extension method) Sets the default tab stops for paragraphs in
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable func set<TabArrayT>(tabs: TabArrayT) where TabArrayT : TabArrayProtocol -
set(topMargin:Extension method) Sets the top margin for text in
text_view.Note that this function is confusingly named. In CSS terms, the value set here is padding.
Declaration
Swift
@inlinable func set(topMargin: Int) -
set(wrapMode:Extension method) Sets the line wrapping for the view.
Declaration
Swift
@inlinable func set(wrapMode: GtkWrapMode) -
startsDisplayLine(iter:Extension method) Determines whether
iteris at the start of a display line.See [method
Gtk.TextView.forward_display_line] for an explanation of display lines vs. paragraphs.Declaration
Swift
@inlinable func startsDisplayLine<TextIterT>(iter: TextIterT) -> Bool where TextIterT : TextIterProtocol -
windowToBufferCoords(win:Extension methodwindowX: windowY: bufferX: bufferY: ) Converts coordinates on the window identified by
winto buffer coordinates.Declaration
Swift
@inlinable func windowToBufferCoords(win: GtkTextWindowType, windowX: Int, windowY: Int, bufferX: UnsafeMutablePointer<gint>! = nil, bufferY: UnsafeMutablePointer<gint>! = nil) -
acceptsTabExtension methodReturns whether pressing the <kbd>Tab</kbd> key inserts a tab characters.
See [method
Gtk.TextView.set_accepts_tab].Declaration
Swift
@inlinable var acceptsTab: Bool { get nonmutating set } -
bottomMarginExtension methodGets the bottom margin for text in the
text_view.Declaration
Swift
@inlinable var bottomMargin: Int { get nonmutating set } -
bufferExtension methodThe buffer which is displayed.
Declaration
Swift
@inlinable var buffer: TextBufferRef! { get nonmutating set } -
cursorVisibleExtension methodFind out whether the cursor should be displayed.
Declaration
Swift
@inlinable var cursorVisible: Bool { get nonmutating set } -
editableExtension methodUndocumented
Declaration
Swift
@inlinable var editable: Bool { get nonmutating set } -
extraMenuExtension methodGets the menu model that gets added to the context menu or
nilif none has been set.Declaration
Swift
@inlinable var extraMenu: GIO.MenuModelRef! { get nonmutating set } -
indentExtension methodAmount to indent the paragraph, in pixels.
Declaration
Swift
@inlinable var indent: Int { get nonmutating set } -
inputHintsExtension methodGets the
input-hintsof theGtkTextView.Declaration
Swift
@inlinable var inputHints: InputHints { get nonmutating set } -
inputPurposeExtension methodGets the
input-purposeof theGtkTextView.Declaration
Swift
@inlinable var inputPurpose: GtkInputPurpose { get nonmutating set } -
justificationExtension methodUndocumented
Declaration
Swift
@inlinable var justification: GtkJustification { get nonmutating set } -
leftMarginExtension methodGets the default left margin size of paragraphs in the
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable var leftMargin: Int { get nonmutating set } -
ltrContextExtension methodGets the
PangoContextthat is used for rendering LTR directed text layouts.The context may be replaced when CSS changes occur.
Declaration
Swift
@inlinable var ltrContext: Pango.ContextRef! { get } -
monospaceExtension methodWhether text should be displayed in a monospace font.
If
true, set the .monospace style class on the text view to indicate that a monospace font is desired.Declaration
Swift
@inlinable var monospace: Bool { get nonmutating set } -
overwriteExtension methodWhether entered text overwrites existing contents.
Declaration
Swift
@inlinable var overwrite: Bool { get nonmutating set } -
pixelsAboveLinesExtension methodGets the default number of pixels to put above paragraphs.
Adding this function with [method
Gtk.TextView.get_pixels_below_lines] is equal to the line space between each paragraph.Declaration
Swift
@inlinable var pixelsAboveLines: Int { get nonmutating set } -
pixelsBelowLinesExtension methodGets the default number of pixels to put below paragraphs.
The line space is the sum of the value returned by this function and the value returned by [method
Gtk.TextView.get_pixels_above_lines].Declaration
Swift
@inlinable var pixelsBelowLines: Int { get nonmutating set } -
pixelsInsideWrapExtension methodGets the default number of pixels to put between wrapped lines inside a paragraph.
Declaration
Swift
@inlinable var pixelsInsideWrap: Int { get nonmutating set } -
rightMarginExtension methodGets the default right margin for text in
text_view.Tags in the buffer may override the default.
Declaration
Swift
@inlinable var rightMargin: Int { get nonmutating set } -
rtlContextExtension methodGets the
PangoContextthat is used for rendering RTL directed text layouts.The context may be replaced when CSS changes occur.
Declaration
Swift
@inlinable var rtlContext: Pango.ContextRef! { get } -
tabsExtension methodUndocumented
Declaration
Swift
@inlinable var tabs: Pango.TabArrayRef! { get nonmutating set } -
topMarginExtension methodGets the top margin for text in the
text_view.Declaration
Swift
@inlinable var topMargin: Int { get nonmutating set } -
wrapModeExtension methodGets the line wrapping for the view.
Declaration
Swift
@inlinable var wrapMode: GtkWrapMode { get nonmutating set } -
parentInstanceExtension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GtkWidget { get } -
textExtension methodUndocumented
Declaration
Swift
@inlinable var text: String { get nonmutating set }
View on GitHub
Install in Dash
TextViewProtocol Protocol Reference