Fixing an issue with output parameters that are of type IntPtr
[castle.git] / MonoRail / Castle.MonoRail.Framework / Helpers / Effects2Helper.cs
blob96987045a5aad9969ec55448791e6c59ea57d566
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Framework.Helpers
17 using System;
19 /// <summary>
20 /// Exposes the effect script from Thomas Fuchs
21 /// (http://script.aculo.us, http://mir.aculo.us)
22 /// </summary>
23 /// <remarks>
24 /// Before using it, you must install the scripts. See <see cref="ScriptaculousHelper.InstallScripts"/>
25 /// </remarks>
26 [Obsolete("Use ScriptaculousHelper instead")]
27 public class Effects2Helper : ScriptaculousHelper
29 #region Constructors
30 /// <summary>
31 /// Initializes a new instance of the <see cref="Effects2Helper"/> class.
32 /// </summary>
33 public Effects2Helper() { }
34 /// <summary>
35 /// Initializes a new instance of the <see cref="Effects2Helper"/> class.
36 /// setting the Controller, Context and ControllerContext.
37 /// </summary>
38 /// <param name="engineContext">The engine context.</param>
39 public Effects2Helper(IEngineContext engineContext) : base(engineContext) { }
40 #endregion
42 /// <summary>
43 /// Make an element appear. If the element was previously set to display:none;
44 /// inside the style attribute of the element, the effect will automatically
45 /// show the element.
46 /// </summary>
47 /// <remarks>
48 /// Microsoft Internet Explorer can only set opacity on elements that have a
49 /// 'layout'. To let an element have a layout, you must set some CSS
50 /// positional properties, like 'width' or 'height'.
51 /// </remarks>
52 /// <param name="elementId"></param>
53 /// <returns></returns>
54 public String Appear(String elementId)
56 return ScriptBlock( String.Format( "new Effect.Appear('{0}');", elementId ) );
59 /// <summary>
60 /// Makes an element fade away and takes it out of the document flow
61 /// at the end of the effect by setting the CSS display property to false.
62 /// </summary>
63 /// <remarks>
64 /// Works safely with most HTML block elements (like DIV and LI).
65 /// Microsoft Internet Explorer can only set opacity on elements that
66 /// have a 'layout'. To let an element have a layout, you must set some
67 /// CSS positional properties, like 'width' or 'height'.
68 /// </remarks>
69 /// <param name="elementId"></param>
70 /// <returns></returns>
71 public String Fade(String elementId)
73 return ScriptBlock( String.Format( "new Effect.Fade('{0}');", elementId ) );
76 /// <summary>
77 /// Gives the illusion of the element puffing away (like a in a cloud of smoke).
78 /// </summary>
79 /// <remarks>
80 /// Works safely with most HTML block elements (like DIV and LI).
81 /// </remarks>
82 /// <param name="elementId"></param>
83 /// <returns></returns>
84 public String Puff(String elementId)
86 return ScriptBlock( String.Format( "new Effect.Puff('{0}');", elementId ) );
89 /// <summary>
90 /// Makes the element drop and fade out at the same time.
91 /// </summary>
92 /// <remarks>
93 /// Works safely with most HTML block elements (like DIV and LI).
94 /// </remarks>
95 /// <param name="elementId"></param>
96 /// <returns></returns>
97 public String DropOut(String elementId)
99 return ScriptBlock( String.Format( "new Effect.DropOut('{0}');", elementId ) );
102 /// <summary>
103 /// Moves the element slightly to the left, then to the right, repeatedly.
104 /// </summary>
105 /// <remarks>
106 /// Works safely with most HTML block elements (like DIV and LI).
107 /// </remarks>
108 /// <param name="elementId"></param>
109 /// <returns></returns>
110 public String Shake(String elementId)
112 return ScriptBlock( String.Format( "new Effect.Shake('{0}');", elementId ) );
115 /// <summary>
116 /// Gives the illusion of a TV-style switch off.
117 /// </summary>
118 /// <remarks>
119 /// Works safely with most HTML block elements (like DIV and LI).
120 /// </remarks>
121 /// <param name="elementId"></param>
122 /// <returns></returns>
123 public String SwitchOff(String elementId)
125 return ScriptBlock( String.Format( "new Effect.SwitchOff('{0}');", elementId ) );
128 /// <summary>
129 /// This pair of effects simulates a window blind, where the
130 /// contents of the affected elements stay in place.
131 /// </summary>
132 /// <remarks>
133 /// Works safely with most HTML block elements (like DIV and LI),
134 /// except table rows, table bodies and table heads.
135 /// </remarks>
136 /// <param name="elementId"></param>
137 /// <returns></returns>
138 public String BlindUp(String elementId)
140 return ScriptBlock( String.Format( "new Effect.BlindUp('{0}');", elementId ) );
143 /// <summary>
144 /// This pair of effects simulates a window blind, where the
145 /// contents of the affected elements stay in place.
146 /// </summary>
147 /// <remarks>
148 /// Works safely with most HTML block elements (like DIV and LI),
149 /// except table rows, table bodies and table heads.
150 /// </remarks>
151 /// <param name="elementId"></param>
152 /// <returns></returns>
153 public String BlindDown(String elementId)
155 return ScriptBlock( String.Format( "new Effect.BlindDown('{0}');", elementId ) );
158 /// <summary>
159 /// This pair of effects simulates a window blind, where the contents of
160 /// the affected elements scroll up and down accordingly.
161 /// </summary>
162 /// <remarks>
163 /// You must include a second DIV element,
164 /// wrapping the contents of the outer DIV.
165 /// So, if you call new Effect.SlideDown('x'), your element must look like this:
166 /// <code>
167 /// &lt;div id="x"&gt;&lt;div&gt;contents&lt;/div&gt;&lt;/div&gt;
168 /// </code>
169 /// Because of a bug in Internet Explorer 6 (overflow not correctly hidden),
170 /// an additional wrapper div is needed if you want to use these effects on
171 /// absolutely positionend elements (wrapper is the absolutely positioned element,
172 /// x has position:relative; set; ):
173 /// <code>
174 /// &lt;div id="wrapper"&gt;
175 /// &lt;div id="x"&gt;&lt;div&gt;contents&lt;/div&gt;&lt;/div&gt;
176 /// &lt;/div&gt;
177 /// </code>
178 /// Works only on block elements.
179 /// </remarks>
180 /// <param name="elementId"></param>
181 /// <returns></returns>
182 public String SlideUp(String elementId)
184 return ScriptBlock( String.Format( "new Effect.SlideUp('{0}');", elementId ) );
187 /// <summary>
188 /// This pair of effects simulates a window blind, where the contents of
189 /// the affected elements scroll up and down accordingly.
190 /// </summary>
191 /// <remarks>
192 /// You must include a second DIV element,
193 /// wrapping the contents of the outer DIV.
194 /// So, if you call new Effect.SlideDown('x'), your element must look like this:
195 /// <code>
196 /// &lt;div id="x"&gt;&lt;div&gt;contents&lt;/div&gt;&lt;/div&gt;
197 /// </code>
198 /// Because of a bug in Internet Explorer 6 (overflow not correctly hidden),
199 /// an additional wrapper div is needed if you want to use these effects on
200 /// absolutely positionend elements (wrapper is the absolutely positioned element,
201 /// x has position:relative; set; ):
202 /// <code>
203 /// &lt;div id="wrapper"&gt;
204 /// &lt;div id="x"&gt;&lt;div&gt;contents&lt;/div&gt;&lt;/div&gt;
205 /// &lt;/div&gt;
206 /// </code>
207 /// Works only on block elements.
208 /// </remarks>
209 /// <param name="elementId"></param>
210 /// <returns></returns>
211 public String SlideDown(String elementId)
213 return ScriptBlock( String.Format( "new Effect.SlideDown('{0}');", elementId ) );