Mercurial > projects > dynamin
diff dynamin/gui/notebook.d @ 55:c138461bf845
Add focusing and other changes that are related
like descendantAdded/Removed events, Window.activated event, and updating List.
Window.state was also added, even though focusing does not depend on it.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 08 Aug 2009 15:42:27 -0500 |
parents | ccc108b25a0a |
children | 6580fabb7dce |
line wrap: on
line diff
--- a/dynamin/gui/notebook.d Sat Aug 08 15:31:24 2009 -0500 +++ b/dynamin/gui/notebook.d Sat Aug 08 15:42:27 2009 -0500 @@ -68,7 +68,7 @@ */ class Notebook : Container { protected: - List!(TabPage) _tabPages; + List!(TabPage, true) _tabPages; int _selectedIndex = -1; bool _multipleLines = true; Control _content; @@ -91,7 +91,7 @@ } Theme.current.Tab_paint(selectedTabPage, this, e.graphics); } - void whenTabPagesChanged() { + void whenTabPagesChanged(TabPage page, int) { if(_tabPages.count == 0) selectedIndex = -1; else if(selectedIndex == -1) @@ -116,7 +116,7 @@ this() { selectionChanged.mainHandler = &whenSelectionChanged; - _tabPages = new List!(TabPage)(&whenTabPagesChanged); + _tabPages = new List!(TabPage, true)(&whenTabPagesChanged, &whenTabPagesChanged); _focusable = true; } override void layout() { @@ -143,7 +143,7 @@ * tabbedView.TabPages.Add(advancedPage); * ----- */ - List!(TabPage) tabPages() { return _tabPages; } + List!(TabPage, true) tabPages() { return _tabPages; } /** * Gets or sets the selected tab using its index. An index of -1 means * there is no selected tab.