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.window

An AbstractWindow is a top-level window. Concrete subclasses are Window and Dialog.

alias WindowPeer;
Alias for the native type for a top-level window or dialog (eg, HWND, Widget, GdkWidget).

AbstractWindow PeerToWindow(WindowPeer_ peer);
Get the AbstractWindow associated with the given peer. Return null if none.

void setWindowPeer(AbstractWindow w, WindowPeer_ peer);
Associate the given peer with the given AbstractWindow. The association must be broken when the peer is destroyed. The builtin MinWin AbstractWindow subclasses automatically break the association on the peer Destroy event.

class AbstractWindow: minwin.component.Component;
Base class for Windows and Dialogs.

WindowPeer_ peer;
Read/write property for peer.

MenuBar menubar;
Read/write property for the menu bar for this window.

bool quitOnDestroy;
Read/write property to indicate the application should request to quit when the window is destroyed.

void doCommand(int cmd);
Override of Component doCommand to call commandDelegates, if any.

MultiDelegate!(Component,GContext) paintDelegate;
Multi-delegate for paint processing.

MultiDelegate!(Component,GXContext) paintXDelegate;
Multi-delegate for extended-paint processing.

MultiDelegate!(Component,int) commandDelegate;
Multi-delegate for command processing.

MultiBoolDelegate!(Component) cancelCloseDelegate;
Multi-delegate for cancelling close requests.

MultiDelegate!(Component,KeyEvent *) keyDelegate;
Multi-delegate for key events.

MultiDelegate!(Component,MouseEvent *) mouseDelegate;
Multi-delegate for mouse events.

MultiDelegate!(Component,WindowEvent *) windowDelegate;
Multi-delegate for window events.

char[] title;
Read/write property for the window title.

GContext getGContext();
Return a graphics context GContext for this window.

Image getCompatibleImage(int width, int height);
Create an Image compatible with this window.

Image loadCompatibleImage(char[] imageKey, char[] fmt = "bmp");
Load a picture resource with the specified name and file format into an Image compatible with this window.

void close();
Close the window.

Color backgroundColor;
Read/write property for the window background color.

void toFront();
Raise this window's peer to the top of the stacking order.

class Window: minwin.window.AbstractWindow;
Top-level window class.

this(char[] title = "", char[] name = "");
Construct a top-level window with given title and name.

this(WindowPeer_ peer);
Construct a top-level window wrapping the given peer. The peer is stored as a FOREIGN_PEER so it will not be destroyed if the Window is destroyed. The peer must have the appropriate infrastructure in place to forward events and behaviors to the Window object.