goocanvas 0.90.6-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. data/ChangeLog +87 -0
  2. data/README +37 -0
  3. data/Rakefile +14 -0
  4. data/ext/goocanvas/depend +5 -0
  5. data/ext/goocanvas/extconf.rb +66 -0
  6. data/ext/goocanvas/goocanvas.def +2 -0
  7. data/ext/goocanvas/rbgoocairo.c +74 -0
  8. data/ext/goocanvas/rbgoocanvas.c +236 -0
  9. data/ext/goocanvas/rbgoocanvas.h +66 -0
  10. data/ext/goocanvas/rbgoocanvasellipse.c +50 -0
  11. data/ext/goocanvas/rbgoocanvasgroup.c +41 -0
  12. data/ext/goocanvas/rbgoocanvasimage.c +45 -0
  13. data/ext/goocanvas/rbgoocanvasitem.c +358 -0
  14. data/ext/goocanvas/rbgoocanvaspolyline.c +102 -0
  15. data/ext/goocanvas/rbgoocanvasrect.c +47 -0
  16. data/ext/goocanvas/rbgoocanvasstyle.c +61 -0
  17. data/ext/goocanvas/rbgoocanvastable.c +41 -0
  18. data/ext/goocanvas/rbgoocanvastext.c +58 -0
  19. data/ext/goocanvas/rbgoocanvaswidget.c +48 -0
  20. data/ext/goocanvas/rbgooutils.c +44 -0
  21. data/extconf.rb +49 -0
  22. data/lib/1.8/goocanvas.so +0 -0
  23. data/lib/1.9/goocanvas.so +0 -0
  24. data/lib/goocanvas.rb +145 -0
  25. data/sample/demo-arrowhead.rb +315 -0
  26. data/sample/demo-fifteen.rb +218 -0
  27. data/sample/demo-primitives.rb +720 -0
  28. data/sample/demo.rb +84 -0
  29. data/sample/flower.png +0 -0
  30. data/sample/scalability-demo.rb +130 -0
  31. data/sample/simple-demo.rb +35 -0
  32. data/sample/table-demo.rb +137 -0
  33. data/sample/toroid.png +0 -0
  34. data/sample/units-demo.rb +80 -0
  35. data/sample/widgets-demo.rb +197 -0
  36. data/vendor/local/bin/libgoocanvas-3.dll +0 -0
  37. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvas.h +334 -0
  38. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasatk.h +22 -0
  39. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasellipse.h +120 -0
  40. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasenumtypes.h +33 -0
  41. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasgrid.h +153 -0
  42. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasgroup.h +109 -0
  43. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasimage.h +121 -0
  44. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitem.h +479 -0
  45. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitemmodel.h +275 -0
  46. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitemsimple.h +247 -0
  47. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasmarshal.h +61 -0
  48. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaspath.h +116 -0
  49. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaspolyline.h +176 -0
  50. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasprivate.h +59 -0
  51. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasrect.h +121 -0
  52. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasstyle.h +110 -0
  53. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvastable.h +139 -0
  54. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvastext.h +133 -0
  55. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasutils.h +333 -0
  56. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaswidget.h +66 -0
  57. data/vendor/local/include/goocanvas-1.0.0/goocanvas/stamp-goocanvasmarshal.h +1 -0
  58. data/vendor/local/lib/libgoocanvas.a +0 -0
  59. data/vendor/local/lib/libgoocanvas.dll.a +0 -0
  60. data/vendor/local/lib/pkgconfig/goocanvas.pc +13 -0
  61. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvas.html +1982 -0
  62. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasEllipse.html +269 -0
  63. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasEllipseModel.html +274 -0
  64. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGrid.html +469 -0
  65. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGridModel.html +476 -0
  66. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGroup.html +183 -0
  67. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGroupModel.html +184 -0
  68. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasImage.html +247 -0
  69. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasImageModel.html +252 -0
  70. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItem.html +3014 -0
  71. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemModel.html +1764 -0
  72. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemModelSimple.html +298 -0
  73. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemSimple.html +809 -0
  74. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPath.html +279 -0
  75. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPathModel.html +280 -0
  76. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPolyline.html +369 -0
  77. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPolylineModel.html +375 -0
  78. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasRect.html +247 -0
  79. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasRectModel.html +252 -0
  80. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasStyle.html +489 -0
  81. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTable.html +452 -0
  82. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTableModel.html +452 -0
  83. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasText.html +324 -0
  84. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTextModel.html +287 -0
  85. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasWidget.html +266 -0
  86. data/vendor/local/share/gtk-doc/html/goocanvas/ch01.html +53 -0
  87. data/vendor/local/share/gtk-doc/html/goocanvas/ch02.html +50 -0
  88. data/vendor/local/share/gtk-doc/html/goocanvas/ch03.html +62 -0
  89. data/vendor/local/share/gtk-doc/html/goocanvas/ch04.html +60 -0
  90. data/vendor/local/share/gtk-doc/html/goocanvas/ch05.html +33 -0
  91. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-GooCanvas-Types.html +815 -0
  92. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-architecture.html +157 -0
  93. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-coordinates.html +106 -0
  94. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-creating-items.html +420 -0
  95. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-model-view-canvas.html +246 -0
  96. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-overview.html +106 -0
  97. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-simple-canvas.html +238 -0
  98. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-wysiwyg.html +84 -0
  99. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas.devhelp +608 -0
  100. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas.devhelp2 +639 -0
  101. data/vendor/local/share/gtk-doc/html/goocanvas/home.png +0 -0
  102. data/vendor/local/share/gtk-doc/html/goocanvas/index.html +138 -0
  103. data/vendor/local/share/gtk-doc/html/goocanvas/index.sgml +814 -0
  104. data/vendor/local/share/gtk-doc/html/goocanvas/left.png +0 -0
  105. data/vendor/local/share/gtk-doc/html/goocanvas/right.png +0 -0
  106. data/vendor/local/share/gtk-doc/html/goocanvas/style.css +257 -0
  107. data/vendor/local/share/gtk-doc/html/goocanvas/up.png +0 -0
  108. data/vendor/local/share/gtk-doc/tmpl/goocanvas/dummy.sgml +0 -0
  109. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvas-unused.sgml +0 -0
  110. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvas.sgml +536 -0
  111. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasellipse.sgml +82 -0
  112. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasellipsemodel.sgml +82 -0
  113. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgrid.sgml +176 -0
  114. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgridmodel.sgml +176 -0
  115. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgroup.sgml +58 -0
  116. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgroupmodel.sgml +58 -0
  117. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasimage.sgml +81 -0
  118. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasimagemodel.sgml +81 -0
  119. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitem.sgml +773 -0
  120. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemmodel.sgml +490 -0
  121. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemmodelsimple.sgml +135 -0
  122. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemsimple.sgml +254 -0
  123. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspath.sgml +64 -0
  124. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspathmodel.sgml +64 -0
  125. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspolyline.sgml +109 -0
  126. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspolylinemodel.sgml +109 -0
  127. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasrect.sgml +72 -0
  128. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasrectmodel.sgml +72 -0
  129. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasstyle.sgml +186 -0
  130. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastable.sgml +158 -0
  131. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastablemodel.sgml +158 -0
  132. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastext.sgml +103 -0
  133. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastextmodel.sgml +93 -0
  134. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasutils.sgml +241 -0
  135. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaswidget.sgml +73 -0
  136. metadata +218 -0
