diff dynamin/gui/control.d @ 51:d5823ccfddc6

Add a couple doc comments.
author Jordan Miner <jminer7@gmail.com>
date Tue, 04 Aug 2009 20:59:38 -0500
parents a18c2fd9fe36
children 6e33b00595e9
line wrap: on
line diff
--- a/dynamin/gui/control.d	Tue Aug 04 20:41:43 2009 -0500
+++ b/dynamin/gui/control.d	Tue Aug 04 20:59:38 2009 -0500
@@ -378,8 +378,19 @@
 		return contains(Point(x, y));
 	}
 
+	/**
+	 * Returns true if this control is a top-level control and false otherwise.
+	 * Top-level controls do not have parents. Non-top-level controls can only
+	 * be shown on the screen by adding them as children to a top-level control.
+	 * Currently, the only top-level control is Window.
+	 */
 	bool topLevel() { return false; }
 	// TODO: return NativeControl/Window?
+	/**
+	 * Loops over this control's ancestors, and if a top-level control is found,
+	 * it is returned. If this control does not have a top-level ancestor,
+	 * null is returned.
+	 */
 	Control getTopLevel() {
 		Control c = this;
 		while(c.parent)