76 lines
1.7 KiB
C#
76 lines
1.7 KiB
C#
using System.Windows.Forms;
|
|
using JD.Kernel.StaticHelpers;
|
|
using JD.Sequencers.Tools;
|
|
using JD.Sequencers.Windowlesses;
|
|
|
|
namespace JD.Sequencers.Controls
|
|
{
|
|
/// <summary>
|
|
/// Manages an ensemble of <see cref="WindowlessControl"/>s and the tools associated with them.
|
|
/// </summary>
|
|
public class WindowlessContainer : WindowlessControl
|
|
{
|
|
#region Variables
|
|
|
|
private readonly IPhysicalControl m_rootControl;
|
|
private readonly Selection m_selection = new Selection();
|
|
|
|
private readonly ToolManager m_toolManager;
|
|
|
|
private MouseEventArgs m_lastMouseDownEventArgs;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
public WindowlessContainer(IPhysicalControl owner)
|
|
{
|
|
Throw.IfNull(owner, "owner");
|
|
m_rootControl = owner;
|
|
|
|
m_toolManager = new ToolManager(this);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
/// <summary>
|
|
/// Overriden.
|
|
/// </summary>
|
|
public override sealed IPhysicalControl RootControl
|
|
{
|
|
get
|
|
{
|
|
return m_rootControl;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Selection.
|
|
/// </summary>
|
|
public Selection Selection
|
|
{
|
|
get
|
|
{
|
|
return m_selection;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Manages the tools for this container.
|
|
/// </summary>
|
|
public ToolManager ToolManager
|
|
{
|
|
get { return m_toolManager; }
|
|
}
|
|
|
|
public MouseEventArgs LastMouseDownEventArgs
|
|
{
|
|
get { return m_lastMouseDownEventArgs; }
|
|
internal set { m_lastMouseDownEventArgs = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|