Component

A component.

Constructors

this
this()

Creates a new component.

this
this(float width, float height)

Creates a new component.

Members

Functions

clean
void clean()

Cleans the component for its native objects.

intersect
bool intersect(FloatVector p)

Checks whether the component intersects with a specific point.

refresh
void refresh(size_t width, size_t height)

Refreshes the component with a given width ahd height. This is usually the layer size which is usually the window size.

render
void render(ExternalWindow window)

Will render the component. Called during every frame render.

updateInternalPosition
void updateInternalPosition(FloatVector position)

Updates the internal position. Use this to avoid event handling.

updatePosition
void updatePosition()

Called when the position of the component updates.

updateSize
void updateSize()

Called when the size of the component updates.

Properties

height
ptrdiff_t height [@property getter]

Gets the height.

position
FloatVector position [@property getter]

Gets the position.

position
FloatVector position [@property setter]

Sets the position.

size
FloatVector size [@property getter]

Gets the size.

size
FloatVector size [@property setter]

Sets the size.

width
ptrdiff_t width [@property getter]

Gets the width.

x
ptrdiff_t x [@property getter]

Gets the x coordinate.

y
ptrdiff_t y [@property getter]

Gets the y coordinate.

Variables

globalKeyPress
void delegate(KeyboardKey key, ref bool stopEvent) globalKeyPress;

Handler for global key press events.

globalKeyRelease
void delegate(KeyboardKey key, ref bool stopEvent) globalKeyRelease;

Handler for global key release events.

globalMouseMove
void delegate(FloatVector position, ref bool stopEvent) globalMouseMove;

Handler for global mouse movement events.

globalMousePress
void delegate(MouseButton button, ref bool stopEvent) globalMousePress;

Handler for global mouse press events.

globalMouseRelease
void delegate(MouseButton button, ref bool stopEvent) globalMouseRelease;

Handler for global mouse release events.

keyPress
void delegate(KeyboardKey key, ref bool stopEvent) keyPress;

Handler for key press events.

keyRelease
void delegate(KeyboardKey key, ref bool stopEvent) keyRelease;

Handler for key release events.

mouseMove
void delegate(FloatVector position, ref bool stopEvent) mouseMove;

Handler for mouse movement events.

mousePress
void delegate(MouseButton button, ref bool stopEvent) mousePress;

Handler for mouse press events.

mouseRelease
void delegate(MouseButton button, ref bool stopEvent) mouseRelease;

Handler for mouse release events.

Meta