275 lines
11 KiB
HTML
275 lines
11 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>GimpChainButton</title>
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
|
<link rel="start" href="index.html" title="GIMP Widgets Library Reference Manual">
|
|
<link rel="up" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
|
|
<link rel="prev" href="GimpButton.html" title="GimpButton">
|
|
<link rel="next" href="GimpColorArea.html" title="GimpColorArea">
|
|
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
<link rel="part" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
|
|
<link rel="chapter" href="libgimpwidgets-hierarchy.html" title="Object Hierarchy">
|
|
<link rel="chapter" href="libgimpwidgets-cell-renderers.html" title="Cell Renderers for GtkTreeView">
|
|
<link rel="part" href="libgimpwidgets-colordisplay.html" title="Part II. GIMP Display Filters">
|
|
<link rel="part" href="libgimpwidgets-colorselector.html" title="Part III. GIMP Color Selectors">
|
|
<link rel="part" href="libgimpwidgets-controller.html" title="Part IV. GIMP Controllers">
|
|
<link rel="part" href="libgimpwidgets-utils.html" title="Part V. GIMP Widgets Utilities">
|
|
<link rel="part" href="libgimpwidgets-deprecated.html" title="Part VI. Deprecated API">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
|
|
<td><a accesskey="p" href="GimpButton.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
|
<td><a accesskey="u" href="libgimpwidgets-widgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
|
<th width="100%" align="center">GIMP Widgets Library Reference Manual</th>
|
|
<td><a accesskey="n" href="GimpColorArea.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
|
</tr></table>
|
|
<div class="refentry" lang="en">
|
|
<a name="GimpChainButton"></a><div class="titlepage"></div>
|
|
<div class="refnamediv"><table width="100%"><tr>
|
|
<td valign="top">
|
|
<h2><span class="refentrytitle">GimpChainButton</span></h2>
|
|
<p>GimpChainButton — Widget to visually connect two entry widgets.</p>
|
|
</td>
|
|
<td valign="top" align="right"></td>
|
|
</tr></table></div>
|
|
<div class="refsynopsisdiv">
|
|
<h2>Synopsis</h2>
|
|
<pre class="synopsis">
|
|
|
|
|
|
|
|
<a href="GimpChainButton.html#GimpChainButton-struct">GimpChainButton</a>;
|
|
enum <a href="GimpChainButton.html#GimpChainPosition">GimpChainPosition</a>;
|
|
<a
|
|
href="../gtk/GtkWidget.html"
|
|
>GtkWidget</a>* <a href="GimpChainButton.html#gimp-chain-button-new">gimp_chain_button_new</a> (<a href="GimpChainButton.html#GimpChainPosition">GimpChainPosition</a> position);
|
|
void <a href="GimpChainButton.html#gimp-chain-button-set-active">gimp_chain_button_set_active</a> (<a href="GimpChainButton.html" title="GimpChainButton">GimpChainButton</a> *button,
|
|
gboolean active);
|
|
gboolean <a href="GimpChainButton.html#gimp-chain-button-get-active">gimp_chain_button_get_active</a> (<a href="GimpChainButton.html" title="GimpChainButton">GimpChainButton</a> *button);
|
|
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2550661"></a><h2>Object Hierarchy</h2>
|
|
<pre class="synopsis">
|
|
|
|
GObject
|
|
+----<a
|
|
href="../gtk/GtkObject.html"
|
|
>GtkObject</a>
|
|
+----<a
|
|
href="../gtk/GtkWidget.html"
|
|
>GtkWidget</a>
|
|
+----<a
|
|
href="../gtk/GtkContainer.html"
|
|
>GtkContainer</a>
|
|
+----<a
|
|
href="../gtk/GtkTable.html"
|
|
>GtkTable</a>
|
|
+----GimpChainButton
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2550705"></a><h2>Implemented Interfaces</h2>
|
|
<p>
|
|
GimpChainButton implements
|
|
AtkImplementorIface.</p>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2550722"></a><h2>Signal Prototypes</h2>
|
|
<pre class="synopsis">
|
|
|
|
"<a href="GimpChainButton.html#GimpChainButton-toggled">toggled</a>" void user_function (<a href="GimpChainButton.html" title="GimpChainButton">GimpChainButton</a> *gimpchainbutton,
|
|
gpointer user_data);
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2550342"></a><h2>Description</h2>
|
|
<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 <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a> 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 <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a> whenever a value changes
|
|
in one of the connected widgets and adjusting the other value if
|
|
necessary.
|
|
</p>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2550381"></a><h2>Details</h2>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2550387"></a><h3>
|
|
<a name="GimpChainButton-struct"></a>GimpChainButton</h3>
|
|
<a class="indexterm" name="id2550396"></a><pre class="programlisting">typedef struct _GimpChainButton GimpChainButton;</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2550412"></a><h3>
|
|
<a name="GimpChainPosition"></a>enum GimpChainPosition</h3>
|
|
<a class="indexterm" name="id2550423"></a><pre class="programlisting">typedef enum
|
|
{
|
|
GIMP_CHAIN_TOP,
|
|
GIMP_CHAIN_LEFT,
|
|
GIMP_CHAIN_BOTTOM,
|
|
GIMP_CHAIN_RIGHT
|
|
} GimpChainPosition;
|
|
</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2550440"></a><h3>
|
|
<a name="gimp-chain-button-new"></a>gimp_chain_button_new ()</h3>
|
|
<a class="indexterm" name="id2550449"></a><pre class="programlisting"><a
|
|
href="../gtk/GtkWidget.html"
|
|
>GtkWidget</a>* gimp_chain_button_new (<a href="GimpChainButton.html#GimpChainPosition">GimpChainPosition</a> position);</pre>
|
|
<p>
|
|
Creates a new <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a> widget.
|
|
</p>
|
|
<p>
|
|
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.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>position</code></em> :</span></td>
|
|
<td> The position you are going to use for the button
|
|
with respect to the widgets you want to chain.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td> Pointer to the new <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a>, which is inactive
|
|
by default. Use <a href="GimpChainButton.html#gimp-chain-button-set-active"><code class="function">gimp_chain_button_set_active()</code></a> to
|
|
change its state.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2548602"></a><h3>
|
|
<a name="gimp-chain-button-set-active"></a>gimp_chain_button_set_active ()</h3>
|
|
<a class="indexterm" name="id2548613"></a><pre class="programlisting">void gimp_chain_button_set_active (<a href="GimpChainButton.html" title="GimpChainButton">GimpChainButton</a> *button,
|
|
gboolean active);</pre>
|
|
<p>
|
|
Sets the state of the <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a> to be either locked (<code class="literal">TRUE</code>) or
|
|
unlocked (<code class="literal">FALSE</code>) and changes the showed pixmap to reflect the new state.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>button</code></em> :</span></td>
|
|
<td> Pointer to a <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>active</code></em> :</span></td>
|
|
<td> The new state.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2531461"></a><h3>
|
|
<a name="gimp-chain-button-get-active"></a>gimp_chain_button_get_active ()</h3>
|
|
<a class="indexterm" name="id2531472"></a><pre class="programlisting">gboolean gimp_chain_button_get_active (<a href="GimpChainButton.html" title="GimpChainButton">GimpChainButton</a> *button);</pre>
|
|
<p>
|
|
Checks the state of the <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a>.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>button</code></em> :</span></td>
|
|
<td> Pointer to a <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td> <code class="literal">TRUE</code> if the <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a> is active (locked).
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2531561"></a><h2>Signals</h2>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2531567"></a><h3>
|
|
<a name="GimpChainButton-toggled"></a>The "toggled" signal</h3>
|
|
<pre class="programlisting">void user_function (<a href="GimpChainButton.html" title="GimpChainButton">GimpChainButton</a> *gimpchainbutton,
|
|
gpointer user_data);</pre>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>gimpchainbutton</code></em> :</span></td>
|
|
<td>the object which received the signal.
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
|
|
<td>user data set when the signal handler was connected.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2531637"></a><h2>See Also</h2>
|
|
<p>
|
|
You may want to use the convenience function <a href="libgimpwidgets-GimpWidgets.html#gimp-coordinates-new"><code class="function">gimp_coordinates_new()</code></a> to set
|
|
up two GimpSizeEntries (see <a href="GimpSizeEntry.html" title="GimpSizeEntry"><span class="type">GimpSizeEntry</span></a>) linked with a <a href="GimpChainButton.html" title="GimpChainButton"><span class="type">GimpChainButton</span></a>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
|
|
<td align="left"><a accesskey="p" href="GimpButton.html"><b><< GimpButton</b></a></td>
|
|
<td align="right"><a accesskey="n" href="GimpColorArea.html"><b>GimpColorArea >></b></a></td>
|
|
</tr></table>
|
|
</body>
|
|
</html>
|