コード例 #1
0
 /// <summary>
 /// Registers the given event handler to change events of the screen width based on the range set with the specified name.
 ///
 /// The event is fired whenever the screen width changes and the current screen width is in a different interval of the given range set than before the width change.
 ///
 /// The event handler is called with a single argument: a map <code>mParams</code> which provides the following information about the entered interval: <ul> <li><code>mParams.from</code>: The start value (inclusive) of the entered interval as a number</li> <li><code>mParams.to</code>: The end value (exclusive) range of the entered interval as a number or undefined for the last interval (infinity)</li> <li><code>mParams.unit</code>: The unit used for the values above, e.g. <code>"px"</code></li> <li><code>mParams.name</code>: The name of the entered interval, if available</li> </ul>
 /// </summary>
 /// <param name="fnFunction">The handler function to call when the event occurs. This function will be called in the context of the <code>oListener</code> instance (if present) or on the <code>window</code> instance. A map with information about the entered range set is provided as a single argument to the handler (see details above).</param>
 public extern void attachHandler(MediaRangeChangeDelegate fnFunction);
コード例 #2
0
 /// <summary>
 /// Removes a previously attached event handler from the change events of the screen width.
 ///
 /// The passed parameters must match those used for registration with {@link #.attachHandler} beforehand.
 /// </summary>
 /// <param name="fnFunction">The handler function to detach from the event</param>
 /// <param name="oListener">The object that wanted to be notified when the event occurred</param>
 /// <param name="sName">The name of the range set to listen to. If no name is provided, the {@link sap.ui.Device.media.RANGESETS.SAP_STANDARD default range set} is used.</param>
 public extern void detachHandler(MediaRangeChangeDelegate fnFunction, object oListener, string sName);
コード例 #3
0
 /// <summary>
 /// Registers the given event handler to change events of the screen width based on the range set with the specified name.
 ///
 /// The event is fired whenever the screen width changes and the current screen width is in a different interval of the given range set than before the width change.
 ///
 /// The event handler is called with a single argument: a map <code>mParams</code> which provides the following information about the entered interval: <ul> <li><code>mParams.from</code>: The start value (inclusive) of the entered interval as a number</li> <li><code>mParams.to</code>: The end value (exclusive) range of the entered interval as a number or undefined for the last interval (infinity)</li> <li><code>mParams.unit</code>: The unit used for the values above, e.g. <code>"px"</code></li> <li><code>mParams.name</code>: The name of the entered interval, if available</li> </ul>
 /// </summary>
 /// <param name="fnFunction">The handler function to call when the event occurs. This function will be called in the context of the <code>oListener</code> instance (if present) or on the <code>window</code> instance. A map with information about the entered range set is provided as a single argument to the handler (see details above).</param>
 /// <param name="oListener">The object that wants to be notified when the event occurs (<code>this</code> context within the handler function). If it is not specified, the handler function is called in the context of the <code>window</code>.</param>
 public extern void attachHandler(MediaRangeChangeDelegate fnFunction, object oListener);