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
|
<?xml version="1.0"?>
<!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="GooCanvasRectModel">
<refmeta>
<refentrytitle role="top_of_page">GooCanvasRectModel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GOOCANVAS Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GooCanvasRectModel</refname>
<refpurpose>a model for rectangle items.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<link linkend="GooCanvasRectModel-struct">GooCanvasRectModel</link>;
<link linkend="GooCanvasItemModel">GooCanvasItemModel</link>* <link linkend="goo-canvas-rect-model-new">goo_canvas_rect_model_new</link> (<link linkend="GooCanvasItemModel">GooCanvasItemModel</link> *parent,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y,
<link linkend="gdouble">gdouble</link> width,
<link linkend="gdouble">gdouble</link> height,
...);
</synopsis>
</refsynopsisdiv>
<refsect1 role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----<link linkend="GooCanvasItemModelSimple">GooCanvasItemModelSimple</link>
+----GooCanvasRectModel
</synopsis>
</refsect1>
<refsect1 role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GooCanvasRectModel implements
<link linkend="GooCanvasItemModel">GooCanvasItemModel</link>.</para>
</refsect1>
<refsect1 role="properties">
<title role="properties.title">Properties</title>
<synopsis>
"<link linkend="GooCanvasRectModel--height">height</link>" <link linkend="gdouble">gdouble</link> : Read / Write
"<link linkend="GooCanvasRectModel--radius-x">radius-x</link>" <link linkend="gdouble">gdouble</link> : Read / Write
"<link linkend="GooCanvasRectModel--radius-y">radius-y</link>" <link linkend="gdouble">gdouble</link> : Read / Write
"<link linkend="GooCanvasRectModel--width">width</link>" <link linkend="gdouble">gdouble</link> : Read / Write
"<link linkend="GooCanvasRectModel--x">x</link>" <link linkend="gdouble">gdouble</link> : Read / Write
"<link linkend="GooCanvasRectModel--y">y</link>" <link linkend="gdouble">gdouble</link> : Read / Write
</synopsis>
</refsect1>
<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
GooCanvasRectModel represents a model for rectangle items.
</para>
<para>
It is a subclass of <link linkend="GooCanvasItemModelSimple"><type>GooCanvasItemModelSimple</type></link> and so inherits all of the
style properties such as "stroke-color", "fill-color" and "line-width".
</para>
<para>
It also implements the <link linkend="GooCanvasItemModel"><type>GooCanvasItemModel</type></link> interface, so you can use the
<link linkend="GooCanvasItemModel"><type>GooCanvasItemModel</type></link> functions such as <link linkend="goo-canvas-item-model-raise"><function>goo_canvas_item_model_raise()</function></link> and
<link linkend="goo-canvas-item-model-rotate"><function>goo_canvas_item_model_rotate()</function></link>.
</para>
<para>
To create a <link linkend="GooCanvasRectModel"><type>GooCanvasRectModel</type></link> use <link linkend="goo-canvas-rect-model-new"><function>goo_canvas_rect_model_new()</function></link>.
</para>
<para>
To get or set the properties of an existing <link linkend="GooCanvasRectModel"><type>GooCanvasRectModel</type></link>, use
<link linkend="g-object-get"><function>g_object_get()</function></link> and <link linkend="g-object-set"><function>g_object_set()</function></link>.
</para>
<para>
To respond to events such as mouse clicks on the rectangle you must connect
to the signal handlers of the corresponding <link linkend="GooCanvasRect"><type>GooCanvasRect</type></link> objects.
(See <link linkend="goo-canvas-get-item"><function>goo_canvas_get_item()</function></link> and <link linkend="GooCanvas-item-created"><type>"item-created"</type></link>.)</para>
<para>
</para>
</refsect1>
<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="GooCanvasRectModel-struct" role="struct"/>GooCanvasRectModel</title>
<indexterm><primary>GooCanvasRectModel</primary></indexterm><programlisting>typedef struct _GooCanvasRectModel GooCanvasRectModel;</programlisting>
<para>
The <link linkend="GooCanvasRectModel-struct"><type>GooCanvasRectModel</type></link> struct contains private data only.</para>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="goo-canvas-rect-model-new" role="function"/>goo_canvas_rect_model_new ()</title>
<indexterm><primary>goo_canvas_rect_model_new</primary></indexterm><programlisting><link linkend="GooCanvasItemModel">GooCanvasItemModel</link>* goo_canvas_rect_model_new (<link linkend="GooCanvasItemModel">GooCanvasItemModel</link> *parent,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y,
<link linkend="gdouble">gdouble</link> width,
<link linkend="gdouble">gdouble</link> height,
...);</programlisting>
<para>
Creates a new rectangle item.
</para>
<variablelist role="params">
<varlistentry><term><parameter>parent</parameter> :</term>
<listitem><simpara> the parent model, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. If a parent is specified, it will
assume ownership of the item, and the item will automatically be freed when
it is removed from the parent. Otherwise call <link linkend="g-object-unref"><function>g_object_unref()</function></link> to free it.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> the x coordinate of the left of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> the y coordinate of the top of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter> :</term>
<listitem><simpara> the width of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter> :</term>
<listitem><simpara> the height of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter> :</term>
<listitem><simpara> optional pairs of property names and values, and a terminating <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new rectangle model.
</simpara></listitem></varlistentry>
</variablelist>
<para>
Here's an example showing how to create a rectangle at (100,100) with a
width of 200 and a height of 100.
</para>
<para>
<informalexample><programlisting>
GooCanvasItemModel *rect = goo_canvas_rect_model_new (mygroup, 100.0, 100.0, 200.0, 100.0,
"stroke-color", "red",
"line-width", 5.0,
"fill-color", "blue",
NULL);
</programlisting></informalexample></para>
<para>
</para></refsect2>
</refsect1>
<refsect1 role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2><title><anchor id="GooCanvasRectModel--height"/>The <literal>"height"</literal> property</title>
<indexterm><primary>GooCanvasRectModel:height</primary></indexterm><programlisting> "height" <link linkend="gdouble">gdouble</link> : Read / Write</programlisting>
<para>The height of the rectangle.</para><para>Allowed values: >= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2><title><anchor id="GooCanvasRectModel--radius-x"/>The <literal>"radius-x"</literal> property</title>
<indexterm><primary>GooCanvasRectModel:radius-x</primary></indexterm><programlisting> "radius-x" <link linkend="gdouble">gdouble</link> : Read / Write</programlisting>
<para>The horizontal radius to use for rounded corners.</para><para>Allowed values: >= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2><title><anchor id="GooCanvasRectModel--radius-y"/>The <literal>"radius-y"</literal> property</title>
<indexterm><primary>GooCanvasRectModel:radius-y</primary></indexterm><programlisting> "radius-y" <link linkend="gdouble">gdouble</link> : Read / Write</programlisting>
<para>The vertical radius to use for rounded corners.</para><para>Allowed values: >= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2><title><anchor id="GooCanvasRectModel--width"/>The <literal>"width"</literal> property</title>
<indexterm><primary>GooCanvasRectModel:width</primary></indexterm><programlisting> "width" <link linkend="gdouble">gdouble</link> : Read / Write</programlisting>
<para>The width of the rectangle.</para><para>Allowed values: >= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2><title><anchor id="GooCanvasRectModel--x"/>The <literal>"x"</literal> property</title>
<indexterm><primary>GooCanvasRectModel:x</primary></indexterm><programlisting> "x" <link linkend="gdouble">gdouble</link> : Read / Write</programlisting>
<para>The x coordinate of the rectangle.</para><para>Default value: 0</para>
</refsect2>
<refsect2><title><anchor id="GooCanvasRectModel--y"/>The <literal>"y"</literal> property</title>
<indexterm><primary>GooCanvasRectModel:y</primary></indexterm><programlisting> "y" <link linkend="gdouble">gdouble</link> : Read / Write</programlisting>
<para>The y coordinate of the rectangle.</para><para>Default value: 0</para>
</refsect2>
</refsect1>
<refsect1><refsect2 /><refsect2 /></refsect1>
</refentry>
|