mirror of https://github.com/buggins/dlangui.git
Ability to foreach action in accelerator map.
This commit is contained in:
parent
1c3a759cf7
commit
ee28496955
|
@ -613,6 +613,18 @@ struct ActionMap {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int opApply(int delegate(ref Action) op) {
|
||||||
|
int result = 0;
|
||||||
|
foreach (ref Accelerator acc; _map.byKey) {
|
||||||
|
result = op(_map[acc]);
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List of Actions, for looking up Action by key
|
/// List of Actions, for looking up Action by key
|
||||||
|
|
Loading…
Reference in New Issue