LibreOffice Module slideshow (master) 1
|
Screen updater. More...
#include <screenupdater.hxx>
Classes | |
struct | ImplScreenUpdater |
class | UpdateLock |
Public Member Functions | |
ScreenUpdater (UnoViewContainer const &rViewContainer) | |
~ScreenUpdater () | |
ScreenUpdater (const ScreenUpdater &)=delete | |
ScreenUpdater & | operator= (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< UpdateLock > | createLock () |
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< ImplScreenUpdater > | mpImpl |
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.
|
explicit |
Definition at line 82 of file screenupdater.cxx.
slideshow::internal::ScreenUpdater::~ScreenUpdater | ( | ) |
Definition at line 87 of file screenupdater.cxx.
|
delete |
void slideshow::internal::ScreenUpdater::addViewUpdate | ( | ViewUpdateSharedPtr const & | rViewUpdate | ) |
Register ViewUpdate.
rViewUpdate | Add this ViewUpdate to the list that's asked for pending updates |
Definition at line 173 of file screenupdater.cxx.
References mpImpl.
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().
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.
void slideshow::internal::ScreenUpdater::lockUpdates | ( | ) |
Lock updates to prevent intermediate repaints.
Definition at line 195 of file screenupdater.cxx.
References mpImpl.
void slideshow::internal::ScreenUpdater::notifyUpdate | ( | ) |
Notify screen update.
This method records a screen content update request for all views.
Definition at line 92 of file screenupdater.cxx.
References mpImpl.
Referenced by slideshow::internal::PaintOverlayHandler::drawPolygons(), slideshow::internal::PaintOverlayHandler::handleMouseDragged(), slideshow::internal::CombTransition::operator()(), slideshow::internal::RehearseTimingsActivity::perform(), slideshow::internal::PaintOverlayHandler::repaintWithoutPolygons(), slideshow::internal::RehearseTimingsActivity::viewChanged(), and slideshow::internal::RehearseTimingsActivity::viewsChanged().
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.
rView | The view that needs an update |
bViewClobbered | When 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.
|
delete |
void slideshow::internal::ScreenUpdater::removeViewUpdate | ( | ViewUpdateSharedPtr const & | rViewUpdate | ) |
Unregister ViewUpdate.
rViewUpdate | Remove this ViewUpdate from the list that's asked for pending updates |
Definition at line 178 of file screenupdater.cxx.
References mpImpl.
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().
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.
|
private |
Definition at line 126 of file screenupdater.hxx.
Referenced by addViewUpdate(), commitUpdates(), lockUpdates(), notifyUpdate(), removeViewUpdate(), requestImmediateUpdate(), and unlockUpdates().