SpinButton

A GtkSpinButton is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a GtkEntry, GtkSpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range.

The main properties of a GtkSpinButton are through an adjustment. See the GtkAdjustment section for more details about an adjustment's properties.

class SpinButton : Entry {}

Constructors

this
this(GtkSpinButton* gtkSpinButton)

Sets our main struct and passes it to the parent class

this
this(Adjustment adjustment, double climbRate, uint digits)

Creates a new GtkSpinButton.

this
this(double min, double max, double step)

This is a convenience constructor that allows creation of a numeric GtkSpinButton without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin button is equivalent to the precision of step. Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use gtk_spin_button_set_digits() to correct it.

Members

Functions

addOnChangeValue
void addOnChangeValue(void delegate(GtkScrollType, SpinButton) dlg, ConnectFlags connectFlags)
addOnInput
void addOnInput(gint delegate(void*, SpinButton) dlg, ConnectFlags connectFlags)

The ::input signal can be used to influence the conversion of the users input into a double value. The signal handler is expected to use gtk_entry_get_text() to retrieve the text of the entry and set new_value to the new value. The default conversion uses g_strtod(). TRUE for a successful conversion, FALSE if the input was not handled, and GTK_INPUT_ERROR if the conversion failed.

addOnOutput
void addOnOutput(bool delegate(SpinButton) dlg, ConnectFlags connectFlags)

The ::output signal can be used to change to formatting of the value that is displayed in the spin buttons entry. TRUE if the value has been displayed

addOnValueChanged
void addOnValueChanged(void delegate(SpinButton) dlg, ConnectFlags connectFlags)
addOnWrapped
void addOnWrapped(void delegate(SpinButton) dlg, ConnectFlags connectFlags)

The wrapped signal is emitted right after the spinbutton wraps from its maximum to minimum value or vice-versa. Since 2.10 See Also GtkEntry

configure
void configure(Adjustment adjustment, double climbRate, uint digits)

Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call.

getAdjustment
Adjustment getAdjustment()

Get the adjustment associated with a GtkSpinButton

getDigits
uint getDigits()

Fetches the precision of spin_button. See gtk_spin_button_set_digits().

getIncrements
void getIncrements(double step, double page)

Gets the current step and page the increments used by spin_button. See gtk_spin_button_set_increments().

getNumeric
int getNumeric()

Returns whether non-numeric text can be typed into the spin button. See gtk_spin_button_set_numeric().

getRange
void getRange(double min, double max)

Gets the range allowed for spin_button. See gtk_spin_button_set_range().

getSnapToTicks
int getSnapToTicks()

Returns whether the values are corrected to the nearest step. See gtk_spin_button_set_snap_to_ticks().

getSpinButtonStruct
GtkSpinButton* getSpinButtonStruct()
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*

getUpdatePolicy
GtkSpinButtonUpdatePolicy getUpdatePolicy()

Gets the update behavior of a spin button. See gtk_spin_button_set_update_policy().

getValue
double getValue()

Get the value in the spin_button.

getValueAsInt
int getValueAsInt()

Get the value spin_button represented as an integer.

getWrap
int getWrap()

Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. See gtk_spin_button_set_wrap().

setAdjustment
void setAdjustment(Adjustment adjustment)

Replaces the GtkAdjustment associated with spin_button.

setDigits
void setDigits(uint digits)

Set the precision to be displayed by spin_button. Up to 20 digit precision is allowed.

setIncrements
void setIncrements(double step, double page)

Sets the step and page increments for spin_button. This affects how quickly the value changes when the spin button's arrows are activated.

setNumeric
void setNumeric(int numeric)

Sets the flag that determines if non-numeric text can be typed into the spin button.

setRange
void setRange(double min, double max)

Sets the minimum and maximum allowable values for spin_button. If the current value is outside this range, it will be adjusted to fit within the range, otherwise it will remain unchanged.

setSnapToTicks
void setSnapToTicks(int snapToTicks)

Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.

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

Sets the update behavior of a spin button. This determines whether the spin button is always updated or only when a valid value is set.

setValue
void setValue(double value)

Sets the value of spin_button.

setWrap
void setWrap(int wrap)

Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.

spin
void spin(GtkSpinType direction, double increment)

Increment or decrement a spin button's value in a specified direction by a specified amount.

update
void update()

Manually force an update of the spin button.

Static functions

callBackChangeValue
void callBackChangeValue(GtkSpinButton* spinbuttonStruct, GtkScrollType arg1, SpinButton _spinButton)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackInput
void callBackInput(GtkSpinButton* spinButtonStruct, void* newValue, SpinButton _spinButton)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackOutput
gboolean callBackOutput(GtkSpinButton* spinButtonStruct, SpinButton _spinButton)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackValueChanged
void callBackValueChanged(GtkSpinButton* spinbuttonStruct, SpinButton _spinButton)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackWrapped
void callBackWrapped(GtkSpinButton* spinbuttonStruct, SpinButton _spinButton)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

connectedSignals
int[string] connectedSignals;
gtkSpinButton
GtkSpinButton* gtkSpinButton;

