Window

Basic window. All other windows are inherited from this class.

Constructors

this
this(Coordinate size, wstring title, string[] extraButtons)

Standard constructor. "size" sets both the initial position and the size of the window. Extra buttons are handled from the StyleSheet, currently unimplemented.

Members

Functions

addElement
void addElement(WindowElement we, int eventProperties)

Adds a new WindowElement with the given event properties.

addParent
void addParent(IWindowHandler wh)

Adds a WindowHandler to the window.

close
void close()

Closes the window by calling the WindowHandler's closeWindow function.

draw
void draw()

Draws the window. Intended to be used by the WindowHandler.

drawHeader
void drawHeader()
drawUpdate
void drawUpdate(WindowElement sender)

Updates the output of the elements.

dropFocus
void dropFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
extraButtonEvent
void extraButtonEvent(int num, ubyte button, int state)

Called if an extra button was pressed.

getAbsolutePosition
Coordinate getAbsolutePosition(WindowElement sender)
Undocumented in source. Be warned that the author may not have intended to support it.
getFocus
void getFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
getStyleSheet
StyleSheet getStyleSheet()

If the current window doesn't contain a custom StyleSheet, it gets from it's parent.

getTitle
wstring getTitle()
Undocumented in source. Be warned that the author may not have intended to support it.
move
void move(int x, int y)

Moves the window to the exact location.

passKeyboardEvent
void passKeyboardEvent(wchar c, int type, int x, int y)

Passes a keyboard event.

passMouseDragEvent
void passMouseDragEvent(int x, int y, int relX, int relY, ubyte button)

Passes a mouseDragEvent if the user clicked on an element, held down the button, and moved the mouse.

passMouseEvent
void passMouseEvent(int x, int y, int state, ubyte button)

Detects where the mouse is clicked, then it either passes to an element, or tests whether the close button, an extra button was clicked, also tests for the header, which creates a drag event for moving the window.

passMouseMotionEvent
void passMouseMotionEvent(int x, int y, int relX, int relY, ubyte button)

Passes a mouseMotionEvent if the user moved the mouse.

passScrollEvent
void passScrollEvent(int wX, int wY, int x, int y)

Passes the scroll event to the element where the mouse pointer currently stands.

relMove
void relMove(int x, int y)

Moves the window by the given values.

removeElement
void removeElement(WindowElement we)

Removes the WindowElement if 'we' is found within its ranges, does nothing otherwise.

setHeight
void setHeight(int y)

Sets the height of the window, also issues a redraw.

setSize
void setSize(int x, int y)

Sets the size of the window, also issues a redraw.

setTitle
void setTitle(wstring s)
Undocumented in source. Be warned that the author may not have intended to support it.
setWidth
void setWidth(int x)

Sets the width of the window, also issues a redraw.

Static variables

defaultStyle
StyleSheet defaultStyle;
Undocumented in source.
onDrawUpdate
void delegate() onDrawUpdate;
Undocumented in source.

Variables

customStyle
StyleSheet customStyle;
Undocumented in source.
draggedElement
WindowElement draggedElement;
Undocumented in source.
elements
WindowElement[] elements;
Undocumented in source.
extraButtons
string[] extraButtons;
Undocumented in source.
fullUpdate
bool fullUpdate;
Undocumented in source.
header
int header;
keyboardC
WindowElement[] keyboardC;
mouseC
WindowElement[] mouseC;
Undocumented in source.
moveX
int moveX;
moveY
int moveY;
Undocumented in source.
output
BitmapDrawer output;
Undocumented in source.
parent
IWindowHandler parent;
Undocumented in source.
position
Coordinate position;
scrollC
WindowElement[] scrollC;
Undocumented in source.
title
wstring title;
Undocumented in source.

Inherited Members

From ElementContainer

getAbsolutePosition
Coordinate getAbsolutePosition(WindowElement sender)
Undocumented in source.

Meta