mirror of https://github.com/buggins/dlangui.git
Add foreach support for TreeItem
Also, removed a few examples from the build list to save some pipeline time
This commit is contained in:
parent
9a3b140fb1
commit
14065d7621
|
@ -38,21 +38,9 @@ jobs:
|
|||
# In this mode, `mainSourceFile` is excluded and `version (unittest)` are included
|
||||
# See https://dub.pm/package-format-json.html#configurations
|
||||
dub test
|
||||
cd examples/bezier
|
||||
dub build -b=release
|
||||
cd ../dminer
|
||||
dub build -b=release
|
||||
cd ../dmledit
|
||||
dub build -b=release
|
||||
cd ../dragon
|
||||
dub build -b=release
|
||||
cd ../example1
|
||||
cd examples/example1
|
||||
dub build -b=release
|
||||
cd ../helloworld
|
||||
dub build -b=release
|
||||
cd ../ircclient
|
||||
dub build -b=release
|
||||
cd ../opengl
|
||||
dub build -b=release
|
||||
cd ../tetris
|
||||
dub build -b=release
|
|
@ -27,3 +27,4 @@ lib/res
|
|||
*.lst
|
||||
*.a
|
||||
dlangui-test-default
|
||||
.vscode
|
||||
|
|
|
@ -268,6 +268,10 @@ class TreeItem {
|
|||
return this;
|
||||
}
|
||||
|
||||
/// Support foreach
|
||||
int opApply(int delegate(ref TreeItem) callback) {
|
||||
return _children.opApply(callback);
|
||||
}
|
||||
|
||||
/// returns true if item has at least one child
|
||||
@property bool hasChildren() { return childCount > 0; }
|
||||
|
|
Loading…
Reference in New Issue