# HG changeset patch # User Jordan Miner # Date 1249764399 18000 # Node ID c2566ab82535a422588afefed48cafd13b199bc7 # Parent c138461bf84559216a409638219322289f773f7c Edit comments and fix a typo. diff -r c138461bf845 -r c2566ab82535 dynamin/core/event.d --- 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; /// diff -r c138461bf845 -r c2566ab82535 dynamin/core/list.d --- 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) diff -r c138461bf845 -r c2566ab82535 dynamin/gui/container.d --- 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() { -// } } diff -r c138461bf845 -r c2566ab82535 dynamin/gui/control.d --- a/dynamin/gui/control.d Sat Aug 08 15:42:27 2009 -0500 +++ b/dynamin/gui/control.d Sat Aug 08 15:46:39 2009 -0500 @@ -366,6 +366,7 @@ void focus() { if(!_focusable) return; + auto top = getTopLevel(); if(!top) return;