You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/01/21 17:29:28 UTC
[royale-asjs] 03/03: text display and editing in RichEditableText
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 17b2d544419d22ef39c95898a6e7bf0ae7768f1f
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Jan 21 09:29:03 2020 -0800
text display and editing in RichEditableText
---
.../SparkRoyale/src/main/resources/defaults.css | 7 +
.../main/royale/spark/components/Application.as | 14 +-
.../royale/spark/components/RichEditableText.as | 36 ++--
.../src/main/royale/spark/components/Scroller.as | 18 +-
.../src/main/royale/spark/components/TextArea.as | 4 +-
.../spark/components/supportClasses/GroupBase.as | 10 +-
.../RichEditableTextContainerManager.as | 24 +--
.../src/main/royale/spark/core/IViewport.as | 220 +++++++++++++++++++++
8 files changed, 293 insertions(+), 40 deletions(-)
diff --git a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
index 1fa4275..c774246 100644
--- a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
+++ b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
@@ -163,6 +163,13 @@ Panel .TitleBar
background-color: #FFFFFF;
}
+RichEditableText
+{
+ inactiveTextSelectionColor: #E8E8E8;
+ focusedTextSelectionColor: #A8C6EE;
+ unfocusedTextSelectionColor: #E8E8E8;
+}
+
Scroller
{
IBeadView: ClassReference("org.apache.royale.html.beads.GroupView");
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Application.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Application.as
index 186fccd..6cfdb04 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Application.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Application.as
@@ -68,6 +68,7 @@ import mx.managers.ISystemManager;
COMPILE::JS {
import org.apache.royale.core.ElementWrapper;
+ import org.apache.royale.events.ElementEvents;
}
import org.apache.royale.binding.ContainerDataBinding;
@@ -1639,10 +1640,17 @@ public class Application extends SkinnableContainer implements IStrand, IParent,
/**
* @private
*/
- /* override protected function createChildren():void
+ override protected function createChildren():void
{
+ COMPILE::JS
+ {
+ ElementEvents.elementEvents["focusin"] = 1;
+ ElementEvents.elementEvents["focusout"] = 1;
+ }
+
super.createChildren();
+ /*
// Only listen for softKeyboard events
// if the runtime supports a soft keyboard
if (softKeyboardBehavior != "")
@@ -1661,8 +1669,8 @@ public class Application extends SkinnableContainer implements IStrand, IParent,
if (nativeApp && nativeApp["nativeApplication"])
EventDispatcher(nativeApp["nativeApplication"]).
addEventListener(Event.DEACTIVATE, nativeApplication_deactivateHandler);
- }
- } */
+ }*/
+ }
/**
* @private
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/RichEditableText.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/RichEditableText.as
index 702c9d2..bdbe02a 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/RichEditableText.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/RichEditableText.as
@@ -85,7 +85,6 @@ package spark.components
use namespace tlf_internal; */
- import mx.core.IVisualElement;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.events.FlexEvent;
@@ -93,7 +92,9 @@ package spark.components
import spark.components.supportClasses.RichEditableTextContainerManager;
import spark.core.IEditableText;
+ import spark.core.IViewport;
+ import org.apache.royale.textLayout.beads.DispatchTLFKeyboardEventBead;
import org.apache.royale.textLayout.container.TextContainerManager;
import org.apache.royale.textLayout.conversion.ITextExporter;
import org.apache.royale.textLayout.conversion.ITextImporter;
@@ -103,12 +104,13 @@ package spark.components
import org.apache.royale.textLayout.edit.SelectionState;
import org.apache.royale.textLayout.elements.TextFlow;
import org.apache.royale.textLayout.events.SelectionEvent;
- import org.apache.royale.textLayout.factory.TLFFactory;
import org.apache.royale.textLayout.factory.StandardTLFFactory;
+ import org.apache.royale.textLayout.factory.TLFFactory;
import org.apache.royale.textLayout.factory.TextFlowTextLineFactory;
import org.apache.royale.textLayout.factory.TextLineFactoryBase;
use namespace mx_internal;
import mx.managers.IFocusManagerComponent;
+ import org.apache.royale.textLayout.beads.DispatchTLFKeyboardEventBead;
//--------------------------------------
@@ -452,9 +454,9 @@ package spark.components
* @see flashx.textLayout.container.TextContainerManager
*/
public class RichEditableText extends UIComponent
- implements IFocusManagerComponent, IVisualElement, IEditableText
+ implements IFocusManagerComponent, IEditableText, IViewport
{
- //, IIMESupport, ISystemCursorClient, IViewport
+ //, IIMESupport, ISystemCursorClient
// include "../core/Version.as";
//--------------------------------------------------------------------------
@@ -633,6 +635,8 @@ package spark.components
{
super();
+ typeNames = "RichEditableText";
+
initClass();
// Use the setter.
@@ -1054,7 +1058,7 @@ package spark.components
* Set to true by a scroller when it installs this as a viewport.
* Set to false by a scroller when it uninstalls this as a viewport.
*/
- /* public function set clipAndEnableScrolling(value:Boolean):void
+ public function set clipAndEnableScrolling(value:Boolean):void
{
if (value == _clipAndEnableScrolling)
return;
@@ -1063,7 +1067,7 @@ package spark.components
clipAndEnableScrollingChanged = true;
invalidateProperties();
- } */
+ }
//----------------------------------
// contentHeight
@@ -1954,7 +1958,7 @@ package spark.components
/**
* @private
*/
- /* private var _selectionHighlighting:String =
+ private var _selectionHighlighting:String = "whenFocused" /*
TextSelectionHighlighting.WHEN_FOCUSED; */
/**
@@ -1962,9 +1966,9 @@ package spark.components
* To indicate either selection highlighting or selection styles have
* changed.
*/
- /* private var selectionFormatsChanged:Boolean = false;
+ private var selectionFormatsChanged:Boolean = false;
- [Inspectable(category="General", enumeration="always,whenActive,whenFocused", defaultValue="whenFocused")] */
+ [Inspectable(category="General", enumeration="always,whenActive,whenFocused", defaultValue="whenFocused")]
/**
* Determines when the text selection is highlighted.
@@ -1995,15 +1999,15 @@ package spark.components
* @playerversion AIR 1.5
* @productversion Royale 0.9.4
*/
- /* public function get selectionHighlighting():String
+ public function get selectionHighlighting():String
{
return _selectionHighlighting;
- } */
+ }
/**
* @private
*/
- /* public function set selectionHighlighting(value:String):void
+ public function set selectionHighlighting(value:String):void
{
if (value == _selectionHighlighting)
return;
@@ -2013,7 +2017,7 @@ package spark.components
invalidateProperties();
invalidateDisplayList();
- } */
+ }
//----------------------------------
// text
@@ -4944,6 +4948,12 @@ package spark.components
commitProperties();
measure();
updateDisplayList(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
+ COMPILE::JS
+ {
+ if (element['tabIndex'] == -1)
+ element['tabIndex'] = 0;
+ }
+ addBead(new DispatchTLFKeyboardEventBead());
}
}
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
index 2ee8f0d..fe6b416 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
@@ -53,7 +53,6 @@ import spark.components.supportClasses.GroupBase;
import spark.components.supportClasses.ScrollerLayout;
import spark.components.supportClasses.TouchScrollHelper;
import spark.core.IGraphicElement;
-import spark.core.IViewport;
import spark.core.NavigationUnit;
import spark.effects.Animate;
import spark.effects.ThrowEffect;
@@ -69,6 +68,7 @@ import mx.core.UIComponent;
import mx.managers.IFocusManagerComponent;
import spark.components.supportClasses.SkinnableComponent;
+import spark.core.IViewport;
import org.apache.royale.core.IChild;
import org.apache.royale.events.Event;
@@ -1051,7 +1051,7 @@ public class Scroller extends SkinnableComponent
// viewport - default property
//----------------------------------
- private var _viewport:IVisualElement;//IViewport;
+ private var _viewport:IViewport;
[Bindable(event="viewportChanged")]
@@ -1079,7 +1079,7 @@ public class Scroller extends SkinnableComponent
* @playerversion AIR 1.5
* @productversion Royale 0.9.4
*/
- public function get viewport(): IVisualElement//IViewport
+ public function get viewport(): IViewport
{
return _viewport;
}
@@ -1087,7 +1087,7 @@ public class Scroller extends SkinnableComponent
/**
* @private
*/
- public function set viewport(value:IVisualElement):void
+ public function set viewport(value:IViewport):void
{
if (value == _viewport)
return;
@@ -1113,8 +1113,9 @@ public class Scroller extends SkinnableComponent
{
/* SWF?
if (skin && viewport)
- {
+ {*/
viewport.clipAndEnableScrolling = true;
+ /*
Group(skin).addElementAt(viewport, 0);
viewport.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, viewport_propertyChangeHandler);
viewport.addEventListener(Event.RESIZE, viewport_resizeHandler);
@@ -3893,6 +3894,13 @@ public class Scroller extends SkinnableComponent
(_viewport as UIComponent).height = height;
installViewport();
}
+
+ override public function setActualSize(w:Number, h:Number):void
+ {
+ super.setActualSize(w, h);
+ (_viewport as UIComponent).width = width;
+ (_viewport as UIComponent).height = height;
+ }
}
}
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as
index e7dd751..af69ee1 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as
@@ -20,7 +20,7 @@
package spark.components
{
- import mx.core.IVisualElement;
+ import spark.core.IViewport;
import spark.components.supportClasses.SkinnableTextBase;
@@ -340,7 +340,7 @@ package spark.components
scroller.percentWidth = 100;
textDisplay = new RichEditableText();
partAdded("textDisplay", textDisplay);
- scroller.viewport = textDisplay as IVisualElement;
+ scroller.viewport = textDisplay as IViewport;
addElement(scroller);
}
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
index f14efdd..46eb68b 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
@@ -33,14 +33,13 @@ package spark.components.supportClasses
//import flash.geom.Rectangle;
//import mx.core.ILayoutElement;
-import org.apache.royale.geom.Point;
-
import mx.core.IUIComponent;
import mx.core.IVisualElement;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.events.PropertyChangeEvent;
+import spark.core.IViewport;
import spark.layouts.BasicLayout;
import spark.layouts.supportClasses.LayoutBase;
@@ -54,8 +53,9 @@ import org.apache.royale.core.IParent;
import org.apache.royale.core.ValuesManager;
import org.apache.royale.events.Event;
import org.apache.royale.events.ValueEvent;
+import org.apache.royale.geom.Point;
import org.apache.royale.utils.MXMLDataInterpreter;
-import org.apache.royale.utils.loadBeadFromValuesManager;
+import org.apache.royale.utils.loadBeadFromValuesManager;
//import spark.utils.FTETextUtil;
//import spark.utils.MaskUtil;
@@ -332,8 +332,8 @@ include "../../styles/metadata/SelectionFormatTextStyles.as" */
* @playerversion AIR 1.5
* @productversion Royale 0.9.4
*/
-public class GroupBase extends UIComponent implements ILayoutParent, IContainer
-{ //implements IViewport
+public class GroupBase extends UIComponent implements ILayoutParent, IContainer, IViewport
+{
//--------------------------------------------------------------------------
//
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/RichEditableTextContainerManager.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/RichEditableTextContainerManager.as
index a5a0b17..8ddb842 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/RichEditableTextContainerManager.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/RichEditableTextContainerManager.as
@@ -45,8 +45,6 @@ import spark.components.TextSelectionHighlighting;
import flashx.textLayout.tlf_internal;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.edit.EditManager;
-import flashx.textLayout.edit.EditingMode;
-import flashx.textLayout.edit.SelectionFormat;
import flashx.textLayout.edit.SelectionManager;
import flashx.textLayout.elements.FlowLeafElement;
import flashx.textLayout.elements.ParagraphElement;
@@ -58,6 +56,8 @@ import flashx.undo.IUndoManager;
import flashx.undo.UndoManager;
*/
+import org.apache.royale.textLayout.edit.EditingMode;
+import org.apache.royale.textLayout.edit.SelectionFormat;
import org.apache.royale.textLayout.edit.ElementRange;
import org.apache.royale.textLayout.elements.TextRange;
import org.apache.royale.textLayout.edit.IEditManager;
@@ -259,6 +259,7 @@ public class RichEditableTextContainerManager extends TextContainerManager
/**
* @private
+ */
override protected function getFocusedSelectionFormat():SelectionFormat
{
var selectionColor:* = textDisplay.getStyle("focusedTextSelectionColor");
@@ -272,13 +273,13 @@ public class RichEditableTextContainerManager extends TextContainerManager
// the inverse color of the background, for maximum readability.
// If not editable, then no insertion point.
return new SelectionFormat(
- selectionColor, 1.0, BlendMode.NORMAL,
- 0x000000, hideCursor ? 0 : focusedPointAlpha, BlendMode.INVERT);
+ selectionColor, 1.0, "normal" /*BlendMode.NORMAL*/,
+ 0x000000, hideCursor ? 0 : focusedPointAlpha, "invert" /*BlendMode.INVERT*/);
}
- */
/**
* @private
+ */
override protected function getUnfocusedSelectionFormat():SelectionFormat
{
var unfocusedSelectionColor:* = textDisplay.getStyle(
@@ -286,19 +287,19 @@ public class RichEditableTextContainerManager extends TextContainerManager
var unfocusedAlpha:Number =
textDisplay.selectionHighlighting !=
- TextSelectionHighlighting.WHEN_FOCUSED ?
+ "whenFocused" /*TextSelectionHighlighting.WHEN_FOCUSED*/ ?
1.0 :
0.0;
// No insertion point when no focus.
return new SelectionFormat(
- unfocusedSelectionColor, unfocusedAlpha, BlendMode.NORMAL,
+ unfocusedSelectionColor, unfocusedAlpha, "normal" /*BlendMode.NORMAL*/,
unfocusedSelectionColor, 0.0);
}
- */
/**
* @private
+ */
override protected function getInactiveSelectionFormat():SelectionFormat
{
var inactiveSelectionColor:* = textDisplay.getStyle(
@@ -308,7 +309,7 @@ public class RichEditableTextContainerManager extends TextContainerManager
var inactiveRangeAlpha:Number =
textDisplay.selectionHighlighting ==
- TextSelectionHighlighting.ALWAYS ?
+ "always" /*TextSelectionHighlighting.ALWAYS*/ ?
1.0 :
0.0;
@@ -317,11 +318,10 @@ public class RichEditableTextContainerManager extends TextContainerManager
var pointBlinkRate:Number = 0.0;
return new SelectionFormat(
- inactiveSelectionColor, inactiveRangeAlpha, BlendMode.NORMAL,
- inactiveSelectionColor, inactivePointAlpha, BlendMode.INVERT,
+ inactiveSelectionColor, inactiveRangeAlpha, "normal" /* BlendMode.NORMAL */,
+ inactiveSelectionColor, inactivePointAlpha, "invert" /* BlendMode.INVERT */,
pointBlinkRate);
}
- */
/**
* @private
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/core/IViewport.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/core/IViewport.as
new file mode 100644
index 0000000..74ad7b5
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/core/IViewport.as
@@ -0,0 +1,220 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.core
+{
+
+import mx.core.IVisualElement;
+
+/**
+ * The IViewport interface is implemented by components that support a viewport.
+ * If a component's children are larger than the component,
+ * and you want to clip the children to the component boundaries, you can define a viewport and scroll bars.
+ * A viewport is a rectangular subset of the area of a component that you want to display,
+ * rather than displaying the entire component.
+ *
+ * <p>A viewport on its own is not movable by the application user.
+ * However, you can combine a viewport with scroll bars so the user can scroll
+ * the viewport to see the entire content of the component.
+ * Use the Scroller component to add scrolbars to the component.</p>
+ *
+ * @see spark.components.Scroller
+ *
+ * @includeExample examples/IViewportExample.mxml
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+public interface IViewport extends IVisualElement
+{
+
+ /**
+ * The width of the viewport's contents.
+ *
+ * If <code>clipAndEnabledScrolling</code> is true, the viewport's
+ * <code>contentWidth</code> defines the limit for horizontal scrolling
+ * and the viewport's actual width defines how much of the content is visible.
+ *
+ * To scroll through the content horizontally, vary the
+ * <code>horizontalScrollPosition</code> between 0 and
+ * <code>contentWidth - width</code>.
+ *
+ * <p>Implementations of this property must be Bindable and
+ * must generate events of type <code>propertyChange</code>.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ function get contentWidth():Number;
+ */
+
+ /**
+ * The height of the viewport's content.
+ *
+ * If <code>clipAndEnabledScrolling</code> is true, the viewport's
+ * <code>contentHeight</code> defines the limit for vertical scrolling
+ * and the viewport's actual height defines how much of the content is visible.
+ *
+ * To scroll through the content vertically, vary the
+ * <code>verticalScrollPosition</code> between 0 and
+ * <code>contentHeight - height</code>.
+ *
+ * <p>Implementations of this property must be Bindable and
+ * must generate events of type <code>propertyChange</code>.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ function get contentHeight():Number;
+ */
+
+ /**
+ * The x coordinate of the origin of the viewport in the component's coordinate system,
+ * where the default value is (0,0) corresponding to the upper-left corner of the component.
+ *
+ * If <code>clipAndEnableScrolling</code> is <code>true</code>, setting this property
+ * typically causes the viewport to be set to:
+ * <pre>
+ * new Rectangle(horizontalScrollPosition, verticalScrollPosition, width, height)
+ * </pre>
+ *
+ * Implementations of this property must be Bindable and
+ * must generate events of type <code>propertyChange</code>.
+ *
+ * @default 0
+ *
+ * @see #target
+ * @see #verticalScrollPosition
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ function get horizontalScrollPosition():Number;
+ function set horizontalScrollPosition(value:Number):void;
+ */
+
+ /**
+ * The y coordinate of the origin of the viewport in the component's coordinate system,
+ * where the default value is (0,0) corresponding to the upper-left corner of the component.
+ *
+ * If <code>clipAndEnableScrolling</code> is <code>true</code>, setting this property
+ * typically causes the viewport to be set to:
+ * <pre>
+ * new Rectangle(horizontalScrollPosition, verticalScrollPosition, width, height)
+ * </pre>
+ *
+ * Implementations of this property must be Bindable and
+ * must generate events of type <code>propertyChange</code>.
+ *
+ * @default 0
+ *
+ * @see #horizontalScrollPosition
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ function get verticalScrollPosition():Number;
+ function set verticalScrollPosition(value:Number):void;
+ */
+
+ /**
+ * Returns the amount to add to the viewport's current
+ * <code>horizontalScrollPosition</code> to scroll by the requested scrolling unit.
+ *
+ * @param navigationUnit The amount to scroll.
+ * The value must be one of the following spark.core.NavigationUnit
+ * constants:
+ * <ul>
+ * <li><code>LEFT</code></li>
+ * <li><code>RIGHT</code></li>
+ * <li><code>PAGE_LEFT</code></li>
+ * <li><code>PAGE_RIGHT</code></li>
+ * <li><code>HOME</code></li>
+ * <li><code>END</code></li>
+ * </ul>
+ * To scroll by a single column, use <code>LEFT</code> or <code>RIGHT</code>.
+ * To scroll to the first or last column, use <code>HOME</code> or <code>END</code>.
+ *
+ * @return The number of pixels to add to <code>horizontalScrollPosition</code>.
+ *
+ * @see spark.core.NavigationUnit
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ function getHorizontalScrollPositionDelta(navigationUnit:uint):Number;
+ */
+
+ /**
+ * Returns the amount to add to the viewport's current
+ * <code>verticalScrollPosition</code> to scroll by the requested scrolling unit.
+ *
+ * @param navigationUnit The amount to scroll.
+ * The value of unit must be one of the following spark.core.NavigationUnit
+ * constants:
+ * <ul>
+ * <li><code>UP</code></li>
+ * <li><code>DOWN</code></li>
+ * <li><code>PAGE_UP</code></li>
+ * <li><code>PAGE_DOWN</code></li>
+ * <li><code>HOME</code></li>
+ * <li><code>END</code></li>
+ * </ul>
+ * To scroll by a single row use <code>UP</code> or <code>DOWN</code>.
+ * To scroll to the first or last row, use <code>HOME</code> or <code>END</code>.
+ *
+ * @return The number of pixels to add to <code>verticalScrollPosition</code>.
+ *
+ * @see spark.core.NavigationUnit
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ function getVerticalScrollPositionDelta(navigationUnit:uint):Number;
+ */
+
+ /**
+ * If <code>true</code>, specifies to clip the children to the boundaries of the viewport.
+ * If <code>false</code>, the container children extend past the container boundaries,
+ * regardless of the size specification of the component.
+ *
+ * @default false
+ *
+ * @see spark.layouts.supportClasses.LayoutBase#updateScrollRect
+ * @see #verticalScrollPosition
+ * @see #horizontalScrollPosition
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get clipAndEnableScrolling():Boolean;
+ function set clipAndEnableScrolling(value:Boolean):void;
+}
+
+}