the main Gtk struct

onChangeValueListeners
void delegate(GtkScrollType, SpinButton)[] onChangeValueListeners;
Undocumented in source.
onInputListeners
gint delegate(void*, SpinButton)[] onInputListeners;
Undocumented in source.
onOutputListeners
bool delegate(SpinButton)[] onOutputListeners;
Undocumented in source.
onValueChangedListeners
void delegate(SpinButton)[] onValueChangedListeners;
Undocumented in source.
onWrappedListeners
void delegate(SpinButton)[] onWrappedListeners;
Undocumented in source.

Inherited Members

From Entry

gtkEntry
GtkEntry* gtkEntry;

the main Gtk struct

getEntryStruct
GtkEntry* getEntryStruct()
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 EditableT!(GtkEntry)
Undocumented in source.
__anonymous
mixin CellEditableT!(GtkEntry)
Undocumented in source.
getStockId
StockID getStockId(GtkEntryIconPosition iconPos)

Gets the stock id of action. Since 2.16

setStockId
void setStockId(GtkEntryIconPosition iconPos, StockID stockId)

Sets the stock id on action Since 2.16

connectedSignals
int[string] connectedSignals;
onActivateListeners
void delegate(Entry)[] onActivateListeners;
Undocumented in source.
addOnActivate
void addOnActivate(void delegate(Entry) dlg, ConnectFlags connectFlags)

The ::activate signal is emitted when the user hits the Enter key. While this signal is used as a keybinding signal, it is also commonly used by applications to intercept activation of entries. The default bindings for this signal are all forms of the Enter key.

