MinWin API Reference

minwin

app
button
canvas
combo
component
dialog
event
font
geometry
group
icon
image
label
layout
listbox
menu
multidg
paint
peer
peerimpl
scroll
text
window

minwin.multidg

A multi-delegate is similar to a C# multicast delegate. It has array copy semantics so assignment will copy the length and data pointer but modification could allocate a distinct copy. Delegates in a multi-delegate are fired in the order they were added.

A MultiBoolDelegate is a multi-delegates where each delegate returns a bool and the result of executing the MultiBoolDelegate is the or'ed value of all the bools.

To append to a multi-delegate use ~=

To remove a delegate from a multi-delegate use remove()

To fire all the delegates in order use opCall: multidg()

To test if the multi-delegate is empty use isEmpty()

struct MultiDelegate(T...);
Store multiple delegates with any number of arguments.

alias Callback;
Alias for delegate type.

Callback[] dgs;
Array of delegates making up this multi-delegate.

void opCall(T args);
Call each delegate.

void opCatAssign(Callback dg);
Add the given delegate.

void remove(Callback dg);
Remove the given delegate, if present.

bool isEmpty;
Read-only property returns true if no delegates are in this multi-delegate.

struct MultiBoolDelegate(T...);
Multi-delegate where the delegates return a bool result.

alias Callback;
Alias for delegate type.

Callback[] dgs;
Array of delegates making up this multi-delegate.

bool opCall(T args);
Call each delegate and return the logical-or of the results.

void opCatAssign(Callback dg);
Add the given delegate.

void remove(Callback dg);
Remove the given delegate, if present.

bool isEmpty;
Read-only property returns true if no delegates are in this multi-delegate.