Ultralight  1.0.0
A fast, lightweight, HTML UI engine for native apps.
ultralight::App Class Referenceabstract

Main application class. More...

#include <App.h>

Inheritance diagram for ultralight::App:
ultralight::RefCounted

Public Member Functions

virtual void set_window (Ref< Window > window)=0
 Set the main window. More...
 
virtual RefPtr< Windowwindow ()=0
 Get the main window.
 
virtual void set_listener (AppListener *listener)=0
 Set an AppListener to receive callbacks for app-related events. More...
 
virtual AppListenerlistener ()=0
 Get the AppListener, if any.
 
virtual bool is_running () const =0
 Whether or not the App is running.
 
virtual Monitormain_monitor ()=0
 Get the main monitor (this is never NULL). More...
 
virtual Ref< Rendererrenderer ()=0
 Get the underlying Renderer instance.
 
virtual void Run ()=0
 Run the main loop. More...
 
virtual void Quit ()=0
 Quit the application.
 

Static Public Member Functions

static Ref< AppCreate ()
 Create the App singleton. More...
 
static Appinstance ()
 Get the App singleton.
 

Detailed Description

Main application class.

Definition at line 43 of file App.h.

Member Function Documentation

◆ Create()

static Ref<App> ultralight::App::Create ( )
static

Create the App singleton.

Note
You should only create one of these per application lifetime.
   App maintains its own Renderer instance, make sure to set your
   Config before creating App. (@see Platform::set_config)

◆ main_monitor()

virtual Monitor* ultralight::App::main_monitor ( )
pure virtual

Get the main monitor (this is never NULL).

Note
We'll add monitor enumeration later.

◆ Run()

virtual void ultralight::App::Run ( )
pure virtual

Run the main loop.

Note
Make sure to call set_window before calling this.

◆ set_listener()

virtual void ultralight::App::set_listener ( AppListener listener)
pure virtual

Set an AppListener to receive callbacks for app-related events.

Note
Ownership remains with the caller.

◆ set_window()

virtual void ultralight::App::set_window ( Ref< Window window)
pure virtual

Set the main window.

You must set this before calling Run.

Parameters
windowThe window to use for all rendering.
Note
We currently only support one Window per App, this will change later once we add support for multiple driver instances.

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