@@ -0,0 +1,246 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>Model/View Canvas Example</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="GooCanvas Reference Manual">
8
+ <link rel="up" href="ch01.html" title="Introduction">
9
+ <link rel="prev" href="goocanvas-simple-canvas.html" title="Simple Canvas Example">
10
+ <link rel="next" href="goocanvas-architecture.html" title="Underlying Architecture">
11
+ <meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ </head>
14
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16
+ <td><a accesskey="p" href="goocanvas-simple-canvas.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17
+ <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19
+ <th width="100%" align="center">GooCanvas Reference Manual</th>
20
+ <td><a accesskey="n" href="goocanvas-architecture.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21
+ </tr></table>
22
+ <div class="refentry" title="Model/View Canvas Example">
23
+ <a name="goocanvas-model-view-canvas"></a><div class="titlepage"></div>
24
+ <div class="refnamediv"><table width="100%"><tr>
25
+ <td valign="top">
26
+ <h2><span class="refentrytitle">Model/View Canvas Example</span></h2>
27
+ <p>Model/View Canvas Example — how to create a model/view canvas.</p>
28
+ </td>
29
+ <td valign="top" align="right"></td>
30
+ </tr></table></div>
31
+ <div class="refsect1" title="Model View Canvas Example">
32
+ <a name="model-view-overview"></a><h2>Model View Canvas Example</h2>
33
+ <p>
34
+ Here's a complete example application that creates a model-view <a class="link" href="GooCanvas.html" title="GooCanvas"><span class="type">GooCanvas</span></a>
35
+ with a rectangle and a text item in it.
36
+ </p>
37
+ <div class="informalexample">
38
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
39
+ <tbody>
40
+ <tr>
41
+ <td class="listing_lines" align="right"><pre>1
42
+ 2
43
+ 3
44
+ 4
45
+ 5
46
+ 6
47
+ 7
48
+ 8
49
+ 9
50
+ 10
51
+ 11
52
+ 12
53
+ 13
54
+ 14
55
+ 15
56
+ 16
57
+ 17
58
+ 18
59
+ 19
60
+ 20
61
+ 21
62
+ 22
63
+ 23
64
+ 24
65
+ 25
66
+ 26
67
+ 27
68
+ 28
69
+ 29
70
+ 30
71
+ 31
72
+ 32
73
+ 33
74
+ 34
75
+ 35
76
+ 36
77
+ 37
78
+ 38
79
+ 39
80
+ 40
81
+ 41
82
+ 42
83
+ 43
84
+ 44
85
+ 45
86
+ 46
87
+ 47
88
+ 48
89
+ 49
90
+ 50
91
+ 51
92
+ 52
93
+ 53
94
+ 54
95
+ 55
96
+ 56
97
+ 57
98
+ 58
99
+ 59
100
+ 60
101
+ 61
102
+ 62
103
+ 63
104
+ 64
105
+ 65
106
+ 66
107
+ 67
108
+ 68
109
+ 69
110
+ 70
111
+ 71
112
+ 72
113
+ 73
114
+ 74
115
+ 75
116
+ 76
117
+ 77
118
+ 78
119
+ 79
120
+ 80
121
+ 81
122
+ 82
123
+ 83
124
+ 84
125
+ 85
126
+ 86
127
+ 87
128
+ 88
129
+ 89
130
+ 90
131
+ 91
132
+ 92
133
+ 93
134
+ 94
135
+ 95
136
+ 96
137
+ 97</pre></td>
138
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;stdlib.h&gt;</span>
139
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;goocanvas.h&gt;</span>
140
+
141
+
142
+ <span class="keyword">static</span><span class="normal"> gboolean </span><span class="function">on_rect_button_press</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GooCanvasItem.html">GooCanvasItem</a> </span><span class="symbol">*</span><span class="normal">view</span><span class="symbol">,</span>
143
+ <span class="normal"> <a href="GooCanvasItem.html">GooCanvasItem</a> </span><span class="symbol">*</span><span class="normal">target</span><span class="symbol">,</span>
144
+ <span class="normal"> GdkEventButton </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span>
145
+ <span class="normal"> gpointer data</span><span class="symbol">);</span>
146
+
147
+ <span class="keyword">static</span><span class="normal"> gboolean </span><span class="function">on_delete_event</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkWidget </span><span class="symbol">*</span><span class="normal">window</span><span class="symbol">,</span>
148
+ <span class="normal"> GdkEvent </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span>
149
+ <span class="normal"> gpointer unused_data</span><span class="symbol">);</span>
150
+
151
+
152
+ <span class="type">int</span>
153
+ <span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
154
+ <span class="cbracket">{</span>
155
+ <span class="normal"> GtkWidget </span><span class="symbol">*</span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">scrolled_win</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">canvas</span><span class="symbol">;</span>
156
+ <span class="normal"> <a href="GooCanvasItemModel.html">GooCanvasItemModel</a> </span><span class="symbol">*</span><span class="normal">root</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">rect_model</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">text_model</span><span class="symbol">;</span>
157
+ <span class="normal"> <a href="GooCanvasItem.html">GooCanvasItem</a> </span><span class="symbol">*</span><span class="normal">rect_item</span><span class="symbol">;</span>
158
+
159
+ <span class="normal"> </span><span class="comment">/* Initialize GTK+. */</span>
160
+ <span class="normal"> gtk_set_locale </span><span class="symbol">();</span>
161
+ <span class="normal"> </span><span class="function">gtk_init</span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">argv</span><span class="symbol">);</span>
162
+
163
+ <span class="normal"> </span><span class="comment">/* Create the window and widgets. */</span>
164
+ <span class="normal"> window </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gtk_window_new</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GTK_WINDOW_TOPLEVEL</span><span class="symbol">);</span>
165
+ <span class="normal"> </span><span class="function">gtk_window_set_default_size</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WINDOW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">),</span><span class="normal"> </span><span class="number">640</span><span class="symbol">,</span><span class="normal"> </span><span class="number">600</span><span class="symbol">);</span>
166
+ <span class="normal"> </span><span class="function">gtk_widget_show</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">);</span>
167
+ <span class="normal"> </span><span class="function">g_signal_connect</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"delete_event"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkSignalFunc</span><span class="symbol">)</span><span class="normal"> on_delete_event</span><span class="symbol">,</span>
168
+ <span class="normal"> NULL</span><span class="symbol">);</span>
169
+
170
+ <span class="normal"> scrolled_win </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gtk_scrolled_window_new</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">NULL</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
171
+ <span class="normal"> </span><span class="function">gtk_scrolled_window_set_shadow_type</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_SCROLLED_WINDOW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">scrolled_win</span><span class="symbol">),</span>
172
+ <span class="normal"> GTK_SHADOW_IN</span><span class="symbol">);</span>
173
+ <span class="normal"> </span><span class="function">gtk_widget_show</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">scrolled_win</span><span class="symbol">);</span>
174
+ <span class="normal"> </span><span class="function">gtk_container_add</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">),</span><span class="normal"> scrolled_win</span><span class="symbol">);</span>
175
+
176
+ <span class="normal"> canvas </span><span class="symbol">=</span><span class="normal"> goo_canvas_new </span><span class="symbol">();</span>
177
+ <span class="normal"> </span><span class="function">gtk_widget_set_size_request</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="number">600</span><span class="symbol">,</span><span class="normal"> </span><span class="number">450</span><span class="symbol">);</span>
178
+ <span class="normal"> </span><span class="function"><a href="GooCanvas.html#goo-canvas-set-bounds">goo_canvas_set_bounds</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GOO_CANVAS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">),</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1000</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1000</span><span class="symbol">);</span>
179
+ <span class="normal"> </span><span class="function">gtk_widget_show</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">);</span>
180
+ <span class="normal"> </span><span class="function">gtk_container_add</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">scrolled_win</span><span class="symbol">),</span><span class="normal"> canvas</span><span class="symbol">);</span>
181
+
182
+ <span class="normal"> root </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GooCanvasGroupModel.html#goo-canvas-group-model-new">goo_canvas_group_model_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">NULL</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
183
+
184
+ <span class="normal"> </span><span class="comment">/* Add a few simple items. */</span>
185
+ <span class="normal"> rect_model </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GooCanvasRectModel.html#goo-canvas-rect-model-new">goo_canvas_rect_model_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">root</span><span class="symbol">,</span><span class="normal"> </span><span class="number">100</span><span class="symbol">,</span><span class="normal"> </span><span class="number">100</span><span class="symbol">,</span><span class="normal"> </span><span class="number">400</span><span class="symbol">,</span><span class="normal"> </span><span class="number">400</span><span class="symbol">,</span>
186
+ <span class="normal"> </span><span class="string">"line-width"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">10.0</span><span class="symbol">,</span>
187
+ <span class="normal"> </span><span class="string">"radius-x"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">20.0</span><span class="symbol">,</span>
188
+ <span class="normal"> </span><span class="string">"radius-y"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">10.0</span><span class="symbol">,</span>
189
+ <span class="normal"> </span><span class="string">"stroke-color"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"yellow"</span><span class="symbol">,</span>
190
+ <span class="normal"> </span><span class="string">"fill-color"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"red"</span><span class="symbol">,</span>
191
+ <span class="normal"> NULL</span><span class="symbol">);</span>
192
+
193
+ <span class="normal"> text_model </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GooCanvasTextModel.html#goo-canvas-text-model-new">goo_canvas_text_model_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">root</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Hello World"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span>
194
+ <span class="normal"> GTK_ANCHOR_CENTER</span><span class="symbol">,</span>
195
+ <span class="normal"> </span><span class="string">"font"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Sans 24"</span><span class="symbol">,</span>
196
+ <span class="normal"> NULL</span><span class="symbol">);</span>
197
+ <span class="normal"> </span><span class="function"><a href="GooCanvasItemModel.html#goo-canvas-item-model-rotate">goo_canvas_item_model_rotate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">text_model</span><span class="symbol">,</span><span class="normal"> </span><span class="number">45</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">);</span>
198
+
199
+ <span class="normal"> </span><span class="function"><a href="GooCanvas.html#goo-canvas-set-root-item-model">goo_canvas_set_root_item_model</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GOO_CANVAS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">),</span><span class="normal"> root</span><span class="symbol">);</span>
200
+
201
+ <span class="normal"> </span><span class="comment">/* Connect a signal handler for the rectangle item. */</span>
202
+ <span class="normal"> rect_item </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GooCanvas.html#goo-canvas-get-item">goo_canvas_get_item</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GOO_CANVAS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">),</span><span class="normal"> rect_model</span><span class="symbol">);</span>
203
+ <span class="normal"> </span><span class="function">g_signal_connect</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">rect_item</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"button_press_event"</span><span class="symbol">,</span>
204
+ <span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkSignalFunc</span><span class="symbol">)</span><span class="normal"> on_rect_button_press</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
205
+
206
+ <span class="normal"> </span><span class="comment">/* Pass control to the GTK+ main event loop. */</span>
207
+ <span class="normal"> gtk_main </span><span class="symbol">();</span>
208
+
209
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
210
+ <span class="cbracket">}</span>
211
+
212
+
213
+ <span class="comment">/* This handles button presses in item views. We simply output a message to</span>
214
+ <span class="comment"> the console. */</span>
215
+ <span class="keyword">static</span><span class="normal"> gboolean</span>
216
+ <span class="function">on_rect_button_press</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GooCanvasItem.html">GooCanvasItem</a> </span><span class="symbol">*</span><span class="normal">item</span><span class="symbol">,</span>
217
+ <span class="normal"> <a href="GooCanvasItem.html">GooCanvasItem</a> </span><span class="symbol">*</span><span class="normal">target</span><span class="symbol">,</span>
218
+ <span class="normal"> GdkEventButton </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span>
219
+ <span class="normal"> gpointer data</span><span class="symbol">)</span>
220
+ <span class="cbracket">{</span>
221
+ <span class="normal"> </span><span class="function">g_print</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"rect item received button press event</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">);</span>
222
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> TRUE</span><span class="symbol">;</span>
223
+ <span class="cbracket">}</span>
224
+
225
+
226
+ <span class="comment">/* This is our handler for the "delete-event" signal of the window, which</span>
227
+ <span class="comment"> is emitted when the 'x' close button is clicked. We just exit here. */</span>
228
+ <span class="keyword">static</span><span class="normal"> gboolean</span>
229
+ <span class="function">on_delete_event</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkWidget </span><span class="symbol">*</span><span class="normal">window</span><span class="symbol">,</span>
230
+ <span class="normal"> GdkEvent </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span>
231
+ <span class="normal"> gpointer unused_data</span><span class="symbol">)</span>
232
+ <span class="cbracket">{</span>
233
+ <span class="normal"> </span><span class="function">exit</span><span class="normal"> </span><span class="symbol">(</span><span class="number">0</span><span class="symbol">);</span>
234
+ <span class="cbracket">}</span></pre></td>
235
+ </tr>
236
+ </tbody>
237
+ </table>
238
+ </div>
239
+
240
+ </div>
241
+ </div>
242
+ <div class="footer">
243
+ <hr>
244
+ Generated by GTK-Doc V1.14</div>
245
+ </body>
246
+ </html>
@@ -0,0 +1,106 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>Overview</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="GooCanvas Reference Manual">
8
+ <link rel="up" href="ch01.html" title="Introduction">
9
+ <link rel="prev" href="ch01.html" title="Introduction">
10
+ <link rel="next" href="goocanvas-simple-canvas.html" title="Simple Canvas Example">
11
+ <meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ </head>
14
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16
+ <td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17
+ <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19
+ <th width="100%" align="center">GooCanvas Reference Manual</th>
20
+ <td><a accesskey="n" href="goocanvas-simple-canvas.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21
+ </tr></table>
22
+ <div class="refentry" title="Overview">
23
+ <a name="goocanvas-overview"></a><div class="titlepage"></div>
24
+ <div class="refnamediv"><table width="100%"><tr>
25
+ <td valign="top">
26
+ <h2><span class="refentrytitle">Overview</span></h2>
27
+ <p>Overview — a quick tour of GooCanvas.</p>
28
+ </td>
29
+ <td valign="top" align="right"></td>
30
+ </tr></table></div>
31
+ <div class="refsect1" title="Features">
32
+ <a name="features"></a><h2>Features</h2>
33
+ <div class="itemizedlist"><ul class="itemizedlist" type="disc">
34
+ <li class="listitem"><p>
35
+ Optional model/view split.
36
+ </p></li>
37
+ <li class="listitem"><p>
38
+ Uses interfaces for items and views.
39
+ </p></li>
40
+ <li class="listitem"><p>
41
+ Basic items - rect/ellipse/polyline/text/image/grid/group.
42
+ </p></li>
43
+ <li class="listitem"><p>
44
+ Path item, using SVG path specification strings.
45
+ </p></li>
46
+ <li class="listitem"><p>
47
+ Table item for layout of other items (similar to the GtkTable widget).
48
+ (This also supports items whose requested height changes according to
49
+ their allocated width, such as text items.)
50
+ </p></li>
51
+ <li class="listitem"><p>
52
+ Embedded GTK+ widgets.
53
+ </p></li>
54
+ <li class="listitem"><p>
55
+ Layers/stacking order with raise/lower functions.
56
+ </p></li>
57
+ <li class="listitem"><p>
58
+ Cascading styles - line width/style/dashes, colors, fill patterns.
59
+ </p></li>
60
+ <li class="listitem"><p>
61
+ Affine transformations for all items - rotations/scales/skews.
62
+ </p></li>
63
+ <li class="listitem"><p>
64
+ Event handling - button/motion events, "pointer-events" property like SVG.
65
+ </p></li>
66
+ <li class="listitem"><p>
67
+ Grabs - support for pointer and keyboard grabs.
68
+ </p></li>
69
+ <li class="listitem"><p>
70
+ Keyboard focus traversal.
71
+ </p></li>
72
+ <li class="listitem"><p>
73
+ Accessibility (item title and description properties and hierarchy stuff).
74
+ </p></li>
75
+ <li class="listitem"><p>
76
+ Printing (output to a given cairo_t).
77
+ </p></li>
78
+ <li class="listitem"><p>
79
+ Scrolling.
80
+ </p></li>
81
+ <li class="listitem"><p>
82
+ Zooming.
83
+ </p></li>
84
+ <li class="listitem"><p>
85
+ Static items that don't move as the canvas is scrolled or zoomed.
86
+ </p></li>
87
+ <li class="listitem"><p>
88
+ Item visibility setting - on/off/above zoom threshold.
89
+ </p></li>
90
+ <li class="listitem"><p>
91
+ Simple animation.
92
+ </p></li>
93
+ <li class="listitem"><p>
94
+ Scalable - support for thousands of items over a large canvas area.
95
+ </p></li>
96
+ <li class="listitem"><p>
97
+ Support for different units - pixels/points/inches/millimeters.
98
+ </p></li>
99
+ </ul></div>
100
+ </div>
101
+ </div>
102
+ <div class="footer">
103
+ <hr>
104
+ Generated by GTK-Doc V1.14</div>
105
+ </body>
106
+ </html>