Loading...
Searching...
No Matches
WindowListener

#include <AppCore/Window.h>

Overview

Interface for all Window-related events.

See also
Window::set_listener

Public Member Functions

virtual ~WindowListener ()
 
virtual void OnClose (ultralight::Window *window)
 Called when the Window is closed.
 
virtual void OnResize (ultralight::Window *window, uint32_t width_px, uint32_t height_px)
 Called when the Window is resized.
 
virtual bool OnKeyEvent (const ultralight::KeyEvent &evt)
 Called when a keyboard event is fired.
 
virtual bool OnMouseEvent (const ultralight::MouseEvent &evt)
 Called when a mouse event is fired.
 
virtual bool OnScrollEvent (const ultralight::ScrollEvent &evt)
 Called when a scroll event is fired.
 

Constructor & Destructor Documentation

◆ ~WindowListener()

virtual ~WindowListener ( )
inlinevirtual

Member Function Documentation

◆ OnClose()

virtual void OnClose ( ultralight::Window * window)
inlinevirtual

Called when the Window is closed.

◆ OnKeyEvent()

virtual bool OnKeyEvent ( const ultralight::KeyEvent & evt)
inlinevirtual

Called when a keyboard event is fired.

Parameters
evtDetails for the event.
Returns
Return false to consume the event and prevent it from propagating further.

◆ OnMouseEvent()

virtual bool OnMouseEvent ( const ultralight::MouseEvent & evt)
inlinevirtual

Called when a mouse event is fired.

Parameters
evtDetails for the event.
Returns
Return false to consume the event and prevent it from propagating further.

◆ OnResize()

virtual void OnResize ( ultralight::Window * window,
uint32_t width_px,
uint32_t height_px )
inlinevirtual

Called when the Window is resized.

Parameters
widthThe new width (in pixels).
heightThe new height (in pixels).

◆ OnScrollEvent()

virtual bool OnScrollEvent ( const ultralight::ScrollEvent & evt)
inlinevirtual

Called when a scroll event is fired.

Parameters
evtDetails for the event.
Returns
Return false to consume the event and prevent it from propagating further.

The documentation for this class was generated from the following file: