OpenGlWidget

Nests an opengl capable window inside this window as a widget.

You may also just want to create an additional SimpleWindow with OpenGlOptions.yes yourself.

An OpenGL widget cannot have child widgets. It will throw if you try.

Constructors

this
this(Widget parent)

Members

Functions

addChild
void addChild(Widget, int)

OpenGL widgets cannot have child widgets. Do not call this.

registerMovement
void registerMovement()

When an opengl widget is laid out, it will adjust the glViewport for you automatically. Keep in mind that events like mouse coordinates are still relative to your size.

Inherited Members

From Widget

removeWidget
void removeWidget()
getByName
WidgetClass getByName(string name)
name
string name;
defaultEventHandlers
EventHandler[string] defaultEventHandlers;
setupDefaultEventHandlers
void setupDefaultEventHandlers()
defaultEventHandler_click
void defaultEventHandler_click(Event event)
defaultEventHandler_keydown
void defaultEventHandler_keydown(Event event)
defaultEventHandler_keyup
void defaultEventHandler_keyup(Event event)
defaultEventHandler_mousedown
void defaultEventHandler_mousedown(Event event)
defaultEventHandler_mouseover
void defaultEventHandler_mouseover(Event event)
defaultEventHandler_mouseout
void defaultEventHandler_mouseout(Event event)
defaultEventHandler_mouseup
void defaultEventHandler_mouseup(Event event)
defaultEventHandler_mousemove
void defaultEventHandler_mousemove(Event event)
defaultEventHandler_mouseenter
void defaultEventHandler_mouseenter(Event event)
defaultEventHandler_mouseleave
void defaultEventHandler_mouseleave(Event event)
defaultEventHandler_char
void defaultEventHandler_char(Event event)
defaultEventHandler_triggered
void defaultEventHandler_triggered(Event event)
defaultEventHandler_change
void defaultEventHandler_change(Event event)
defaultEventHandler_focus
void defaultEventHandler_focus(Event event)
defaultEventHandler_blur
void defaultEventHandler_blur(Event event)

Default event handlers. These are called on the appropriate event unless Event.preventDefault is called on the event at some point through the bubbling process.

addDirectEventListener
EventListener addDirectEventListener(string event, void delegate() handler, bool useCapture = false)

Events use a Javascript-esque scheme.

addDirectEventListener
EventListener addDirectEventListener(string event, void delegate(Event) handler, bool useCapture = false)
addEventListener
EventListener addEventListener(string event, void delegate() handler, bool useCapture = false)
addEventListener
EventListener addEventListener(string event, void delegate(Event) handler, bool useCapture = false)
addEventListener
EventListener addEventListener(string event, EventHandler handler, bool useCapture = false)
removeEventListener
void removeEventListener(string event, EventHandler handler, bool useCapture = false)
removeEventListener
void removeEventListener(EventListener listener)
globalCoordinates
Point globalCoordinates()
isFocused
bool isFocused()
show
void show()
hide
void hide()
focus
void focus()
paint
void paint(ScreenPainter painter)
erase
void erase(ScreenPainter painter)

I don't actually like the name of this this draws a background on it

backgroundColor
Color backgroundColor()
backgroundColor
void backgroundColor(Color c)
draw
ScreenPainter draw()
redraw
void redraw(string file = __FILE__, size_t line = __LINE__)

Meta

Suggestion Box / Bug Report