Mercurial > projects > dynamin
changeset 56:c2566ab82535
Edit comments and fix a typo.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 08 Aug 2009 15:46:39 -0500 |
parents | c138461bf845 |
children | 1db4cb3abbb0 |
files | dynamin/core/event.d dynamin/core/list.d dynamin/gui/container.d dynamin/gui/control.d |
diffstat | 4 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/dynamin/core/event.d Sat Aug 08 15:42:27 2009 -0500 +++ b/dynamin/core/event.d Sat Aug 08 15:46:39 2009 -0500 @@ -69,6 +69,8 @@ /// void delegate(ArgsType e) public alias void delegate(ArgsType e) Dispatcher; + // TODO: could save memory by storing mainHandler in handlers? + // putting 15 events (24 bytes each) in every control takes memory // TODO: use a list-like struct? Handler[] handlers; ///
--- a/dynamin/core/list.d Sat Aug 08 15:42:27 2009 -0500 +++ b/dynamin/core/list.d Sat Aug 08 15:46:39 2009 -0500 @@ -108,7 +108,7 @@ } T pop() { if(_count < 1) - throw new Exception("List.Pop() - List is empty"); + throw new Exception("List.pop() - List is empty"); T item = _data[_count-1]; // must null out to allow to be collected static if(is(T == class) || is(T == interface)) @@ -121,7 +121,6 @@ void add(T item) { insert(item, _count); } - // TODO: AddRange? void remove(T item) { uint i = find(item); if(i == -1) @@ -145,7 +144,6 @@ static if(hasDelegates) whenAdded(item, index); } - // TODO: InsertRange? void clear() { for(; _count > 0; --_count) { static if(hasDelegates)
--- a/dynamin/gui/container.d Sat Aug 08 15:42:27 2009 -0500 +++ b/dynamin/gui/container.d Sat Aug 08 15:46:39 2009 -0500 @@ -365,9 +365,6 @@ assert(i == 2); } -// TODO: calling panel.children.add(button) will cause a crash -// because the button's parent is not set to the panel -// need to add a change handler on children? class Panel : Container { ControlList children() { return _children; } void add(Control child) { super.add(child); }; @@ -378,7 +375,5 @@ int opApply(int delegate(inout uint index, inout Control item) dg) { return super.opApply(dg); } -// override protected void whenPainting() { -// } }