callBackActivate
void callBackActivate(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onBackspaceListeners
void delegate(Entry)[] onBackspaceListeners;
Undocumented in source.
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.

callBackBackspace
void callBackBackspace(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onCopyClipboardListeners
void delegate(Entry)[] onCopyClipboardListeners;
Undocumented in source.
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.

callBackCopyClipboard
void callBackCopyClipboard(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onCutClipboardListeners
void delegate(Entry)[] onCutClipboardListeners;
Undocumented in source.
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.

callBackCutClipboard
void callBackCutClipboard(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onDeleteFromCursorListeners
void delegate(GtkDeleteType, gint, Entry)[] onDeleteFromCursorListeners;
Undocumented in source.
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.

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.
onIconPressListeners
void delegate(GtkEntryIconPosition, GdkEvent*, Entry)[] onIconPressListeners;
Undocumented in source.
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

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.
onIconReleaseListeners
void delegate(GtkEntryIconPosition, GdkEvent*, Entry)[] onIconReleaseListeners;
Undocumented in source.
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

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.
onInsertAtCursorListeners
void delegate(string, Entry)[] onInsertAtCursorListeners;
Undocumented in source.
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.

callBackInsertAtCursor
void callBackInsertAtCursor(GtkEntry* entryStruct, gchar* str, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onMoveCursorListeners
void delegate(GtkMovementStep, gint, gboolean, Entry)[] onMoveCursorListeners;
Undocumented in source.
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

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.
onPasteClipboardListeners
void delegate(Entry)[] onPasteClipboardListeners;
Undocumented in source.
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.

callBackPasteClipboard
void callBackPasteClipboard(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onPopulatePopupListeners
void delegate(Widget, Entry)[] onPopulatePopupListeners;
Undocumented in source.
addOnPopulatePopup
void addOnPopulatePopup(void delegate(Widget, 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 items to the widget, which will be a GtkMenu in this case. If "populate-all" is TRUE, this signal will also be emitted to populate touch popups. In this case, widget will be a different container, e.g. a GtkToolbar. The signal handler should not make assumptions about the type of widget.

callBackPopulatePopup
void callBackPopulatePopup(GtkEntry* entryStruct, GtkWidget* popup, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onPreeditChangedListeners
void delegate(string, Entry)[] onPreeditChangedListeners;
Undocumented in source.
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

callBackPreeditChanged
void callBackPreeditChanged(GtkEntry* entryStruct, gchar* preedit, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
onToggleOverwriteListeners
void delegate(Entry)[] onToggleOverwriteListeners;
Undocumented in source.
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, GtkEntryCompletion

callBackToggleOverwrite
void callBackToggleOverwrite(GtkEntry* entryStruct, Entry _entry)
Undocumented in source. Be warned that the author may not have intended to support it.
getBuffer
EntryBuffer getBuffer()

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

setBuffer
void setBuffer(EntryBuffer buffer)

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

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().

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

getTextArea
void getTextArea(Rectangle textArea)

Gets the area where the entry's text is drawn. This function is useful when drawing something to the entry in a draw callback. If the entry is not realized, text_area is filled with zeros. See also gtk_entry_get_icon_area().

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(). Note that you probably want to set "input-purpose" to GTK_INPUT_PURPOSE_PASSWORD or GTK_INPUT_PURPOSE_PIN to inform input methods about the purpose of this entry, in addition to setting visibility to FALSE.

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.

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

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.

getActivatesDefault
int getActivatesDefault()

Retrieves the value set by gtk_entry_set_activates_default().

getHasFrame
int getHasFrame()

Gets the value set by gtk_entry_set_has_frame().

getInnerBorder
Border getInnerBorder()

Warning gtk_entry_get_inner_border has been deprecated since version 3.4 and should not be used in newly-written code. Use the standard border and padding CSS properties (through objects like GtkStyleContext and GtkCssProvider); the value returned by this function is ignored by GtkEntry. This function returns the entry's "inner-border" property. See gtk_entry_set_inner_border() for more information. Since 2.10

getWidthChars
int getWidthChars()

Gets the value set by gtk_entry_set_width_chars().

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.)

setHasFrame
void setHasFrame(int setting)

Sets whether the entry has a beveled frame around it.

setInnerBorder
void setInnerBorder(Border border)

Warning gtk_entry_set_inner_border has been deprecated since version 3.4 and should not be used in newly-written code. Use the standard border and padding CSS properties (through objects like GtkStyleContext and GtkCssProvider); the value set with this function is ignored by GtkEntry. 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

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.

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().

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

getAlignment
float getAlignment()

Gets the value set by gtk_entry_set_alignment(). Since 2.4

setPlaceholderText
void setPlaceholderText(string text)

Sets text to be displayed in entry when it is empty and unfocused. This can be used to give a visual hint of the expected contents of the GtkEntry. Note that since the placeholder text gets removed when the entry received focus, using this feature is a bit problematic if the entry is given the initial focus in a window. Sometimes this can be worked around by delaying the initial focus setting until the first key event arrives.

getPlaceholderText
string getPlaceholderText()

Retrieves the text that will be displayed when entry is empty and unfocused

setOverwriteMode
void setOverwriteMode(int overwrite)

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

getOverwriteMode
int getOverwriteMode()

Gets the value set by gtk_entry_set_overwrite_mode(). Since 2.14

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.

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()).

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()).

setAttributes
void setAttributes(PgAttributeList attrs)

Sets a PangoAttrList; the attributes in the list are applied to the entry text.

getAttributes
PgAttributeList getAttributes()

Gets the attribute list that was set on the entry using gtk_entry_set_attributes(), if any.

getMaxLength
int getMaxLength()

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

getVisibility
int getVisibility()

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

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

getCompletion
EntryCompletion getCompletion()

Returns the auxiliary completion object currently in use by entry. 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

getCursorHadjustment
Adjustment getCursorHadjustment()

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

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

getProgressFraction
double getProgressFraction()

Returns the current fraction of the task that's been completed. See gtk_entry_set_progress_fraction(). 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

getProgressPulseStep
double getProgressPulseStep()

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

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

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

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

getTabs
PgTabArray getTabs()

Gets the tabstops that were set on the entry using gtk_entry_set_tabs(), if any.

setTabs
void setTabs(PgTabArray tabs)

Sets a PangoTabArray; the tabstops in the array are applied to the entry text.

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)

Warning gtk_entry_set_icon_from_stock has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_entry_set_icon_from_icon_name() instead. 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

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

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

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

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

getIconStock
string getIconStock(GtkEntryIconPosition iconPos)

Warning gtk_entry_get_icon_stock has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_entry_get_icon_name() instead. 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

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

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

setIconActivatable
void setIconActivatable(GtkEntryIconPosition iconPos, int activatable)

Sets whether the icon is activatable. Since 2.16

getIconActivatable
int getIconActivatable(GtkEntryIconPosition iconPos)

Returns whether the icon is activatable. Since 2.16

setIconSensitive
void setIconSensitive(GtkEntryIconPosition iconPos, int sensitive)

Sets the sensitivity for the specified icon. Since 2.16

getIconSensitive
int getIconSensitive(GtkEntryIconPosition iconPos)

Returns whether the icon appears sensitive or insensitive. Since 2.16

getIconAtPos
int getIconAtPos(int x, int y)

Finds the icon at the given position and return its index. The position's coordinates are relative to the entry's top left corner. 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

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

getIconTooltipText
string getIconTooltipText(GtkEntryIconPosition iconPos)

Gets the contents of the tooltip on the icon at the specified position in entry. 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_entry_set_icon_tooltip_text(). 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

setIconDragSource
void setIconDragSource(GtkEntryIconPosition iconPos, TargetList 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

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

getIconArea
void getIconArea(GtkEntryIconPosition iconPos, Rectangle iconArea)

Gets the area where entry's icon at icon_pos is drawn. This function is useful when drawing something to the entry in a draw callback. If the entry is not realized or has no icon at the given position, icon_area is filled with zeros. See also gtk_entry_get_text_area()

setInputPurpose
void setInputPurpose(GtkInputPurpose purpose)

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

getInputPurpose
GtkInputPurpose getInputPurpose()

Gets the value of the "input-purpose" property.

setInputHints
void setInputHints(GtkInputHints hints)

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

getInputHints
GtkInputHints getInputHints()

Gets the value of the "input-hints" property.

Meta