<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2008 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.supportClasses
{

import spark.components.supportClasses.GroupBase;
import mx.core.ILayoutElement;
import spark.layout.supportClasses.LayoutBase;

/**
 *  The ButtonBarHorizontalLayout is a layout specifically designed for the
 *  Spark ButtonBar skins.
 *
 *  The layout lays out the children horizontally, left to right.
 *  
 *  The layout measures such that all children are sized at their preferred size.
 * 
 *  If there is enough space, each child is set to its preferred size, plus any
 *  excess space evenly distributed between the children.
 * 
 *  If there is not enough space for all the children to be sized to their
 *  preferred size, then the children that are smaller than the average width
 *  will be allocated their preferred size and the rest of the elements will be
 *  reduced equally.
 * 
 *  All children are set to the height of the parent.
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class ButtonBarHorizontalLayout extends LayoutBase
{
    include "../../core/Version.as";

    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

    /**
     *  Constructor.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    public function ButtonBarHorizontalLayout():void
    {
        super();
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  gap
    //----------------------------------

    private var _gap:int = 0;

    [Inspectable(category="General")]

    /**
     *  The horizontal space between layout elements.
     * 
     *  Note that the gap is only applied between layout elements, so if there's
     *  just one element, the gap has no effect on the layout.
     * 
     *  @default 0
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */    
    public function get gap():int
    {
        return _gap;
    }

    /**
     *  @private
     */
    public function set gap(value:int):void
    {
        if (_gap == value) 
            return;
    
        _gap = value;
        invalidateTargetSizeAndDisplayList();
    }
<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2008 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.supportClasses
{

import spark.components.supportClasses.GroupBase;
import mx.core.ILayoutElement;
import spark.layout.supportClasses.LayoutBase;

/**
 *  The ButtonBarHorizontalLayout is a layout specifically designed for the
 *  Spark ButtonBar skins.
 *
 *  The layout lays out the children horizontally, left to right.
 *  
 *  The layout measures such that all children are sized at their preferred size.
 * 
 *  If there is enough space, each child is set to its preferred size, plus any
 *  excess space evenly distributed between the children.
 * 
 *  If there is not enough space for all the children to be sized to their
 *  preferred size, then the children that are smaller than the average width
 *  will be allocated their preferred size and the rest of the elements will be
 *  reduced equally.
 * 
 *  All children are set to the height of the parent.
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class ButtonBarHorizontalLayout extends LayoutBase
{
    include "../../core/Version.as";

    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

    /**
     *  Constructor.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    public function ButtonBarHorizontalLayout():void
    {
        super();
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  gap
    //----------------------------------

    private var _gap:int = 0;

    [Inspectable(category="General")]

    /**
     *  The horizontal space between layout elements.
     * 
     *  Note that the gap is only applied between layout elements, so if there's
     *  just one element, the gap has no effect on the layout.
     * 
     *  @default 0
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */    
    public function get gap():int
    {
        return _gap;
    }

    /**
     *  @private
     */
    public function set gap(value:int):void
    {
        if (_gap == value) 
            return;
    
        _gap = value;

        var g:GroupBase = target;
        if (g)
        {
            g.invalidateSize();
            g.invalidateDisplayList();
        }
    }

{'fraction_non_alphanumeric': 0.24019448946515398, 'fraction_numerical': 0.008752025931928687, 'mean_word_length': 1.3043315907393578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '7396244', 'n_tokens_mistral': 1560, 'n_tokens_neox': 1439, 'n_words': 523}