Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::WindowListener Class Reference

#include <AppCore/Window.h>

Details

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 ultralight::WindowListener::~WindowListener ( )
inlinevirtual

Member Function Documentation

◆ OnClose()

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

Called when the Window is closed.

◆ OnKeyEvent()

virtual bool ultralight::WindowListener::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 ultralight::WindowListener::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 ultralight::WindowListener::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 ultralight::WindowListener::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: