# HG changeset patch # User Jordan Miner # Date 1249437578 18000 # Node ID d5823ccfddc6b0d256b072d87d6888440d937e31 # Parent a18c2fd9fe36b82166b1bf7300ca704611d77277 Add a couple doc comments. diff -r a18c2fd9fe36 -r d5823ccfddc6 dynamin/gui/check_box.d --- 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(); diff -r a18c2fd9fe36 -r d5823ccfddc6 dynamin/gui/control.d --- 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)