<?xml version="1.0"?>
<page id="GimpUi.ChainButton"
      type="guide"
      style="class"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="index" group="class" type="guide"/>
  </info>
  <title>GimpUi.ChainButton</title>
  <synopsis><code>
const GimpUi = imports.gi.GimpUi;

let chainButton = new GimpUi.ChainButton({
    <link xref='GimpUi.ChainButton-active'>active</link>: value,
    <link xref='GimpUi.ChainButton-icon-size'>icon_size</link>: value,
    <link xref='GimpUi.ChainButton-position'>position</link>: value,
});
  </code></synopsis>
  <p>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.</p>  <p>The <link xref="GimpUi.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 <link xref="GimpUi.ChainButton"/> whenever a
value changes in one of the connected widgets and adjusting the
other value if necessary.</p>

  <synopsis>
    <title>Hierarchy</title>
    <tree>
      <item>
        <code>GObject.Object</code>
      <item>
        <code>GObject.InitiallyUnowned</code>
      <item>
        <code>Gtk.Widget</code>
      <item>
        <code>Gtk.Container</code>
      <item>
        <code>Gtk.Grid</code>
      <item>
        <code>GimpUi.ChainButton</code>
      </item>
      </item>
      </item>
      </item>
      </item>
      </item>
    </tree>
  </synopsis>
  <links type="topic" ui:expanded="true"
         api:type="function" api:mime="text/x-gjs"
         groups="constructor" style="linklist">
    <title>Constructors</title>
  </links>
  <links type="topic" ui:expanded="true"
         api:type="function" api:mime="text/x-gjs"
         groups="method" style="linklist">
    <title>Methods</title>
  </links>
  <links type="topic" ui:expanded="true"
         api:type="function" api:mime="text/x-gjs"
         groups="function" style="linklist">
    <title>Static Functions</title>
  </links>
  <links type="topic" ui:expanded="true" groups="property" style="linklist">
    <title>Properties</title>
  </links>
  <links type="topic" ui:expanded="true" groups="signal" style="linklist">
    <title>Signals</title>
  </links>
  <links type="topic" ui:expanded="true" groups="vfunc" style="linklist">
    <title>Virtual functions</title>
  </links>
  <links type="topic" ui:expanded="true" groups="field" style="linklist">
    <title>Fields</title>
  </links>
  <links type="topic" ui:expanded="true" groups="#first #default #last" style="linklist">
    <title>Other</title>
  </links>
</page>
