LibreOffice Module slideshow (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
slideshow::internal::ScreenUpdater Class Reference

Screen updater. More...

#include <screenupdater.hxx>

Classes

struct  ImplScreenUpdater
 
class  UpdateLock
 

Public Member Functions

 ScreenUpdater (UnoViewContainer const &rViewContainer)
 
 ~ScreenUpdater ()
 
 ScreenUpdater (const ScreenUpdater &)=delete
 
ScreenUpdateroperator= (const ScreenUpdater &)=delete
 
void notifyUpdate ()
 Notify screen update. More...
 
void notifyUpdate (const UnoViewSharedPtr &rView, bool bViewClobbered)
 Notify screen update. More...
 
void commitUpdates ()
 Commits collected update actions. More...
 
void addViewUpdate (ViewUpdateSharedPtr const &rViewUpdate)
 Register ViewUpdate. More...
 
void removeViewUpdate (ViewUpdateSharedPtr const &)
 Unregister ViewUpdate. More...
 
void requestImmediateUpdate ()
 A wart. More...
 
::std::shared_ptr< UpdateLockcreateLock ()
 Call this method to create a lock instead of calling lockUpdates() and unlockUpdates() directly. More...
 
void lockUpdates ()
 Lock updates to prevent intermediate repaints. More...
 
void unlockUpdates ()
 When called as often as lockUpdates() then commitUpdates() is called. More...
 

Private Attributes

std::unique_ptr< ImplScreenUpdatermpImpl
 

Detailed Description

Screen updater.

This class handles and synchronizes screen updates centrally. Therefore, it can hold a number of ViewUpdate objects, which are polled for pending updates on commitUpdates(). Furthermore, external code can request updates via notifyUpdate() calls. If neither such an update was requested, nor any of the registered ViewUpdate objects report any pending update, commitUpdates() does nothing.

Definition at line 42 of file screenupdater.hxx.

Constructor & Destructor Documentation

◆ ScreenUpdater() [1/2]

slideshow::internal::ScreenUpdater::ScreenUpdater ( UnoViewContainer const &  rViewContainer)
explicit

Definition at line 82 of file screenupdater.cxx.

◆ ~ScreenUpdater()

slideshow::internal::ScreenUpdater::~ScreenUpdater ( )

Definition at line 87 of file screenupdater.cxx.

◆ ScreenUpdater() [2/2]

slideshow::internal::ScreenUpdater::ScreenUpdater ( const ScreenUpdater )
delete

Member Function Documentation

◆ addViewUpdate()

void slideshow::internal::ScreenUpdater::addViewUpdate ( ViewUpdateSharedPtr const &  rViewUpdate)

Register ViewUpdate.

Parameters
rViewUpdateAdd this ViewUpdate to the list that's asked for pending updates

Definition at line 173 of file screenupdater.cxx.

References mpImpl.

◆ commitUpdates()

void slideshow::internal::ScreenUpdater::commitUpdates ( )

Commits collected update actions.

Definition at line 106 of file screenupdater.cxx.

References mpImpl, slideshow::internal::ViewUpdate::needsUpdate(), and slideshow::internal::ViewUpdate::update().

Referenced by unlockUpdates().

◆ createLock()

std::shared_ptr< ScreenUpdater::UpdateLock > slideshow::internal::ScreenUpdater::createLock ( )

Call this method to create a lock instead of calling lockUpdates() and unlockUpdates() directly.

Definition at line 212 of file screenupdater.cxx.

◆ lockUpdates()

void slideshow::internal::ScreenUpdater::lockUpdates ( )

Lock updates to prevent intermediate repaints.

Definition at line 195 of file screenupdater.cxx.

References mpImpl.

◆ notifyUpdate() [1/2]

void slideshow::internal::ScreenUpdater::notifyUpdate ( )

◆ notifyUpdate() [2/2]

void slideshow::internal::ScreenUpdater::notifyUpdate ( const UnoViewSharedPtr rView,
bool  bViewClobbered 
)

Notify screen update.

This method records a screen content update request for the given view.

Parameters
rViewThe view that needs an update
bViewClobberedWhen true, notifies update that view content is clobbered by external circumstances (e.g. by another application), and needs update even if the implementation 'thinks' it does not need to render something to screen.

Definition at line 97 of file screenupdater.cxx.

References mpImpl.

◆ operator=()

ScreenUpdater & slideshow::internal::ScreenUpdater::operator= ( const ScreenUpdater )
delete

◆ removeViewUpdate()

void slideshow::internal::ScreenUpdater::removeViewUpdate ( ViewUpdateSharedPtr const &  rViewUpdate)

Unregister ViewUpdate.

Parameters
rViewUpdateRemove this ViewUpdate from the list that's asked for pending updates

Definition at line 178 of file screenupdater.cxx.

References mpImpl.

◆ requestImmediateUpdate()

void slideshow::internal::ScreenUpdater::requestImmediateUpdate ( )

A wart.

Used to fire an immediate screen update. Currently needed for the wait symbol, since switching that on and off does get to commitUpdates()

Definition at line 183 of file screenupdater.cxx.

References mpImpl.

Referenced by slideshow::internal::PointerSymbol::setVisible(), slideshow::internal::SlideOverlayButton::setVisible(), and slideshow::internal::WaitSymbol::setVisible().

◆ unlockUpdates()

void slideshow::internal::ScreenUpdater::unlockUpdates ( )

When called as often as lockUpdates() then commitUpdates() is called.

Definition at line 201 of file screenupdater.cxx.

References commitUpdates(), and mpImpl.

Member Data Documentation

◆ mpImpl

std::unique_ptr<ImplScreenUpdater> slideshow::internal::ScreenUpdater::mpImpl
private

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