RADLib
RADical C++ application framework
RADUi::FrameScheduler Class Reference

Coalesces UI updates so expensive redraws occur at a target frame rate. More...

#include <RADUi.h>

Public Member Functions

 FrameScheduler (double framesPerSecond=60.0)
 Creates a scheduler capped at framesPerSecond. More...
 
 ~FrameScheduler ()
 Stops the scheduler worker. More...
 
 FrameScheduler (const FrameScheduler &)=delete
 Schedulers are owned by one bridge/model and are not copied. More...
 
FrameScheduleroperator= (const FrameScheduler &)=delete
 Schedulers are owned by one bridge/model and are not copied. More...
 
void requestUpdate (std::function< void()> task)
 Requests that task run on the UI thread at the next scheduled frame. More...
 

Detailed Description

Coalesces UI updates so expensive redraws occur at a target frame rate.

Constructor & Destructor Documentation

◆ FrameScheduler() [1/2]

RADUi::FrameScheduler::FrameScheduler ( double  framesPerSecond = 60.0)
explicit

Creates a scheduler capped at framesPerSecond.

◆ ~FrameScheduler()

RADUi::FrameScheduler::~FrameScheduler ( )

Stops the scheduler worker.

◆ FrameScheduler() [2/2]

RADUi::FrameScheduler::FrameScheduler ( const FrameScheduler )
delete

Schedulers are owned by one bridge/model and are not copied.

Member Function Documentation

◆ operator=()

FrameScheduler& RADUi::FrameScheduler::operator= ( const FrameScheduler )
delete

Schedulers are owned by one bridge/model and are not copied.

◆ requestUpdate()

void RADUi::FrameScheduler::requestUpdate ( std::function< void()>  task)

Requests that task run on the UI thread at the next scheduled frame.


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