1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpundo">
<refmeta>
<refentrytitle role="top_of_page">gimpundo</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpundo</refname>
<refpurpose>Control of undo/redo.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-group-start">gimp_image_undo_group_start</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-group-end">gimp_image_undo_group_end</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-is-enabled">gimp_image_undo_is_enabled</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-disable">gimp_image_undo_disable</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-enable">gimp_image_undo_enable</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-freeze">gimp_image_undo_freeze</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-thaw">gimp_image_undo_thaw</link> (<link linkend="gint32">gint32</link> image_ID);
</synopsis>
</refsynopsisdiv>
<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
Control of undo/redo.
</para>
</refsect1>
<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="gimp-image-undo-group-start" role="function"/>gimp_image_undo_group_start ()</title>
<indexterm><primary>gimp_image_undo_group_start</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_group_start (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Starts a group undo.
</para>
<para>
This function is used to start a group undo--necessary for logically
combining two or more undo operations into a single operation. This
call must be used in conjunction with a 'gimp-image-undo-group-end'
call.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The ID of the image in which to open an undo group.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-group-end" role="function"/>gimp_image_undo_group_end ()</title>
<indexterm><primary>gimp_image_undo_group_end</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_group_end (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Finish a group undo.
</para>
<para>
This function must be called once for each
'gimp-image-undo-group-start' call that is made.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The ID of the image in which to close an undo group.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-is-enabled" role="function"/>gimp_image_undo_is_enabled ()</title>
<indexterm><primary>gimp_image_undo_is_enabled</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_is_enabled (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Check if the image's undo stack is enabled.
</para>
<para>
This procedure checks if the image's undo stack is currently enabled
or disabled. This is useful when several plugins or scripts call
each other and want to check if their caller has already used
'gimp_image_undo_disable' or 'gimp_image_undo_freeze'.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> True if undo is enabled for this image.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-disable" role="function"/>gimp_image_undo_disable ()</title>
<indexterm><primary>gimp_image_undo_disable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_disable (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Disable the image's undo stack.
</para>
<para>
This procedure disables the image's undo stack, allowing subsequent
operations to ignore their undo steps. This is generally called in
conjunction with 'gimp_image_undo_enable' to temporarily disable an
image undo stack. This is advantageous because saving undo steps can
be time and memory intensive.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> True if the image undo has been disabled.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-enable" role="function"/>gimp_image_undo_enable ()</title>
<indexterm><primary>gimp_image_undo_enable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_enable (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Enable the image's undo stack.
</para>
<para>
This procedure enables the image's undo stack, allowing subsequent
operations to store their undo steps. This is generally called in
conjunction with 'gimp_image_undo_disable' to temporarily disable an
image undo stack.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> True if the image undo has been enabled.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-freeze" role="function"/>gimp_image_undo_freeze ()</title>
<indexterm><primary>gimp_image_undo_freeze</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_freeze (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Freeze the image's undo stack.
</para>
<para>
This procedure freezes the image's undo stack, allowing subsequent
operations to ignore their undo steps. This is generally called in
conjunction with 'gimp_image_undo_thaw' to temporarily disable an
image undo stack. This is advantageous because saving undo steps can
be time and memory intensive. 'gimp_image_undo_{freeze,thaw}' and
'gimp_image_undo_{disable,enable}' differ in that the former does
not free up all undo steps when undo is thawed, so is more suited to
interactive in-situ previews. It is important in this case that the
image is back to the same state it was frozen in before thawing,
else 'undo' behaviour is undefined.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> True if the image undo has been frozen.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-thaw" role="function"/>gimp_image_undo_thaw ()</title>
<indexterm><primary>gimp_image_undo_thaw</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_thaw (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Thaw the image's undo stack.
</para>
<para>
This procedure thaws the image's undo stack, allowing subsequent
operations to store their undo steps. This is generally called in
conjunction with 'gimp_image_undo_freeze' to temporarily freeze an
image undo stack. 'gimp_image_undo_thaw' does NOT free the undo
stack as 'gimp_image_undo_enable' does, so is suited for situations
where one wishes to leave the undo stack in the same state in which
one found it despite non-destructively playing with the image in the
meantime. An example would be in-situ plugin previews. Balancing
freezes and thaws and ensuring image consistancy is the
responsibility of the caller.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter> :</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> True if the image undo has been thawed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|