GimpUi.ChainButton¶
- Subclasses:
 None
Methods¶
- Inherited:
 Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
 Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/c  | 
The chain’s toggled state  | 
||
r/w/c  | 
The chain’s icon size  | 
||
r/w/co  | 
The chain’s position  | 
Child Properties¶
- Inherited:
 
Style Properties¶
- Inherited:
 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Fields¶
- Inherited:
 
Class Details¶
- class GimpUi.ChainButton(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
This widget provides a button showing either a linked or a broken chain that can be used to link two entries, spinbuttons, colors or other GUI elements and show that they may be locked. Use it for example to connect X and Y ratios to provide the possibility of a constrained aspect ratio.
The
GimpUi.ChainButtononly gives visual feedback, it does not really connect widgets. You have to take care of locking the values yourself by checking the state of theGimpUi.ChainButtonwhenever a value changes in one of the connected widgets and adjusting the other value if necessary.- classmethod new(position)¶
 - Parameters:
 position (
GimpUi.ChainPosition) – The position you are going to use for the button with respect to the widgets you want to chain.- Returns:
 Pointer to the new
GimpUi.ChainButton, which is inactive by default. UseGimpUi.ChainButton.set_active() to change its state.- Return type:
 
Creates a new
GimpUi.ChainButtonwidget.This returns a button showing either a broken or a linked chain and small clamps attached to both sides that visually group the two widgets you want to connect. This widget looks best when attached to a grid taking up two columns (or rows respectively) next to the widgets that it is supposed to connect. It may work for more than two widgets, but the look is optimized for two.
- get_active()¶
 - Returns:
 Trueif theGimpUi.ChainButtonis active (locked).- Return type:
 
Checks the state of the
GimpUi.ChainButton.
- get_button()¶
 - Returns:
 The
GimpUi.ChainButton's button.- Return type:
 
New in version 3.0.
- get_icon_size()¶
 - Returns:
 The icon size.
- Return type:
 
Gets the icon size of the
GimpUi.ChainButton.New in version 2.10.10.
- set_active(active)¶
 - Parameters:
 active (
bool) – The new state.
Sets the state of the
GimpUi.ChainButtonto be either locked (True) or unlocked (False) and changes the showed pixmap to reflect the new state.
- set_icon_size(size)¶
 - Parameters:
 size (
Gtk.IconSize) – The new icon size.
Sets the icon size of the
GimpUi.ChainButton.New in version 2.10.10.
Signal Details¶
- GimpUi.ChainButton.signals.toggled(chain_button)¶
 - Signal Name:
 toggled- Flags:
 - Parameters:
 chain_button (
GimpUi.ChainButton) – The object which received the signal
Property Details¶
- GimpUi.ChainButton.props.active¶
 - 
The toggled state of the chain button.
New in version 2.10.10.
 
- GimpUi.ChainButton.props.icon_size¶
 - Name:
 icon-size- Type:
 - Default Value:
 - Flags:
 
The chain button icon size.
New in version 2.10.10.
- GimpUi.ChainButton.props.position¶
 - Name:
 position- Type:
 - Default Value:
 - Flags:
 
The position in which the chain button will be used.
New in version 2.4.