context 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile.rb +107 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-atk_rb.html +612 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-gdk_pixbuf2_rb.html +637 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-glib2_rb.html +829 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-gtk2-base_rb.html +709 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-gtk2_rb.html +623 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-pango_rb.html +665 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-color_rb.html +865 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-colors_rb.html +1266 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-constants_rb.html +632 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-blur_rb.html +655 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-circle_rb.html +619 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-color_rb.html +621 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-path_rb.html +726 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-rectangle_rb.html +643 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-triangle_rb.html +622 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context_rb.html +639 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-paper_rb.html +793 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-papers_rb.html +651 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-path_rb.html +625 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-point_rb.html +617 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo_rb.html +756 -0
- data/coverage/index.html +1170 -0
- data/coverage/lib-Context-Bridge_rb.html +673 -0
- data/coverage/lib-Context-Context_rb.html +756 -0
- data/coverage/lib-Context-EnumeratedType_rb.html +661 -0
- data/coverage/lib-Context-ExecutionProxy_rb.html +671 -0
- data/coverage/lib-Context-Gtk-App_rb.html +638 -0
- data/coverage/lib-Context-Gtk-Key_rb.html +664 -0
- data/coverage/lib-Context-Gtk-Widget_rb.html +667 -0
- data/coverage/lib-Context-KeyAssignment_rb.html +641 -0
- data/coverage/lib-Context-KeyMap_rb.html +653 -0
- data/coverage/lib-Context-Key_rb.html +667 -0
- data/coverage/lib-Context-View_rb.html +659 -0
- data/coverage/lib-Context-Views-Gtk-PageView_rb.html +660 -0
- data/coverage/lib-Context-Views-PageView_rb.html +627 -0
- data/coverage/lib-Context-Widget_rb.html +650 -0
- data/coverage/lib-Context-require_all_rb.html +623 -0
- data/doc/classes/Context.html +174 -0
- data/doc/classes/Context/Bridge.html +296 -0
- data/doc/classes/Context/Context.html +564 -0
- data/doc/classes/Context/EnumeratedType.html +283 -0
- data/doc/classes/Context/ExecutionProxy.html +228 -0
- data/doc/classes/Context/Gtk.html +126 -0
- data/doc/classes/Context/Gtk/App.html +217 -0
- data/doc/classes/Context/Gtk/Key.html +292 -0
- data/doc/classes/Context/Gtk/PageView.html +245 -0
- data/doc/classes/Context/Gtk/PageView/MainWindow.html +200 -0
- data/doc/classes/Context/Gtk/Widget.html +311 -0
- data/doc/classes/Context/Key.html +305 -0
- data/doc/classes/Context/Key/Modifier.html +117 -0
- data/doc/classes/Context/KeyAssignment.html +234 -0
- data/doc/classes/Context/KeyMap.html +273 -0
- data/doc/classes/Context/PageView.html +180 -0
- data/doc/classes/Context/View.html +334 -0
- data/doc/classes/Context/Widget.html +298 -0
- data/doc/classes/Kernel.html +148 -0
- data/doc/classes/Object.html +196 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/Context/Bridge_rb.html +108 -0
- data/doc/files/lib/Context/Context_rb.html +109 -0
- data/doc/files/lib/Context/EnumeratedType_rb.html +101 -0
- data/doc/files/lib/Context/ExecutionProxy_rb.html +101 -0
- data/doc/files/lib/Context/Gtk/App_rb.html +110 -0
- data/doc/files/lib/Context/Gtk/Key_rb.html +109 -0
- data/doc/files/lib/Context/Gtk/Widget_rb.html +109 -0
- data/doc/files/lib/Context/KeyAssignment_rb.html +108 -0
- data/doc/files/lib/Context/KeyMap_rb.html +109 -0
- data/doc/files/lib/Context/Key_rb.html +108 -0
- data/doc/files/lib/Context/Version_rb.html +101 -0
- data/doc/files/lib/Context/View_rb.html +101 -0
- data/doc/files/lib/Context/Views/Gtk/PageView_rb.html +111 -0
- data/doc/files/lib/Context/Views/PageView_rb.html +108 -0
- data/doc/files/lib/Context/Widget_rb.html +101 -0
- data/doc/files/lib/Context/require_all_rb.html +101 -0
- data/doc/fr_class_index.html +46 -0
- data/doc/fr_file_index.html +42 -0
- data/doc/fr_method_index.html +103 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/Context/Bridge.rb +63 -0
- data/lib/Context/Context.rb +146 -0
- data/lib/Context/EnumeratedType.rb +51 -0
- data/lib/Context/ExecutionProxy.rb +61 -0
- data/lib/Context/Gtk/App.rb +28 -0
- data/lib/Context/Gtk/Key.rb +54 -0
- data/lib/Context/Gtk/Widget.rb +57 -0
- data/lib/Context/Key.rb +57 -0
- data/lib/Context/KeyAssignment.rb +31 -0
- data/lib/Context/KeyMap.rb +43 -0
- data/lib/Context/Version.rb +5 -0
- data/lib/Context/View.rb +49 -0
- data/lib/Context/Views/Gtk/PageView.rb +50 -0
- data/lib/Context/Views/PageView.rb +17 -0
- data/lib/Context/Widget.rb +40 -0
- data/lib/Context/require_all.rb +13 -0
- data/spec/Context/Bridge_spec.rb +40 -0
- data/spec/Context/Context_spec.rb +102 -0
- data/spec/Context/EnumeratedType_spec.rb +51 -0
- data/spec/Context/ExecutionProxy_spec.rb +28 -0
- data/spec/Context/Gtk/App_spec.rb +24 -0
- data/spec/Context/Gtk/Key_spec.rb +45 -0
- data/spec/Context/Gtk/Widget_spec.rb +44 -0
- data/spec/Context/KeyAssignment_spec.rb +26 -0
- data/spec/Context/KeyMap_spec.rb +64 -0
- data/spec/Context/Key_spec.rb +22 -0
- data/spec/Context/View_spec.rb +62 -0
- data/spec/Context/Views/Gtk/PageView_spec.rb +44 -0
- data/spec/Context/Views/PageView_spec.rb +20 -0
- data/spec/Context/Widget_spec.rb +15 -0
- data/spec/Context/require_all_spec.rb +13 -0
- data/test_results.html +343 -0
- metadata +179 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: Context::View</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Context::View</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/Context/View_rb.html">
|
|
59
|
+
lib/Context/View.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
<a href="../Object.html">
|
|
69
|
+
Object
|
|
70
|
+
</a>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- banner header -->
|
|
76
|
+
|
|
77
|
+
<div id="bodyContent">
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<div id="contextContent">
|
|
82
|
+
|
|
83
|
+
<div id="description">
|
|
84
|
+
<p>
|
|
85
|
+
This is the abstract view class
|
|
86
|
+
</p>
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div id="method-list">
|
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
|
95
|
+
|
|
96
|
+
<div class="name-list">
|
|
97
|
+
<a href="#M000066">addView</a>
|
|
98
|
+
<a href="#M000069">close</a>
|
|
99
|
+
<a href="#M000070">getWidget</a>
|
|
100
|
+
<a href="#M000065">new</a>
|
|
101
|
+
<a href="#M000071">notifyKey</a>
|
|
102
|
+
<a href="#M000068">open</a>
|
|
103
|
+
<a href="#M000067">removeView</a>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<!-- if includes -->
|
|
111
|
+
|
|
112
|
+
<div id="section">
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<div id="attribute-list">
|
|
119
|
+
<h3 class="section-bar">Attributes</h3>
|
|
120
|
+
|
|
121
|
+
<div class="name-list">
|
|
122
|
+
<table>
|
|
123
|
+
<tr class="top-aligned-row context-row">
|
|
124
|
+
<td class="context-item-name">context</td>
|
|
125
|
+
<td class="context-item-value"> [R] </td>
|
|
126
|
+
<td class="context-item-desc"></td>
|
|
127
|
+
</tr>
|
|
128
|
+
</table>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<!-- if method_list -->
|
|
135
|
+
<div id="methods">
|
|
136
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
137
|
+
|
|
138
|
+
<div id="method-M000065" class="method-detail">
|
|
139
|
+
<a name="M000065"></a>
|
|
140
|
+
|
|
141
|
+
<div class="method-heading">
|
|
142
|
+
<a href="#M000065" class="method-signature">
|
|
143
|
+
<span class="method-name">new</span><span class="method-args">(context)</span>
|
|
144
|
+
</a>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="method-description">
|
|
148
|
+
<p><a class="source-toggle" href="#"
|
|
149
|
+
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
|
150
|
+
<div class="method-source-code" id="M000065-source">
|
|
151
|
+
<pre>
|
|
152
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 6</span>
|
|
153
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">context</span>)
|
|
154
|
+
<span class="ruby-ivar">@context</span> = <span class="ruby-identifier">context</span>
|
|
155
|
+
<span class="ruby-keyword kw">end</span>
|
|
156
|
+
</pre>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
162
|
+
|
|
163
|
+
<div id="method-M000066" class="method-detail">
|
|
164
|
+
<a name="M000066"></a>
|
|
165
|
+
|
|
166
|
+
<div class="method-heading">
|
|
167
|
+
<a href="#M000066" class="method-signature">
|
|
168
|
+
<span class="method-name">addView</span><span class="method-args">(view)</span>
|
|
169
|
+
</a>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div class="method-description">
|
|
173
|
+
<p><a class="source-toggle" href="#"
|
|
174
|
+
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
|
175
|
+
<div class="method-source-code" id="M000066-source">
|
|
176
|
+
<pre>
|
|
177
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 10</span>
|
|
178
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addView</span>(<span class="ruby-identifier">view</span>)
|
|
179
|
+
<span class="ruby-identifier">myWidget</span> = <span class="ruby-identifier">getWidget</span>()
|
|
180
|
+
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">myWidget</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
|
|
181
|
+
<span class="ruby-identifier">newWidget</span> = <span class="ruby-identifier">view</span>.<span class="ruby-identifier">getWidget</span>()
|
|
182
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">newWidget</span>.<span class="ruby-identifier">nil?</span>
|
|
183
|
+
<span class="ruby-identifier">myWidget</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">newWidget</span>)
|
|
184
|
+
<span class="ruby-identifier">newWidget</span>.<span class="ruby-identifier">addedTo</span>(<span class="ruby-identifier">myWidget</span>)
|
|
185
|
+
<span class="ruby-keyword kw">end</span>
|
|
186
|
+
<span class="ruby-keyword kw">end</span>
|
|
187
|
+
<span class="ruby-keyword kw">end</span>
|
|
188
|
+
</pre>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div id="method-M000069" class="method-detail">
|
|
194
|
+
<a name="M000069"></a>
|
|
195
|
+
|
|
196
|
+
<div class="method-heading">
|
|
197
|
+
<a href="#M000069" class="method-signature">
|
|
198
|
+
<span class="method-name">close</span><span class="method-args">()</span>
|
|
199
|
+
</a>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div class="method-description">
|
|
203
|
+
<p>
|
|
204
|
+
Concrete classes should override this method
|
|
205
|
+
</p>
|
|
206
|
+
<p><a class="source-toggle" href="#"
|
|
207
|
+
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
|
208
|
+
<div class="method-source-code" id="M000069-source">
|
|
209
|
+
<pre>
|
|
210
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 37</span>
|
|
211
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
|
212
|
+
<span class="ruby-keyword kw">end</span>
|
|
213
|
+
</pre>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
<div id="method-M000070" class="method-detail">
|
|
219
|
+
<a name="M000070"></a>
|
|
220
|
+
|
|
221
|
+
<div class="method-heading">
|
|
222
|
+
<a href="#M000070" class="method-signature">
|
|
223
|
+
<span class="method-name">getWidget</span><span class="method-args">()</span>
|
|
224
|
+
</a>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div class="method-description">
|
|
228
|
+
<p>
|
|
229
|
+
Concrete classes should override this method
|
|
230
|
+
</p>
|
|
231
|
+
<p><a class="source-toggle" href="#"
|
|
232
|
+
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
|
233
|
+
<div class="method-source-code" id="M000070-source">
|
|
234
|
+
<pre>
|
|
235
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 41</span>
|
|
236
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getWidget</span>
|
|
237
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
|
238
|
+
<span class="ruby-keyword kw">end</span>
|
|
239
|
+
</pre>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
|
|
244
|
+
<div id="method-M000071" class="method-detail">
|
|
245
|
+
<a name="M000071"></a>
|
|
246
|
+
|
|
247
|
+
<div class="method-heading">
|
|
248
|
+
<a href="#M000071" class="method-signature">
|
|
249
|
+
<span class="method-name">notifyKey</span><span class="method-args">(widget, key)</span>
|
|
250
|
+
</a>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<div class="method-description">
|
|
254
|
+
<p><a class="source-toggle" href="#"
|
|
255
|
+
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
|
256
|
+
<div class="method-source-code" id="M000071-source">
|
|
257
|
+
<pre>
|
|
258
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 45</span>
|
|
259
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notifyKey</span>(<span class="ruby-identifier">widget</span>, <span class="ruby-identifier">key</span>)
|
|
260
|
+
<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">notifyKey</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">key</span>)
|
|
261
|
+
<span class="ruby-keyword kw">end</span>
|
|
262
|
+
</pre>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div id="method-M000068" class="method-detail">
|
|
268
|
+
<a name="M000068"></a>
|
|
269
|
+
|
|
270
|
+
<div class="method-heading">
|
|
271
|
+
<a href="#M000068" class="method-signature">
|
|
272
|
+
<span class="method-name">open</span><span class="method-args">()</span>
|
|
273
|
+
</a>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<div class="method-description">
|
|
277
|
+
<p>
|
|
278
|
+
Concrete classes should override this method
|
|
279
|
+
</p>
|
|
280
|
+
<p><a class="source-toggle" href="#"
|
|
281
|
+
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
|
282
|
+
<div class="method-source-code" id="M000068-source">
|
|
283
|
+
<pre>
|
|
284
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 33</span>
|
|
285
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>
|
|
286
|
+
<span class="ruby-keyword kw">end</span>
|
|
287
|
+
</pre>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<div id="method-M000067" class="method-detail">
|
|
293
|
+
<a name="M000067"></a>
|
|
294
|
+
|
|
295
|
+
<div class="method-heading">
|
|
296
|
+
<a href="#M000067" class="method-signature">
|
|
297
|
+
<span class="method-name">removeView</span><span class="method-args">(view)</span>
|
|
298
|
+
</a>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
<div class="method-description">
|
|
302
|
+
<p><a class="source-toggle" href="#"
|
|
303
|
+
onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
|
|
304
|
+
<div class="method-source-code" id="M000067-source">
|
|
305
|
+
<pre>
|
|
306
|
+
<span class="ruby-comment cmt"># File lib/Context/View.rb, line 21</span>
|
|
307
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeView</span>(<span class="ruby-identifier">view</span>)
|
|
308
|
+
<span class="ruby-identifier">myWidget</span> = <span class="ruby-identifier">getWidget</span>()
|
|
309
|
+
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">myWidget</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>)
|
|
310
|
+
<span class="ruby-identifier">oldWidget</span> = <span class="ruby-identifier">view</span>.<span class="ruby-identifier">getWidget</span>()
|
|
311
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">oldWidget</span>.<span class="ruby-identifier">nil?</span>
|
|
312
|
+
<span class="ruby-identifier">myWidget</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">oldWidget</span>)
|
|
313
|
+
<span class="ruby-identifier">oldWidget</span>.<span class="ruby-identifier">removedFrom</span>(<span class="ruby-identifier">myWidget</span>)
|
|
314
|
+
<span class="ruby-keyword kw">end</span>
|
|
315
|
+
<span class="ruby-keyword kw">end</span>
|
|
316
|
+
<span class="ruby-keyword kw">end</span>
|
|
317
|
+
</pre>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
<div id="validator-badges">
|
|
330
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
</body>
|
|
334
|
+
</html>
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: Context::Widget</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Context::Widget</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/Context/Widget_rb.html">
|
|
59
|
+
lib/Context/Widget.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
<a href="../Object.html">
|
|
69
|
+
Object
|
|
70
|
+
</a>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- banner header -->
|
|
76
|
+
|
|
77
|
+
<div id="bodyContent">
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<div id="contextContent">
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div id="method-list">
|
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
|
89
|
+
|
|
90
|
+
<div class="name-list">
|
|
91
|
+
<a href="#M000057">add</a>
|
|
92
|
+
<a href="#M000055">addedTo</a>
|
|
93
|
+
<a href="#M000059">eql?</a>
|
|
94
|
+
<a href="#M000054">new</a>
|
|
95
|
+
<a href="#M000058">remove</a>
|
|
96
|
+
<a href="#M000056">removedFrom</a>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<!-- if includes -->
|
|
104
|
+
|
|
105
|
+
<div id="section">
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<div id="attribute-list">
|
|
112
|
+
<h3 class="section-bar">Attributes</h3>
|
|
113
|
+
|
|
114
|
+
<div class="name-list">
|
|
115
|
+
<table>
|
|
116
|
+
<tr class="top-aligned-row context-row">
|
|
117
|
+
<td class="context-item-name">delegate</td>
|
|
118
|
+
<td class="context-item-value"> [R] </td>
|
|
119
|
+
<td class="context-item-desc"></td>
|
|
120
|
+
</tr>
|
|
121
|
+
</table>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<!-- if method_list -->
|
|
128
|
+
<div id="methods">
|
|
129
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
130
|
+
|
|
131
|
+
<div id="method-M000054" class="method-detail">
|
|
132
|
+
<a name="M000054"></a>
|
|
133
|
+
|
|
134
|
+
<div class="method-heading">
|
|
135
|
+
<a href="#M000054" class="method-signature">
|
|
136
|
+
<span class="method-name">new</span><span class="method-args">(delegate)</span>
|
|
137
|
+
</a>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<div class="method-description">
|
|
141
|
+
<p><a class="source-toggle" href="#"
|
|
142
|
+
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
|
143
|
+
<div class="method-source-code" id="M000054-source">
|
|
144
|
+
<pre>
|
|
145
|
+
<span class="ruby-comment cmt"># File lib/Context/Widget.rb, line 7</span>
|
|
146
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">delegate</span>)
|
|
147
|
+
<span class="ruby-ivar">@delegate</span> = <span class="ruby-identifier">delegate</span>
|
|
148
|
+
<span class="ruby-keyword kw">end</span>
|
|
149
|
+
</pre>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
155
|
+
|
|
156
|
+
<div id="method-M000057" class="method-detail">
|
|
157
|
+
<a name="M000057"></a>
|
|
158
|
+
|
|
159
|
+
<div class="method-heading">
|
|
160
|
+
<a href="#M000057" class="method-signature">
|
|
161
|
+
<span class="method-name">add</span><span class="method-args">(widget)</span>
|
|
162
|
+
</a>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div class="method-description">
|
|
166
|
+
<p>
|
|
167
|
+
Use this widget as a container for the passed widget
|
|
168
|
+
</p>
|
|
169
|
+
<p><a class="source-toggle" href="#"
|
|
170
|
+
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
|
171
|
+
<div class="method-source-code" id="M000057-source">
|
|
172
|
+
<pre>
|
|
173
|
+
<span class="ruby-comment cmt"># File lib/Context/Widget.rb, line 26</span>
|
|
174
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">widget</span>)
|
|
175
|
+
<span class="ruby-comment cmt"># This is an abstract method, the child classes should</span>
|
|
176
|
+
<span class="ruby-comment cmt"># implement this</span>
|
|
177
|
+
<span class="ruby-keyword kw">end</span>
|
|
178
|
+
</pre>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<div id="method-M000055" class="method-detail">
|
|
184
|
+
<a name="M000055"></a>
|
|
185
|
+
|
|
186
|
+
<div class="method-heading">
|
|
187
|
+
<a href="#M000055" class="method-signature">
|
|
188
|
+
<span class="method-name">addedTo</span><span class="method-args">(widget)</span>
|
|
189
|
+
</a>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<div class="method-description">
|
|
193
|
+
<p>
|
|
194
|
+
This method is called after the widget has been successfully added to
|
|
195
|
+
another widget
|
|
196
|
+
</p>
|
|
197
|
+
<p><a class="source-toggle" href="#"
|
|
198
|
+
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
|
199
|
+
<div class="method-source-code" id="M000055-source">
|
|
200
|
+
<pre>
|
|
201
|
+
<span class="ruby-comment cmt"># File lib/Context/Widget.rb, line 13</span>
|
|
202
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addedTo</span>(<span class="ruby-identifier">widget</span>)
|
|
203
|
+
<span class="ruby-comment cmt"># This is an abstract method, the child classes should</span>
|
|
204
|
+
<span class="ruby-comment cmt"># implement this </span>
|
|
205
|
+
<span class="ruby-keyword kw">end</span>
|
|
206
|
+
</pre>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<div id="method-M000059" class="method-detail">
|
|
212
|
+
<a name="M000059"></a>
|
|
213
|
+
|
|
214
|
+
<div class="method-heading">
|
|
215
|
+
<a href="#M000059" class="method-signature">
|
|
216
|
+
<span class="method-name">eql?</span><span class="method-args">(widget)</span>
|
|
217
|
+
</a>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
<div class="method-description">
|
|
221
|
+
<p><a class="source-toggle" href="#"
|
|
222
|
+
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
|
223
|
+
<div class="method-source-code" id="M000059-source">
|
|
224
|
+
<pre>
|
|
225
|
+
<span class="ruby-comment cmt"># File lib/Context/Widget.rb, line 36</span>
|
|
226
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">widget</span>)
|
|
227
|
+
<span class="ruby-ivar">@delegate</span>.<span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">widget</span>.<span class="ruby-identifier">delegate</span>)
|
|
228
|
+
<span class="ruby-keyword kw">end</span>
|
|
229
|
+
</pre>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div id="method-M000058" class="method-detail">
|
|
235
|
+
<a name="M000058"></a>
|
|
236
|
+
|
|
237
|
+
<div class="method-heading">
|
|
238
|
+
<a href="#M000058" class="method-signature">
|
|
239
|
+
<span class="method-name">remove</span><span class="method-args">(widget)</span>
|
|
240
|
+
</a>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<div class="method-description">
|
|
244
|
+
<p><a class="source-toggle" href="#"
|
|
245
|
+
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
|
246
|
+
<div class="method-source-code" id="M000058-source">
|
|
247
|
+
<pre>
|
|
248
|
+
<span class="ruby-comment cmt"># File lib/Context/Widget.rb, line 31</span>
|
|
249
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">widget</span>)
|
|
250
|
+
<span class="ruby-comment cmt"># This is an abstract method, the child classes should</span>
|
|
251
|
+
<span class="ruby-comment cmt"># implement this</span>
|
|
252
|
+
<span class="ruby-keyword kw">end</span>
|
|
253
|
+
</pre>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div id="method-M000056" class="method-detail">
|
|
259
|
+
<a name="M000056"></a>
|
|
260
|
+
|
|
261
|
+
<div class="method-heading">
|
|
262
|
+
<a href="#M000056" class="method-signature">
|
|
263
|
+
<span class="method-name">removedFrom</span><span class="method-args">(widget)</span>
|
|
264
|
+
</a>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div class="method-description">
|
|
268
|
+
<p>
|
|
269
|
+
This method is called after the widget has been successfully removed from
|
|
270
|
+
another widget
|
|
271
|
+
</p>
|
|
272
|
+
<p><a class="source-toggle" href="#"
|
|
273
|
+
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
|
274
|
+
<div class="method-source-code" id="M000056-source">
|
|
275
|
+
<pre>
|
|
276
|
+
<span class="ruby-comment cmt"># File lib/Context/Widget.rb, line 20</span>
|
|
277
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removedFrom</span>(<span class="ruby-identifier">widget</span>)
|
|
278
|
+
<span class="ruby-comment cmt"># This is an abstract method, the child classes should</span>
|
|
279
|
+
<span class="ruby-comment cmt"># implement this </span>
|
|
280
|
+
<span class="ruby-keyword kw">end</span>
|
|
281
|
+
</pre>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<div id="validator-badges">
|
|
294
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
</body>
|
|
298
|
+
</html>
|