SAKAI Masahiro - Gimp::UI::ChainButton Diff
- Added parts are displayed like this.
- Deleted parts are displayed
like this.
= Gimp::UI::ChainButton
Widget to visually connect two entry widgets.
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 ChainButton only gives visual feedback, it does not really connect widgets.
You have to take care of locking the values yourself by checking the state of
the ChainButton whenever a value changes in one of the connected widgets and
adjusting the other value if necessary.
== Constants
--- Gimp::UI::ChainButton::TOP
--- Gimp::UI::ChainButton::LEFT
--- Gimp::UI::ChainButton::BUTTON
--- Gimp::UI::ChainButton::RIGHT
== Class Methods
--- Gimp::UI::ChainButton.new([position])
position: The position you are going to use for the button
with respect to the widgets you want to chain.
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 table 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.
Returns: the new Gimp::ChainButton, which is inactive by default.
Use active= to change its state.
== Methods:
Gimp::UI::ChainButton#position
-
Gimp::UI::ChainButton#active
Checks the state
Gimp::UI::ChainButton#active=(state)
Sets the state to be either locked (true) or unlocked (false) and
changes the showed pixmap to reflect the new state.
Gimp::UI::ChainButton#button
Gimp::UI::ChainButton#line1
Gimp::UI::ChainButton#line2
Gimp::UI::ChainButton#pixmap
Gimp::UI::ChainButton#broken
Gimp::UI::ChainButton#broken_mask
Gimp::UI::ChainButton#chain
構成Widget
Widget to visually connect two entry widgets.
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 ChainButton only gives visual feedback, it does not really connect widgets.
You have to take care of locking the values yourself by checking the state of
the ChainButton whenever a value changes in one of the connected widgets and
adjusting the other value if necessary.
== Constants
--- Gimp::UI::ChainButton::TOP
--- Gimp::UI::ChainButton::LEFT
--- Gimp::UI::ChainButton::BUTTON
--- Gimp::UI::ChainButton::RIGHT
== Class Methods
--- Gimp::UI::ChainButton.new([position])
position: The position you are going to use for the button
with respect to the widgets you want to chain.
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 table 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.
Returns: the new Gimp::ChainButton, which is inactive by default.
Use active= to change its state.
== Methods:
Gimp::UI::ChainButton#position
-
Gimp::UI::ChainButton#active
Checks the state
Gimp::UI::ChainButton#active=(state)
Sets the state to be either locked (true) or unlocked (false) and
changes the showed pixmap to reflect the new state.
Gimp::UI::ChainButton#button
Gimp::UI::ChainButton#line1
Gimp::UI::ChainButton#line2
Gimp::UI::ChainButton#pixmap
Gimp::UI::ChainButton#broken
Gimp::UI::ChainButton#broken_mask
Gimp::UI::ChainButton#chain
構成Widget