<?xml version="1.0"?>
<page id="GimpUi.SpinScale.set_constrain_drag"
      type="topic"
      style="method"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="GimpUi.SpinScale" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>none</api:type>
      </api:returns>
      <api:name>gimp_spin_scale_set_constrain_drag</api:name>
      <api:arg>
        <api:type>GimpUi.SpinScale</api:type>
        <api:name>self</api:name>
      </api:arg>
      <api:arg>
        <api:type>bool</api:type>
        <api:name>constrain</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.SpinScale.set_constrain_drag</title>
  <synopsis><code mime="text/x-python">
@accepts(GimpUi.SpinScale, bool)
@returns(none)
def set_constrain_drag(self, constrain):
    # Python wrapper for gimp_spin_scale_set_constrain_drag()
  </code></synopsis>
  <p>If @constrain_drag is TRUE, dragging the scale with the pointer will
only result into integer values. It will still possible to set the
scale to fractional values (if the spin scale "digits" is above 0)
for instance with keyboard edit.</p>

<terms>
<item>
<title><code>self</code></title>
  <p>the <link xref="GimpUi.SpinScale"/>.</p>
</item>
<item>
<title><code>constrain</code></title>
  <p>whether constraining to integer values when dragging with
            pointer.</p>
</item>
</terms>

</page>
