class SmartWindowInkGameController extends ComputerInkGameController
{

	protected event OnInitialize()
	{
		super.OnInitialize();
	}

	protected override function GetOwner() : SmartWindow
	{
		return ( ( SmartWindow )( GetOwnerEntity() ) );
	}

	protected override function InitializeMainLayout()
	{
		if( !( TDBID.IsValid( m_layoutID ) ) )
		{
			m_layoutID = T"DevicesUIDefinitions.SmartWindowLayoutWidget";
		}
		super.InitializeMainLayout();
	}

	public override function Refresh( state : EDeviceStatus )
	{
		if( state == m_cashedState )
		{
			return;
		}
		super.Refresh( state );
	}

	protected override function TurnOn()
	{
		m_rootWidget.SetVisible( true );
		RequestActionWidgetsUpdate();
		ShowMails();
		ShowNewsfeed();
		ShowDevices();
	}

	protected override function TurnOff()
	{
		m_rootWidget.SetVisible( false );
		m_devicesMenuInitialized = false;
	}

	public override function GetMainLayoutController() : SmartWindowMainLayoutWidgetController
	{
		return ( ( SmartWindowMainLayoutWidgetController )( m_mainLayout.GetController() ) );
	}

	public override function UpdateMailsWidgets( widgetsData : array< SDocumentWidgetPackage > )
	{
		var i : Int32;
		for( i = 0; i < widgetsData.Size(); i += 1 )
		{
			widgetsData[ i ].placement = EWidgetPlacementType.FLOATING;
		}
		InitializeMails( widgetsData );
	}

	public override function UpdateFilesWidgets( widgetsData : array< SDocumentWidgetPackage > )
	{
		var i : Int32;
		for( i = 0; i < widgetsData.Size(); i += 1 )
		{
			widgetsData[ i ].placement = EWidgetPlacementType.FLOATING;
		}
		InitializeFiles( widgetsData );
	}

}

