Entry

Description The GtkEntry widget is a single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible. When using an entry for passwords and other sensitive information, it can be put into "password mode" using gtk_entry_set_visibility(). In this mode, entered text is displayed using a 'invisible' character. By default, GTK+ picks the best invisible character that is available in the current font, but it can be changed with gtk_entry_set_invisible_char(). Since 2.16, GTK+ displays a warning when Caps Lock or input methods might interfere with entering text in a password entry. The warning can be turned off with the "caps-lock-warning" property. Since 2.16, GtkEntry has the ability to display progress or activity information behind the text. To make an entry display such information, use gtk_entry_set_progress_fraction() or gtk_entry_set_progress_pulse_step(). Additionally, GtkEntry can show icons at either side of the entry. These icons can be activatable by clicking, can be set up as drag source and can have tooltips. To add an icon, use gtk_entry_set_icon_from_gicon() or one of the various other functions that set an icon from a stock id, an icon name or a pixbuf. To trigger an action when the user clicks an icon, connect to the "icon-press" signal. To allow DND operations from an icon, use gtk_entry_set_icon_drag_source(). To set a tooltip on an icon, use gtk_entry_set_icon_tooltip_text() or the corresponding function for markup. Note that functionality or information that is only available by clicking on an icon in an entry may not be accessible at all to users which are not able to use a mouse or other pointing device. It is therefore recommended that any such functionality should also be available by other means, e.g. via the context menu of the entry.

class Entry : Widget , EditableIF , CellEditableIF {}

Constructors

this
this(GtkEntry* gtkEntry)

Sets our main struct and passes it to the parent class

this
this(string text)
this
this(string text, int max)
this
this()

Creates a new entry.

this
this(EntryBuffer buffer)

Creates a new entry with the specified text buffer. Since 2.18

this
this(int max)

Warning gtk_entry_new_with_max_length has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_entry_set_max_length() instead. Creates a new GtkEntry widget with the given maximum length.

Members

Functions

addOnActivate
void addOnActivate(void delegate(Entry) dlg, ConnectFlags connectFlags)

A keybinding signal which gets emitted when the user activates the entry. Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control activation programmatically. The default bindings for this signal are all forms of the Enter key.

addOnBackspace
void addOnBackspace(void delegate(Entry) dlg, ConnectFlags connectFlags)

The ::backspace signal is a keybinding signal which gets emitted when the user asks for it. The default bindings for this signal are Backspace and Shift-Backspace.

addOnCopyClipboard
void addOnCopyClipboard(void delegate(Entry) dlg, ConnectFlags connectFlags)

The ::copy-clipboard signal is a keybinding signal which gets emitted to copy the selection to the clipboard. The default bindings for this signal are Ctrl-c and Ctrl-Insert.

addOnCutClipboard
void addOnCutClipboard(void delegate(Entry) dlg, ConnectFlags connectFlags)

The ::cut-clipboard signal is a keybinding signal which gets emitted to cut the selection to the clipboard. The default bindings for this signal are Ctrl-x and Shift-Delete.

addOnDeleteFromCursor
void addOnDeleteFromCursor(void delegate(GtkDeleteType, gint, Entry) dlg, ConnectFlags connectFlags)

The ::delete-from-cursor signal is a keybinding signal which gets emitted when the user initiates a text deletion. If the type is GTK_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 Delete for deleting a character and Ctrl-Delete for deleting a word.

addOnIconPress
void addOnIconPress(void delegate(GtkEntryIconPosition, GdkEvent*, Entry) dlg, ConnectFlags connectFlags)

The ::icon-press signal is emitted when an activatable icon is clicked. Since 2.16

addOnIconRelease
void addOnIconRelease(void delegate(GtkEntryIconPosition, GdkEvent*, Entry) dlg, ConnectFlags connectFlags)

The ::icon-release signal is emitted on the button release from a mouse click over an activatable icon. Since 2.16

addOnInsertAtCursor
void addOnInsertAtCursor(void delegate(string, Entry) dlg, ConnectFlags connectFlags)

The ::insert-at-cursor signal is a keybinding signal which gets emitted when the user initiates the insertion of a fixed string at the cursor. This signal has no default bindings.

addOnMoveCursor
void addOnMoveCursor(void delegate(GtkMovementStep, gint, gboolean, Entry) dlg, ConnectFlags connectFlags)

The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry, 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 Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here. Arrow keys move by individual characters/lines Ctrl-arrow key combinations move by words/paragraphs Home/End keys move to the ends of the buffer TRUE if the move should extend the selection

addOnPasteClipboard
void addOnPasteClipboard(void delegate(Entry) dlg, ConnectFlags connectFlags)

The ::paste-clipboard signal is a keybinding signal which gets emitted to paste the contents of the clipboard into the text view. The default bindings for this signal are Ctrl-v and Shift-Insert.

addOnPopulatePopup
void addOnPopulatePopup(void delegate(GtkMenu*, Entry) dlg, ConnectFlags connectFlags)

The ::populate-popup signal gets emitted before showing the context menu of the entry. If you need to add items to the context menu, connect to this signal and append your menuitems to the menu.

addOnPreeditChanged
void addOnPreeditChanged(void delegate(string, Entry) 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. Since 2.20

addOnToggleOverwrite
void addOnToggleOverwrite(void delegate(Entry) dlg, ConnectFlags connectFlags)

The ::toggle-overwrite signal is a keybinding signal which gets emitted to toggle the overwrite mode of the entry. The default bindings for this signal is Insert. See Also GtkTextView a widget for handling multi-line text entry. GtkEntryCompletion adds completion functionality to GtkEntry.

appendText
void appendText(string text)

Warning gtk_entry_append_text has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_editable_insert_text() instead. Appends the given text to the contents of the widget.

getActivatesDefault
int getActivatesDefault()

Retrieves the value set by gtk_entry_set_activates_default().

getAlignment
float getAlignment()

Gets the value set by gtk_entry_set_alignment(). Since 2.4

getBuffer
EntryBuffer getBuffer()

Get the GtkEntryBuffer object which holds the text for this widget. Since 2.18

getCompletion
EntryCompletion getCompletion()

Returns the auxiliary completion object currently in use by entry. Since 2.4

getCurrentIconDragSource
int getCurrentIconDragSource()

Returns the index of the icon which is the source of the current DND operation, or -1. This function is meant to be used in a "drag-data-get" callback. Since 2.16

getCursorHadjustment
Adjustment getCursorHadjustment()

Retrieves the horizontal cursor adjustment for the entry. See gtk_entry_set_cursor_hadjustment(). Since 2.12

getEntryStruct
GtkEntry* getEntryStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getHasFrame
int getHasFrame()

Gets the value set by gtk_entry_set_has_frame().

getIconActivatable
int getIconActivatable(GtkEntryIconPosition iconPos)

Returns whether the icon is activatable. Since 2.16

getIconAtPos
int getIconAtPos(int x, int y)

Finds the icon at the given position and return its index. If x, y doesn't lie inside an icon, -1 is returned. This function is intended for use in a "query-tooltip" signal handler. Since 2.16

getIconGicon
IconIF getIconGicon(GtkEntryIconPosition iconPos)

Retrieves the GIcon used for the icon, or NULL if there is no icon or if the icon was set by some other method (e.g., by stock, pixbuf, or icon name). Since 2.16

getIconName
string getIconName(GtkEntryIconPosition iconPos)

Retrieves the icon name used for the icon, or NULL if there is no icon or if the icon was set by some other method (e.g., by pixbuf, stock or gicon). Since 2.16

getIconPixbuf
Pixbuf getIconPixbuf(GtkEntryIconPosition iconPos)

Retrieves the image used for the icon. Unlike the other methods of setting and getting icon data, this method will work regardless of whether the icon was set using a GdkPixbuf, a GIcon, a stock item, or an icon name. Since 2.16

getIconSensitive
int getIconSensitive(GtkEntryIconPosition iconPos)

Returns whether the icon appears sensitive or insensitive. Since 2.16

getIconStock
string getIconStock(GtkEntryIconPosition iconPos)

Retrieves the stock id used for the icon, or NULL if there is no icon or if the icon was set by some other method (e.g., by pixbuf, icon name or gicon). Since 2.16

getIconStorageType
GtkImageType getIconStorageType(GtkEntryIconPosition iconPos)

Gets the type of representation being used by the icon to store image data. If the icon has no image data, the return value will be GTK_IMAGE_EMPTY. Since 2.16

getIconTooltipMarkup
string getIconTooltipMarkup(GtkEntryIconPosition iconPos)

Gets the contents of the tooltip on the icon at the specified position in entry. Since 2.16

getIconTooltipText
string getIconTooltipText(GtkEntryIconPosition iconPos)

Gets the contents of the tooltip on the icon at the specified position in entry. Since 2.16

getIconWindow
Window getIconWindow(GtkEntryIconPosition iconPos)

Returns the GdkWindow which contains the entry's icon at icon_pos. This function is useful when drawing something to the entry in an expose-event callback because it enables the callback to distinguish between the text window and entry's icon windows. See also gtk_entry_get_text_window(). Note that GTK+ 3 does not have this function anymore; it has been replaced by gtk_entry_get_icon_area(). Since 2.20

getInnerBorder
Border getInnerBorder()

This function returns the entry's "inner-border" property. See gtk_entry_set_inner_border() for more information. Since 2.10

getInvisibleChar
gunichar getInvisibleChar()

Retrieves the character displayed in place of the real characters for entries with visibility set to false. See gtk_entry_set_invisible_char().

getLayout
PgLayout getLayout()

Gets the PangoLayout used to display the entry. The layout is useful to e.g. convert text positions to pixel positions, in combination with gtk_entry_get_layout_offsets(). The returned layout is owned by the entry and must not be modified or freed by the caller. Keep in mind that the layout text may contain a preedit string, so gtk_entry_layout_index_to_text_index() and gtk_entry_text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.

getLayoutOffsets
void getLayoutOffsets(int x, int y)

Obtains the position of the PangoLayout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget. Also useful to convert mouse events into coordinates inside the PangoLayout, e.g. to take some action if some part of the entry text is clicked. Note that as the user scrolls around in the entry the offsets will change; you'll need to connect to the "notify::scroll-offset" signal to track this. Remember when using the PangoLayout functions you need to convert to and from pixels using PANGO_PIXELS() or PANGO_SCALE. Keep in mind that the layout text may contain a preedit string, so gtk_entry_layout_index_to_text_index() and gtk_entry_text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.

getMaxLength
int getMaxLength()

Retrieves the maximum allowed length of the text in entry. See gtk_entry_set_max_length().

getOverwriteMode
int getOverwriteMode()

Gets the value set by gtk_entry_set_overwrite_mode(). Since 2.14

getProgressFraction
double getProgressFraction()

Returns the current fraction of the task that's been completed. See gtk_entry_set_progress_fraction(). Since 2.16

getProgressPulseStep
double getProgressPulseStep()

Retrieves the pulse step set with gtk_entry_set_progress_pulse_step(). Since 2.16

getStockId
StockID getStockId(GtkEntryIconPosition iconPos)

Gets the stock id of action. Since 2.16

getStruct
void* getStruct()

the main Gtk struct as a void*

getText
string getText()

Retrieves the contents of the entry widget. See also gtk_editable_get_chars().

getTextLength
ushort getTextLength()

Retrieves the current length of the text in entry. Since 2.14

getTextWindow
Window getTextWindow()

Returns the GdkWindow which contains the text. This function is useful when drawing something to the entry in an expose-event callback because it enables the callback to distinguish between the text window and entry's icon windows. See also gtk_entry_get_icon_window(). Note that GTK+ 3 does not have this function anymore; it has been replaced by gtk_entry_get_text_area(). Since 2.20

getVisibility
int getVisibility()

Retrieves whether the text in entry is visible. See gtk_entry_set_visibility().

getWidthChars
int getWidthChars()

Gets the value set by gtk_entry_set_width_chars().

imContextFilterKeypress
int imContextFilterKeypress(GdkEventKey* event)

Allow the GtkEntry 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(). 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 GtkEntry. See gtk_text_view_reset_im_context() for an example of use. Since 2.22

layoutIndexToTextIndex
int layoutIndexToTextIndex(int layoutIndex)

Converts from a position in the entry contents (returned by gtk_entry_get_text()) to a position in the entry's PangoLayout (returned by gtk_entry_get_layout(), with text retrieved via pango_layout_get_text()).

prependText
void prependText(string text)

Warning gtk_entry_prepend_text has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_editable_insert_text() instead. Prepends the given text to the contents of the widget.

progressPulse
void progressPulse()

Indicates that some progress is made, but you don't know how much. Causes the entry's progress indicator to enter "activity mode," where a block bounces back and forth. Each call to gtk_entry_progress_pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by gtk_entry_set_progress_pulse_step()). Since 2.16

