Contains changes from "gwen-dotnet" removing dependancies on Windows, which ultimately means certain features (e.g. file load/save dialogs) do not work. Those classes still exist, but the code has been commented out.
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System;
|
|
using Gwen.Control;
|
|
|
|
namespace Gwen.ControlInternal
|
|
{
|
|
/// <summary>
|
|
/// Modal control for windows.
|
|
/// </summary>
|
|
public class Modal : Base
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="Modal"/> class.
|
|
/// </summary>
|
|
/// <param name="parent">Parent control.</param>
|
|
public Modal(Base parent)
|
|
: base(parent)
|
|
{
|
|
KeyboardInputEnabled = true;
|
|
MouseInputEnabled = true;
|
|
ShouldDrawBackground = true;
|
|
SetBounds(0, 0, GetCanvas().Width, GetCanvas().Height);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Lays out the control's interior according to alignment, padding, dock etc.
|
|
/// </summary>
|
|
/// <param name="skin">Skin to use.</param>
|
|
protected override void Layout(Skin.Base skin)
|
|
{
|
|
SetBounds(0, 0, GetCanvas().Width, GetCanvas().Height);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Renders the control using specified skin.
|
|
/// </summary>
|
|
/// <param name="skin">Skin to use.</param>
|
|
protected override void Render(Skin.Base skin)
|
|
{
|
|
skin.DrawModalControl(this);
|
|
}
|
|
}
|
|
}
|