Mercurial > projects > dynamin
changeset 49:62742ce025ec
Add Control.tabIndex
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Tue, 04 Aug 2009 20:39:03 -0500 |
parents | 41b141453b8e |
children | a18c2fd9fe36 |
files | dynamin/gui/control.d |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dynamin/gui/control.d Tue Aug 04 20:31:15 2009 -0500 +++ b/dynamin/gui/control.d Tue Aug 04 20:39:03 2009 -0500 @@ -63,6 +63,7 @@ bool _visible; bool _focusable; bool _focused; + int _tabIndex; package Point _location; package Size _size; string _text; @@ -234,6 +235,7 @@ _text = ""; _focusable = false; _focused = false; + _tabIndex = 0; _visible = true; _cursor = Cursor.Arrow; _elasticX = false; @@ -282,6 +284,21 @@ } /** + * Gets or sets this control's tab index. The tab index of controls + * decides in what order they are focused when the tab key is pressed. + * If multiple controls in a window have the same tab index, focus is + * changed based on the order they were added to the window. + * The default is 0. + */ + int tabIndex() { + return _tabIndex; + } + /// ditto + void tabIndex(int i) { + _tabIndex = i; + } + + /** * */ void focus() {