resetImContext
void resetImContext()

Reset the input method context of the entry if needed. This can be necessary in the case where modifying the buffer would confuse on-going input method behavior. Since 2.22

setActivatesDefault
void setActivatesDefault(int setting)

If setting is TRUE, pressing Enter in the entry will activate the default widget for the window containing the entry. This usually means that the dialog box containing the entry will be closed, since the default widget is usually one of the dialog buttons. (For experts: if setting is TRUE, the entry calls gtk_window_activate_default() on the window containing the entry, in the default handler for the "activate" signal.)

setAlignment
void setAlignment(float xalign)

Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry. Since 2.4

setBuffer
void setBuffer(EntryBuffer buffer)

Set the GtkEntryBuffer object which holds the text for this widget. Since 2.18

setCompletion
void setCompletion(EntryCompletion completion)

Sets completion to be the auxiliary completion object to use with entry. All further configuration of the completion mechanism is done on completion using the GtkEntryCompletion API. Completion is disabled if completion is set to NULL. Since 2.4

setCursorHadjustment
void setCursorHadjustment(Adjustment adjustment)

Hooks up an adjustment to the cursor position in an entry, so that when the cursor is moved, the adjustment is scrolled to show that position. See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining the adjustment. The adjustment has to be in pixel units and in the same coordinate system as the entry. Since 2.12

setHasFrame
void setHasFrame(int setting)

Sets whether the entry has a beveled frame around it.

setIconActivatable
void setIconActivatable(GtkEntryIconPosition iconPos, int activatable)

Sets whether the icon is activatable. Since 2.16

setIconDragSource
void setIconDragSource(GtkEntryIconPosition iconPos, GtkTargetList* targetList, GdkDragAction actions)

Sets up the icon at the given position so that GTK+ will start a drag operation when the user clicks and drags the icon. To handle the drag operation, you need to connect to the usual "drag-data-get" (or possibly "drag-data-delete") signal, and use gtk_entry_get_current_icon_drag_source() in your signal handler to find out if the drag was started from an icon. By default, GTK+ uses the icon as the drag icon. You can use the "drag-begin" signal to set a different icon. Note that you have to use g_signal_connect_after() to ensure that your signal handler gets executed after the default handler. Since 2.16

setIconFromGicon
void setIconFromGicon(GtkEntryIconPosition iconPos, IconIF icon)

Sets the icon shown in the entry at the specified position from the current icon theme. If the icon isn't known, a "broken image" icon will be displayed instead. If icon is NULL, no icon will be shown in the specified position. Since 2.16

setIconFromIconName
void setIconFromIconName(GtkEntryIconPosition iconPos, string iconName)

Sets the icon shown in the entry at the specified position from the current icon theme. If the icon name isn't known, a "broken image" icon will be displayed instead. If icon_name is NULL, no icon will be shown in the specified position. Since 2.16

setIconFromPixbuf
void setIconFromPixbuf(GtkEntryIconPosition iconPos, Pixbuf pixbuf)

Sets the icon shown in the specified position using a pixbuf. If pixbuf is NULL, no icon will be shown in the specified position. Since 2.16

setIconFromStock
void setIconFromStock(GtkEntryIconPosition iconPos, string stockId)

Sets the icon shown in the entry at the specified position from a stock image. If stock_id is NULL, no icon will be shown in the specified position. Since 2.16

setIconSensitive
void setIconSensitive(GtkEntryIconPosition iconPos, int sensitive)

Sets the sensitivity for the specified icon. Since 2.16

setIconTooltipMarkup
void setIconTooltipMarkup(GtkEntryIconPosition iconPos, string tooltip)

Sets tooltip as the contents of the tooltip for the icon at the specified position. tooltip is assumed to be marked up with the Pango text markup language. Use NULL for tooltip to remove an existing tooltip. See also gtk_widget_set_tooltip_markup() and gtk_enty_set_icon_tooltip_text(). Since 2.16

setIconTooltipText
void setIconTooltipText(GtkEntryIconPosition iconPos, string tooltip)

Sets tooltip as the contents of the tooltip for the icon at the specified position. Use NULL for tooltip to remove an existing tooltip. See also gtk_widget_set_tooltip_text() and gtk_entry_set_icon_tooltip_markup(). Since 2.16

setInnerBorder
void setInnerBorder(Border border)

Sets entry's inner-border property to border, or clears it if NULL is passed. The inner-border is the area around the entry's text, but inside its frame. If set, this property overrides the inner-border style property. Overriding the style-provided border is useful when you want to do in-place editing of some text in a canvas or list widget, where pixel-exact positioning of the entry is important. Since 2.10

setInvisibleChar
void setInvisibleChar(gunichar ch)

Sets the character to use in place of the actual text when gtk_entry_set_visibility() has been called to set text visibility to FALSE. i.e. this is the character used in "password mode" to show the user how many characters have been typed. By default, GTK+ picks the best invisible char available in the current font. If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.

setMaxLength
void setMaxLength(int max)

Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit.

setOverwriteMode
void setOverwriteMode(int overwrite)

Sets whether the text is overwritten when typing in the GtkEntry. Since 2.14

setProgressFraction
void setProgressFraction(double fraction)

Causes the entry's progress indicator to "fill in" the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive. Since 2.16

setProgressPulseStep
void setProgressPulseStep(double fraction)

Sets the fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse(). Since 2.16

setStockId
void setStockId(GtkEntryIconPosition iconPos, StockID stockId)

Sets the stock id on action Since 2.16

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

Sets the text in the widget to the given value, replacing the current contents. See gtk_entry_buffer_set_text().

setVisibility
void setVisibility(int visible)

Sets whether the contents of the entry are visible or not. When visibility is set to FALSE, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere. By default, GTK+ picks the best invisible character available in the current font, but it can be changed with gtk_entry_set_invisible_char().

setWidthChars
void setWidthChars(int nChars)

Changes the size request of the entry to be about the right size for n_chars characters. Note that it changes the size request, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size.

textIndexToLayoutIndex
int textIndexToLayoutIndex(int textIndex)

Converts from a position in the entry's PangoLayout (returned by gtk_entry_get_layout()) to a position in the entry contents (returned by gtk_entry_get_text()).

unsetInvisibleChar
void unsetInvisibleChar()

Unsets the invisible char previously set with gtk_entry_set_invisible_char(). So that the default invisible char is used again. Since 2.16

Mixins

__anonymous
mixin EditableT!(GtkEntry)
Undocumented in source.
__anonymous
mixin CellEditableT!(GtkEntry)
Undocumented in source.

Static functions

