1//////////////////////////////////////////////////////////////////////////////// 2// 3// ADOBE SYSTEMS INCORPORATED 4// Copyright 2005-2007 Adobe Systems Incorporated 5// All Rights Reserved. 6// 7// NOTICE: Adobe permits you to use, modify, and distribute this file 8// in accordance with the terms of the license agreement accompanying it. 9// 10//////////////////////////////////////////////////////////////////////////////// 11 12package mx.core 13{ 14 15import flash.accessibility.AccessibilityProperties; 16import flash.display.DisplayObject; 17import flash.display.DisplayObjectContainer; 18import flash.display.IBitmapDrawable; 19import flash.display.LoaderInfo; 20import flash.display.Stage; 21import flash.events.IEventDispatcher; 22import flash.geom.Rectangle; 23import flash.geom.Point; 24import flash.geom.Transform; 25 26/** 27 * The IFlexDisplayObject interface defines the interface for skin elements. 28 * At a minimum, a skin must be a DisplayObject and implement this interface. 29 */ 30public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher 31{ 32 33include "IDisplayObjectInterface.as" 34 35 //-------------------------------------------------------------------------- 36 // 37 // Properties 38 // 39 //-------------------------------------------------------------------------- 40 41 42 //---------------------------------- 43 // measuredHeight 44 //---------------------------------- 45 46 /** 47 * The measured height of this object. 48 * 49 * <p>This is typically hard-coded for graphical skins 50 * because this number is simply the number of pixels in the graphic. 51 * For code skins, it can also be hard-coded 52 * if you expect to be drawn at a certain size. 53 * If your size can change based on properties, you may want 54 * to also be an ILayoutManagerClient so a <code>measure()</code> 55 * method will be called at an appropriate time, 56 * giving you an opportunity to compute a <code>measuredHeight</code>.</p> 57 */ 58 function get measuredHeight():Number; 59 60 //---------------------------------- 61 // measuredWidth 62 //---------------------------------- 63 64 /** 65 * The measured width of this object. 66 * 67 * <p>This is typically hard-coded for graphical skins 68 * because this number is simply the number of pixels in the graphic. 69 * For code skins, it can also be hard-coded 70 * if you expect to be drawn at a certain size. 71 * If your size can change based on properties, you may want 72 * to also be an ILayoutManagerClient so a <code>measure()</code> 73 * method will be called at an appropriate time, 74 * giving you an opportunity to compute a <code>measuredHeight</code>.</p> 75 */ 76 function get measuredWidth():Number; 77 78 79 //-------------------------------------------------------------------------- 80 // 81 // Methods 82 // 83 //-------------------------------------------------------------------------- 84 85 /** 86 * Moves this object to the specified x and y coordinates. 87 * 88 * @param x The new x-position for this object. 89 * 90 * @param y The new y-position for this object. 91 */ 92 function move(x:Number, y:Number):void; 93 94 /** 95 * Sets the actual size of this object. 96 * 97 * <p>This method is mainly for use in implementing the 98 * <code>updateDisplayList()</code> method, which is where 99 * you compute this object's actual size based on 100 * its explicit size, parent-relative (percent) size, 101 * and measured size. 102 * You then apply this actual size to the object 103 * by calling <code>setActualSize()</code>.</p> 104 * 105 * <p>In other situations, you should be setting properties 106 * such as <code>width</code>, <code>height</code>, 107 * <code>percentWidth</code>, or <code>percentHeight</code> 108 * rather than calling this method.</p> 109 * 110 * @param newWidth The new width for this object. 111 * 112 * @param newHeight The new height for this object. 113 */ 114 function setActualSize(newWidth:Number, newHeight:Number):void; 115} 116 117} 118