/*
*
*  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.
*
*/

@namespace "library://ns.apache.org/royale/spark";

.royale *, . royale *:before, . royale *:after {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

global {
    IStatesImpl:            ClassReference("org.apache.royale.core.StatesWithTransitionsImpl");
	IEffectTimer: 			ClassReference("org.apache.royale.utils.EffectTimer");
}

/* -------------------------------------------------------
 * Common Platform Styles
 * -------------------------------------------------------
 */


Button
{
    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ImageAndTextModel");
}
CheckBox
{
	IBeadModel: ClassReference("org.apache.royale.html.beads.models.ToggleButtonModel");
}
ComboBox
{
	IBeadModel: ClassReference("org.apache.royale.html.beads.models.ComboBoxModel");
	IBeadView: ClassReference("org.apache.royale.html.beads.ComboBoxView");
	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.ComboBoxController");
	IPopUp: ClassReference("org.apache.royale.html.supportClasses.ComboBoxList");
}

GroupBase
{
	IBeadLayout: ClassReference("spark.layouts.supportClasses.SparkLayoutBead");
	IBeadView: ClassReference("spark.components.beads.GroupView");
}

Image
{
	IBeadModel: ClassReference("org.apache.royale.html.beads.models.ImageModel");
	IBeadView:  ClassReference("org.apache.royale.html.beads.ImageView");
}


DataGroup
{
	IDataProviderItemRendererMapper: ClassReference("mx.controls.listClasses.VirtualDataItemRendererFactoryForIListData");
	IBeadModel: ClassReference("mx.controls.beads.models.SingleSelectionIListModel");
	IBeadView:  ClassReference("org.apache.royale.html.beads.VirtualDataContainerView");			
	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.ListSingleSelectionMouseController");
	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.VirtualListVerticalLayout");
	IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory");
	IItemRenderer: ClassReference("mx.controls.listClasses.ListItemRenderer");
	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
}

NonVirtualHDataGroup
{
	IDataProviderItemRendererMapper: ClassReference("mx.controls.listClasses.DataItemRendererFactoryForIListData");
	IBeadModel: ClassReference("mx.controls.beads.models.SingleSelectionIListModel");
	IBeadView:  ClassReference("org.apache.royale.html.beads.DataContainerView");			
	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.ListSingleSelectionMouseController");
	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalLayout");
	IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory");
	IItemRenderer: ClassReference("mx.controls.listClasses.ListItemRenderer");
	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
}

NonVirtualVDataGroup
{
	IDataProviderItemRendererMapper: ClassReference("mx.controls.listClasses.DataItemRendererFactoryForIListData");
	IBeadModel: ClassReference("mx.controls.beads.models.SingleSelectionIListModel");
	IBeadView:  ClassReference("org.apache.royale.html.beads.DataContainerView");			
	IBeadController: ClassReference("org.apache.royale.html.beads.controllers.ListSingleSelectionMouseController");
	IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.VerticalLayout");
	IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory");
	IItemRenderer: ClassReference("mx.controls.listClasses.ListItemRenderer");
	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
}

DropDownList
{
	IBeadModel: ClassReference("mx.controls.beads.models.SingleSelectionICollectionViewModel");
	IBeadView: ClassReference("spark.components.beads.DropDownListView");
	IBeadController: ClassReference("spark.components.beads.controllers.DropDownListController");
}

.DropDownDataGroup
{
	background-color: #FFFFFF;
}

List
{
	IBeadView: ClassReference("spark.components.beads.SkinnableContainerView");
	IBeadLayout: ClassReference("spark.layouts.supportClasses.SparkLayoutBead");
	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
	IContentView: ClassReference("spark.components.DataGroup");
}

NumericStepper
{
	IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel");
	IBeadView: ClassReference("org.apache.royale.html.beads.NumericStepperView");
}
Panel
{
	IBeadModel: ClassReference("mx.containers.beads.models.PanelModel");
	IBeadView: ClassReference("spark.components.beads.PanelView");
	IPanelContentArea: ClassReference("spark.components.Group");	
	
	background-color: #FFFFFF;
	border: 1px solid #333333
}

Panel .TitleBar
{
	border-bottom: 1px solid #333333;
}

.PanelContent
{
	background-color: #FFFFFF;
}

Scroller
{
	IBeadView: ClassReference("org.apache.royale.html.beads.GroupView");
}

SkinnableContainer
{
	IBeadView: ClassReference("spark.components.beads.SkinnableContainerView");
	IBeadLayout: ClassReference("spark.layouts.supportClasses.SparkLayoutBead");
	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
	IContentView: ClassReference("spark.components.Group");
}

TabBar
{
	IBeadView: ClassReference("spark.components.beads.SkinnableContainerView");
	IBeadLayout: ClassReference("spark.layouts.supportClasses.SparkLayoutBead");
	IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
	IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
	IContentView: ClassReference("spark.components.NonVirtualHDataGroup");
}

TextArea
{
	border-style: solid;
	border-color: #000000;
	border-width: 1px;
	background-color: #FFFFFF;
}

/* -------------------------------------------------------
* SWF specific styles
* -------------------------------------------------------
*/

@media -royale-swf
{
	/* Global style declaration for Flash only.  This will effectively be the same
	   as the browser defaults */
	
	Button
	{
		IBeadView: ClassReference("mx.controls.beads.CSSImageAndTextButtonView");
	}
	CheckBox
	{
		IBeadView:  ClassReference("mx.controls.beads.CheckBoxView");			
	}
	
    SkinnableContainer
    {
	    IBackgroundBead: ClassReference("org.apache.royale.html.beads.SolidBackgroundBead");
	    IBorderBead: ClassReference("org.apache.royale.html.beads.SingleLineBorderBead");
	    IContentView: ClassReference("org.apache.royale.html.supportClasses.ContainerContentArea");
    }

	Label
	{
		IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel");
		IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView");
		iMeasurementBead: ClassReference("org.apache.royale.html.beads.TextFieldLabelMeasurementBead");
	}
	
	List
	{
		iBackgroundBead: ClassReference("org.apache.royale.html.beads.SolidBackgroundBead");
		iBorderBead: ClassReference('org.apache.royale.html.beads.SingleLineBorderBead');
		iBorderModel: ClassReference('org.apache.royale.html.beads.models.SingleLineBorderModel');
		IContentView: ClassReference("org.apache.royale.html.supportClasses.DataGroup");
		font-size: 11px;
		font-family: Arial;
	}
		
	Panel
	{
		IContentView: ClassReference("org.apache.royale.html.supportClasses.ContainerContentArea");
		IBorderBead: ClassReference("org.apache.royale.html.beads.SingleLineBorderBead");
		IBackgroundBead: ClassReference("org.apache.royale.html.beads.SolidBackgroundBead");    
	}
	
	RadioButton
	{
		IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel");
		IBeadView:  ClassReference("mx.controls.beads.RadioButtonView");			
	}
	
	TextArea
	{
		IBeadModel: ClassReference("org.apache.royale.html.beads.models.NonNullTextModel");
		IBeadView: ClassReference("org.apache.royale.html.beads.TextAreaView");
		IBeadController: ClassReference("org.apache.royale.html.beads.controllers.EditableTextKeyboardController");
		IBorderBead: ClassReference('org.apache.royale.html.beads.SingleLineBorderBead');
		IBorderModel: ClassReference('org.apache.royale.html.beads.models.SingleLineBorderModel');
		IBackgroundBead: ClassReference('org.apache.royale.html.beads.SolidBackgroundBead');
		border-style: solid;
		border-color: #000000;
		border-width: 1px;
		background-color: #FFFFFF;
		font-size: 11px;
		font-family: Arial;
	}
	
	TextInput
	{
		IBeadModel: ClassReference("org.apache.royale.html.beads.models.NonNullTextModel");
		IBeadView: ClassReference("org.apache.royale.html.beads.TextInputWithBorderView");
		IBeadController: ClassReference("org.apache.royale.html.beads.controllers.EditableTextKeyboardController");
		IBorderBead: ClassReference('org.apache.royale.html.beads.SingleLineBorderBead');
		IBackgroundBead: ClassReference('org.apache.royale.html.beads.SolidBackgroundBead');
		border-style: solid;
		border-color: #000000;
		border-width: 1px;
		background-color: #FFFFFF;
		font-size: 11px;
		font-family: Arial;
	}
}
