~ubuntu-branches/ubuntu/gutsy/goocanvas/gutsy

« back to all changes in this revision

Viewing changes to docs/xml/goocanvasmodelsimple.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-08-28 11:47:12 UTC
  • Revision ID: james.westby@ubuntu.com-20060828114712-ejoo9vy6ckao9cvs
Tags: upstream-0.4
ImportĀ upstreamĀ versionĀ 0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
 
3
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 
4
<refentry id="GooCanvasModelSimple">
 
5
<refmeta>
 
6
<refentrytitle role="top_of_page">GooCanvasModelSimple</refentrytitle>
 
7
<manvolnum>3</manvolnum>
 
8
<refmiscinfo>GOOCANVAS Library</refmiscinfo>
 
9
</refmeta>
 
10
 
 
11
<refnamediv>
 
12
<refname>GooCanvasModelSimple</refname>
 
13
<refpurpose>a simple implementation of the canvas model interface.</refpurpose>
 
14
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
 
15
</refnamediv>
 
16
 
 
17
<refsynopsisdiv role="synopsis">
 
18
<title role="synopsis.title">Synopsis</title>
 
19
 
 
20
<synopsis>
 
21
 
 
22
#include &lt;goocanvas.h&gt;
 
23
 
 
24
 
 
25
            <link linkend="GooCanvasModelSimple-struct">GooCanvasModelSimple</link>;
 
26
 
 
27
<link linkend="GooCanvasModelSimple">GooCanvasModelSimple</link>* <link linkend="goo-canvas-model-simple-new">goo_canvas_model_simple_new</link>
 
28
                                            (void);
 
29
 
 
30
</synopsis>
 
31
</refsynopsisdiv>
 
32
 
 
33
<refsect1 role="object_hierarchy">
 
34
<title role="object_hierarchy.title">Object Hierarchy</title>
 
35
<synopsis>
 
36
 
 
37
  <link linkend="GObject">GObject</link>
 
38
   +----GooCanvasModelSimple
 
39
</synopsis>
 
40
 
 
41
</refsect1>
 
42
 
 
43
 
 
44
 
 
45
<refsect1 role="impl_interfaces">
 
46
<title role="impl_interfaces.title">Implemented Interfaces</title>
 
47
<para>
 
48
GooCanvasModelSimple implements
 
49
 <link linkend="GooCanvasModel">GooCanvasModel</link>.</para>
 
50
 
 
51
</refsect1>
 
52
 
 
53
 
 
54
 
 
55
 
 
56
 
 
57
<refsect1 role="desc">
 
58
<title role="desc.title">Description</title>
 
59
<para>
 
60
<link linkend="GooCanvasModelSimple"><type>GooCanvasModelSimple</type></link> is a simple implementation of the <link linkend="GooCanvasModel"><type>GooCanvasModel</type></link>
 
61
interface.
 
62
</para>
 
63
<para>
 
64
Typically the canvas model is created, items are added, and then the model
 
65
is set in the <link linkend="GooCanvasView--"><type>GooCanvasView:</type></link>
 
66
</para>
 
67
<para>
 
68
<informalexample><programlisting>
 
69
 GooCanvasModelSimple *canvas_model;
 
70
 GooCanvasItem *root, *item;
 
71
 
 
72
 /&ast; Create a simple model. &ast;/
 
73
 canvas_model = goo_canvas_model_simple_new&nbsp;();
 
74
 
 
75
 /&ast; Get the root item of the model. &ast;/
 
76
 root = goo_canvas_model_get_root_item (GOO_CANVAS_MODEL (canvas_model));
 
77
 
 
78
 /&ast; Create a rectangle item. &ast;/
 
79
 item = goo_canvas_rect_new (root, 100, 100, 50, 50, NULL);
 
80
 
 
81
 /&ast; Pass the model to the GooCanvasView. &ast;/
 
82
 goo_canvas_view_set_model (GOO_CANVAS_VIEW (canvas),
 
83
                            GOO_CANVAS_MODEL (canvas_model));
 
84
  
 
85
 /&ast; Unref the model, since the GooCanvasView owns it now. &ast;/
 
86
 g_object_unref (canvas_model);
 
87
</programlisting></informalexample></para>
 
88
<para>
 
89
 
 
90
</para>
 
91
</refsect1>
 
92
 
 
93
<refsect1 role="details">
 
94
<title role="details.title">Details</title>
 
95
<refsect2>
 
96
<title><anchor id="GooCanvasModelSimple-struct" role="struct"/>GooCanvasModelSimple</title>
 
97
<indexterm><primary>GooCanvasModelSimple</primary></indexterm><programlisting>typedef struct _GooCanvasModelSimple GooCanvasModelSimple;</programlisting>
 
98
<para>
 
99
The <link linkend="GooCanvasModelSimple-struct"><type>GooCanvasModelSimple</type></link> struct contains private data only.</para>
 
100
<para>
 
101
 
 
102
</para></refsect2>
 
103
<refsect2>
 
104
<title><anchor id="goo-canvas-model-simple-new" role="function"/>goo_canvas_model_simple_new ()</title>
 
105
<indexterm><primary>goo_canvas_model_simple_new</primary></indexterm><programlisting><link linkend="GooCanvasModelSimple">GooCanvasModelSimple</link>* goo_canvas_model_simple_new
 
106
                                            (void);</programlisting>
 
107
<para>
 
108
Creates a new simple canvas model.</para>
 
109
<para>
 
110
 
 
111
</para><variablelist role="params">
 
112
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GooCanvasModelSimple"><type>GooCanvasModelSimple</type></link>.
 
113
</simpara></listitem></varlistentry>
 
114
</variablelist></refsect2>
 
115
 
 
116
</refsect1>
 
117
 
 
118
 
 
119
 
 
120
 
 
121
</refentry>