Show
Ignore:
Timestamp:
11/12/07 08:44:36 (2 years ago)
Author:
dan
Message:

ony: Root.children; Crop();
Document.load/.instantiate.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/iteration3/xinf/ony/Document.hx

    r729 r754  
    33 
    44import xinf.style.StyleSheet; 
     5import xinf.style.ElementStyle; 
    56 
    67interface Document implements Group { 
     
    1112    var height(default,set_height):Float; 
    1213 
    13     var styleSheet(default,null):StyleSheet
     14    var styleSheet(default,null):StyleSheet<ElementStyle>
    1415    function getElementById( id:String ) :Element; 
    1516    function getTypedElementById<T>( id:String, cl:Class<T> ) :T; 
     
    1718    function unmarshal( xml:Xml, ?parent:Group ) :Element; 
    1819 
    19         static function load( url:String ) :Document; 
     20        static function load( url:String, ?onLoad:Document->Void ) :Document; 
     21        static function instantiate( data:String, ?onLoad:Document->Void ) :Document; 
    2022} 
  • branches/iteration3/xinf/ony/Element.hx

    r729 r754  
    99import xinf.style.ElementStyle; 
    1010import xinf.style.Stylable; 
     11import xinf.style.Selector; 
    1112import xinf.xml.Serializable; 
    1213 
     
    3334 
    3435    /** the element's style **/ 
    35     var style(default,null):ElementStyle; 
     36    var style(default,default):ElementStyle; 
    3637 
    3738    function styleChanged() :Void; 
    3839        function getParentStyle() :xinf.style.Style; 
     40        function matchSelector( s:Selector ) :Bool; 
    3941 
    4042    /** read element data from xml */ 
    4143    function fromXml( xml:Xml ) :Void; 
     44         
     45        /** called when the document is completely loaded **/ 
     46        function onLoad() :Void; 
    4247 
    4348    /** convert the given point from global to local coordinates **/ 
  • branches/iteration3/xinf/ony/Root.hx

    r743 r754  
    77class Root { 
    88    private static var mRoot:Document; 
     9         
     10    public static var children(get_children,null) :Iterator<Element>; 
     11        static function get_children() :Iterator<Element> { 
     12                return cast mRoot.children; 
     13        } 
    914 
    1015        private static function getRoot() :Document {