///////////////////////////////////////////////////////////////////////////////// // Copyright © 2008 W. Kowarschick // // Permission is granted to copy, distribute and/or modify this document // under the terms of the WK License, Version 1.0 (WKL 1.0) or any later version // published by Wolfgang Kowarschick. ///////////////////////////////////////////////////////////////////////////////// package model { import controller.Components; import flash.events.EventDispatcher; import flash.text.StyleSheet; [Bindable] public class ModelSite extends EventDispatcher { ///////////////////////////////////////////////////////////////////////////// // Private Members ///////////////////////////////////////////////////////////////////////////// private var v_url: ModelURL = Components.instance.modelURL; private var v_page_content: String; private var v_navigation_tree: XML; private function m_update_selected_item(): void { if (this.navigationTree != null && !(v_url.external)) this.selectedItem = this.navigationTree..node.(@url==v_url.url)[0]; } ///////////////////////////////////////////////////////////////////////////// // (Public) Attributes ///////////////////////////////////////////////////////////////////////////// public function get pageContent(): String { return v_page_content; } public function set pageContent(p_page_content: String): void { v_page_content = p_page_content; m_update_selected_item(); } public function get navigationTree(): XML { return v_navigation_tree; } public function set navigationTree(p_navigation_tree: XML): void { v_navigation_tree = p_navigation_tree; m_update_selected_item(); } public var selectedItem: XML; public var htmlCSSurl: String = ""; public var htmlStyleSheet: StyleSheet; ///////////////////////////////////////////////////////////////////////////// // End of Class ///////////////////////////////////////////////////////////////////////////// } }