Mercurial > projects > dynamin
comparison dynamin/gui/window.d @ 63:84beb40c1665
Edit some comments.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 08 Aug 2009 20:35:48 -0500 |
parents | c138461bf845 |
children | 4c095424a9ab |
comparison
equal
deleted
inserted
replaced
62:60832e1eef04 | 63:84beb40c1665 |
---|---|
459 * An array of rectangles in screen coordinates that the window will be | 459 * An array of rectangles in screen coordinates that the window will be |
460 * snapped to. | 460 * snapped to. |
461 */ | 461 */ |
462 Rect[] snapRects = null; | 462 Rect[] snapRects = null; |
463 /** | 463 /** |
464 * Convenience method that sets SnapRects to an array | 464 * Convenience method that sets snapRects to an array |
465 * with just the specified Rect. | 465 * with just the specified Rect. |
466 */ | 466 */ |
467 void snapRect(Rect rect) { | 467 void snapRect(Rect rect) { |
468 snapRects = [rect]; | 468 snapRects = [rect]; |
469 } | 469 } |
470 | 470 |
471 /** | 471 /** |
472 * The SnapDistance specifies how close a window has to be to a | 472 * The snapDistance specifies how close a window has to be to a |
473 * snap rectangle for the window to snap to it. The default is 10 pixels. | 473 * snap rectangle for the window to snap to it. The default is 10 pixels. |
474 */ | 474 */ |
475 uint snapDistance = 10; | 475 uint snapDistance = 10; |
476 | 476 |
477 /** | 477 /** |
519 BorderSize borderSize() { | 519 BorderSize borderSize() { |
520 return _borderSize; | 520 return _borderSize; |
521 } | 521 } |
522 | 522 |
523 /** | 523 /** |
524 * Moves this window to the specified position relative to | 524 * Moves this window to the specified position relative to the specified |
525 * the specified control. If no control is specified, the | 525 * control. If no control is specified, the window is positioned relative |
526 * window is positioned relative to the screen. | 526 * to the screen. |
527 */ | 527 */ |
528 void position(Position pos, Control c = null) { | 528 void position(Position pos, Control c = null) { |
529 Rect rect; | 529 Rect rect; |
530 if(c && c.onScreen) { | 530 if(c && c.onScreen) { |
531 rect = c.screenLocation + c.size; | 531 rect = c.screenLocation + c.size; |