callBackActivate
void callBackActivate(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackBackspace
void callBackBackspace(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCopyClipboard
void callBackCopyClipboard(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCutClipboard
void callBackCutClipboard(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDeleteFromCursor
void callBackDeleteFromCursor(GtkEntry* entryStruct, GtkDeleteType type, gint count, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackIconPress
void callBackIconPress(GtkEntry* entryStruct, GtkEntryIconPosition iconPos, GdkEvent* event, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackIconRelease
void callBackIconRelease(GtkEntry* entryStruct, GtkEntryIconPosition iconPos, GdkEvent* event, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackInsertAtCursor
void callBackInsertAtCursor(GtkEntry* entryStruct, gchar* str, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveCursor
void callBackMoveCursor(GtkEntry* entryStruct, GtkMovementStep step, gint count, gboolean extendSelection, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPasteClipboard
void callBackPasteClipboard(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPopulatePopup
void callBackPopulatePopup(GtkEntry* entryStruct, GtkMenu* menu, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPreeditChanged
void callBackPreeditChanged(GtkEntry* entryStruct, gchar* preedit, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackToggleOverwrite
void callBackToggleOverwrite(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

connectedSignals
int[string] connectedSignals;
gtkEntry
GtkEntry* gtkEntry;

the main Gtk struct

onActivateListeners
void delegate(Entry)[] onActivateListeners;
Undocumented in source.
onBackspaceListeners
void delegate(Entry)[] onBackspaceListeners;
Undocumented in source.
onCopyClipboardListeners
void delegate(Entry)[] onCopyClipboardListeners;
Undocumented in source.
onCutClipboardListeners
void delegate(Entry)[] onCutClipboardListeners;
Undocumented in source.
onDeleteFromCursorListeners
void delegate(GtkDeleteType, gint, Entry)[] onDeleteFromCursorListeners;
Undocumented in source.
onIconPressListeners
void delegate(GtkEntryIconPosition, GdkEvent*, Entry)[] onIconPressListeners;
Undocumented in source.
onIconReleaseListeners
void delegate(GtkEntryIconPosition, GdkEvent*, Entry)[] onIconReleaseListeners;
Undocumented in source.
onInsertAtCursorListeners
void delegate(string, Entry)[] onInsertAtCursorListeners;
Undocumented in source.
onMoveCursorListeners
void delegate(GtkMovementStep, gint, gboolean, Entry)[] onMoveCursorListeners;
Undocumented in source.
onPasteClipboardListeners
void delegate(Entry)[] onPasteClipboardListeners;
Undocumented in source.
onPopulatePopupListeners
void delegate(GtkMenu*, Entry)[] onPopulatePopupListeners;
Undocumented in source.
onPreeditChangedListeners
void delegate(string, Entry)[] onPreeditChangedListeners;
Undocumented in source.
onToggleOverwriteListeners
void delegate(Entry)[] onToggleOverwriteListeners;
Undocumented in source.

Inherited Members

From Widget

gtkWidget
GtkWidget* gtkWidget;

the main Gtk struct

getWidgetStruct
GtkWidget* getWidgetStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
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.
__anonymous
mixin BuildableT!(GtkWidget)
Undocumented in source.
getWidgetClass
GtkWidgetClass* getWidgetClass()
Undocumented in source. Be warned that the author may not have intended to support it.
getWidth
int getWidth()
getHeight
int getHeight()
getAllocation
GtkAllocation getAllocation()

The widget's allocated size.

getDrawable
deprecated Drawable getDrawable()

Gets the drawable for this widget

getWindow
Window getWindow()

Gets the Window for this widget

setCursor
void setCursor(Cursor cursor)

Sets the cursor.

resetCursor
void resetCursor()

Resets the cursor. don't know if this is implemented by GTK+. Seems that it's not

modifyFont
void modifyFont(string family, int size)

Modifies the font for this widget. This just calls modifyFont(new PgFontDescription(PgFontDescription.fromString(family ~ " " ~ size)));

setTooltip
void setTooltip(string tipText, string tipPrivate)

Sets this widget tooltip

onEvent
bool onEvent(GdkEvent* event)
onButtonPressEvent
bool onButtonPressEvent(GdkEventButton* event)
onButtonReleaseEvent
bool onButtonReleaseEvent(GdkEventButton* event)
onScrollEvent
bool onScrollEvent(GdkEventScroll* event)
onMotionNotifyEvent
bool onMotionNotifyEvent(GdkEventMotion* event)
onDeleteEvent
bool onDeleteEvent(GdkEventAny* event)
onExposeEvent
bool onExposeEvent(GdkEventExpose* event)
onKeyPressEvent
bool onKeyPressEvent(GdkEventKey* event)
onKeyReleaseEvent
bool onKeyReleaseEvent(GdkEventKey* event)
onEnterNotifyEvent
bool onEnterNotifyEvent(GdkEventCrossing* event)
onLeaveNotifyEvent
bool onLeaveNotifyEvent(GdkEventCrossing* event)
onConfigureEvent
bool onConfigureEvent(GdkEventConfigure* event)
onFocusInEvent
bool onFocusInEvent(GdkEventFocus* event)
onFocusOutEvent
bool onFocusOutEvent(GdkEventFocus* event)
onMapEvent
bool onMapEvent(GdkEventAny* event)
onUnmapEvent
bool onUnmapEvent(GdkEventAny* event)
onPropertyNotifyEvent
bool onPropertyNotifyEvent(GdkEventProperty* event)
onSelectionClearEvent
bool onSelectionClearEvent(GdkEventSelection* event)
onSelectionRequestEvent
bool onSelectionRequestEvent(GdkEventSelection* event)
onSelectionNotifyEvent
bool onSelectionNotifyEvent(GdkEventSelection* event)
onProximityInEvent
bool onProximityInEvent(GdkEventProximity* event)
onProximityOutEvent
bool onProximityOutEvent(GdkEventProximity* event)
onVisibilityNotifyEvent
bool onVisibilityNotifyEvent(GdkEventVisibility* event)
onClientEvent
bool onClientEvent(GdkEventClient* event)
onNoExposeEvent
bool onNoExposeEvent(GdkEventAny* event)
onWindowStateEvent
bool onWindowStateEvent(GdkEventWindowState* event)
destroy
void destroy()

Destroys a widget.

addOnDestroy
alias addOnDestroy = ObjectGtk.addOnDestroy
Undocumented in source.
connectedSignals
int[string] connectedSignals;
onAccelClosuresChangedListeners
void delegate(Widget)[] onAccelClosuresChangedListeners;
Undocumented in source.
addOnAccelClosuresChanged
void addOnAccelClosuresChanged(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackAccelClosuresChanged
void callBackAccelClosuresChanged(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onButtonPressListeners
bool delegate(GdkEventButton*, Widget)[] onButtonPressListeners;
Undocumented in source.
addOnButtonPress
void addOnButtonPress(bool delegate(GdkEventButton*, Widget) dlg, ConnectFlags connectFlags)

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

callBackButtonPress
gboolean callBackButtonPress(GtkWidget* widgetStruct, GdkEventButton* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onButtonReleaseListeners
bool delegate(GdkEventButton*, Widget)[] onButtonReleaseListeners;
Undocumented in source.
addOnButtonRelease
void addOnButtonRelease(bool delegate(GdkEventButton*, Widget) dlg, ConnectFlags connectFlags)

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.

callBackButtonRelease
gboolean callBackButtonRelease(GtkWidget* widgetStruct, GdkEventButton* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onCanActivateAccelListeners
bool delegate(guint, Widget)[] onCanActivateAccelListeners;
Undocumented in source.
addOnCanActivateAccel
void addOnCanActivateAccel(bool delegate(guint, Widget) dlg, ConnectFlags connectFlags)

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default GtkWidget handling for determining whether an accelerator can be activated.

callBackCanActivateAccel
gboolean callBackCanActivateAccel(GtkWidget* widgetStruct, guint signalId, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onChildNotifyListeners
void delegate(ParamSpec, Widget)[] onChildNotifyListeners;
Undocumented in source.
addOnChildNotify
void addOnChildNotify(void delegate(ParamSpec, Widget) dlg, ConnectFlags connectFlags)

The ::child-notify signal is emitted for each child property that has changed on an object. The signal's detail holds the property name.

callBackChildNotify
void callBackChildNotify(GtkWidget* widgetStruct, GParamSpec* pspec, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onClientListeners
bool delegate(GdkEventClient*, Widget)[] onClientListeners;
Undocumented in source.
addOnClient
void addOnClient(bool delegate(GdkEventClient*, Widget) dlg, ConnectFlags connectFlags)

The ::client-event will be emitted when the widget's window receives a message (via a ClientMessage event) from another application.

callBackClient
gboolean callBackClient(GtkWidget* widgetStruct, GdkEventClient* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onCompositedChangedListeners
void delegate(Widget)[] onCompositedChangedListeners;
Undocumented in source.
addOnCompositedChanged
void addOnCompositedChanged(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::composited-changed signal is emitted when the composited status of widgets screen changes. See gdk_screen_is_composited().

callBackCompositedChanged
void callBackCompositedChanged(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onConfigureListeners
bool delegate(GdkEventConfigure*, Widget)[] onConfigureListeners;
Undocumented in source.
addOnConfigure
void addOnConfigure(bool delegate(GdkEventConfigure*, Widget) dlg, ConnectFlags connectFlags)

The ::configure-event signal will be emitted when the size, position or stacking of the widget's window has changed. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

callBackConfigure
gboolean callBackConfigure(GtkWidget* widgetStruct, GdkEventConfigure* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDamageListeners
bool delegate(Event, Widget)[] onDamageListeners;
Undocumented in source.
addOnDamage
void addOnDamage(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into. Since 2.14

callBackDamage
gboolean callBackDamage(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDeleteListeners
bool delegate(Event, Widget)[] onDeleteListeners;
Undocumented in source.
addOnDelete
void addOnDelete(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting gtk_widget_hide_on_delete() to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

callBackDelete
gboolean callBackDelete(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDestroyEventListeners
bool delegate(Event, Widget)[] onDestroyEventListeners;
Undocumented in source.
addOnDestroyEvent
void addOnDestroyEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::destroy-event signal is emitted when a GdkWindow is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

callBackDestroyEvent
gboolean callBackDestroyEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDirectionChangedListeners
void delegate(GtkTextDirection, Widget)[] onDirectionChangedListeners;
Undocumented in source.
addOnDirectionChanged
void addOnDirectionChanged(void delegate(GtkTextDirection, Widget) dlg, ConnectFlags connectFlags)

The ::direction-changed signal is emitted when the text direction of a widget changes.

callBackDirectionChanged
void callBackDirectionChanged(GtkWidget* widgetStruct, GtkTextDirection previousDirection, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragBeginListeners
void delegate(GdkDragContext*, Widget)[] onDragBeginListeners;
Undocumented in source.
addOnDragBegin
void addOnDragBegin(void delegate(GdkDragContext*, Widget) dlg, ConnectFlags connectFlags)

The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with gtk_drag_source_set_icon(). Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use g_signal_connect_after() to override what the default handler did.

callBackDragBegin
void callBackDragBegin(GtkWidget* widgetStruct, GdkDragContext* dragContext, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDataDeleteListeners
void delegate(GdkDragContext*, Widget)[] onDragDataDeleteListeners;
Undocumented in source.
addOnDragDataDelete
void addOnDragDataDelete(void delegate(GdkDragContext*, Widget) dlg, ConnectFlags connectFlags)

The ::drag-data-delete signal is emitted on the drag source when a drag with the action GDK_ACTION_MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What "delete" means depends on the context of the drag operation.

callBackDragDataDelete
void callBackDragDataDelete(GtkWidget* widgetStruct, GdkDragContext* dragContext, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDataGetListeners
void delegate(GdkDragContext*, GtkSelectionData*, guint, guint, Widget)[] onDragDataGetListeners;
Undocumented in source.
addOnDragDataGet
void addOnDragDataGet(void delegate(GdkDragContext*, GtkSelectionData*, guint, guint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info. See gtk_selection_data_set() and gtk_selection_data_set_text().

callBackDragDataGet
void callBackDragDataGet(GtkWidget* widgetStruct, GdkDragContext* dragContext, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDataReceivedListeners
void delegate(GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint, Widget)[] onDragDataReceivedListeners;
Undocumented in source.
addOnDragDataReceived
void addOnDragDataReceived(void delegate(GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk_drag_status() and not finish the drag. If the data was received in response to a "drag-drop" signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call gtk_drag_finish(), setting the success parameter depending on whether the data was processed successfully. The handler may inspect and modify drag_context->action before calling gtk_drag_finish(), e.g. to implement GDK_ACTION_ASK as shown in the

callBackDragDataReceived
void callBackDragDataReceived(GtkWidget* widgetStruct, GdkDragContext* dragContext, gint x, gint y, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDropListeners
bool delegate(GdkDragContext*, gint, gint, guint, Widget)[] onDragDropListeners;
Undocumented in source.
addOnDragDrop
void addOnDragDrop(bool delegate(GdkDragContext*, gint, gint, guint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler must ensure that gtk_drag_finish() is called to let the source know that the drop is done. The call to gtk_drag_finish() can be done either directly or in a "drag-data-received" handler which gets triggered by calling gtk_drag_get_data() to receive the data for one or more of the supported targets.

callBackDragDrop
gboolean callBackDragDrop(GtkWidget* widgetStruct, GdkDragContext* dragContext, gint x, gint y, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragEndListeners
void delegate(GdkDragContext*, Widget)[] onDragEndListeners;
Undocumented in source.
addOnDragEnd
void addOnDragEnd(void delegate(GdkDragContext*, Widget) dlg, ConnectFlags connectFlags)

The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in "drag-begin".

callBackDragEnd
void callBackDragEnd(GtkWidget* widgetStruct, GdkDragContext* dragContext, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragFailedListeners
bool delegate(GdkDragContext*, GtkDragResult, Widget)[] onDragFailedListeners;
Undocumented in source.
addOnDragFailed
void addOnDragFailed(bool delegate(GdkDragContext*, GtkDragResult, Widget) dlg, ConnectFlags connectFlags)

The ::drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DND operation based on the type of error, it returns TRUE is the failure has been already handled (not showing the default "drag operation failed" animation), otherwise it returns FALSE. Since 2.12

callBackDragFailed
gboolean callBackDragFailed(GtkWidget* widgetStruct, GdkDragContext* dragContext, GtkDragResult result, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragLeaveListeners
void delegate(GdkDragContext*, guint, Widget)[] onDragLeaveListeners;
Undocumented in source.
addOnDragLeave
void addOnDragLeave(void delegate(GdkDragContext*, guint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in "drag-motion", e.g. undo highlighting with gtk_drag_unhighlight()

callBackDragLeave
void callBackDragLeave(GtkWidget* widgetStruct, GdkDragContext* dragContext, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragMotionListeners
bool delegate(GdkDragContext*, gint, gint, guint, Widget)[] onDragMotionListeners;
Undocumented in source.
addOnDragMotion
void addOnDragMotion(bool delegate(GdkDragContext*, gint, gint, guint, Widget) dlg, ConnectFlags connectFlags)

The drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk_drag_status(). If the decision whether the drop will be accepted or rejected can't be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling gtk_drag_get_data() and defer the gdk_drag_status() call to the "drag-data-received" handler. Note that you cannot not pass GTK_DEST_DEFAULT_DROP, GTK_DEST_DEFAULT_MOTION or GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set() when using the drag-motion signal that way. Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last "drag-leave" and if not, treat the drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with gtk_drag_highlight().

callBackDragMotion
gboolean callBackDragMotion(GtkWidget* widgetStruct, GdkDragContext* dragContext, gint x, gint y, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onEnterNotifyListeners
bool delegate(GdkEventCrossing*, Widget)[] onEnterNotifyListeners;
Undocumented in source.
addOnEnterNotify
void addOnEnterNotify(bool delegate(GdkEventCrossing*, Widget) dlg, ConnectFlags connectFlags)

The ::enter-notify-event will be emitted when the pointer enters the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_ENTER_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.

callBackEnterNotify
gboolean callBackEnterNotify(GtkWidget* widgetStruct, GdkEventCrossing* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onListeners
bool delegate(Event, Widget)[] onListeners;
Undocumented in source.
addOn
void addOn(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. "key-press-event") and finally a generic "event-after" signal.

callBack
gboolean callBack(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onEventAfterListeners
void delegate(Event, Widget)[] onEventAfterListeners;
Undocumented in source.
addOnEventAfter
void addOnEventAfter(void delegate(Event, Widget) dlg, ConnectFlags connectFlags)

After the emission of the "event" signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values.

callBackEventAfter
void callBackEventAfter(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onExposeListeners
bool delegate(GdkEventExpose*, Widget)[] onExposeListeners;
Undocumented in source.
addOnExpose
void addOnExpose(bool delegate(GdkEventExpose*, Widget) dlg, ConnectFlags connectFlags)

The ::expose-event signal is emitted when an area of a previously obscured GdkWindow is made visible and needs to be redrawn. GTK_NO_WINDOW widgets will get a synthesized event from their parent widget. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_EXPOSURE_MASK mask.

callBackExpose
gboolean callBackExpose(GtkWidget* widgetStruct, GdkEventExpose* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusListeners
bool delegate(GtkDirectionType, Widget)[] onFocusListeners;
Undocumented in source.
addOnFocus
void addOnFocus(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
callBackFocus
gboolean callBackFocus(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusInListeners
bool delegate(GdkEventFocus*, Widget)[] onFocusInListeners;
Undocumented in source.
addOnFocusIn
void addOnFocusIn(bool delegate(GdkEventFocus*, Widget) dlg, ConnectFlags connectFlags)

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

callBackFocusIn
gboolean callBackFocusIn(GtkWidget* widgetStruct, GdkEventFocus* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusOutListeners
bool delegate(GdkEventFocus*, Widget)[] onFocusOutListeners;
Undocumented in source.
addOnFocusOut
void addOnFocusOut(bool delegate(GdkEventFocus*, Widget) dlg, ConnectFlags connectFlags)

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

callBackFocusOut
gboolean callBackFocusOut(GtkWidget* widgetStruct, GdkEventFocus* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onGrabBrokenListeners
bool delegate(Event, Widget)[] onGrabBrokenListeners;
Undocumented in source.
addOnGrabBroken
void addOnGrabBroken(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Since 2.8

callBackGrabBroken
gboolean callBackGrabBroken(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onGrabFocusListeners
void delegate(Widget)[] onGrabFocusListeners;
Undocumented in source.
addOnGrabFocus
void addOnGrabFocus(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackGrabFocus
void callBackGrabFocus(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onGrabNotifyListeners
void delegate(gboolean, Widget)[] onGrabNotifyListeners;
Undocumented in source.
addOnGrabNotify
void addOnGrabNotify(void delegate(gboolean, Widget) dlg, ConnectFlags connectFlags)

The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed. A widget is shadowed by a gtk_grab_add() when the topmost grab widget in the grab stack of its window group is not its ancestor. FALSE if the widget becomes shadowed, TRUE if it becomes unshadowed

callBackGrabNotify
void callBackGrabNotify(GtkWidget* widgetStruct, gboolean wasGrabbed, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onHideListeners
void delegate(Widget)[] onHideListeners;
Undocumented in source.
addOnHide
void addOnHide(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackHide
void callBackHide(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onHierarchyChangedListeners
void delegate(Widget, Widget)[] onHierarchyChangedListeners;
Undocumented in source.
addOnHierarchyChanged
void addOnHierarchyChanged(void delegate(Widget, Widget) dlg, ConnectFlags connectFlags)

The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is anchored when its toplevel ancestor is a GtkWindow. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

callBackHierarchyChanged
void callBackHierarchyChanged(GtkWidget* widgetStruct, GtkWidget* previousToplevel, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyPressListeners
bool delegate(GdkEventKey*, Widget)[] onKeyPressListeners;
Undocumented in source.
addOnKeyPress
void addOnKeyPress(bool delegate(GdkEventKey*, Widget) dlg, ConnectFlags connectFlags)

The ::key-press-event signal is emitted when a key is pressed. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

callBackKeyPress
gboolean callBackKeyPress(GtkWidget* widgetStruct, GdkEventKey* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyReleaseListeners
bool delegate(GdkEventKey*, Widget)[] onKeyReleaseListeners;
Undocumented in source.
addOnKeyRelease
void addOnKeyRelease(bool delegate(GdkEventKey*, Widget) dlg, ConnectFlags connectFlags)

The ::key-release-event signal is emitted when a key is pressed. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.

callBackKeyRelease
gboolean callBackKeyRelease(GtkWidget* widgetStruct, GdkEventKey* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeynavFailedListeners
bool delegate(GtkDirectionType, Widget)[] onKeynavFailedListeners;
Undocumented in source.
addOnKeynavFailed
void addOnKeynavFailed(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)

Gets emitted if keyboard navigation fails. See gtk_widget_keynav_failed() for details. Since 2.12

callBackKeynavFailed
gboolean callBackKeynavFailed(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onLeaveNotifyListeners
bool delegate(GdkEventCrossing*, Widget)[] onLeaveNotifyListeners;
Undocumented in source.
addOnLeaveNotify
void addOnLeaveNotify(bool delegate(GdkEventCrossing*, Widget) dlg, ConnectFlags connectFlags)

The ::leave-notify-event will be emitted when the pointer leaves the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_LEAVE_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.

callBackLeaveNotify
gboolean callBackLeaveNotify(GtkWidget* widgetStruct, GdkEventCrossing* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMapListeners
void delegate(Widget)[] onMapListeners;
Undocumented in source.
addOnMap
void addOnMap(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackMap
void callBackMap(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMapEventListeners
bool delegate(Event, Widget)[] onMapEventListeners;
Undocumented in source.
addOnMapEvent
void addOnMapEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::map-event signal will be emitted when the widget's window is mapped. A window is mapped when it becomes visible on the screen. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

callBackMapEvent
gboolean callBackMapEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMnemonicActivateListeners
bool delegate(gboolean, Widget)[] onMnemonicActivateListeners;
Undocumented in source.
addOnMnemonicActivate
void addOnMnemonicActivate(bool delegate(gboolean, Widget) dlg, ConnectFlags connectFlags)
callBackMnemonicActivate
gboolean callBackMnemonicActivate(GtkWidget* widgetStruct, gboolean arg1, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMotionNotifyListeners
bool delegate(GdkEventMotion*, Widget)[] onMotionNotifyListeners;
Undocumented in source.
addOnMotionNotify
void addOnMotionNotify(bool delegate(GdkEventMotion*, Widget) dlg, ConnectFlags connectFlags)

The ::motion-notify-event signal is emitted when the pointer moves over the widget's GdkWindow. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_POINTER_MOTION_MASK mask. This signal will be sent to the grab widget if there is one.

callBackMotionNotify
gboolean callBackMotionNotify(GtkWidget* widgetStruct, GdkEventMotion* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMoveFocusListeners
void delegate(GtkDirectionType, Widget)[] onMoveFocusListeners;
Undocumented in source.
addOnMoveFocus
void addOnMoveFocus(void delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
callBackMoveFocus
void callBackMoveFocus(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onNoExposeListeners
bool delegate(GdkEventNoExpose*, Widget)[] onNoExposeListeners;
Undocumented in source.
addOnNoExpose
void addOnNoExpose(bool delegate(GdkEventNoExpose*, Widget) dlg, ConnectFlags connectFlags)

The ::no-expose-event will be emitted when the widget's window is drawn as a copy of another GdkDrawable (with gdk_draw_drawable() or gdk_window_copy_area()) which was completely unobscured. If the source window was partially obscured GdkEventExpose events will be generated for those areas.

callBackNoExpose
gboolean callBackNoExpose(GtkWidget* widgetStruct, GdkEventNoExpose* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onParentSetListeners
void delegate(GtkObject*, Widget)[] onParentSetListeners;
Undocumented in source.
addOnParentSet
void addOnParentSet(void delegate(GtkObject*, Widget) dlg, ConnectFlags connectFlags)

The ::parent-set signal is emitted when a new parent has been set on a widget.

callBackParentSet
void callBackParentSet(GtkWidget* widgetStruct, GtkObject* oldParent, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onPopupMenuListeners
bool delegate(Widget)[] onPopupMenuListeners;
Undocumented in source.
addOnPopupMenu
void addOnPopupMenu(bool delegate(Widget) dlg, ConnectFlags connectFlags)

This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the GtkEntry widget creates a menu with clipboard commands. See the section called “Implement GtkWidget::popup_menu” for an example of how to use this signal.

callBackPopupMenu
gboolean callBackPopupMenu(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onPropertyNotifyListeners
bool delegate(GdkEventProperty*, Widget)[] onPropertyNotifyListeners;
Undocumented in source.
addOnPropertyNotify
void addOnPropertyNotify(bool delegate(GdkEventProperty*, Widget) dlg, ConnectFlags connectFlags)

The ::property-notify-event signal will be emitted when a property on the widget's window has been changed or deleted. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask.

callBackPropertyNotify
gboolean callBackPropertyNotify(GtkWidget* widgetStruct, GdkEventProperty* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onProximityInListeners
bool delegate(GdkEventProximity*, Widget)[] onProximityInListeners;
Undocumented in source.
addOnProximityIn
void addOnProximityIn(bool delegate(GdkEventProximity*, Widget) dlg, ConnectFlags connectFlags)

To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask. This signal will be sent to the grab widget if there is one.

callBackProximityIn
gboolean callBackProximityIn(GtkWidget* widgetStruct, GdkEventProximity* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onProximityOutListeners
bool delegate(GdkEventProximity*, Widget)[] onProximityOutListeners;
Undocumented in source.
addOnProximityOut
void addOnProximityOut(bool delegate(GdkEventProximity*, Widget) dlg, ConnectFlags connectFlags)

To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask. This signal will be sent to the grab widget if there is one.

callBackProximityOut
gboolean callBackProximityOut(GtkWidget* widgetStruct, GdkEventProximity* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onQueryTooltipListeners
bool delegate(gint, gint, gboolean, GtkTooltip*, Widget)[] onQueryTooltipListeners;
Undocumented in source.
addOnQueryTooltip
void addOnQueryTooltip(bool delegate(gint, gint, gboolean, GtkTooltip*, Widget) dlg, ConnectFlags connectFlags)

Emitted when "has-tooltip" is TRUE and the "gtk-tooltip-timeout" has expired with the cursor hovering "above" widget; or emitted when widget got focus in keyboard mode. Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget. If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard_mode is TRUE, the values of x and y are undefined and should not be used. The signal handler is free to manipulate tooltip with the therefore destined function calls. TRUE if the tooltip was trigged using the keyboard Since 2.12

callBackQueryTooltip
gboolean callBackQueryTooltip(GtkWidget* widgetStruct, gint x, gint y, gboolean keyboardMode, GtkTooltip* tooltip, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onRealizeListeners
void delegate(Widget)[] onRealizeListeners;
Undocumented in source.
addOnRealize
void addOnRealize(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackRealize
void callBackRealize(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onScreenChangedListeners
void delegate(Screen, Widget)[] onScreenChangedListeners;
Undocumented in source.
addOnScreenChanged
void addOnScreenChanged(void delegate(Screen, Widget) dlg, ConnectFlags connectFlags)

The ::screen-changed signal gets emitted when the screen of a widget has changed.

callBackScreenChanged
void callBackScreenChanged(GtkWidget* widgetStruct, GdkScreen* previousScreen, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onScrollListeners
bool delegate(GdkEventScroll*, Widget)[] onScrollListeners;
Undocumented in source.
addOnScroll
void addOnScroll(bool delegate(GdkEventScroll*, Widget) dlg, ConnectFlags connectFlags)

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

callBackScroll
gboolean callBackScroll(GtkWidget* widgetStruct, GdkEventScroll* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionClearListeners
bool delegate(GdkEventSelection*, Widget)[] onSelectionClearListeners;
Undocumented in source.
addOnSelectionClear
void addOnSelectionClear(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)

The ::selection-clear-event signal will be emitted when the the widget's window has lost ownership of a selection.

callBackSelectionClear
gboolean callBackSelectionClear(GtkWidget* widgetStruct, GdkEventSelection* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionGetListeners
void delegate(GtkSelectionData*, guint, guint, Widget)[] onSelectionGetListeners;
Undocumented in source.
addOnSelectionGet
void addOnSelectionGet(void delegate(GtkSelectionData*, guint, guint, Widget) dlg, ConnectFlags connectFlags)
callBackSelectionGet
void callBackSelectionGet(GtkWidget* widgetStruct, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionNotifyListeners
bool delegate(GdkEventSelection*, Widget)[] onSelectionNotifyListeners;
Undocumented in source.
addOnSelectionNotify
void addOnSelectionNotify(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)
callBackSelectionNotify
gboolean callBackSelectionNotify(GtkWidget* widgetStruct, GdkEventSelection* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionReceivedListeners
void delegate(GtkSelectionData*, guint, Widget)[] onSelectionReceivedListeners;
Undocumented in source.
addOnSelectionReceived
void addOnSelectionReceived(void delegate(GtkSelectionData*, guint, Widget) dlg, ConnectFlags connectFlags)
callBackSelectionReceived
void callBackSelectionReceived(GtkWidget* widgetStruct, GtkSelectionData* data, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionRequestListeners
bool delegate(GdkEventSelection*, Widget)[] onSelectionRequestListeners;
Undocumented in source.
addOnSelectionRequest
void addOnSelectionRequest(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget's window.

callBackSelectionRequest
gboolean callBackSelectionRequest(GtkWidget* widgetStruct, GdkEventSelection* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onShowListeners
void delegate(Widget)[] onShowListeners;
Undocumented in source.
addOnShow
void addOnShow(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackShow
void callBackShow(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onShowHelpListeners
bool delegate(GtkWidgetHelpType, Widget)[] onShowHelpListeners;
Undocumented in source.
addOnShowHelp
void addOnShowHelp(bool delegate(GtkWidgetHelpType, Widget) dlg, ConnectFlags connectFlags)
callBackShowHelp
gboolean callBackShowHelp(GtkWidget* widgetStruct, GtkWidgetHelpType helpType, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSizeAllocateListeners
void delegate(GtkAllocation*, Widget)[] onSizeAllocateListeners;
Undocumented in source.
addOnSizeAllocate
void addOnSizeAllocate(void delegate(GtkAllocation*, Widget) dlg, ConnectFlags connectFlags)
callBackSizeAllocate
void callBackSizeAllocate(GtkWidget* widgetStruct, GtkAllocation* allocation, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSizeRequestListeners
void delegate(GtkRequisition*, Widget)[] onSizeRequestListeners;
Undocumented in source.
addOnSizeRequest
void addOnSizeRequest(void delegate(GtkRequisition*, Widget) dlg, ConnectFlags connectFlags)
callBackSizeRequest
void callBackSizeRequest(GtkWidget* widgetStruct, GtkRequisition* requisition, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onStateChangedListeners
void delegate(GtkStateType, Widget)[] onStateChangedListeners;
Undocumented in source.
addOnStateChanged
void addOnStateChanged(void delegate(GtkStateType, Widget) dlg, ConnectFlags connectFlags)

The ::state-changed signal is emitted when the widget state changes. See gtk_widget_get_state().

callBackStateChanged
void callBackStateChanged(GtkWidget* widgetStruct, GtkStateType state, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onStyleSetListeners
void delegate(Style, Widget)[] onStyleSetListeners;
Undocumented in source.
addOnStyleSet
void addOnStyleSet(void delegate(Style, Widget) dlg, ConnectFlags connectFlags)

The ::style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like gtk_widget_modify_base() also cause this signal to be emitted.

callBackStyleSet
void callBackStyleSet(GtkWidget* widgetStruct, GtkStyle* previousStyle, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onUnmapListeners
void delegate(Widget)[] onUnmapListeners;
Undocumented in source.
addOnUnmap
void addOnUnmap(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackUnmap
void callBackUnmap(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onUnmapEventListeners
bool delegate(Event, Widget)[] onUnmapEventListeners;
Undocumented in source.
addOnUnmapEvent
void addOnUnmapEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::unmap-event signal will be emitted when the widget's window is unmapped. A window is unmapped when it becomes invisible on the screen. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

callBackUnmapEvent
gboolean callBackUnmapEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onUnrealizeListeners
void delegate(Widget)[] onUnrealizeListeners;
Undocumented in source.
addOnUnrealize
void addOnUnrealize(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackUnrealize
void callBackUnrealize(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onVisibilityNotifyListeners
bool delegate(GdkEventVisibility*, Widget)[] onVisibilityNotifyListeners;
Undocumented in source.
addOnVisibilityNotify
void addOnVisibilityNotify(bool delegate(GdkEventVisibility*, Widget) dlg, ConnectFlags connectFlags)

The ::visibility-notify-event will be emitted when the widget's window is obscured or unobscured. To receive this signal the GdkWindow associated to the widget needs to enable the GDK_VISIBILITY_NOTIFY_MASK mask.

callBackVisibilityNotify
gboolean callBackVisibilityNotify(GtkWidget* widgetStruct, GdkEventVisibility* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onWindowStateListeners
bool delegate(GdkEventWindowState*, Widget)[] onWindowStateListeners;
Undocumented in source.
addOnWindowState
void addOnWindowState(bool delegate(GdkEventWindowState*, Widget) dlg, ConnectFlags connectFlags)

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes. To receive this signal the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

callBackWindowState
gboolean callBackWindowState(GtkWidget* widgetStruct, GdkEventWindowState* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
unref
void unref()

Warning gtk_widget_unref has been deprecated since version 2.12 and should not be used in newly-written code. Use g_object_unref() instead. Inverse of gtk_widget_ref(). Equivalent to g_object_unref().

destroyed
void destroyed(Widget widgetPointer)

This function sets *widget_pointer to NULL if widget_pointer != NULL. It's intended to be used as a callback connected to the "destroy" signal of a widget. You connect gtk_widget_destroyed() as a signal handler, and pass the address of your widget variable as user data. Then when the widget is destroyed, the variable will be set to NULL. Useful for example to avoid multiple copies of the same dialog.

unparent
void unparent()

This function is only for use in widget implementations. Should be called by implementations of the remove method on GtkContainer, to dissociate a child from the container.

show
void show()

Flags a widget to be displayed. Any widget that isn't shown will not appear on the screen. If you want to show all the widgets in a container, it's easier to call gtk_widget_show_all() on the container, instead of individually showing the widgets. Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen. When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.

showNow
void showNow()

Shows a widget. If the widget is an unmapped toplevel widget (i.e. a GtkWindow that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.

hide
void hide()

Reverses the effects of gtk_widget_show(), causing the widget to be hidden (invisible to the user).

showAll
void showAll()

Recursively shows a widget, and any child widgets (if the widget is a container).

hideAll
void hideAll()

Recursively hides a widget and any child widgets.

map
void map()

This function is only for use in widget implementations. Causes a widget to be mapped if it isn't already.

unmap
void unmap()

This function is only for use in widget implementations. Causes a widget to be unmapped if it's currently mapped.

realize
void realize()

Creates the GDK (windowing system) resources associated with a widget. For example, widget->window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically. Realizing a widget requires all the widget's parent widgets to be realized; calling gtk_widget_realize() realizes the widget's parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen. This function is primarily used in widget implementations, and isn't very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as GtkWidget::expose-event. Or simply g_signal_connect() to the GtkWidget::realize signal.

unrealize
void unrealize()

This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as widget->window).

queueDraw
void queueDraw()

Equivalent to calling gtk_widget_queue_draw_area() for the entire area of a widget.

queueResize
void queueResize()

This function is only for use in widget implementations. Flags a widget to have its size renegotiated; should be called when a widget for some reason has a new size request. For example, when you change the text in a GtkLabel, GtkLabel queues a resize to ensure there's enough space for the new text.

queueResizeNoRedraw
void queueResizeNoRedraw()

This function works like gtk_widget_queue_resize(), except that the widget is not invalidated. Since 2.4

draw
void draw(Rectangle area)

Warning gtk_widget_draw is deprecated and should not be used in newly-written code. In GTK+ 1.2, this function would immediately render the region area of a widget, by invoking the virtual draw method of a widget. In GTK+ 2.0, the draw method is gone, and instead gtk_widget_draw() simply invalidates the specified region of the widget, then updates the invalid region of the widget immediately. Usually you don't want to update the region immediately for performance reasons, so in general gtk_widget_queue_draw_area() is a better choice if you want to draw a region of a widget.

sizeRequest
void sizeRequest(GtkRequisition requisition)

This function is typically used when implementing a GtkContainer subclass. Obtains the preferred size of a widget. The container uses this information to arrange its child widgets and decide what size allocations to give them with gtk_widget_size_allocate(). You can also call this function from an application, with some caveats. Most notably, getting a size request requires the widget to be associated with a screen, because font information may be needed. Multihead-aware applications should keep this in mind. Also remember that the size request is not necessarily the size a widget will actually be allocated. See also gtk_widget_get_child_requisition().

getChildRequisition
void getChildRequisition(GtkRequisition requisition)

This function is only for use in widget implementations. Obtains widget->requisition, unless someone has forced a particular geometry on the widget (e.g. with gtk_widget_set_size_request()), in which case it returns that geometry instead of the widget's requisition. This function differs from gtk_widget_size_request() in that it retrieves the last size request value from widget->requisition, while gtk_widget_size_request() actually calls the "size_request" method on widget to compute the size request and fill in widget->requisition, and only then returns widget->requisition. Because this function does not call the "size_request" method, it can only be used when you know that widget->requisition is up-to-date, that is, gtk_widget_size_request() has been called since the last time a resize was queued. In general, only container implementations have this information; applications should use gtk_widget_size_request().

sizeAllocate
void sizeAllocate(GtkAllocation* allocation)

This function is only used by GtkContainer subclasses, to assign a size and position to their child widgets.

addAccelerator
void addAccelerator(string accelSignal, AccelGroup accelGroup, uint accelKey, GdkModifierType accelMods, GtkAccelFlags accelFlags)

Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget's toplevel via gtk_window_add_accel_group(), and the signal must be of type G_RUN_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or gtk_menu_item_set_accel_path() instead.

removeAccelerator
int removeAccelerator(AccelGroup accelGroup, uint accelKey, GdkModifierType accelMods)

Removes an accelerator from widget, previously installed with gtk_widget_add_accelerator().

setAccelPath
void setAccelPath(string accelPath, AccelGroup accelGroup)

Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to gtk_widget_set_accel_path(). Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See gtk_accel_map_save().) This function is a low level function that would most likely be used by a menu creation system like GtkUIManager. If you use GtkUIManager, setting up accelerator paths will be done automatically. Even when you you aren't using GtkUIManager, if you only want to set up accelerators on menu items gtk_menu_item_set_accel_path() provides a somewhat more convenient interface. Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().

listAccelClosures
ListG listAccelClosures()

Lists the closures used by widget for accelerator group connections with gtk_accel_group_connect_by_path() or gtk_accel_group_connect(). The closures can be used to monitor accelerator changes on widget, by connecting to the GtkAccelGroup::accel-changed signal of the GtkAccelGroup of a closure which can be found out with gtk_accel_group_from_accel_closure().

canActivateAccel
int canActivateAccel(uint signalId)

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This is done by emitting the "can-activate-accel" signal on widget; if the signal isn't overridden by a handler or in a derived widget, then the default check is that the widget must be sensitive, and the widget and all its ancestors mapped. Since 2.4

event
int event(Event event)

Rarely-used function. This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don't use this function; instead, use gtk_main_do_event() so the event will behave as if it were in the event queue. Don't synthesize expose events; instead, use gdk_window_invalidate_rect() to invalidate a region of the window.

activate
int activate()

For widgets that can be "activated" (buttons, menu items, etc.) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If widget isn't activatable, the function returns FALSE.

reparent
void reparent(Widget newParent)

Moves a widget from one GtkContainer to another, handling reference count issues to avoid destroying the widget.

intersect
int intersect(Rectangle area, Rectangle intersection)

Computes the intersection of a widget's area and area, storing the intersection in intersection, and returns TRUE if there was an intersection. intersection may be NULL if you're only interested in whether there was an intersection.

isFocus
int isFocus()

Determines if the widget is the focus widget within its toplevel. (This does not mean that the HAS_FOCUS flag is necessarily set; HAS_FOCUS will only be set if the toplevel widget additionally has the global input focus.)

grabFocus
void grabFocus()

Causes widget to have the keyboard focus for the GtkWindow it's inside. widget must be a focusable widget, such as a GtkEntry; something like GtkFrame won't work. More precisely, it must have the GTK_CAN_FOCUS flag set. Use gtk_widget_set_can_focus() to modify that flag. The widget also needs to be realized and mapped. This is indicated by the related signals. Grabbing the focus immediately after creating the widget will likely fail and cause critical warnings.

grabDefault
void grabDefault()

Causes widget to become the default widget. widget must have the GTK_CAN_DEFAULT flag set; typically you have to set this flag yourself by calling gtk_widget_set_can_default (widget, TRUE). The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, gtk_widget_activate() should affect them.

setName
void setName(string name)

Widgets can be named, which allows you to refer to them from a gtkrc file. You can apply a style to widgets with a particular name in the gtkrc file. See the documentation for gtkrc files (on the same page as the docs for GtkRcStyle). Note that widget names are separated by periods in paths (see gtk_widget_path()), so names with embedded periods may cause confusion.

getName
string getName()

Retrieves the name of a widget. See gtk_widget_set_name() for the significance of widget names.

setState
void setState(GtkStateType state)

This function is for use in widget implementations. Sets the state of a widget (insensitive, prelighted, etc.) Usually you should set the state using wrapper functions such as gtk_widget_set_sensitive().

setSensitive
void setSensitive(int sensitive)

Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are "grayed out" and the user can't interact with them. Insensitive widgets are known as "inactive", "disabled", or "ghosted" in some other toolkits.

setParent
void setParent(Widget parent)

This function is useful only when implementing subclasses of GtkContainer. Sets the container as the parent of widget, and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is gtk_widget_unparent().

setParentWindow
void setParentWindow(Window parentWindow)

Sets a non default parent window for widget.

getParentWindow
Window getParentWindow()

Gets widget's parent window.

setUposition
void setUposition(int x, int y)

Warning gtk_widget_set_uposition is deprecated and should not be used in newly-written code. Sets the position of a widget. The funny "u" in the name comes from the "user position" hint specified by the X Window System, and exists for legacy reasons. This function doesn't work if a widget is inside a container; it's only really useful on GtkWindow. Don't use this function to center dialogs over the main application window; most window managers will do the centering on your behalf if you call gtk_window_set_transient_for(), and it's really not possible to get the centering to work correctly in all cases from application code. But if you insist, use gtk_window_set_position() to set GTK_WIN_POS_CENTER_ON_PARENT, don't do the centering manually. Note that although x and y can be individually unset, the position is not honoured unless both x and y are set.

setUsize
void setUsize(int width, int height)

Warning gtk_widget_set_usize has been deprecated since version 2.2 and should not be used in newly-written code. Use gtk_widget_set_size_request() instead. Sets the minimum size of a widget; that is, the widget's size request will be width by height. You can use this function to force a widget to be either larger or smaller than it is. The strange "usize" name dates from the early days of GTK+, and derives from X Window System terminology. In many cases, gtk_window_set_default_size() is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the usize will force them to leave the window at least as large as the usize. When dealing with window sizes, gtk_window_set_geometry_hints() can be a useful function as well. Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct.

setEvents
void setEvents(int events)

Sets the event mask (see GdkEventMask) for a widget. The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget's functionality, so be careful. This function must be called while a widget is unrealized. Consider gtk_widget_add_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can't be used with GTK_NO_WINDOW widgets; to get events on those widgets, place them inside a GtkEventBox and receive events on the event box.

addEvents
void addEvents(int events)

Adds the events in the bitfield events to the event mask for widget. See gtk_widget_set_events() for details.

setExtensionEvents
void setExtensionEvents(GdkExtensionMode mode)

Sets the extension events mask to mode. See GdkExtensionMode and gdk_input_set_extension_events().

getExtensionEvents
GdkExtensionMode getExtensionEvents()

Retrieves the extension events the widget will receive; see gdk_input_set_extension_events().

getToplevel
Widget getToplevel()

This function returns the topmost widget in the container hierarchy widget is a part of. If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced. Note the difference in behavior vs. gtk_widget_get_ancestor(); gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW) would return NULL if widget wasn't inside a toplevel window, and if the window was inside a GtkWindow-derived widget which was in turn inside the toplevel GtkWindow. While the second case may seem unlikely, it actually happens when a GtkPlug is embedded inside a GtkSocket within the same application. To reliably find the toplevel GtkWindow, use gtk_widget_get_toplevel() and check if the TOPLEVEL flags is set on the result.

getAncestor
Widget getAncestor(GType widgetType)

Gets the first ancestor of widget with type widget_type. For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first GtkBox that's an ancestor of widget. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel GtkWindow in the docs for gtk_widget_get_toplevel(). Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor() considers widget to be an ancestor of itself.

getColormap
Colormap getColormap()

Gets the colormap that will be used to render widget. No reference will be added to the returned colormap; it should not be unreferenced.

setColormap
void setColormap(Colormap colormap)

Sets the colormap for the widget to the given value. Widget must not have been previously realized. This probably should only be used from an init() function (i.e. from the constructor for the widget).

getVisual
Visual getVisual()

Gets the visual that will be used to render widget.

getEvents
int getEvents()

Returns the event mask for the widget (a bitfield containing flags from the GdkEventMask enumeration). These are the events that the widget will receive.

getPointer
void getPointer(int x, int y)

Obtains the location of the mouse pointer in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that are not GTK_NO_WINDOW widgets, and are relative to widget->allocation.x, widget->allocation.y for widgets that are GTK_NO_WINDOW widgets.

isAncestor
int isAncestor(Widget ancestor)

Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.

translateCoordinates
int translateCoordinates(Widget destWidget, int srcX, int srcY, int destX, int destY)

Translate coordinates relative to src_widget's allocation to coordinates relative to dest_widget's allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel.

hideOnDelete
int hideOnDelete()

Utility function; intended to be connected to the "delete-event" signal on a GtkWindow. The function calls gtk_widget_hide() on its argument, then returns TRUE. If connected to ::delete-event, the result is that clicking the close button for a window (on the window frame, top right corner usually) will hide but not destroy the window. By default, GTK+ destroys windows when ::delete-event is received.

setStyle
void setStyle(Style style)

Sets the GtkStyle for a widget (widget->style). You probably don't want to use this function; it interacts badly with themes, because themes work by replacing the GtkStyle. Instead, use gtk_widget_modify_style().

ensureStyle
void ensureStyle()

Ensures that widget has a style (widget->style). Not a very useful function; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.

getStyle
Style getStyle()

Simply an accessor function that returns widget->style.

resetRcStyles
void resetRcStyles()

Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings. This function is not useful for applications.

pushColormap
void pushColormap(Colormap cmap)

Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets. Remove cmap with gtk_widget_pop_colormap(). There's little reason to use this function.

popColormap
void popColormap()

Removes a colormap pushed with gtk_widget_push_colormap().

setDefaultColormap
void setDefaultColormap(Colormap colormap)

Sets the default colormap to use when creating widgets. gtk_widget_push_colormap() is a better function to use if you only want to affect a few widgets, rather than all widgets.

getDefaultStyle
Style getDefaultStyle()

Returns the default style used by all widgets initially.

getDefaultColormap
Colormap getDefaultColormap()

Obtains the default colormap used to create widgets.

getDefaultVisual
Visual getDefaultVisual()

Obtains the visual of the default colormap. Not really useful; used to be useful before gdk_colormap_get_visual() existed.

setDirection
void setDirection(GtkTextDirection dir)

Sets the reading direction on a particular widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitely visual rather than logical (such as buttons for text justification). If the direction is set to GTK_TEXT_DIR_NONE, then the value set by gtk_widget_set_default_direction() will be used.

getDirection
GtkTextDirection getDirection()

Gets the reading direction for a particular widget. See gtk_widget_set_direction().

setDefaultDirection
void setDefaultDirection(GtkTextDirection dir)

Sets the default reading direction for widgets where the direction has not been explicitly set by gtk_widget_set_direction().

getDefaultDirection
GtkTextDirection getDefaultDirection()

Obtains the current default reading direction. See gtk_widget_set_default_direction().

shapeCombineMask
void shapeCombineMask(Bitmap shapeMask, int offsetX, int offsetY)

Sets a shape for this widget's GDK window. This allows for transparent windows etc., see gdk_window_shape_combine_mask() for more information.

inputShapeCombineMask
void inputShapeCombineMask(Bitmap shapeMask, int offsetX, int offsetY)

Sets an input shape for this widget's GDK window. This allows for windows which react to mouse click in a nonrectangular region, see gdk_window_input_shape_combine_mask() for more information. Since 2.10

path
void path(uint pathLength, string path, string pathReversed)

Obtains the full path to widget. The path is simply the name of a widget and all its parents in the container hierarchy, separated by periods. The name of a widget comes from gtk_widget_get_name(). Paths are used to apply styles to a widget in gtkrc configuration files. Widget names are the type of the widget by default (e.g. "GtkButton") or can be set to an application-specific value with gtk_widget_set_name(). By setting the name of a widget, you allow users or theme authors to apply styles to that specific widget in their gtkrc file. path_reversed_p fills in the path in reverse order, i.e. starting with widget's name instead of starting with the name of widget's outermost ancestor.

classPath
void classPath(uint pathLength, string path, string pathReversed)

Same as gtk_widget_path(), but always uses the name of a widget's type, never uses a custom name set with gtk_widget_set_name().

getCompositeName
string getCompositeName()

Obtains the composite name of a widget.

modifyStyle
void modifyStyle(RcStyle style)

Modifies style values on the widget. Modifications made using this technique take precedence over style values set via an RC file, however, they will be overriden if a style is explicitely set on the widget using gtk_widget_set_style(). The GtkRcStyle structure is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged. Note that modifications made with this function are not cumulative with previous calls to gtk_widget_modify_style() or with such functions as gtk_widget_modify_fg(). If you wish to retain previous values, you must first call gtk_widget_get_modifier_style(), make your modifications to the returned style, then call gtk_widget_modify_style() with that style. On the other hand, if you first call gtk_widget_modify_style(), subsequent calls to such functions gtk_widget_modify_fg() will have a cumulative effect with the initial modifications.

getModifierStyle
RcStyle getModifierStyle()

Returns the current modifier style for the widget. (As set by gtk_widget_modify_style().) If no style has previously set, a new GtkRcStyle will be created with all values unset, and set as the modifier style for the widget. If you make changes to this rc style, you must call gtk_widget_modify_style(), passing in the returned rc style, to make sure that your changes take effect. Caution: passing the style back to gtk_widget_modify_style() will normally end up destroying it, because gtk_widget_modify_style() copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive.

modifyFg
void modifyFg(GtkStateType state, Color color)

Sets the foreground color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style().

modifyBg
void modifyBg(GtkStateType state, Color color)

Sets the background color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style(). Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the background color on that.

modifyText
void modifyText(GtkStateType state, Color color)

Sets the text color for a widget in a particular state. All other style values are left untouched. The text color is the foreground color used along with the base color (see gtk_widget_modify_base()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().

modifyBase
void modifyBase(GtkStateType state, Color color)

Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see gtk_widget_modify_text()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style(). Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the base color on that.

modifyFont
void modifyFont(PgFontDescription fontDesc)

Sets the font to use for a widget. All other style values are left untouched. See also gtk_widget_modify_style().

modifyCursor
void modifyCursor(Color primary, Color secondary)

Sets the cursor color to use in a widget, overriding the "cursor-color" and "secondary-cursor-color" style properties. All other style values are left untouched. See also gtk_widget_modify_style(). Since 2.12

createPangoContext
PgContext createPangoContext()

Creates a new PangoContext with the appropriate font map, font description, and base direction for drawing text for this widget. See also gtk_widget_get_pango_context().

getPangoContext
PgContext getPangoContext()

Gets a PangoContext with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by gtk_widget_create_pango_context(), this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget's attributes. If you create and keep a PangoLayout using this context, you must deal with changes to the context by calling pango_layout_context_changed() on the layout in response to the "style-set" and "direction-changed" signals for the widget.

createPangoLayout
PgLayout createPangoLayout(string text)

Creates a new PangoLayout with the appropriate font map, font description, and base direction for drawing text for this widget. If you keep a PangoLayout created in this way around, in order to notify the layout of changes to the base direction or font of this widget, you must call pango_layout_context_changed() in response to the "style-set" and "direction-changed" signals for the widget.

renderIcon
Pixbuf renderIcon(string stockId, GtkIconSize size, string detail)

A convenience function that uses the theme engine and RC file settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK. size should be a size such as GTK_ICON_SIZE_MENU. detail should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code. The pixels in the returned GdkPixbuf are shared with the rest of the application and should not be modified. The pixbuf should be freed after use with g_object_unref().

popCompositeChild
void popCompositeChild()

Cancels the effect of a previous call to gtk_widget_push_composite_child().

pushCompositeChild
void pushCompositeChild()

Makes all newly-created widgets as composite children until the corresponding gtk_widget_pop_composite_child() call. A composite child is a child that's an implementation detail of the container it's inside and should not be visible to people using the container. Composite children aren't treated differently by GTK (but see gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI builders might want to treat them in a different way.

queueClear
void queueClear()

Warning gtk_widget_queue_clear has been deprecated since version 2.2 and should not be used in newly-written code. Use gtk_widget_queue_draw() instead. This function does the same as gtk_widget_queue_draw().

queueClearArea
void queueClearArea(int x, int y, int width, int height)

Warning gtk_widget_queue_clear_area has been deprecated since version 2.2 and should not be used in newly-written code. Use gtk_widget_queue_draw_area() instead. This function is no longer different from gtk_widget_queue_draw_area(), though it once was. Now it just calls gtk_widget_queue_draw_area(). Originally gtk_widget_queue_clear_area() would force a redraw of the background for GTK_NO_WINDOW widgets, and gtk_widget_queue_draw_area() would not. Now both functions ensure the background will be redrawn.

queueDrawArea
void queueDrawArea(int x, int y, int width, int height)

Invalidates the rectangular area of widget defined by x, y, width and height by calling gdk_window_invalidate_rect() on the widget's window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated. Normally you would only use this function in widget implementations. You might also use it, or gdk_window_invalidate_rect() directly, to schedule a redraw of a GtkDrawingArea or some portion thereof. Frequently you can just call gdk_window_invalidate_rect() or gdk_window_invalidate_region() instead of this function. Those functions will invalidate only a single window, instead of the widget and all its children. The advantage of adding to the invalidated region compared to simply drawing immediately is efficiency; using an invalid region ensures that you only have to redraw one time.

resetShapes
void resetShapes()

Recursively resets the shape on this widget and its descendants.

setAppPaintable
void setAppPaintable(int appPaintable)

Sets whether the application intends to draw on the widget in an "expose-event" handler. This is a hint to the widget and does not affect the behavior of the GTK+ core; many widgets ignore this flag entirely. For widgets that do pay attention to the flag, such as GtkEventBox and GtkWindow, the effect is to suppress default themed drawing of the widget's background. (Children of the widget will still be drawn.) The application is then entirely responsible for drawing the widget background. Note that the background is still drawn when the widget is mapped. If this is not suitable (e.g. because you want to make a transparent

setDoubleBuffered
void setDoubleBuffered(int doubleBuffered)

Widgets are double buffered by default; you can use this function to turn off the buffering. "Double buffered" simply means that gdk_window_begin_paint_region() and gdk_window_end_paint() are called automatically around expose events sent to the widget. gdk_window_begin_paint() diverts all drawing to a widget's window to an offscreen buffer, and gdk_window_end_paint() draws the buffer to the screen. The result is that users see the window update in one smooth step, and don't see individual graphics primitives being rendered. In very simple terms, double buffered widgets don't flicker, so you would only use this function to turn off double buffering if you had special needs and really knew what you were doing. Note: if you turn off double-buffering, you have to handle expose events, since even the clearing to the background color or pixmap will not happen automatically (as it is done in gdk_window_begin_paint()).

setRedrawOnAllocate
void setRedrawOnAllocate(int redrawOnAllocate)

Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is TRUE and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance. Note that for NO_WINDOW widgets setting this flag to FALSE turns off all allocation on resizing: the widget will not even redraw if its position changes; this is to allow containers that don't draw anything to avoid excess invalidations. If you set this flag on a NO_WINDOW widget that does draw on widget->window, you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size.

setCompositeName
void setCompositeName(string name)

Sets a widgets composite name. The widget must be a composite child of its parent; see gtk_widget_push_composite_child().

setScrollAdjustments
int setScrollAdjustments(Adjustment hadjustment, Adjustment vadjustment)

For widgets that support scrolling, sets the scroll adjustments and returns TRUE. For widgets that don't support scrolling, does nothing and returns FALSE. Widgets that don't support scrolling can be scrolled by placing them in a GtkViewport, which does support scrolling.

mnemonicActivate
int mnemonicActivate(int groupCycling)

Emits the "mnemonic-activate" signal. The default handler for this signal activates the widget if group_cycling is FALSE, and just grabs the focus if group_cycling is TRUE.

classInstallStyleProperty
void classInstallStyleProperty(GtkWidgetClass* klass, ParamSpec pspec)

Installs a style property on a widget class. The parser for the style property is determined by the value type of pspec.

classInstallStylePropertyParser
void classInstallStylePropertyParser(GtkWidgetClass* klass, ParamSpec pspec, GtkRcPropertyParser parser)

Installs a style property on a widget class.

classFindStyleProperty
ParamSpec classFindStyleProperty(GtkWidgetClass* klass, string propertyName)

Finds a style property of a widget class by name. Since 2.2

classListStyleProperties
ParamSpec[] classListStyleProperties(GtkWidgetClass* klass)

Returns all style properties of a widget class. Since 2.2

regionIntersect
Region regionIntersect(Region region)

Computes the intersection of a widget's area and region, returning the intersection. The result may be empty, use gdk_region_empty() to check.

sendExpose
int sendExpose(Event event)

Very rarely-used function. This function is used to emit an expose event signals on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a child NO_WINDOW widget, and that is normally done using gtk_container_propagate_expose(). If you want to force an area of a window to be redrawn, use gdk_window_invalidate_rect() or gdk_window_invalidate_region(). To cause the redraw to be done immediately, follow that call with a call to gdk_window_process_updates().

sendFocusChange
int sendFocusChange(Event event)

Sends the focus change event to widget This function is not meant to be used by applications. The only time it should be used is when it is necessary for a GtkWidget to assign focus to a widget that is semantically owned by the first widget even though it's not a direct child - for instance, a search entry in a floating window similar to the quick search in GtkTreeView. Since 2.22

styleGetProperty
void styleGetProperty(string propertyName, Value value)

Gets the value of a style property of widget.

styleGetValist
void styleGetValist(string firstPropertyName, void* varArgs)

Non-vararg variant of gtk_widget_style_get(). Used primarily by language bindings.

styleAttach
void styleAttach()

This function attaches the widget's GtkStyle to the widget's GdkWindow. It is a replacement for widget->style = gtk_style_attach (widget->style, widget->window); and should only ever be called in a derived widget's "realize" implementation which does not chain up to its parent class' "realize" implementation, because one of the parent classes (finally GtkWidget) would attach the style itself. Since 2.20

getAccessible
ObjectAtk getAccessible()

Returns the accessible object that describes the widget to an assistive technology. If no accessibility library is loaded (i.e. no ATK implementation library is loaded via GTK_MODULES or via another application library, such as libgnome), then this AtkObject instance may be a no-op. Likewise, if no class-specific AtkObject implementation is available for the widget instance in question, it will inherit an AtkObject implementation from the first ancestor class for which such an implementation is defined. The documentation of the ATK library contains more information about accessible objects and their uses.

childFocus
int childFocus(GtkDirectionType direction)

This function is used by custom widget implementations; if you're writing an app, you'd use gtk_widget_grab_focus() to move the focus to a particular widget, and gtk_container_set_focus_chain() to change the focus tab order. So you may want to investigate those functions instead. gtk_widget_child_focus() is called by containers as the user moves around the window using keyboard shortcuts. direction indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). gtk_widget_child_focus() emits the "focus" signal; widgets override the default handler for this signal in order to implement appropriate focus behavior. The default ::focus handler for a widget should return TRUE if moving in direction left the focus on a focusable location inside that widget, and FALSE if moving in direction moved the focus outside the widget. If returning TRUE, widgets normally call gtk_widget_grab_focus() to place the focus accordingly; if returning FALSE, they don't modify the current focus location. This function replaces gtk_container_focus() from GTK+ 1.2. It was necessary to check that the child was visible, sensitive, and focusable before calling gtk_container_focus(). gtk_widget_child_focus() returns FALSE if the widget is not currently in a focusable state, so there's no need for those checks.

childNotify
void childNotify(string childProperty)

Emits a "child-notify" signal for the child property child_property on widget. This is the analogue of g_object_notify() for child properties.

freezeChildNotify
void freezeChildNotify()

Stops emission of "child-notify" signals on widget. The signals are queued until gtk_widget_thaw_child_notify() is called on widget. This is the analogue of g_object_freeze_notify() for child properties.

getChildVisible
int getChildVisible()

Gets the value set with gtk_widget_set_child_visible(). If you feel a need to use this function, your code probably needs reorganization. This function is only useful for container implementations and never should be called by an application.

getParent
Widget getParent()

Returns the parent container of widget.

getSettings
Settings getSettings()

Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget. Note that this function can only be called when the GtkWidget is attached to a toplevel, since the settings object is specific to a particular GdkScreen.

getClipboard
Clipboard getClipboard(GdkAtom selection)

Returns the clipboard object for the given selection to be used with widget. widget must have a GdkDisplay associated with it, so must be attached to a toplevel window. Since 2.2

getDisplay
Display getDisplay()

Get the GdkDisplay for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a GtkWindow at the top. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Since 2.2

getRootWindow
Window getRootWindow()

Get the root window where this widget is located. This function can only be called after the widget has been added to a widget hierarchy with GtkWindow at the top. The root window is useful for such purposes as creating a popup GdkWindow associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Since 2.2

getScreen
Screen getScreen()

Get the GdkScreen from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a GtkWindow at the top. In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Since 2.2

hasScreen
int hasScreen()

Checks whether there is a GdkScreen is associated with this widget. All toplevel widgets have an associated screen, and all widgets added into a hierarchy with a toplevel window at the top. Since 2.2

getSizeRequest
void getSizeRequest(int width, int height)

Gets the size request that was explicitly set for the widget using gtk_widget_set_size_request(). A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used intead. See gtk_widget_set_size_request(). To get the size a widget will actually use, call gtk_widget_size_request() instead of this function.

setChildVisible
void setChildVisible(int isVisible)

Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with gtk_widget_show(). The child visibility can be set for widget before it is added to a container with gtk_widget_set_parent(), to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of TRUE when the widget is removed from a container. Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself. This function is only useful for container implementations and never should be called by an application.

setSizeRequest
void setSizeRequest(int width, int height)

Sets the minimum size of a widget; that is, the widget's size request will be width by height. You can use this function to force a widget to be either larger or smaller than it normally would be. In most cases, gtk_window_set_default_size() is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, gtk_window_set_geometry_hints() can be a useful function as well. Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct. The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested. If the size request in a given direction is -1 (unset), then the "natural" size request of the widget will be used instead. Widgets can't actually be allocated a size less than 1 by 1, but you can pass 0,0 to this function to mean "as small as possible."

thawChildNotify
void thawChildNotify()

Reverts the effect of a previous call to gtk_widget_freeze_child_notify(). This causes all queued "child-notify" signals on widget to be emitted.

setNoShowAll
void setNoShowAll(int noShowAll)

Sets the "no-show-all" property, which determines whether calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect this widget. This is mostly for use in constructing widget hierarchies with externally controlled visibility, see GtkUIManager. Since 2.4

getNoShowAll
int getNoShowAll()

Returns the current value of the GtkWidget:no-show-all property, which determines whether calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect this widget. Since 2.4

listMnemonicLabels
ListG listMnemonicLabels()

Returns a newly allocated list of the widgets, normally labels, for which this widget is a the target of a mnemonic (see for example, gtk_label_set_mnemonic_widget()). The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards. Since 2.4

addMnemonicLabel
void addMnemonicLabel(Widget label)

Adds a widget to the list of mnemonic labels for this widget. (See gtk_widget_list_mnemonic_labels()). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well, by using a connection to the "destroy" signal or a weak notifier. Since 2.4

removeMnemonicLabel
void removeMnemonicLabel(Widget label)

Removes a widget from the list of mnemonic labels for this widget. (See gtk_widget_list_mnemonic_labels()). The widget must have previously been added to the list with gtk_widget_add_mnemonic_label(). Since 2.4

getAction
Action getAction()

Warning gtk_widget_get_action has been deprecated since version 2.16 and should not be used in newly-written code. Use gtk_activatable_get_related_action() instead. Returns the GtkAction that widget is a proxy for. See also gtk_action_get_proxies(). Since 2.10

isComposited
int isComposited()

Whether widget can rely on having its alpha channel drawn correctly. On X11 this function returns whether a compositing manager is running for widget's screen. Please note that the semantics of this call will change in the future if used on a widget that has a composited window in its hierarchy (as set by gdk_window_set_composited()). Since 2.10

errorBell
void errorBell()

Notifies the user about an input-related error on this widget. If the "gtk-error-bell" setting is TRUE, it calls gdk_window_beep(), otherwise it does nothing. Note that the effect of gdk_window_beep() can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used. Since 2.12

keynavFailed
int keynavFailed(GtkDirectionType direction)

This function should be called whenever keyboard navigation within a single widget hits a boundary. The function emits the "keynav-failed" signal on the widget and its return value should be interpreted in a way similar to the return value of Since 2.12

getTooltipMarkup
string getTooltipMarkup()

Gets the contents of the tooltip for widget. Since 2.12

setTooltipMarkup
void setTooltipMarkup(string markup)

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language. This function will take care of setting GtkWidget:has-tooltip to TRUE and of the default handler for the GtkWidget::query-tooltip signal. See also the GtkWidget:tooltip-markup property and gtk_tooltip_set_markup(). Since 2.12

getTooltipText
string getTooltipText()

Gets the contents of the tooltip for widget. Since 2.12

setTooltipText
void setTooltipText(string text)

Sets text as the contents of the tooltip. This function will take care of setting GtkWidget:has-tooltip to TRUE and of the default handler for the GtkWidget::query-tooltip signal. See also the GtkWidget:tooltip-text property and gtk_tooltip_set_text(). Since 2.12

getTooltipWindow
GtkWindow* getTooltipWindow()

Returns the GtkWindow of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using gtk_widget_set_tooltip_window(). Since 2.12

setTooltipWindow
void setTooltipWindow(GtkWindow* customWindow)

Replaces the default, usually yellow, window used for displaying tooltips with custom_window. GTK+ will take care of showing and hiding custom_window at the right moment, to behave likewise as the default tooltip window. If custom_window is NULL, the default tooltip window will be used. If the custom window should have the default theming it needs to have the name "gtk-tooltip", see gtk_widget_set_name(). Since 2.12

getHasTooltip
int getHasTooltip()

Returns the current value of the has-tooltip property. See GtkWidget:has-tooltip for more information. Since 2.12

setHasTooltip
void setHasTooltip(int hasTooltip)

Sets the has-tooltip property on widget to has_tooltip. See GtkWidget:has-tooltip for more information. Since 2.12

triggerTooltipQuery
void triggerTooltipQuery()

Triggers a tooltip query on the display where the toplevel of widget is located. See gtk_tooltip_trigger_tooltip_query() for more information. Since 2.12

getSnapshot
Pixmap getSnapshot(Rectangle clipRect)

Create a GdkPixmap of the contents of the widget and its children. Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on the widget being snapshot and likely differs from those of a target widget displaying the pixmap. The function gdk_pixbuf_get_from_drawable() can be used to convert the pixmap to a visual independant representation. The snapshot area used by this function is the widget's allocation plus any extra space occupied by additional windows belonging to this widget (such as the arrows of a spin button). Thus, the resulting snapshot pixmap is possibly larger than the allocation. If clip_rect is non-NULL, the resulting pixmap is shrunken to match the specified clip_rect. The (x,y) coordinates of clip_rect are interpreted widget relative. If width or height of clip_rect are 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective amount. For instance a clip_rect { +5, +5, -10, -10 } will chop off 5 pixels at each side of the snapshot pixmap. If non-NULL, clip_rect will contain the exact widget-relative snapshot coordinates upon return. A clip_rect of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area and use clip_rect as a pure output parameter. The returned pixmap can be NULL, if the resulting clip_area was empty. Since 2.14

setAllocation
void setAllocation(GtkAllocation allocation)

Sets the widget's allocation. This should not be used directly, but from within a widget's size_allocate method. Since 2.18

getAppPaintable
int getAppPaintable()

Determines whether the application intends to draw on the widget in an "expose-event" handler. See gtk_widget_set_app_paintable() Since 2.18

getCanDefault
int getCanDefault()

Determines whether widget can be a default widget. See gtk_widget_set_can_default(). Since 2.18

setCanDefault
void setCanDefault(int canDefault)

Specifies whether widget can be a default widget. See gtk_widget_grab_default() for details about the meaning of "default". Since 2.18

getCanFocus
int getCanFocus()

Determines whether widget can own the input focus. See gtk_widget_set_can_focus(). Since 2.18

setCanFocus
void setCanFocus(int canFocus)

Specifies whether widget can own the input focus. See gtk_widget_grab_focus() for actually setting the input focus on a widget. Since 2.18

getDoubleBuffered
int getDoubleBuffered()

Determines whether the widget is double buffered. See gtk_widget_set_double_buffered() Since 2.18

getHasWindow
int getHasWindow()

Determines whether widget has a GdkWindow of its own. See gtk_widget_set_has_window(). Since 2.18

setHasWindow
void setHasWindow(int hasWindow)

Specifies whether widget has a GdkWindow of its own. Note that all realized widgets have a non-NULL "window" pointer (gtk_widget_get_window() never returns a NULL window when a widget is realized), but for many of them it's actually the GdkWindow of one of its parent widgets. Widgets that do not create a window for themselves in GtkWidget::realize() must announce this by calling this function with has_window = FALSE. This function should only be called by widget implementations, and they should call it in their init() function. Since 2.18

getSensitive
int getSensitive()

Returns the widget's sensitivity (in the sense of returning the value that has been set using gtk_widget_set_sensitive()). The effective sensitivity of a widget is however determined by both its own and its parent widget's sensitivity. See gtk_widget_is_sensitive(). Since 2.18

isSensitive
int isSensitive()

Returns the widget's effective sensitivity, which means it is sensitive itself and also its parent widget is sensntive Since 2.18

getState
GtkStateType getState()

Returns the widget's state. See gtk_widget_set_state(). Since 2.18

getVisible
int getVisible()

Determines whether the widget is visible. Note that this doesn't take into account whether the widget's parent is also visible or the widget is obscured in any way. See gtk_widget_set_visible(). Since 2.18

setVisible
void setVisible(int visible)

Sets the visibility state of widget. Note that setting this to TRUE doesn't mean the widget is actually viewable, see gtk_widget_get_visible(). This function simply calls gtk_widget_show() or gtk_widget_hide() but is nicer to use when the visibility of the widget depends on some condition. Since 2.18

hasDefault
int hasDefault()

Determines whether widget is the current default widget within its toplevel. See gtk_widget_set_can_default(). Since 2.18

hasFocus
int hasFocus()

Determines if the widget has the global input focus. See gtk_widget_is_focus() for the difference between having the global input focus, and only having the focus within a toplevel. Since 2.18

hasGrab
int hasGrab()

Determines whether the widget is currently grabbing events, so it is the only widget receiving input events (keyboard and mouse). See also gtk_grab_add(). Since 2.18

hasRcStyle
int hasRcStyle()

Determines if the widget style has been looked up through the rc mechanism. Since 2.20

isDrawable
int isDrawable()

Determines whether widget can be drawn to. A widget can be drawn to if it is mapped and visible. Since 2.18

isToplevel
int isToplevel()

Determines whether widget is a toplevel widget. Currently only GtkWindow and GtkInvisible are toplevel widgets. Toplevel widgets have no parent widget. Since 2.18

setWindow
void setWindow(Window window)

Sets a widget's window. This function should only be used in a widget's GtkWidget::realize() implementation. The window passed is usually either new window created with gdk_window_new(), or the window of its parent widget as returned by gtk_widget_get_parent_window(). Widgets must indicate whether they will create their own GdkWindow by calling gtk_widget_set_has_window(). This is usually done in the widget's init() function. Since 2.18

setReceivesDefault
void setReceivesDefault(int receivesDefault)

Specifies whether widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default. See gtk_widget_grab_default() for details about the meaning of "default". Since 2.18

getReceivesDefault
int getReceivesDefault()

Determines whether widget is alyways treated as default widget withing its toplevel when it has the focus, even if another widget is the default. See gtk_widget_set_receives_default(). Since 2.18

setRealized
void setRealized(int realized)

Marks the widget as being realized. This function should only ever be called in a derived widget's "realize" or "unrealize" implementation. Since 2.20

getRealized
int getRealized()

Determines whether widget is realized. Since 2.20

setMapped
void setMapped(int mapped)

Marks the widget as being realized. This function should only ever be called in a derived widget's "map" or "unmap" implementation. Since 2.20

getMapped
int getMapped()

Whether the widget is mapped. Since 2.20

getRequisition
void getRequisition(GtkRequisition requisition)

Retrieves the widget's requisition. This function should only be used by widget implementations in order to figure whether the widget's requisition has actually changed after some internal state change (so that they can call gtk_widget_queue_resize() instead of gtk_widget_queue_draw()). Normally, gtk_widget_size_request() should be used. Since 2.20

requisitionCopy
GtkRequisition* requisitionCopy(GtkRequisition* requisition)

Copies a GtkRequisition.

requisitionFree
void requisitionFree(GtkRequisition* requisition)

Frees a GtkRequisition.

From EditableIF

getEditableTStruct
GtkEditable* getEditableTStruct()
Undocumented in source.
getStruct
void* getStruct()

the main Gtk struct as a void*

onChangedListeners
void delegate(EditableIF)[] onChangedListeners()
addOnChanged
void addOnChanged(void delegate(EditableIF) dlg, ConnectFlags connectFlags)

The ::changed signal is emitted at the end of a single user-visible operation on the contents of the GtkEditable. E.g., a paste operation that replaces the contents of the selection will cause only one signal emission (even though it is implemented by first deleting the selection, then inserting the new content, and may cause multiple ::notify::text signals to be emitted).

onDeleteTextListeners
void delegate(gint, gint, EditableIF)[] onDeleteTextListeners()
Undocumented in source.
addOnDeleteText
void addOnDeleteText(void delegate(gint, gint, EditableIF) dlg, ConnectFlags connectFlags)

This signal is emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the range of deleted text, or prevent it from being deleted entirely. The start_pos and end_pos parameters are interpreted as for gtk_editable_delete_text().

onInsertTextListeners
void delegate(string, gint, void*, EditableIF)[] onInsertTextListeners()
Undocumented in source.
addOnInsertText
void addOnInsertText(void delegate(string, gint, void*, EditableIF) dlg, ConnectFlags connectFlags)

This signal is emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the inserted text, or prevent it from being inserted entirely.

selectRegion
void selectRegion(int startPos, int endPos)

Selects a region of text. The characters that are selected are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the the characters selected are those characters from start_pos to the end of the text. Note that positions are specified in characters, not bytes.

getSelectionBounds
int getSelectionBounds(int* startPos, int* endPos)

Retrieves the selection bound of the editable. start_pos will be filled with the start of the selection and end_pos with end. If no text was selected both will be identical and FALSE will be returned. Note that positions are specified in characters, not bytes.

insertText
void insertText(string newText, int newTextLength, int position)

Inserts new_text_length bytes of new_text into the contents of the widget, at position position. Note that the position is in characters, not in bytes. The function updates position to point after the newly inserted text.

deleteText
void deleteText(int startPos, int endPos)

Deletes a sequence of characters. The characters that are deleted are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the the characters deleted are those from start_pos to the end of the text. Note that the positions are specified in characters, not bytes.

getChars
string getChars(int startPos, int endPos)

Retrieves a sequence of characters. The characters that are retrieved are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the the characters retrieved are those characters from start_pos to the end of the text. Note that positions are specified in characters, not bytes.

cutClipboard
void cutClipboard()

Removes the contents of the currently selected content in the editable and puts it on the clipboard.

copyClipboard
void copyClipboard()

Copies the contents of the currently selected content in the editable and puts it on the clipboard.

pasteClipboard
void pasteClipboard()

Pastes the content of the clipboard to the current position of the cursor in the editable.

deleteSelection
void deleteSelection()

Deletes the currently selected text of the editable. This call doesn't do anything if there is no selected text.

setPosition
void setPosition(int position)

Sets the cursor position in the editable to the given value. The cursor is displayed before the character with the given (base 0) index in the contents of the editable. The value must be less than or equal to the number of characters in the editable. A value of -1 indicates that the position should be set after the last character of the editable. Note that position is in characters, not in bytes.

getPosition
int getPosition()

Retrieves the current position of the cursor relative to the start of the content of the editable. Note that this position is in characters, not in bytes.

setEditable
void setEditable(int isEditable)

Determines if the user can edit the text in the editable widget or not.

getEditable
int getEditable()

Retrieves whether editable is editable. See gtk_editable_set_editable().

From CellEditableIF

getCellEditableTStruct
GtkCellEditable* getCellEditableTStruct()
Undocumented in source.
getStruct
void* getStruct()

the main Gtk struct as a void*

onEditingDoneListeners
void delegate(CellEditableIF)[] onEditingDoneListeners()
addOnEditingDone
void addOnEditingDone(void delegate(CellEditableIF) dlg, ConnectFlags connectFlags)

This signal is a sign for the cell renderer to update its value from the cell_editable. Implementations of GtkCellEditable are responsible for emitting this signal when they are done editing, e.g. GtkEntry is emitting it when the user presses Enter. gtk_cell_editable_editing_done() is a convenience method for emitting GtkCellEditable::editing-done.

onRemoveWidgetListeners
void delegate(CellEditableIF)[] onRemoveWidgetListeners()
Undocumented in source.
addOnRemoveWidget
void addOnRemoveWidget(void delegate(CellEditableIF) dlg, ConnectFlags connectFlags)

This signal is meant to indicate that the cell is finished editing, and the widget may now be destroyed. Implementations of GtkCellEditable are responsible for emitting this signal when they are done editing. It must be emitted after the "editing-done" signal, to give the cell renderer a chance to update the cell's value before the widget is removed. gtk_cell_editable_remove_widget() is a convenience method for emitting GtkCellEditable::remove-widget.

startEditing
void startEditing(Event event)

Begins editing on a cell_editable. event is the GdkEvent that began the editing process. It may be NULL, in the instance that editing was initiated through programatic means.

editingDone
void editingDone()

Emits the "editing-done" signal.

removeWidget
void removeWidget()

Emits the "remove-widget" signal.

Meta