<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2010 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//       
////////////////////////////////////////////////////////////////////////////////
package spark.components
{
import flash.display.StageOrientation;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.StageOrientationEvent;
import flash.ui.Keyboard;

import mx.core.FlexGlobals;
import mx.core.InteractionMode;
import mx.core.mx_internal;
import mx.events.SandboxMouseEvent;
import mx.managers.IFocusManagerComponent;

import spark.core.NavigationUnit;

use namespace mx_internal;

[DefaultProperty("items")]

//--------------------------------------
//  States
//--------------------------------------

/**
 *  Normal and landscape state.
 *  
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
[SkinState("normalAndLandscape")]

/**
 *  Closed and landscape state.
 *  
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
[SkinState("closedAndLandscape")]

/**
 *  Disabled and landscape state.
 *  
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
[SkinState("disabledAndLandscape")]

/**
 *  The ViewMenu container defines a menu in a View container.
 *  Each menu item is defined by using the ViewMenuItem control. 
 *  The application container automatically creates and displays a 
 *  ViewMenu container when the user presses the device's menu button. 
 *  You can also use the <code>ViewNavigatorApplicationBase.viewMenuOpen</code> property
 *  to open the menu programmatically.
 *
 *  <p>The following images shows a ViewMenu at the bottom of the screen 
 *  with five menu items:</p>
 *
 * <p>
 *  <img src="../../images/vm_open_menu_vm.png" alt="View menu" />
 * </p>
 *
 *  <p>The ViewMenuLayout class define the layout of the menu.
 *  Alternatively, you can create your own custom layout class.</p>
 *
 *  <p>Define the menu items by using the <code>View.viewMenuItems</code> property,
 *  as the following example shows:</p>
 *  
 *  <pre>
 *  &lt;s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
 *      xmlns:s="library://ns.adobe.com/flex/spark" 
 *      title="Home"&gt; 
 *
 *    ...
 *
 *    &lt;s:viewMenuItems&gt; 
 *        &lt;s:ViewMenuItem label="Add" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Cancel" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Delete" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Edit" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Search" click="itemClickInfo(event);"/&gt; 
 *    &lt;/s:viewMenuItems&gt;
 *
 *  &lt;/s:View&gt;
 *  </pre>
 *
 *  <p>Notice that you do not explicitly define the ViewMenu container in MXML. 
 *  The ViewMenu container is created automatically 
 *  to hold the ViewMenuItem controls.</p>
 *  
 *  @see spark.components.ViewMenuItem
 *  @see spark.layouts.ViewMenuLayout
 *  @see spark.components.supportClasses.ViewNavigatorApplicationBase
 *  @see spark.skins.mobile.ViewMenuSkin
 *
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */ 
public class ViewMenu extends SkinnablePopUpContainer
                      implements IFocusManagerComponent
{
    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

    /**
     *  Constructor. 
     *<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2010 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//       
////////////////////////////////////////////////////////////////////////////////
package spark.components
{
import flash.display.StageOrientation;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.StageOrientationEvent;
import flash.ui.Keyboard;

import mx.core.FlexGlobals;
import mx.core.InteractionMode;
import mx.core.mx_internal;
import mx.events.SandboxMouseEvent;
import mx.managers.IFocusManagerComponent;

import spark.core.NavigationUnit;

use namespace mx_internal;

[DefaultProperty("items")]

//--------------------------------------
//  States
//--------------------------------------

/**
 *  Normal and landscape state.
 *  
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
[SkinState("normalAndLandscape")]

/**
 *  Closed and landscape state.
 *  
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
[SkinState("closedAndLandscape")]

/**
 *  Disabled and landscape state.
 *  
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
[SkinState("disabledAndLandscape")]

/**
 *  The ViewMenu container defines a menu in a View container.
 *  Each menu item is defined by using the ViewMenuItem control. 
 *  The application container automatically creates and displays a 
 *  ViewMenu container when the user presses the device's menu button. 
 *  You can also use the <code>ViewNavigatorApplicationBase.viewMenuOpen</code> property
 *  to open the menu programmatically.
 *
 *  <p>The following image shows a ViewMenu at the bottom of the screen 
 *  with five menu items:</p>
 *
 * <p>
 *  <img src="../../images/vm_open_menu_vm.png" alt="View menu" />
 * </p>
 *
 *  <p>The ViewMenuLayout class define the layout of the menu.
 *  Alternatively, you can create your own custom layout class.</p>
 *
 *  <p>Define the menu items by using the <code>View.viewMenuItems</code> property,
 *  as the following example shows:</p>
 *  
 *  <pre>
 *  &lt;s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
 *      xmlns:s="library://ns.adobe.com/flex/spark" 
 *      title="Home"&gt; 
 *
 *    ...
 *
 *    &lt;s:viewMenuItems&gt; 
 *        &lt;s:ViewMenuItem label="Add" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Cancel" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Delete" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Edit" click="itemClickInfo(event);"/&gt; 
 *        &lt;s:ViewMenuItem label="Search" click="itemClickInfo(event);"/&gt; 
 *    &lt;/s:viewMenuItems&gt;
 *
 *  &lt;/s:View&gt;
 *  </pre>
 *
 *  <p>Notice that you do not explicitly define the ViewMenu container in MXML. 
 *  The ViewMenu container is created automatically 
 *  to hold the ViewMenuItem controls.</p>
 *  
 *  @see spark.components.ViewMenuItem
 *  @see spark.layouts.ViewMenuLayout
 *  @see spark.components.supportClasses.ViewNavigatorApplicationBase
 *  @see spark.skins.mobile.ViewMenuSkin
 *
 *  @includeExample examples/ViewMenuExampleHome.mxml -noswf
 *  @includeExample examples/ViewMenuExample.mxml -noswf
 *
 *  @langversion 3.0
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */ 
public class ViewMenu extends SkinnablePopUpContainer
                      implements IFocusManagerComponent
{
    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

    /**
     *  Constructor. 
     *
{'fraction_non_alphanumeric': 0.21038495971351837, 'fraction_numerical': 0.00818518992198491, 'mean_word_length': 2.2940185341196293, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3316796', 'n_tokens_mistral': 2355, 'n_tokens_neox': 2221, 'n_words': 573}