 import text.formats.IContainerFormat;
 import text.formats.IParagraphFormat;
 import text.importExport.TextFilter;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/BasicContainerFormatTextStyles.as"
+include "../styles/metadata/AdvancedContainerFormatTextStyles.as"
+include "../styles/metadata/BasicParagraphFormatTextStyles.as"
+include "../styles/metadata/AdvancedParagraphFormatTextStyles.as"
+include "../styles/metadata/BasicCharacterFormatTextStyles.as"
+include "../styles/metadata/AdvancedCharacterFormatTextStyles.as"
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
 
 [DefaultProperty("content")]
 


	//--------------------------------------------------------------------------
	//
	//  Properties: Text formatting
	//
	//--------------------------------------------------------------------------

	//----------------------------------
	//  blockProgression
	//----------------------------------

	/**
	 *  @private
	 */
	private var _blockProgression:String = "lr";

	/**
	 *  Documentation is not currently available.
	 */
	public function get blockProgression():String
	{
		return _blockProgression;
	}

	/**
	 *  @private
	 */
	public function set blockProgression(value:String):void
	{
		if (value != _blockProgression)
		{
			var oldValue:String = _blockProgression;
			_blockProgression = value;
			dispatchPropertyChangeEvent("blockProgression", oldValue, value);

			invalidateTextLines("style");
			invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  direction
	//----------------------------------

	/**
	 *  @private
	 */
	private var _direction:String = "ltr";

	/**
	 *  Documentation is not currently available.
	 */
	public function get direction():String
	{
		return _direction;
	}

	/**
	 *  @private
	 */
	public function set direction(value:String):void
	{
		if (value != _direction)
		{
			var oldValue:String = _direction;
			_direction = value;
			dispatchPropertyChangeEvent("direction", oldValue, value);

			invalidateTextLines("style");
            invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  lineBreak
	//----------------------------------

	/**
	 *  @private
	 */
	private var _lineBreak:String = "toFit";

	/**
	 *  Documentation is not currently available.
	 */
	public function get lineBreak():String
	{
		return _lineBreak;
	}

	/**
	 *  @private
	 */
	public function set lineBreak(value:String):void
	{
		if (value != _lineBreak)
		{
			var oldValue:String = _lineBreak;
			_lineBreak = value;
			dispatchPropertyChangeEvent("lineBreak", oldValue, value);

			invalidateTextLines("style");
            invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  lineThrough
	//----------------------------------

	/**
	 *  @private
	 */
	private var _lineThrough:Boolean = false;

	/**
	 *  Documentation is not currently available.
	 */
	public function get lineThrough():Boolean
	{
		return _lineThrough;
	}

	/**
	 *  @private
	 */
	public function set lineThrough(value:Boolean):void
	{
		if (value != _lineThrough)
		{
			var oldValue:Boolean = _lineThrough;
			_lineThrough = value;
			dispatchPropertyChangeEvent("lineThrough", oldValue, value);

			invalidateTextLines("style");
            invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  marginBottom
	//----------------------------------

	/**
	 *  @private
	 */
	private var _marginBottom:Number = 0;

	/**
	 *  Documentation is not currently available.
	 */
	public function get marginBottom():Number
	{
		return _marginBottom;
	}

	/**
	 *  @private
	 */
	public function set marginBottom(value:Number):void
	{
		if (value != _marginBottom)
		{
			var oldValue:Number = _marginBottom;
			_marginBottom = value;
			dispatchPropertyChangeEvent("marginBottom", oldValue, value);

			invalidateTextLines("style");
            invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  marginLeft
	//----------------------------------

	/**
	 *  @private
	 */
	private var _marginLeft:Number = 0;

	/**
	 *  Documentation is not currently available.
	 */
	public function get marginLeft():Number
	{
		return _marginLeft;
	}

	/**
	 *  @private
	 */
	public function set marginLeft(value:Number):void
	{
		if (value != _marginLeft)
		{
			var oldValue:Number = _marginLeft;
			_marginLeft = value;
			dispatchPropertyChangeEvent("marginLeft", oldValue, value);

			invalidateTextLines("style");
            invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  marginRight
	//----------------------------------

	/**
	 *  @private
	 */
	private var _marginRight:Number = 0;

	/**
	 *  Documentation is not currently available.
	 */
	public function get marginRight():Number
	{
		return _marginRight;
	}

	/**
	 *  @private
	 */
	public function set marginRight(value:Number):void
	{
		if (value != _marginRight)
		{
			var oldValue:Number = _marginRight;
			_marginRight = value;
			dispatchPropertyChangeEvent("marginRight", oldValue, value);

			invalidateTextLines("style");
            invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  marginTop
	//----------------------------------

	/**
	 *  @private
	 */
	private var _marginTop:Number = 0;

	/**
	 *  Documentation is not currently available.
	 */
	public function get marginTop():Number
	{
		return _marginTop;
	}

	/**
	 *  @private
	 */
	public function set marginTop(value:Number):void
	{
		if (value != _marginTop)
		{
			var oldValue:Number = _marginTop;
			_marginTop = value;
			dispatchPropertyChangeEvent("marginTop", oldValue, value);

			invalidateTextLines("style");
			invalidateSize();
			invalidateDisplayList();
		}
	}
	
	//----------------------------------
	//  textAlignLast
	//----------------------------------

	/**
	 *  @private
	 */
	private var _textAlignLast:String = "left";

	/**
	 *  Documentation is not currently available.
	 */
	public function get textAlignLast():String
	{
		return _textAlignLast;
	}

	/**
	 *  @private
	 */
	public function set textAlignLast(value:String):void
	{
		if (value != _textAlignLast)
		{
			var oldValue:String = _textAlignLast;
			_textAlignLast = value;
			dispatchPropertyChangeEvent("textAlignLast", oldValue, value);

			invalidateTextLines("style");
			invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  textDecoration
	//----------------------------------

	/**
	 *  @private
	 */
	private var _textDecoration:String = "none";

	/**
	 *  Documentation is not currently available.
	 */
	public function get textDecoration():String
	{
		return _textDecoration;
	}

	/**
	 *  @private
	 */
	public function set textDecoration(value:String):void
	{
		if (value != _textDecoration)
		{
			var oldValue:String = _textDecoration;
			_textDecoration = value;
			dispatchPropertyChangeEvent("textDecoration", oldValue, value);

			invalidateTextLines("style");
			invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  textIndent
	//----------------------------------

	/**
	 *  @private
	 */
	private var _textIndent:Number = 0;

	/**
	 *  Documentation is not currently available.
	 */
	public function get textIndent():Number
	{
		return _textIndent;
	}

	/**
	 *  @private
	 */
	public function set textIndent(value:Number):void
	{
		if (value != _textIndent)
		{
			var oldValue:Number = _textIndent;
			_textIndent = value;
			dispatchPropertyChangeEvent("textIndent", oldValue, value);

			invalidateTextLines("style");
			invalidateSize();
			invalidateDisplayList();
		}
	}

	//----------------------------------
	//  whiteSpaceCollapse
	//----------------------------------

	/**
	 *  @private
	 */
	private var _whiteSpaceCollapse:String = "preserve";

	/**
	 *  Documentation is not currently available.
	 */
	public function get whiteSpaceCollapse():String
	{
		return _whiteSpaceCollapse;
	}

	/**
	 *  @private
	 */
	public function set whiteSpaceCollapse(value:String):void
	{
		if (value != _whiteSpaceCollapse)
		{
			var oldValue:String = _whiteSpaceCollapse;
			_whiteSpaceCollapse = value;
			dispatchPropertyChangeEvent("whiteSpaceCollapse", oldValue, value);

			invalidateTextLines("style");
			invalidateSize();
			invalidateDisplayList();
		}
	}

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

        
        for each (p in TextUtil.ALL_FORMAT_NAMES)
        {
            if (!(p in textFlowTextFormat))
            {
            	var value:* = getStyle(p);
            	if (p == "tabStops" && value === undefined)
            		value = [];
            	textFlow[p] = value;
            }
         }
        
		return textFlow;
	}
