Packagecom.gestureworks.cml.elements
Classpublic class Menu
InheritanceMenu Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite
Subclasses OrbMenu

The Menu element constructs a custom menu using nested Buttons(s). It features auto-hiding and auto-positioning.

See also

Button
OrbMenu
DropDownMenu


Public Properties
 PropertyDefined By
  autohide : Boolean
Menu
  autoHide : Boolean
Specifies whether the menu automatically hides when not in use
Menu
  autoHideTime : Number
Specifies the auto-hide time
Menu
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
  buttonArray : Array
Menu
 InheritedchildList : ChildList
Returns the object's childList.
TouchContainer
 InheritedclassName : String
sets the class name of displayobject
TouchContainer
 InheritedcloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedcmlIndex : int
Returns the index created by the CML parser.
TouchContainer
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] sets the height of the container
TouchContainer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
 Inheritedid : String
Returns the object's id.
TouchContainer
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainer
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
TouchContainer
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
TouchContainer
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
TouchContainer
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
TouchContainer
  position : *
[override] Specifies the position alogorithm of the menu.
Menu
 InheritedrelativeX : Boolean
When set true this containers children's x position will be laid out relatively to each other.
TouchContainer
 InheritedrelativeY : Boolean
When set true this containers children's y position will be laid out relatively to each other.
TouchContainer
  slider : Slider
Menu
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
 InheritedtoBitmap : Boolean
TouchContainer
 Inheritedwidth : Number
[override] sets the width of the container
TouchContainer
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainer
Public Methods
 MethodDefined By
  
Constructor
Menu
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
  
clone():*
[override] Returns clone of self
Menu
  
dispose():void
[override] Dispose method
Menu
 Inherited
getElementById(id:String):*
Searches CML childList by id.
TouchContainer
 Inherited
getElementsByClassName(className:String):Array
Searches the CML childList by className.
TouchContainer
 Inherited
getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class.
TouchContainer
  
init():void
[override] Initialisation method
Menu
 Inherited
loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number.
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
Creates gestureList object from XML
TouchContainer
 Inherited
parseCML(cml:XMLList):XMLList
Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
TouchContainer
 Inherited
querySelector(selector:String):*
Searches the CML childList by selector.
TouchContainer
 Inherited
querySelectorAll(selector:*):Array
Search the CML childList by selector.
TouchContainer
 Inherited
removeChild(child:DisplayObject):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildAt(index:int):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
[override] Removes children from display list and, if not already removed, the child list
TouchContainer
  
reset():void
Menu
 Inherited
saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number.
TouchContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainer
  
startTimer():void
if autohide on, adds the listener
Menu
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
  
updateLayout(containerWidth:Number, containerHeight:Number):void
sets the layout depending on the position
Menu
 Inherited
Updates child padding within this container
TouchContainer
 Inherited
Updates child percent dimensions within this container
TouchContainer
 Inherited
updateProperties(state:* = 0):void
Updates properties from state.
TouchContainer
 Inherited
Updates child relative positions within this container
TouchContainer
Property Detail
autohideproperty
autohide:Boolean


Implementation
    public function get autohide():Boolean
    public function set autohide(value:Boolean):void
autoHideproperty 
autoHide:Boolean

Specifies whether the menu automatically hides when not in use


Implementation
    public function get autoHide():Boolean
    public function set autoHide(value:Boolean):void
autoHideTimeproperty 
autoHideTime:Number

Specifies the auto-hide time


Implementation
    public function get autoHideTime():Number
    public function set autoHideTime(value:Number):void
buttonArrayproperty 
public var buttonArray:Array

positionproperty 
position:*[override]

Specifies the position alogorithm of the menu. This includes the position of the buttons with in the menu. The button must be a child of the menu.

The default value is bottom.


Implementation
    public function get position():*
    public function set position(value:any):void
sliderproperty 
public var slider:Slider

Constructor Detail
Menu()Constructor
public function Menu()

Constructor

Method Detail
clone()method
override public function clone():*

Returns clone of self

Returns
*
dispose()method 
override public function dispose():void

Dispose method

init()method 
override public function init():void

Initialisation method

reset()method 
public function reset():void

startTimer()method 
public function startTimer():void

if autohide on, adds the listener

updateLayout()method 
public function updateLayout(containerWidth:Number, containerHeight:Number):void

sets the layout depending on the position

Parameters

containerWidth:Number
 
containerHeight:Number