SND\AstrorEnales_cp e3be0183e0 - Fixed that a Dx10 effect can be used with multiple techniques
- Implemented DualTextureEffect 100% and added a Sample for it
- Finished the DualTexture.fx for Dx10 (others are coming soon)
- Some other preparations for built in shaders
2012-09-05 19:50:10 +00:00

160 lines
3.1 KiB
C#

using System;
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.Framework
{
public abstract class GameWindow
{
#region Private
private string title;
#endregion
#region Events
public event EventHandler<EventArgs> Activated;
public event EventHandler<EventArgs> ClientSizeChanged;
public event EventHandler<EventArgs> Deactivated;
public event EventHandler<EventArgs> OrientationChanged;
public event EventHandler<EventArgs> Paint;
public event EventHandler<EventArgs> ScreenDeviceNameChanged;
#endregion
#region Public
#region Title
public string Title
{
get
{
return this.title;
}
set
{
if (String.IsNullOrEmpty(value))
{
throw new ArgumentNullException();
}
if (value != this.title)
{
this.title = value;
SetTitle(value);
}
}
}
#endregion
public abstract bool AllowUserResizing
{
get;
set;
}
public abstract Rectangle ClientBounds
{
get;
}
public abstract string ScreenDeviceName
{
get;
}
public abstract DisplayOrientation CurrentOrientation
{
get;
}
public abstract IntPtr Handle
{
get;
}
public abstract bool IsMinimized
{
get;
}
#endregion
#region BeginScreenDeviceChange (abstract)
public abstract void BeginScreenDeviceChange(bool willBeFullScreen);
#endregion
#region EndScreenDeviceChange
public void EndScreenDeviceChange(string screenDeviceName)
{
EndScreenDeviceChange(screenDeviceName, ClientBounds.Width,
ClientBounds.Height);
}
#endregion
#region EndScreenDeviceChange (abstract)
public abstract void EndScreenDeviceChange(string screenDeviceName,
int clientWidth, int clientHeight);
#endregion
#region SetTitle (abstract)
protected abstract void SetTitle(string title);
#endregion
#region OnActivated
protected void OnActivated()
{
if (Activated != null)
{
Activated(this, EventArgs.Empty);
}
}
#endregion
#region OnDeactivated
protected void OnDeactivated()
{
if (Deactivated != null)
{
Deactivated(this, EventArgs.Empty);
}
}
#endregion
#region OnOrientationChanged
protected void OnOrientationChanged()
{
if (OrientationChanged != null)
{
OrientationChanged(this, EventArgs.Empty);
}
}
#endregion
#region OnPaint
protected void OnPaint()
{
if (Paint != null)
{
Paint(this, EventArgs.Empty);
}
}
#endregion
#region OnScreenDeviceNameChanged
protected void OnScreenDeviceNameChanged()
{
if (ScreenDeviceNameChanged != null)
{
ScreenDeviceNameChanged(this, EventArgs.Empty);
}
}
#endregion
#region OnClientSizeChanged
protected void OnClientSizeChanged()
{
if (ClientSizeChanged != null)
ClientSizeChanged(this, EventArgs.Empty);
}
#endregion
}
}