blob: 54591f201813ca577f9cdd78339a8c5f9a971c0f [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:comps="comps.*"
xmlns:local="*" close="closeAllChildWindow()">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@font-face {
src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
fontFamily: EmbeddedArial;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedArial;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedArial;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: EmbeddedVerdana;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedVerdana;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedVerdana;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: EmbeddedVerdanaHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedVerdanaHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedVerdanaHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
fontFamily: EmbeddedMeiryo;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedMeiryo;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
fontFamily: EmbeddedMeiryoHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedMeiryoHalo;
embedAsCFF: false;
}
s|WindowedApplication{
fontFamily: EmbeddedMeiryo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|Window{
fontFamily: EmbeddedMeiryo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|TitleBar{
fontFamily: EmbeddedMeiryo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|Button{
fontFamily: EmbeddedMeiryo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|Label{
fontFamily: EmbeddedMeiryo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
global{
fontFamily: EmbeddedMeiryo;
fontAntiAliasType: normal;
}
</fx:Style>
<fx:Script>
<![CDATA[
import spark.components.Window;
import flash.display.NativeWindow;
import mx.core.FlexGlobals;
import spark.components.windowClasses.TitleBar;
import comps.*;
import flash.system.Capabilities;
import spark.components.WindowedApplication;
import mx.events.FlexEvent;
public var childWindowList:Array=new Array();
public var windowObj:Window;
public function createAWindow():void
{
windowObj=new Window();
windowObj.x=200;
windowObj.minWidth=140;
windowObj.title="plain window 1";
windowObj.systemChrome="standard";
childWindowList.push(windowObj);
windowObj.addEventListener("creationComplete", handleNewWindowCreationComplete);
windowObj.open(true);
}
public function handleNewWindowCreationComplete(e:FlexEvent):void
{
e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
dispatchEvent(new FlexEvent("myWindowComplete"));
}
public function closeAllChildWindow():void
{
var win:Window;
while(childWindowList.length>0)
{
win=Window(childWindowList.pop());
if (win!=null && !win.closed)
win.close();
}
}
]]>
</fx:Script>
</s:WindowedApplication>