TextView

You may wish to begin by reading the [text widget conceptual overview]TextWidget which gives an overview of all the objects and data types related to the text widget and how they work together.

CSS nodes

|[<!-- language="plain" --> 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.

class TextView : Container , ScrollableIF {}

Constructors

this
this(GtkTextView* gtkTextView, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new #GtkTextView. If you don’t call gtk_text_view_set_buffer() before using the text view, an empty default buffer will be created for you. Get the buffer with gtk_text_view_get_buffer(). If you want to specify your own buffer, consider gtk_text_view_new_with_buffer().

this
this(TextBuffer buffer)

Creates a new #GtkTextView widget displaying the buffer @buffer. One buffer can be shared among many widgets. @buffer may be %NULL to create a default buffer, in which case this function is equivalent to gtk_text_view_new(). The text view adds its own reference count to the buffer; it does not take over an existing reference.

Members

Classes

OnBackspaceDelegateWrapper
class OnBackspaceDelegateWrapper
Undocumented in source.
OnCopyClipboardDelegateWrapper
class OnCopyClipboardDelegateWrapper
Undocumented in source.
OnCutClipboardDelegateWrapper
class OnCutClipboardDelegateWrapper
Undocumented in source.
OnDeleteFromCursorDelegateWrapper
class OnDeleteFromCursorDelegateWrapper
Undocumented in source.
OnExtendSelectionDelegateWrapper
class OnExtendSelectionDelegateWrapper
Undocumented in source.
OnInsertAtCursorDelegateWrapper
class OnInsertAtCursorDelegateWrapper
Undocumented in source.
OnMoveCursorDelegateWrapper
class OnMoveCursorDelegateWrapper
Undocumented in source.
OnMoveViewportDelegateWrapper
class OnMoveViewportDelegateWrapper
Undocumented in source.
OnPasteClipboardDelegateWrapper
class OnPasteClipboardDelegateWrapper
Undocumented in source.
OnPopulatePopupDelegateWrapper
class OnPopulatePopupDelegateWrapper
Undocumented in source.
OnPreeditChangedDelegateWrapper
class OnPreeditChangedDelegateWrapper
Undocumented in source.
OnSelectAllDelegateWrapper
class OnSelectAllDelegateWrapper
Undocumented in source.
OnSetAnchorDelegateWrapper
class OnSetAnchorDelegateWrapper
Undocumented in source.
OnToggleCursorVisibleDelegateWrapper
class OnToggleCursorVisibleDelegateWrapper
Undocumented in source.
OnToggleOverwriteDelegateWrapper
class OnToggleOverwriteDelegateWrapper
Undocumented in source.

Functions

addChildAtAnchor
void addChildAtAnchor(Widget child, TextChildAnchor anchor)

Adds a child widget in the text buffer, at the given @anchor.

addChildInWindow
void addChildInWindow(Widget child, GtkTextWindowType whichWindow, int xpos, int ypos)

Adds a child at fixed coordinates in one of the text widget's windows.

addOnBackspace
gulong addOnBackspace(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::backspace signal is a [keybinding signal]GtkBindingSignal which gets emitted when the user asks for it.

addOnCopyClipboard
gulong addOnCopyClipboard(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::copy-clipboard signal is a [keybinding signal]GtkBindingSignal which gets emitted to copy the selection to the clipboard.

addOnCutClipboard
gulong addOnCutClipboard(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::cut-clipboard signal is a [keybinding signal]GtkBindingSignal which gets emitted to cut the selection to the clipboard.

addOnDeleteFromCursor
gulong addOnDeleteFromCursor(void delegate(GtkDeleteType, int, TextView) dlg, ConnectFlags connectFlags)

The ::delete-from-cursor signal is a [keybinding signal]GtkBindingSignal which gets emitted when the user initiates a text deletion.

addOnExtendSelection
gulong addOnExtendSelection(bool delegate(GtkTextExtendSelection, TextIter, TextIter, TextIter, TextView) dlg, ConnectFlags connectFlags)

The ::extend-selection signal is emitted when the selection needs to be extended at @location.

addOnInsertAtCursor
gulong addOnInsertAtCursor(void delegate(string, TextView) dlg, ConnectFlags connectFlags)

The ::insert-at-cursor signal is a [keybinding signal]GtkBindingSignal which gets emitted when the user initiates the insertion of a fixed string at the cursor.

addOnMoveCursor
gulong addOnMoveCursor(void delegate(GtkMovementStep, int, bool, TextView) dlg, ConnectFlags connectFlags)

The ::move-cursor signal is a [keybinding signal]GtkBindingSignal which gets emitted when the user initiates a cursor movement. If the cursor is not visible in @text_view, this signal causes the viewport to be moved instead.

addOnMoveViewport
gulong addOnMoveViewport(void delegate(GtkScrollStep, int, TextView) dlg, ConnectFlags connectFlags)

The ::move-viewport signal is a [keybinding signal]GtkBindingSignal 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.

addOnPasteClipboard
gulong addOnPasteClipboard(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::paste-clipboard signal is a [keybinding signal]GtkBindingSignal which gets emitted to paste the contents of the clipboard into the text view.

addOnPopulatePopup
gulong addOnPopulatePopup(void delegate(Widget, TextView) dlg, ConnectFlags connectFlags)

The ::populate-popup signal gets emitted before showing the context menu of the text view.

addOnPreeditChanged
gulong addOnPreeditChanged(void delegate(string, TextView) dlg, ConnectFlags connectFlags)

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.

addOnSelectAll
gulong addOnSelectAll(void delegate(bool, TextView) dlg, ConnectFlags connectFlags)

The ::select-all signal is a [keybinding signal]GtkBindingSignal which gets emitted to select or unselect the complete contents of the text view.

addOnSetAnchor
gulong addOnSetAnchor(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::set-anchor signal is a [keybinding signal]GtkBindingSignal which gets emitted when the user initiates setting the "anchor" mark. The "anchor" mark gets placed at the same position as the "insert" mark.

addOnToggleCursorVisible
gulong addOnToggleCursorVisible(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::toggle-cursor-visible signal is a [keybinding signal]GtkBindingSignal which gets emitted to toggle the #GtkTextView:cursor-visible property.

addOnToggleOverwrite
gulong addOnToggleOverwrite(void delegate(TextView) dlg, ConnectFlags connectFlags)

The ::toggle-overwrite signal is a [keybinding signal]GtkBindingSignal which gets emitted to toggle the overwrite mode of the text view.

appendText
void appendText(string text, bool ensureVisible)

Simply appends some text to this view

backwardDisplayLine
bool backwardDisplayLine(TextIter iter)

Moves the given @iter backward 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.

backwardDisplayLineStart
bool backwardDisplayLineStart(TextIter iter)

Moves the given @iter backward 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.

bufferToWindowCoords
void bufferToWindowCoords(GtkTextWindowType win, int bufferX, int bufferY, int windowX, int windowY)

Converts coordinate (@buffer_x, @buffer_y) to coordinates for the window @win, and stores the result in (@window_x, @window_y).

forwardDisplayLine
bool forwardDisplayLine(TextIter iter)

Moves the given @iter forward 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.

forwardDisplayLineEnd
bool forwardDisplayLineEnd(TextIter iter)

Moves the given @iter forward 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.

getAcceptsTab
bool getAcceptsTab()

Returns whether pressing the Tab key inserts a tab characters. gtk_text_view_set_accepts_tab().

getBorderWindowSize
int getBorderWindowSize(GtkTextWindowType type)

Gets the width of the specified border window. See gtk_text_view_set_border_window_size().

getBottomMargin
int getBottomMargin()

Gets the bottom margin for text in the @text_view.

getBuffer
TextBuffer getBuffer()

Returns the #GtkTextBuffer being 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.

getCursorLocations
void getCursorLocations(TextIter iter, GdkRectangle strong, GdkRectangle weak)

Given an @iter within a text layout, determine the positions of the strong and weak cursors if the insertion point is at that iterator. 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.

getCursorVisible
bool getCursorVisible()

Find out whether the cursor should be displayed.

getDefaultAttributes
TextAttributes getDefaultAttributes()

Obtains a copy of the default text attributes. These are the attributes used for text unless a tag overrides them. You’d typically pass the default attributes in to gtk_text_iter_get_attributes() in order to get the attributes in effect at a given text position.

getEditable
bool getEditable()

Returns the default editability of the #GtkTextView. Tags in the buffer may override this setting for some ranges of text.

getIndent
int getIndent()

Gets the default indentation of paragraphs in @text_view. Tags in the view’s buffer may override the default. The indentation may be negative.

getInputHints
GtkInputHints getInputHints()

Gets the value of the #GtkTextView:input-hints property.

getInputPurpose
GtkInputPurpose getInputPurpose()

Gets the value of the #GtkTextView:input-purpose property.

getIterAtLocation
bool getIterAtLocation(TextIter iter, int x, int y)

Retrieves the iterator at buffer coordinates @x and @y. 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 gtk_text_view_window_to_buffer_coords().

getIterAtPosition
bool getIterAtPosition(TextIter iter, int trailing, int x, int y)

Retrieves the iterator pointing to the character at buffer coordinates @x and @y. 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 gtk_text_view_window_to_buffer_coords().

getIterLocation
void getIterLocation(TextIter iter, GdkRectangle location)

Gets a rectangle which roughly contains the character at @iter. The rectangle position is in buffer coordinates; use gtk_text_view_buffer_to_window_coords() to convert these coordinates to coordinates for one of the windows in the text view.

getJustification
GtkJustification getJustification()

Gets the default justification of paragraphs in @text_view. Tags in the buffer may override the default.

getLeftMargin
int getLeftMargin()

Gets the default left margin size of paragraphs in the @text_view. Tags in the buffer may override the default.

getLineAtY
void getLineAtY(TextIter targetIter, int y, int lineTop)

Gets the #GtkTextIter at the start of the line containing the coordinate @y. @y is in buffer coordinates, convert from window coordinates with gtk_text_view_window_to_buffer_coords(). If non-%NULL, @line_top will be filled with the coordinate of the top edge of the line.

getLineTextAt
string getLineTextAt(int y)

Get the text line at the pixel y

getLineYrange
void getLineYrange(TextIter iter, int y, int 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 gtk_text_view_buffer_to_window_coords().

getMonospace
bool getMonospace()

Gets the value of the #GtkTextView:monospace property.

getOverwrite
bool getOverwrite()

Returns whether the #GtkTextView is in overwrite mode or not.

getPixelsAboveLines
int getPixelsAboveLines()

Gets the default number of pixels to put above paragraphs. Adding this function with gtk_text_view_get_pixels_below_lines() is equal to the line space between each paragraph.

getPixelsBelowLines
int getPixelsBelowLines()

Gets the value set by gtk_text_view_set_pixels_below_lines().

getPixelsInsideWrap
int getPixelsInsideWrap()

Gets the value set by gtk_text_view_set_pixels_inside_wrap().

getRightMargin
int getRightMargin()

Gets the default right margin for text in @text_view. Tags in the buffer may override the default.

getStruct
void* getStruct()

the main Gtk struct as a void*

getTabs
PgTabArray getTabs()

Gets the default tabs for @text_view. Tags in the buffer may override the defaults. The returned array will be %NULL if “standard” (8-space) tabs are used. Free the return value with pango_tab_array_free().

getTextViewStruct
GtkTextView* getTextViewStruct()

Get the main Gtk struct

getTopMargin
int getTopMargin()

Gets the top margin for text in the @text_view.

getVisibleRect
void getVisibleRect(GdkRectangle visibleRect)

Fills @visible_rect with the currently-visible region of the buffer, in buffer coordinates. Convert to window coordinates with gtk_text_view_buffer_to_window_coords().

getWindow
Window getWindow(GtkTextWindowType win)

Retrieves the #GdkWindow corresponding to an area of the text view; possible windows include the overall widget window, child windows on the left, right, top, bottom, and the window that displays the text buffer. Windows are %NULL and nonexistent if their width or height is 0, and are nonexistent before the widget has been realized.

getWindowType
GtkTextWindowType getWindowType(Window window)

Usually used to find out which window an event corresponds to. If you connect to an event signal on @text_view, this function should be called on event->window to see which window it was.

getWrapMode
GtkWrapMode getWrapMode()

Gets the line wrapping for the view.

imContextFilterKeypress
bool imContextFilterKeypress(GdkEventKey* event)

Allow the #GtkTextView input 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 gtk_im_context_filter_keypress().

insertText
void insertText(string text)

Simply appends some on the cursor position

internalRemoveOnBackspace
void internalRemoveOnBackspace(OnBackspaceDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnCopyClipboard
void internalRemoveOnCopyClipboard(OnCopyClipboardDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnCutClipboard
void internalRemoveOnCutClipboard(OnCutClipboardDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnDeleteFromCursor
void internalRemoveOnDeleteFromCursor(OnDeleteFromCursorDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnExtendSelection
void internalRemoveOnExtendSelection(OnExtendSelectionDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnInsertAtCursor
void internalRemoveOnInsertAtCursor(OnInsertAtCursorDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnMoveCursor
void internalRemoveOnMoveCursor(OnMoveCursorDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnMoveViewport
void internalRemoveOnMoveViewport(OnMoveViewportDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnPasteClipboard
void internalRemoveOnPasteClipboard(OnPasteClipboardDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnPopulatePopup
void internalRemoveOnPopulatePopup(OnPopulatePopupDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnPreeditChanged
void internalRemoveOnPreeditChanged(OnPreeditChangedDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnSelectAll
void internalRemoveOnSelectAll(OnSelectAllDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnSetAnchor
void internalRemoveOnSetAnchor(OnSetAnchorDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnToggleCursorVisible
void internalRemoveOnToggleCursorVisible(OnToggleCursorVisibleDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnToggleOverwrite
void internalRemoveOnToggleOverwrite(OnToggleOverwriteDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
moveChild
void moveChild(Widget child, int xpos, int ypos)

Updates the position of a child, as for gtk_text_view_add_child_in_window().

moveMarkOnscreen
bool moveMarkOnscreen(TextMark mark)

Moves a mark within the buffer so that it's located within the currently-visible text area.

moveVisually
bool moveVisually(TextIter iter, int count)

Move the iterator a given number of characters visually, treating it as the strong cursor position. If @count is positive, then the new strong cursor position will be @count positions to the right of the old cursor position. If @count is negative then the new strong cursor position will be @count positions to the left of the old cursor position.

placeCursorOnscreen
bool placeCursorOnscreen()

Moves the cursor to the currently visible region of the buffer, it it isn’t there already.

resetCursorBlink
void resetCursorBlink()

Ensures that the cursor is shown (i.e. not in an 'off' blink interval) and resets the time that it will stay blinking (or visible, in case blinking is disabled).

resetImContext
void resetImContext()

Reset the input method context of the text view if needed.

scrollMarkOnscreen
void scrollMarkOnscreen(TextMark mark)

Scrolls @text_view the minimum distance such that @mark is contained within the visible area of the widget.

scrollToIter
bool scrollToIter(TextIter iter, double withinMargin, bool useAlign, double xalign, double yalign)

Scrolls @text_view so that @iter is on the screen in the position indicated by @xalign and @yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If @use_align is %FALSE, 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 size @within_margin.

scrollToMark
void scrollToMark(TextMark mark, double withinMargin, bool useAlign, double xalign, double yalign)

Scrolls @text_view so that @mark is on the screen in the position indicated by @xalign and @yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If @use_align is %FALSE, 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 size @within_margin.

setAcceptsTab
void setAcceptsTab(bool acceptsTab)

Sets the behavior of the text widget when the Tab key is pressed. If @accepts_tab is %TRUE, a tab character is inserted. If @accepts_tab is %FALSE the keyboard focus is moved to the next widget in the focus chain.

setBorderWindowSize
void setBorderWindowSize(GtkTextWindowType type, int size)

Sets the width of %GTK_TEXT_WINDOW_LEFT or %GTK_TEXT_WINDOW_RIGHT, or the height of %GTK_TEXT_WINDOW_TOP or %GTK_TEXT_WINDOW_BOTTOM. Automatically destroys the corresponding window if the size is set to 0, and creates the window if the size is set to non-zero. This function can only be used for the “border windows,” it doesn’t work with #GTK_TEXT_WINDOW_WIDGET, #GTK_TEXT_WINDOW_TEXT, or #GTK_TEXT_WINDOW_PRIVATE.

setBottomMargin
void setBottomMargin(int bottomMargin)

Sets the bottom margin for text in @text_view.

setBuffer
void setBuffer(TextBuffer buffer)

Sets @buffer as the buffer being displayed by @text_view. The previous buffer displayed by the text view is unreferenced, and a reference is added to @buffer. If you owned a reference to @buffer before passing it to this function, you must remove that reference yourself; #GtkTextView will not “adopt” it.

setCursorVisible
void setCursorVisible(bool setting)

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.

setEditable
void setEditable(bool setting)

Sets the default editability of the #GtkTextView. You can override this default setting with tags in the buffer, using the “editable” attribute of tags.

setIndent
void setIndent(int indent)

Sets the default indentation for paragraphs in @text_view. Tags in the buffer may override the default.

setInputHints
void setInputHints(GtkInputHints hints)

Sets the #GtkTextView:input-hints property, which allows input methods to fine-tune their behaviour.

setInputPurpose
void setInputPurpose(GtkInputPurpose purpose)

Sets the #GtkTextView:input-purpose property which can be used by on-screen keyboards and other input methods to adjust their behaviour.

setJustification
void setJustification(GtkJustification justification)

Sets the default justification of text in @text_view. Tags in the view’s buffer may override the default.

setLeftMargin
void setLeftMargin(int leftMargin)

Sets the default left margin for text in @text_view. Tags in the buffer may override the default.

setMonospace
void setMonospace(bool monospace)

Sets the #GtkTextView:monospace property, which indicates that the text view should use monospace fonts.

setOverwrite
void setOverwrite(bool overwrite)

Changes the #GtkTextView overwrite mode.

setPixelsAboveLines
void setPixelsAboveLines(int pixelsAboveLines)

Sets the default number of blank pixels above paragraphs in @text_view. Tags in the buffer for @text_view may override the defaults.

setPixelsBelowLines
void setPixelsBelowLines(int pixelsBelowLines)

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.

setPixelsInsideWrap
void setPixelsInsideWrap(int pixelsInsideWrap)

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.

setRightMargin
void setRightMargin(int rightMargin)

Sets the default right margin for text in the text view. Tags in the buffer may override the default.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setTabs
void setTabs(PgTabArray tabs)

Sets the default tab stops for paragraphs in @text_view. Tags in the buffer may override the default.

setTopMargin
void setTopMargin(int topMargin)

Sets the top margin for text in @text_view.

setWrapMode
void setWrapMode(GtkWrapMode wrapMode)

Sets the line wrapping for the view.

startsDisplayLine
bool startsDisplayLine(TextIter iter)

Determines whether @iter is at the start of a display line. See gtk_text_view_forward_display_line() for an explanation of display lines vs. paragraphs.

windowToBufferCoords
void windowToBufferCoords(GtkTextWindowType win, int windowX, int windowY, int bufferX, int bufferY)

Converts coordinates on the window identified by @win to buffer coordinates, storing the result in (@buffer_x,@buffer_y).

Mixins

__anonymous
mixin ScrollableT!(GtkTextView)
Undocumented in source.

Static functions

callBackBackspace
void callBackBackspace(GtkTextView* textviewStruct, OnBackspaceDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackBackspaceDestroy
void callBackBackspaceDestroy(OnBackspaceDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCopyClipboard
void callBackCopyClipboard(GtkTextView* textviewStruct, OnCopyClipboardDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCopyClipboardDestroy
void callBackCopyClipboardDestroy(OnCopyClipboardDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCutClipboard
void callBackCutClipboard(GtkTextView* textviewStruct, OnCutClipboardDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCutClipboardDestroy
void callBackCutClipboardDestroy(OnCutClipboardDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDeleteFromCursor
void callBackDeleteFromCursor(GtkTextView* textviewStruct, GtkDeleteType type, int count, OnDeleteFromCursorDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDeleteFromCursorDestroy
void callBackDeleteFromCursorDestroy(OnDeleteFromCursorDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackExtendSelection
int callBackExtendSelection(GtkTextView* textviewStruct, GtkTextExtendSelection granularity, GtkTextIter* location, GtkTextIter* start, GtkTextIter* end, OnExtendSelectionDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackExtendSelectionDestroy
void callBackExtendSelectionDestroy(OnExtendSelectionDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackInsertAtCursor
void callBackInsertAtCursor(GtkTextView* textviewStruct, char* str, OnInsertAtCursorDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackInsertAtCursorDestroy
void callBackInsertAtCursorDestroy(OnInsertAtCursorDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveCursor
void callBackMoveCursor(GtkTextView* textviewStruct, GtkMovementStep step, int count, bool extendSelection, OnMoveCursorDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveCursorDestroy
void callBackMoveCursorDestroy(OnMoveCursorDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveViewport
void callBackMoveViewport(GtkTextView* textviewStruct, GtkScrollStep step, int count, OnMoveViewportDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveViewportDestroy
void callBackMoveViewportDestroy(OnMoveViewportDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPasteClipboard
void callBackPasteClipboard(GtkTextView* textviewStruct, OnPasteClipboardDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPasteClipboardDestroy
void callBackPasteClipboardDestroy(OnPasteClipboardDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPopulatePopup
void callBackPopulatePopup(GtkTextView* textviewStruct, GtkWidget* popup, OnPopulatePopupDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPopulatePopupDestroy
void callBackPopulatePopupDestroy(OnPopulatePopupDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPreeditChanged
void callBackPreeditChanged(GtkTextView* textviewStruct, char* preedit, OnPreeditChangedDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPreeditChangedDestroy
void callBackPreeditChangedDestroy(OnPreeditChangedDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectAll
void callBackSelectAll(GtkTextView* textviewStruct, bool select, OnSelectAllDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectAllDestroy
void callBackSelectAllDestroy(OnSelectAllDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSetAnchor
void callBackSetAnchor(GtkTextView* textviewStruct, OnSetAnchorDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSetAnchorDestroy
void callBackSetAnchorDestroy(OnSetAnchorDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackToggleCursorVisible
void callBackToggleCursorVisible(GtkTextView* textviewStruct, OnToggleCursorVisibleDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackToggleCursorVisibleDestroy
void callBackToggleCursorVisibleDestroy(OnToggleCursorVisibleDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackToggleOverwrite
void callBackToggleOverwrite(GtkTextView* textviewStruct, OnToggleOverwriteDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackToggleOverwriteDestroy
void callBackToggleOverwriteDestroy(OnToggleOverwriteDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()

Variables

gtkTextView
GtkTextView* gtkTextView;

the main Gtk struct

onBackspaceListeners
OnBackspaceDelegateWrapper[] onBackspaceListeners;
Undocumented in source.
onCopyClipboardListeners
OnCopyClipboardDelegateWrapper[] onCopyClipboardListeners;
Undocumented in source.
onCutClipboardListeners
OnCutClipboardDelegateWrapper[] onCutClipboardListeners;
Undocumented in source.
onDeleteFromCursorListeners
OnDeleteFromCursorDelegateWrapper[] onDeleteFromCursorListeners;
Undocumented in source.
onExtendSelectionListeners
OnExtendSelectionDelegateWrapper[] onExtendSelectionListeners;
Undocumented in source.
onInsertAtCursorListeners
OnInsertAtCursorDelegateWrapper[] onInsertAtCursorListeners;
Undocumented in source.
onMoveCursorListeners
OnMoveCursorDelegateWrapper[] onMoveCursorListeners;
Undocumented in source.
onMoveViewportListeners
OnMoveViewportDelegateWrapper[] onMoveViewportListeners;
Undocumented in source.
onPasteClipboardListeners
OnPasteClipboardDelegateWrapper[] onPasteClipboardListeners;
Undocumented in source.
onPopulatePopupListeners
OnPopulatePopupDelegateWrapper[] onPopulatePopupListeners;
Undocumented in source.
onPreeditChangedListeners
OnPreeditChangedDelegateWrapper[] onPreeditChangedListeners;
Undocumented in source.
onSelectAllListeners
OnSelectAllDelegateWrapper[] onSelectAllListeners;
Undocumented in source.
onSetAnchorListeners
OnSetAnchorDelegateWrapper[] onSetAnchorListeners;
Undocumented in source.
onToggleCursorVisibleListeners
OnToggleCursorVisibleDelegateWrapper[] onToggleCursorVisibleListeners;
Undocumented in source.
onToggleOverwriteListeners
OnToggleOverwriteDelegateWrapper[] onToggleOverwriteListeners;
Undocumented in source.

Inherited Members

From Container

gtkContainer
GtkContainer* gtkContainer;

the main Gtk struct

getContainerStruct
GtkContainer* getContainerStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
removeAll
void removeAll()

Removes all widgets from the container

getType
GType getType()
add
void add(Widget widget)

Adds @widget to @container. Typically used for simple containers such as #GtkWindow, #GtkFrame, or #GtkButton; for more complicated layout containers such as #GtkBox or #GtkGrid, this function will pick default packing parameters that may not be correct. So consider functions such as gtk_box_pack_start() and gtk_grid_attach() as an alternative to gtk_container_add() in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers.

checkResize
void checkResize()
childGetProperty
void childGetProperty(Widget child, string propertyName, Value value)

Gets the value of a child property for @child and @container.

childGetValist
void childGetValist(Widget child, string firstPropertyName, void* varArgs)

Gets the values of one or more child properties for @child and @container.

childNotify
void childNotify(Widget child, string childProperty)

Emits a #GtkWidget::child-notify signal for the [child property][child-properties] @child_property on the child.

childNotifyByPspec
void childNotifyByPspec(Widget child, ParamSpec pspec)

Emits a #GtkWidget::child-notify signal for the [child property][child-properties] specified by @pspec on the child.

childSetProperty
void childSetProperty(Widget child, string propertyName, Value value)

Sets a child property for @child and @container.

childSetValist
void childSetValist(Widget child, string firstPropertyName, void* varArgs)

Sets one or more child properties for @child and @container.

childType
GType childType()

Returns the type of the children supported by the container.

forall
void forall(GtkCallback callback, void* callbackData)

Invokes @callback on each direct child of @container, including children that are considered “internal” (implementation details of the container). “Internal” children generally weren’t added by the user of the container, but were added by the container implementation itself.

foreac
void foreac(GtkCallback callback, void* callbackData)

Invokes @callback on each non-internal child of @container. See gtk_container_forall() for details on what constitutes an “internal” child. For all practical purposes, this function should iterate over precisely those child widgets that were added to the container by the application with explicit add() calls.

getBorderWidth
uint getBorderWidth()

Retrieves the border width of the container. See gtk_container_set_border_width().

getChildren
ListG getChildren()

Returns the container’s non-internal children. See gtk_container_forall() for details on what constitutes an "internal" child.

getFocusChain
bool getFocusChain(ListG focusableWidgets)

Retrieves the focus chain of the container, if one has been set explicitly. If no focus chain has been explicitly set, GTK+ computes the focus chain based on the positions of the children. In that case, GTK+ stores %NULL in @focusable_widgets and returns %FALSE.

getFocusChild
Widget getFocusChild()

Returns the current focus child widget inside @container. This is not the currently focused widget. That can be obtained by calling gtk_window_get_focus().

getFocusHadjustment
Adjustment getFocusHadjustment()

Retrieves the horizontal focus adjustment for the container. See gtk_container_set_focus_hadjustment ().

getFocusVadjustment
Adjustment getFocusVadjustment()

Retrieves the vertical focus adjustment for the container. See gtk_container_set_focus_vadjustment().

getPathForChild
WidgetPath getPathForChild(Widget child)

Returns a newly created widget path representing all the widget hierarchy from the toplevel down to and including @child.

getResizeMode
GtkResizeMode getResizeMode()

Returns the resize mode for the container. See gtk_container_set_resize_mode ().

propagateDraw
void propagateDraw(Widget child, Context cr)

When a container receives a call to the draw function, it must send synthetic #GtkWidget::draw calls to all children that don’t have their own #GdkWindows. This function provides a convenient way of doing this. A container, when it receives a call to its #GtkWidget::draw function, calls gtk_container_propagate_draw() once for each child, passing in the @cr the container received.

remove
void remove(Widget widget)

Removes @widget from @container. @widget must be inside @container. Note that @container will own a reference to @widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use @widget again, you need to add a reference to it before removing it from a container, using g_object_ref(). If you don’t want to use @widget again it’s usually more efficient to simply destroy it directly using gtk_widget_destroy() since this will remove it from the container and help break any circular reference count cycles.

resizeChildren
void resizeChildren()
setBorderWidth
void setBorderWidth(uint borderWidth)

Sets the border width of the container.

setFocusChain
void setFocusChain(ListG focusableWidgets)

Sets a focus chain, overriding the one computed automatically by GTK+.

setFocusChild
void setFocusChild(Widget child)

Sets, or unsets if @child is %NULL, the focused child of @container.

setFocusHadjustment
void setFocusHadjustment(Adjustment adjustment)

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the horizontal alignment. See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining the adjustment and gtk_container_set_focus_vadjustment() for setting the vertical adjustment.

setFocusVadjustment
void setFocusVadjustment(Adjustment adjustment)

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the vertical alignment. See gtk_scrolled_window_get_vadjustment() for a typical way of obtaining the adjustment and gtk_container_set_focus_hadjustment() for setting the horizontal adjustment.

setReallocateRedraws
void setReallocateRedraws(bool needsRedraws)

Sets the @reallocate_redraws flag of the container to the given value.

setResizeMode
void setResizeMode(GtkResizeMode resizeMode)

Sets the resize mode for the container.

unsetFocusChain
void unsetFocusChain()

Removes a focus chain explicitly set with gtk_container_set_focus_chain().

OnAddDelegateWrapper
class OnAddDelegateWrapper
Undocumented in source.
onAddListeners
OnAddDelegateWrapper[] onAddListeners;
Undocumented in source.
addOnAdd
gulong addOnAdd(void delegate(Widget, Container) dlg, ConnectFlags connectFlags)
callBackAdd
void callBackAdd(GtkContainer* containerStruct, GtkWidget* object, OnAddDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackAddDestroy
void callBackAddDestroy(OnAddDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnAdd
void internalRemoveOnAdd(OnAddDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
OnCheckResizeDelegateWrapper
class OnCheckResizeDelegateWrapper
Undocumented in source.
onCheckResizeListeners
OnCheckResizeDelegateWrapper[] onCheckResizeListeners;
Undocumented in source.
addOnCheckResize
gulong addOnCheckResize(void delegate(Container) dlg, ConnectFlags connectFlags)
callBackCheckResize
void callBackCheckResize(GtkContainer* containerStruct, OnCheckResizeDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCheckResizeDestroy
void callBackCheckResizeDestroy(OnCheckResizeDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnCheckResize
void internalRemoveOnCheckResize(OnCheckResizeDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
OnRemoveDelegateWrapper
class OnRemoveDelegateWrapper
Undocumented in source.
onRemoveListeners
OnRemoveDelegateWrapper[] onRemoveListeners;
Undocumented in source.
addOnRemove
gulong addOnRemove(void delegate(Widget, Container) dlg, ConnectFlags connectFlags)
callBackRemove
void callBackRemove(GtkContainer* containerStruct, GtkWidget* object, OnRemoveDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackRemoveDestroy
void callBackRemoveDestroy(OnRemoveDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnRemove
void internalRemoveOnRemove(OnRemoveDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
OnSetFocusChildDelegateWrapper
class OnSetFocusChildDelegateWrapper
Undocumented in source.
onSetFocusChildListeners
OnSetFocusChildDelegateWrapper[] onSetFocusChildListeners;
Undocumented in source.
addOnSetFocusChild
gulong addOnSetFocusChild(void delegate(Widget, Container) dlg, ConnectFlags connectFlags)
callBackSetFocusChild
void callBackSetFocusChild(GtkContainer* containerStruct, GtkWidget* object, OnSetFocusChildDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSetFocusChildDestroy
void callBackSetFocusChildDestroy(OnSetFocusChildDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnSetFocusChild
void internalRemoveOnSetFocusChild(OnSetFocusChildDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.

From ScrollableIF

getScrollableStruct
GtkScrollable* getScrollableStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getBorder
bool getBorder(Border border)

Returns the size of a non-scrolling border around the outside of the scrollable. An example for this would be treeview headers. GTK+ can use this information to display overlayed graphics, like the overshoot indication, at the right position.

getHadjustment
Adjustment getHadjustment()

Retrieves the #GtkAdjustment used for horizontal scrolling.

getHscrollPolicy
GtkScrollablePolicy getHscrollPolicy()

Gets the horizontal #GtkScrollablePolicy.

getVadjustment
Adjustment getVadjustment()

Retrieves the #GtkAdjustment used for vertical scrolling.

getVscrollPolicy
GtkScrollablePolicy getVscrollPolicy()

Gets the vertical #GtkScrollablePolicy.

setHadjustment
void setHadjustment(Adjustment hadjustment)

Sets the horizontal adjustment of the #GtkScrollable.

setHscrollPolicy
void setHscrollPolicy(GtkScrollablePolicy policy)

Sets the #GtkScrollablePolicy to determine whether horizontal scrolling should start below the minimum width or below the natural width.

setVadjustment
void setVadjustment(Adjustment vadjustment)

Sets the vertical adjustment of the #GtkScrollable.

setVscrollPolicy
void setVscrollPolicy(GtkScrollablePolicy policy)

Sets the #GtkScrollablePolicy to determine whether vertical scrolling should start below the minimum height or below the natural height.

Meta