Sets our main struct and passes it to the parent class
Creates a new GtkSpinButton.
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.
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.
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 retrieve text rather than numbers.
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.
Get the adjustment associated with a GtkSpinButton
Fetches the precision of spin_button. See gtk_spin_button_set_digits().
Gets the current step and page the increments used by spin_button. See gtk_spin_button_set_increments().
Returns whether non-numeric text can be typed into the spin button. See gtk_spin_button_set_numeric().
Gets the range allowed for spin_button. See gtk_spin_button_set_range().
Returns whether the values are corrected to the nearest step. See gtk_spin_button_set_snap_to_ticks().
the main Gtk struct as a void*
Gets the update behavior of a spin button. See gtk_spin_button_set_update_policy().
Get the value in the spin_button.
Get the value spin_button represented as an integer.
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().
Replaces the GtkAdjustment associated with spin_button.
Set the precision to be displayed by spin_button. Up to 20 digit precision is allowed.
Sets the step and page increments for spin_button. This affects how quickly the value changes when the spin button's arrows are activated.
Sets the flag that determines if non-numeric text can be typed into the spin button.
Sets the minimum and maximum allowable values for spin_button
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.
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.
Set the value of spin_button.
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.
Increment or decrement a spin button's value in a specified direction by a specified amount.
Manually force an update of the spin button.
the main Gtk struct
the main Gtk struct
the main Gtk struct as a void*
Gets the stock id of action. Since 2.16
Sets the stock id on action Since 2.16
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.
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.
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.
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.
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.
The ::icon-press signal is emitted when an activatable icon is clicked. Since 2.16
The ::icon-release signal is emitted on the button release from a mouse click over an activatable icon. Since 2.16
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.
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
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.
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.
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
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.
Get the GtkEntryBuffer object which holds the text for this widget. Since 2.18
Set the GtkEntryBuffer object which holds the text for this widget. Since 2.18
Sets the text in the widget to the given value, replacing the current contents. See gtk_entry_buffer_set_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.
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.
Retrieves the contents of the entry widget. See also gtk_editable_get_chars().
Retrieves the current length of the text in entry. Since 2.14
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().
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.
Unsets the invisible char previously set with gtk_entry_set_invisible_char(). So that the default invisible char is used again. Since 2.16
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.
Retrieves the value set by gtk_entry_set_activates_default().
Gets the value set by gtk_entry_set_has_frame().
This function returns the entry's "inner-border" property. See gtk_entry_set_inner_border() for more information. Since 2.10
Gets the value set by gtk_entry_set_width_chars().
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.)
Sets whether the entry has a beveled frame around it.
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
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.
Retrieves the character displayed in place of the real characters for entries with visibility set to false. See gtk_entry_set_invisible_char().
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
Gets the value set by gtk_entry_set_alignment(). Since 2.4
Sets whether the text is overwritten when typing in the GtkEntry. Since 2.14
Gets the value set by gtk_entry_set_overwrite_mode(). Since 2.14
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.
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.
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()).
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()).
Retrieves the maximum allowed length of the text in entry. See gtk_entry_set_max_length().
Retrieves whether the text in entry is visible. See gtk_entry_set_visibility().
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
Returns the auxiliary completion object currently in use by entry. Since 2.4
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
Retrieves the horizontal cursor adjustment for the entry. See gtk_entry_set_cursor_hadjustment(). Since 2.12
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
Returns the current fraction of the task that's been completed. See gtk_entry_set_progress_fraction(). Since 2.16
Sets the fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse(). Since 2.16
Retrieves the pulse step set with gtk_entry_set_progress_pulse_step(). Since 2.16
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
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
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
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
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
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
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
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
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
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
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
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
Sets whether the icon is activatable. Since 2.16
Returns whether the icon is activatable. Since 2.16
Sets the sensitivity for the specified icon. Since 2.16
Returns whether the icon appears sensitive or insensitive. Since 2.16
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
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
Gets the contents of the tooltip on the icon at the specified position in entry. Since 2.16
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
Gets the contents of the tooltip on the icon at the specified position in entry. Since 2.16
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
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
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
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
Description 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 a GtkAdjustment. See the GtkAdjustment section for more details about an adjustment's properties.