wee 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +286 -0
- data/Features +185 -0
- data/doc/rdoc/classes/ActionView.html +107 -0
- data/doc/rdoc/classes/ActionView/Base.html +133 -0
- data/doc/rdoc/classes/Array.html +7 -59
- data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
- data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
- data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
- data/doc/rdoc/classes/Enumerable.html +6 -6
- data/doc/rdoc/classes/Hash.html +120 -0
- data/doc/rdoc/classes/Main.html +58 -34
- data/doc/rdoc/classes/Object.html +12 -12
- data/doc/rdoc/classes/OgScaffolder.html +165 -166
- data/doc/rdoc/classes/OgScaffolder/Editor.html +112 -112
- data/doc/rdoc/classes/String.html +7 -59
- data/doc/rdoc/classes/Struct.html +14 -14
- data/doc/rdoc/classes/Wee.html +70 -6
- data/doc/rdoc/classes/Wee/AbstractSession.html +502 -0
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +11 -11
- data/doc/rdoc/classes/Wee/Application.html +139 -84
- data/doc/rdoc/classes/Wee/Brush.html +21 -18
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +90 -17
- data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +162 -0
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +41 -17
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +112 -86
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +160 -0
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +15 -15
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +21 -21
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +234 -0
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag/RadioGroup.html +207 -0
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +124 -28
- data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -15
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +38 -38
- data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
- data/doc/rdoc/classes/Wee/CanvasMixin.html +225 -0
- data/doc/rdoc/classes/Wee/Component.html +202 -201
- data/doc/rdoc/classes/Wee/Component/OnAnswer.html +7 -7
- data/doc/rdoc/classes/Wee/ComponentDispatcher.html +289 -0
- data/doc/rdoc/classes/Wee/ComponentRunner.html +321 -0
- data/doc/rdoc/classes/Wee/Context.html +63 -3
- data/doc/rdoc/classes/Wee/Decoration.html +45 -45
- data/doc/rdoc/classes/Wee/Delegate.html +30 -30
- data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +164 -0
- data/doc/rdoc/classes/Wee/ErrorResponse.html +16 -16
- data/doc/rdoc/classes/Wee/Examples.html +114 -0
- data/doc/rdoc/classes/Wee/Examples/Calculator.html +319 -0
- data/doc/rdoc/classes/Wee/Examples/Counter.html +289 -0
- data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +210 -0
- data/doc/rdoc/classes/Wee/Examples/Window.html +346 -0
- data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +227 -0
- data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
- data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
- data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +1230 -0
- data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
- data/doc/rdoc/classes/Wee/IdGenerator.html +148 -0
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +27 -14
- data/doc/rdoc/classes/Wee/LoginDecoration.html +261 -0
- data/doc/rdoc/classes/Wee/Md5IdGenerator.html +14 -14
- data/doc/rdoc/classes/Wee/MessageBox.html +14 -14
- data/doc/rdoc/classes/Wee/Nitro.html +114 -0
- data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +192 -0
- data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +345 -0
- data/doc/rdoc/classes/Wee/Nitro/FormTag.html +155 -0
- data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +178 -0
- data/doc/rdoc/classes/Wee/Page.html +4 -0
- data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
- data/doc/rdoc/classes/Wee/PagelessApplication.html +13 -11
- data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +296 -0
- data/doc/rdoc/classes/Wee/PagelessRequest.html +52 -21
- data/doc/rdoc/classes/Wee/PagelessSession.html +130 -91
- data/doc/rdoc/classes/Wee/Pager.html +534 -0
- data/doc/rdoc/classes/Wee/Presenter.html +482 -298
- data/doc/rdoc/classes/Wee/Rails.html +114 -0
- data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +192 -0
- data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +342 -0
- data/doc/rdoc/classes/Wee/Rails/FormTag.html +155 -0
- data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +177 -0
- data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
- data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
- data/doc/rdoc/classes/Wee/Renderer.html +208 -0
- data/doc/rdoc/classes/Wee/RenderingContext.html +175 -3
- data/doc/rdoc/classes/Wee/Request.html +197 -46
- data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
- data/doc/rdoc/classes/Wee/Response.html +44 -43
- data/doc/rdoc/classes/Wee/Session.html +296 -402
- data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +14 -14
- data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
- data/doc/rdoc/classes/Wee/Utils.html +22 -22
- data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
- data/doc/rdoc/classes/Wee/ValueHolder.html +19 -19
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +72 -46
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/INSTALL.html +1 -1
- data/doc/rdoc/files/README.html +8 -12
- data/doc/rdoc/files/lib/cache/cache_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/abstractsession_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/pager_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components_rb.html +4 -1
- data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/continuation_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +110 -0
- data/doc/rdoc/files/lib/wee/core/context_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core/decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/idgen_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core/page_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core/presenter_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/renderer_rb.html +107 -0
- data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +2 -2
- data/doc/rdoc/files/lib/wee/core_ext_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core_rb.html +7 -14
- data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +107 -0
- data/doc/rdoc/files/lib/wee/examples/counter_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +114 -0
- data/doc/rdoc/files/lib/wee/examples/window_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/page_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/pageless/application_rb.html +8 -1
- data/doc/rdoc/files/lib/wee/pageless/request_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/pageless/session_rb.html +2 -1
- data/doc/rdoc/files/lib/wee/pageless_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/request_rb.html +5 -4
- data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/response_rb.html +2 -1
- data/doc/rdoc/files/lib/wee/session_rb.html +2 -3
- data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +2 -2
- data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/template_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/cache_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils_rb.html +1 -1
- data/doc/rdoc/files/lib/wee_rb.html +5 -3
- data/doc/rdoc/fr_class_index.html +34 -2
- data/doc/rdoc/fr_file_index.html +17 -1
- data/doc/rdoc/fr_method_index.html +464 -314
- data/examples/ajax/ajax.rb +1 -1
- data/examples/demo.rb +47 -0
- data/examples/{calendar.rb → demo/calendar.rb} +89 -97
- data/examples/{example.rb → demo/example.rb} +17 -97
- data/examples/dispatcher.rb +37 -0
- data/examples/draw.rb +14 -11
- data/examples/nitro/run.rb +42 -0
- data/examples/radio.rb +44 -0
- data/examples/test.rb +3 -27
- data/lib/wee.rb +15 -3
- data/lib/wee/adaptors/nitro.rb +154 -0
- data/lib/wee/adaptors/rails.rb +154 -0
- data/lib/wee/application.rb +22 -20
- data/lib/wee/components.rb +3 -0
- data/lib/wee/components/component_dispatcher.rb +46 -0
- data/lib/wee/components/login_decoration.rb +35 -0
- data/lib/wee/components/messagebox.rb +2 -2
- data/lib/wee/components/pager.rb +102 -0
- data/lib/wee/continuation/core/component.rb +13 -12
- data/lib/wee/continuation/session.rb +11 -19
- data/lib/wee/core.rb +8 -7
- data/lib/wee/core/component.rb +8 -28
- data/lib/wee/core/componentrunner.rb +73 -0
- data/lib/wee/core/context.rb +27 -0
- data/lib/wee/core/idgen.rb +5 -0
- data/lib/wee/core/page.rb +1 -0
- data/lib/wee/core/presenter.rb +10 -126
- data/lib/wee/core/renderer.rb +23 -0
- data/lib/wee/core_ext.rb +122 -0
- data/lib/wee/databases/og/scaffolder.rb +0 -1
- data/lib/wee/examples/calculator.rb +70 -0
- data/lib/wee/examples/counter.rb +33 -0
- data/lib/wee/examples/editable_counter.rb +31 -0
- data/{examples → lib/wee/examples}/window.rb +29 -23
- data/lib/wee/idgen/md5.rb +1 -1
- data/lib/wee/idgen/simple.rb +1 -1
- data/lib/wee/pageless/session.rb +2 -3
- data/lib/wee/renderer/html/brushes.rb +142 -22
- data/lib/wee/renderer/html/canvas.rb +57 -19
- data/lib/wee/response.rb +3 -2
- data/lib/wee/session.rb +10 -54
- data/lib/wee/skeleton/og/components/main.rb +5 -1
- data/lib/wee/skeleton/og/conf/db.rb +1 -1
- data/lib/wee/snapshot_ext.rb +4 -10
- data/lib/wee/template.rb +19 -5
- data/lib/wee/utils/helper.rb +2 -2
- metadata +90 -13
- data/examples/calculator.rb +0 -67
- data/lib/wee/context.rb +0 -2
@@ -86,7 +86,7 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
89
|
+
<a href="#M000246">new</a>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
|
@@ -121,21 +121,21 @@
|
|
121
121
|
<div id="methods">
|
122
122
|
<h3 class="section-bar">Public Class methods</h3>
|
123
123
|
|
124
|
-
<div id="method-
|
125
|
-
<a name="
|
124
|
+
<div id="method-M000246" class="method-detail">
|
125
|
+
<a name="M000246"></a>
|
126
126
|
|
127
127
|
<div class="method-heading">
|
128
|
-
<a href="#
|
128
|
+
<a href="#M000246" class="method-signature">
|
129
129
|
<span class="method-name">new</span><span class="method-args">()</span>
|
130
130
|
</a>
|
131
131
|
</div>
|
132
132
|
|
133
133
|
<div class="method-description">
|
134
134
|
<p><a class="source-toggle" href="#"
|
135
|
-
onclick="toggleCode('
|
136
|
-
<div class="method-source-code" id="
|
135
|
+
onclick="toggleCode('M000246-source');return false;">[Source]</a></p>
|
136
|
+
<div class="method-source-code" id="M000246-source">
|
137
137
|
<pre>
|
138
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line
|
138
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 423</span>
|
139
139
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
140
140
|
<span class="ruby-keyword kw">super</span>
|
141
141
|
<span class="ruby-identifier">type</span>(<span class="ruby-value str">'text'</span>)
|
@@ -99,7 +99,7 @@ The format of the internal datastructure is:
|
|
99
99
|
<div id="contents-list">
|
100
100
|
<h3 class="section-bar">Contents</h3>
|
101
101
|
<ul>
|
102
|
-
<li><a href="#
|
102
|
+
<li><a href="#SEC00112">Friend methods for Wee::CallbackStream</a></li>
|
103
103
|
</ul>
|
104
104
|
</div>
|
105
105
|
|
@@ -107,12 +107,12 @@ The format of the internal datastructure is:
|
|
107
107
|
<h3 class="section-bar">Methods</h3>
|
108
108
|
|
109
109
|
<div class="name-list">
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
110
|
+
<a href="#M000309">all_of_type</a>
|
111
|
+
<a href="#M000308">get_callback_for</a>
|
112
|
+
<a href="#M000307">get_ids_for</a>
|
113
|
+
<a href="#M000304">new</a>
|
114
|
+
<a href="#M000305">register_for</a>
|
115
|
+
<a href="#M000306">register_named_for</a>
|
116
116
|
</div>
|
117
117
|
</div>
|
118
118
|
|
@@ -134,19 +134,19 @@ The format of the internal datastructure is:
|
|
134
134
|
<div id="methods">
|
135
135
|
<h3 class="section-bar">Public Class methods</h3>
|
136
136
|
|
137
|
-
<div id="method-
|
138
|
-
<a name="
|
137
|
+
<div id="method-M000304" class="method-detail">
|
138
|
+
<a name="M000304"></a>
|
139
139
|
|
140
140
|
<div class="method-heading">
|
141
|
-
<a href="#
|
141
|
+
<a href="#M000304" class="method-signature">
|
142
142
|
<span class="method-name">new</span><span class="method-args">(id_generator)</span>
|
143
143
|
</a>
|
144
144
|
</div>
|
145
145
|
|
146
146
|
<div class="method-description">
|
147
147
|
<p><a class="source-toggle" href="#"
|
148
|
-
onclick="toggleCode('
|
149
|
-
<div class="method-source-code" id="
|
148
|
+
onclick="toggleCode('M000304-source');return false;">[Source]</a></p>
|
149
|
+
<div class="method-source-code" id="M000304-source">
|
150
150
|
<pre>
|
151
151
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 11</span>
|
152
152
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id_generator</span>)
|
@@ -161,11 +161,11 @@ The format of the internal datastructure is:
|
|
161
161
|
|
162
162
|
<h3 class="section-bar">Public Instance methods</h3>
|
163
163
|
|
164
|
-
<div id="method-
|
165
|
-
<a name="
|
164
|
+
<div id="method-M000305" class="method-detail">
|
165
|
+
<a name="M000305"></a>
|
166
166
|
|
167
167
|
<div class="method-heading">
|
168
|
-
<a href="#
|
168
|
+
<a href="#M000305" class="method-signature">
|
169
169
|
<span class="method-name">register_for</span><span class="method-args">(object, type, callback)</span>
|
170
170
|
</a>
|
171
171
|
</div>
|
@@ -176,8 +176,8 @@ Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> and
|
|
176
176
|
return a unique callback id.
|
177
177
|
</p>
|
178
178
|
<p><a class="source-toggle" href="#"
|
179
|
-
onclick="toggleCode('
|
180
|
-
<div class="method-source-code" id="
|
179
|
+
onclick="toggleCode('M000305-source');return false;">[Source]</a></p>
|
180
|
+
<div class="method-source-code" id="M000305-source">
|
181
181
|
<pre>
|
182
182
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 19</span>
|
183
183
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>)
|
@@ -188,11 +188,11 @@ return a unique callback id.
|
|
188
188
|
</div>
|
189
189
|
</div>
|
190
190
|
|
191
|
-
<div id="method-
|
192
|
-
<a name="
|
191
|
+
<div id="method-M000306" class="method-detail">
|
192
|
+
<a name="M000306"></a>
|
193
193
|
|
194
194
|
<div class="method-heading">
|
195
|
-
<a href="#
|
195
|
+
<a href="#M000306" class="method-signature">
|
196
196
|
<span class="method-name">register_named_for</span><span class="method-args">(object, type, callback, named_id)</span>
|
197
197
|
</a>
|
198
198
|
</div>
|
@@ -203,8 +203,8 @@ Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> with the
|
|
203
203
|
id <tt>named_id</tt>.
|
204
204
|
</p>
|
205
205
|
<p><a class="source-toggle" href="#"
|
206
|
-
onclick="toggleCode('
|
207
|
-
<div class="method-source-code" id="
|
206
|
+
onclick="toggleCode('M000306-source');return false;">[Source]</a></p>
|
207
|
+
<div class="method-source-code" id="M000306-source">
|
208
208
|
<pre>
|
209
209
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 25</span>
|
210
210
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_named_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>, <span class="ruby-identifier">named_id</span>)
|
@@ -224,7 +224,7 @@ id <tt>named_id</tt>.
|
|
224
224
|
|
225
225
|
</div>
|
226
226
|
<div id="section">
|
227
|
-
<h2 class="section-title"><a name="
|
227
|
+
<h2 class="section-title"><a name="SEC00112">Friend methods for Wee::CallbackStream</a></h2>
|
228
228
|
<div class="section-comment">
|
229
229
|
|
230
230
|
</div>
|
@@ -240,19 +240,19 @@ id <tt>named_id</tt>.
|
|
240
240
|
<div id="methods">
|
241
241
|
<h3 class="section-bar">Public Instance methods</h3>
|
242
242
|
|
243
|
-
<div id="method-
|
244
|
-
<a name="
|
243
|
+
<div id="method-M000309" class="method-detail">
|
244
|
+
<a name="M000309"></a>
|
245
245
|
|
246
246
|
<div class="method-heading">
|
247
|
-
<a href="#
|
247
|
+
<a href="#M000309" class="method-signature">
|
248
248
|
<span class="method-name">all_of_type</span><span class="method-args">(type)</span>
|
249
249
|
</a>
|
250
250
|
</div>
|
251
251
|
|
252
252
|
<div class="method-description">
|
253
253
|
<p><a class="source-toggle" href="#"
|
254
|
-
onclick="toggleCode('
|
255
|
-
<div class="method-source-code" id="
|
254
|
+
onclick="toggleCode('M000309-source');return false;">[Source]</a></p>
|
255
|
+
<div class="method-source-code" id="M000309-source">
|
256
256
|
<pre>
|
257
257
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 55</span>
|
258
258
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>)
|
@@ -267,19 +267,19 @@ id <tt>named_id</tt>.
|
|
267
267
|
</div>
|
268
268
|
</div>
|
269
269
|
|
270
|
-
<div id="method-
|
271
|
-
<a name="
|
270
|
+
<div id="method-M000308" class="method-detail">
|
271
|
+
<a name="M000308"></a>
|
272
272
|
|
273
273
|
<div class="method-heading">
|
274
|
-
<a href="#
|
274
|
+
<a href="#M000308" class="method-signature">
|
275
275
|
<span class="method-name">get_callback_for</span><span class="method-args">(id, type)</span>
|
276
276
|
</a>
|
277
277
|
</div>
|
278
278
|
|
279
279
|
<div class="method-description">
|
280
280
|
<p><a class="source-toggle" href="#"
|
281
|
-
onclick="toggleCode('
|
282
|
-
<div class="method-source-code" id="
|
281
|
+
onclick="toggleCode('M000308-source');return false;">[Source]</a></p>
|
282
|
+
<div class="method-source-code" id="M000308-source">
|
283
283
|
<pre>
|
284
284
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 47</span>
|
285
285
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_callback_for</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">type</span>)
|
@@ -294,19 +294,19 @@ id <tt>named_id</tt>.
|
|
294
294
|
</div>
|
295
295
|
</div>
|
296
296
|
|
297
|
-
<div id="method-
|
298
|
-
<a name="
|
297
|
+
<div id="method-M000307" class="method-detail">
|
298
|
+
<a name="M000307"></a>
|
299
299
|
|
300
300
|
<div class="method-heading">
|
301
|
-
<a href="#
|
301
|
+
<a href="#M000307" class="method-signature">
|
302
302
|
<span class="method-name">get_ids_for</span><span class="method-args">(object, type)</span>
|
303
303
|
</a>
|
304
304
|
</div>
|
305
305
|
|
306
306
|
<div class="method-description">
|
307
307
|
<p><a class="source-toggle" href="#"
|
308
|
-
onclick="toggleCode('
|
309
|
-
<div class="method-source-code" id="
|
308
|
+
onclick="toggleCode('M000307-source');return false;">[Source]</a></p>
|
309
|
+
<div class="method-source-code" id="M000307-source">
|
310
310
|
<pre>
|
311
311
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 39</span>
|
312
312
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ids_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>)
|
@@ -94,9 +94,9 @@ The intersection of registered callbacks and those that occured.
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
97
|
+
<a href="#M000395">all_of_type</a>
|
98
|
+
<a href="#M000393">new</a>
|
99
|
+
<a href="#M000394">with_callbacks_for</a>
|
100
100
|
</div>
|
101
101
|
</div>
|
102
102
|
|
@@ -118,11 +118,11 @@ The intersection of registered callbacks and those that occured.
|
|
118
118
|
<div id="methods">
|
119
119
|
<h3 class="section-bar">Public Class methods</h3>
|
120
120
|
|
121
|
-
<div id="method-
|
122
|
-
<a name="
|
121
|
+
<div id="method-M000393" class="method-detail">
|
122
|
+
<a name="M000393"></a>
|
123
123
|
|
124
124
|
<div class="method-heading">
|
125
|
-
<a href="#
|
125
|
+
<a href="#M000393" class="method-signature">
|
126
126
|
<span class="method-name">new</span><span class="method-args">(callbacks, ids_and_values)</span>
|
127
127
|
</a>
|
128
128
|
</div>
|
@@ -138,8 +138,8 @@ occurend in a request, e.g. { id => value }.
|
|
138
138
|
</dd>
|
139
139
|
</dl>
|
140
140
|
<p><a class="source-toggle" href="#"
|
141
|
-
onclick="toggleCode('
|
142
|
-
<div class="method-source-code" id="
|
141
|
+
onclick="toggleCode('M000393-source');return false;">[Source]</a></p>
|
142
|
+
<div class="method-source-code" id="M000393-source">
|
143
143
|
<pre>
|
144
144
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 78</span>
|
145
145
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">callbacks</span>, <span class="ruby-identifier">ids_and_values</span>)
|
@@ -154,11 +154,11 @@ occurend in a request, e.g. { id => value }.
|
|
154
154
|
|
155
155
|
<h3 class="section-bar">Public Instance methods</h3>
|
156
156
|
|
157
|
-
<div id="method-
|
158
|
-
<a name="
|
157
|
+
<div id="method-M000395" class="method-detail">
|
158
|
+
<a name="M000395"></a>
|
159
159
|
|
160
160
|
<div class="method-heading">
|
161
|
-
<a href="#
|
161
|
+
<a href="#M000395" class="method-signature">
|
162
162
|
<span class="method-name">all_of_type</span><span class="method-args">(type)</span>
|
163
163
|
</a>
|
164
164
|
</div>
|
@@ -169,8 +169,8 @@ Returns a [callback, value] array of all callbacks of <tt>type</tt> for
|
|
169
169
|
which an id was given.
|
170
170
|
</p>
|
171
171
|
<p><a class="source-toggle" href="#"
|
172
|
-
onclick="toggleCode('
|
173
|
-
<div class="method-source-code" id="
|
172
|
+
onclick="toggleCode('M000395-source');return false;">[Source]</a></p>
|
173
|
+
<div class="method-source-code" id="M000395-source">
|
174
174
|
<pre>
|
175
175
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 95</span>
|
176
176
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>)
|
@@ -185,19 +185,19 @@ which an id was given.
|
|
185
185
|
</div>
|
186
186
|
</div>
|
187
187
|
|
188
|
-
<div id="method-
|
189
|
-
<a name="
|
188
|
+
<div id="method-M000394" class="method-detail">
|
189
|
+
<a name="M000394"></a>
|
190
190
|
|
191
191
|
<div class="method-heading">
|
192
|
-
<a href="#
|
192
|
+
<a href="#M000394" class="method-signature">
|
193
193
|
<span class="method-name">with_callbacks_for</span><span class="method-args">(object, type) {|@callbacks.get_callback_for(id, type), @ids_and_values[id]| ...}</span>
|
194
194
|
</a>
|
195
195
|
</div>
|
196
196
|
|
197
197
|
<div class="method-description">
|
198
198
|
<p><a class="source-toggle" href="#"
|
199
|
-
onclick="toggleCode('
|
200
|
-
<div class="method-source-code" id="
|
199
|
+
onclick="toggleCode('M000394-source');return false;">[Source]</a></p>
|
200
|
+
<div class="method-source-code" id="M000394-source">
|
201
201
|
<pre>
|
202
202
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 84</span>
|
203
203
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_callbacks_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>)
|
@@ -0,0 +1,225 @@
|
|
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>Module: Wee::CanvasMixin</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>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Wee::CanvasMixin</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/wee/renderer/html/canvas_rb.html">
|
59
|
+
lib/wee/renderer/html/canvas.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000094">close</a>
|
84
|
+
<a href="#M000093">initialize_canvas</a>
|
85
|
+
<a href="#M000096">nest</a>
|
86
|
+
<a href="#M000095">set_brush</a>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
<!-- if includes -->
|
94
|
+
|
95
|
+
<div id="section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if method_list -->
|
105
|
+
<div id="methods">
|
106
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
107
|
+
|
108
|
+
<div id="method-M000094" class="method-detail">
|
109
|
+
<a name="M000094"></a>
|
110
|
+
|
111
|
+
<div class="method-heading">
|
112
|
+
<a href="#M000094" class="method-signature">
|
113
|
+
<span class="method-name">close</span><span class="method-args">()</span>
|
114
|
+
</a>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div class="method-description">
|
118
|
+
<p><a class="source-toggle" href="#"
|
119
|
+
onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
|
120
|
+
<div class="method-source-code" id="M000094-source">
|
121
|
+
<pre>
|
122
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 9</span>
|
123
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
124
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
125
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
126
|
+
<span class="ruby-keyword kw">end</span>
|
127
|
+
</pre>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<div id="method-M000093" class="method-detail">
|
133
|
+
<a name="M000093"></a>
|
134
|
+
|
135
|
+
<div class="method-heading">
|
136
|
+
<a href="#M000093" class="method-signature">
|
137
|
+
<span class="method-name">initialize_canvas</span><span class="method-args">()</span>
|
138
|
+
</a>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div class="method-description">
|
142
|
+
<p><a class="source-toggle" href="#"
|
143
|
+
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
144
|
+
<div class="method-source-code" id="M000093-source">
|
145
|
+
<pre>
|
146
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 4</span>
|
147
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_canvas</span>
|
148
|
+
<span class="ruby-ivar">@parent_brush</span> = <span class="ruby-keyword kw">nil</span>
|
149
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
150
|
+
<span class="ruby-keyword kw">end</span>
|
151
|
+
</pre>
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div id="method-M000096" class="method-detail">
|
157
|
+
<a name="M000096"></a>
|
158
|
+
|
159
|
+
<div class="method-heading">
|
160
|
+
<a href="#M000096" class="method-signature">
|
161
|
+
<span class="method-name">nest</span><span class="method-args">(&block)</span>
|
162
|
+
</a>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
<div class="method-description">
|
166
|
+
<p><a class="source-toggle" href="#"
|
167
|
+
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
168
|
+
<div class="method-source-code" id="M000096-source">
|
169
|
+
<pre>
|
170
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 25</span>
|
171
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nest</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
172
|
+
<span class="ruby-ivar">@parent_brush</span> = <span class="ruby-ivar">@current_brush</span>
|
173
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
174
|
+
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>
|
175
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
176
|
+
<span class="ruby-ivar">@parent_brush</span> = <span class="ruby-ivar">@parent_brush</span>.<span class="ruby-identifier">parent</span>
|
177
|
+
<span class="ruby-keyword kw">end</span>
|
178
|
+
</pre>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div id="method-M000095" class="method-detail">
|
184
|
+
<a name="M000095"></a>
|
185
|
+
|
186
|
+
<div class="method-heading">
|
187
|
+
<a href="#M000095" class="method-signature">
|
188
|
+
<span class="method-name">set_brush</span><span class="method-args">(brush)</span>
|
189
|
+
</a>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
<p><a class="source-toggle" href="#"
|
194
|
+
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
195
|
+
<div class="method-source-code" id="M000095-source">
|
196
|
+
<pre>
|
197
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 14</span>
|
198
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
|
199
|
+
<span class="ruby-comment cmt"># tell previous brush to finish</span>
|
200
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
201
|
+
|
202
|
+
<span class="ruby-identifier">brush</span>.<span class="ruby-identifier">parent</span> = <span class="ruby-ivar">@parent_brush</span>
|
203
|
+
<span class="ruby-identifier">brush</span>.<span class="ruby-identifier">canvas</span> = <span class="ruby-keyword kw">self</span>
|
204
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-identifier">brush</span>
|
205
|
+
|
206
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">brush</span>
|
207
|
+
<span class="ruby-keyword kw">end</span>
|
208
|
+
</pre>
|
209
|
+
</div>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
|
214
|
+
</div>
|
215
|
+
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
<div id="validator-badges">
|
221
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
</body>
|
225
|
+
</html>
|