GimpUi.IntComboBox¶
- Subclasses:
GimpUi.ChannelComboBox,GimpUi.DrawableComboBox,GimpUi.EnumComboBox,GimpUi.ImageComboBox,GimpUi.LayerComboBox,GimpUi.PathComboBox
Methods¶
- Inherited:
Gtk.ComboBox (40), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.CellLayout (9)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Ellipsize mode for the used text cell renderer |
||
r/w |
An optional label to be displayed |
||
r/w |
Combo box layout |
||
r/w |
Value of active item |
Style Properties¶
- Inherited:
Signals¶
Fields¶
- Inherited:
Gtk.ComboBox (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2)
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class GimpUi.IntComboBox(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A widget providing a popup menu of integer values (e.g. enums).
- classmethod new(labels)¶
- Parameters:
labels ([
str]) – an array of labels- Returns:
a new
GimpUi.IntComboBox.- Return type:
A variant of
GimpUi.IntComboBox.new() that takes an array of labels. The array indices are used as values.New in version 2.2.
- connect(value, callback, *data)¶
- Parameters:
value (
int) – the value to setcallback (
GObject.Callback) – a callback to connect to the self's “changed” signaldata (
objectorNone) – a pointer passed as data to g_signal_connect()
- Returns:
the signal handler ID as returned by g_signal_connect()
- Return type:
A convenience function that sets the initial value of a
GimpUi.IntComboBoxand connects callback to the “changed” signal.This function also calls the callback once after setting the initial value. This is often convenient when working with combo boxes that select a default active item, like for example
GimpUi.DrawableComboBox.new(). If you pass an invalid initial value, the callback will be called with the default item active.New in version 2.2.
- get_active()¶
- Returns:
Trueif value has been set orFalseif no item was active.- value:
return location for the integer value
- Return type:
Retrieves the value of the selected (active) item in the self.
New in version 2.2.
- get_active_user_data()¶
- Returns:
Trueif user_data has been set orFalseif no item was active.- user_data:
return location for the
objectvalue
- Return type:
Retrieves the user-data of the selected (active) item in the self.
New in version 2.10.
- get_label()¶
- Returns:
the self' label.
- Return type:
Returns the label previously set with
GimpUi.IntComboBox.set_label(), orNone,New in version 2.10.
- get_layout()¶
- Returns:
the self's layout.
- Return type:
Returns the layout of self
New in version 2.10.
- set_active(value)¶
- Parameters:
value (
int) – an integer value- Returns:
Trueon success (value changed or not) orFalseif there was no item for this value.- Return type:
Looks up the item that belongs to the given value and makes it the selected item in the self.
New in version 2.2.
- set_active_by_user_data(user_data)¶
-
Looks up the item that has the given user_data and makes it the selected item in the self.
New in version 2.10.
- set_label(label)¶
- Parameters:
label (
str) – a string to be shown as label
Sets a caption on the self that will be displayed left-aligned inside the box. When a label is set, the remaining contents of the box will be right-aligned. This is useful for places where screen estate is rare, like in tool options.
New in version 2.10.
- set_layout(layout)¶
- Parameters:
layout (
GimpUi.IntComboBoxLayout) – the combo box layout
Sets the layout of self to layout.
New in version 2.10.
- set_sensitivity(func, *data)¶
- Parameters:
func (
GimpUi.IntSensitivityFunc) – a function that returns a boolean value, orNoneto unset
Sets a function that is used to decide about the sensitivity of rows in the self. Use this if you want to set certain rows insensitive.
Calling
Gtk.Widget.queue_draw() on the self will cause the sensitivity to be updated.New in version 2.4.
Property Details¶
- GimpUi.IntComboBox.props.ellipsize¶
- Name:
ellipsize- Type:
- Default Value:
- Flags:
Specifies the preferred place to ellipsize text in the combo-box, if the cell renderer does not have enough room to display the entire string.
New in version 2.4.
- GimpUi.IntComboBox.props.label¶
-
Sets a label on the combo-box, see
GimpUi.IntComboBox.set_label().New in version 2.10.
- GimpUi.IntComboBox.props.layout¶
- Name:
layout- Type:
- Default Value:
- Flags:
Specifies the combo box layout.
New in version 2.10.
- GimpUi.IntComboBox.props.value¶
-
The active value (different from the “active” property of
Gtk.ComboBoxwhich is the active index).New in version 3.0.