changeset 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 d82c7e5b037b
files dynamin/gui/check_box.d dynamin/gui/control.d
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dynamin/gui/check_box.d	Tue Aug 04 20:41:43 2009 -0500
+++ b/dynamin/gui/check_box.d	Tue Aug 04 20:59:38 2009 -0500
@@ -70,9 +70,11 @@
 		this();
 		this.text = text;
 	}
+	/// Gets or sets whether this check box is checked.
 	bool checked() {
 		return _checkState == CheckState.Checked;
 	}
+	/// ditto
 	void checked(bool b) {
 		_checkState = b ? CheckState.Checked : CheckState.Unchecked;
 		repaint();
--- 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)