using System; using System.Collections.Generic; using System.Text; using Orvid.Graphics; namespace OForms.Windows { /// /// The possible states of an OWindow. /// public enum OWindowState { /// /// The minimized state. /// Minimized, /// /// The maximized state. /// Maximized, /// /// The open state. /// Open, /// /// The active state. /// Active } /// /// This class describes a single window. /// public class OWindow : OControl { public override void Draw(Image img) { DrawWindowBorder(); for (int i = 0; i < Controls.Count; i++) { //Controls[i].Draw(); } } #warning TODO: Finish this method. private void DrawWindowBorder() { } protected LinkedList controls = new LinkedList(); /// /// The controls that this window contains. /// public LinkedList Controls { get { return controls; } } protected OWindowState windowState = OWindowState.Active; /// /// This is to determine if the window /// was maximized when it's state was changed. /// private bool maxWhenChanged = false; /// /// The state of the window. /// public OWindowState WindowState { get { return windowState; } set { if (windowState != OWindowState.Minimized) { if (windowState == OWindowState.Maximized) { maxWhenChanged = true; } else { maxWhenChanged = false; } windowState = value; } else { if (maxWhenChanged) { windowState = OWindowState.Maximized; } else { windowState = OWindowState.Active; } } } } } }