LibreOffice Module sd (master) 1
|
This update lock for the ToolBarManager exists in order to avoid problems with tool bars being displayed while the mouse button is pressed. More...
#include <ViewShellImplementation.hxx>
Classes | |
class | Deleter |
Public Member Functions | |
void | Release (bool bForce=false) |
Release the lock. More... | |
DECL_DLLPRIVATE_LINK (TimeoutCallback, Timer *, void) | |
Static Public Member Functions | |
static std::shared_ptr< ToolBarManagerLock > | Create (const std::shared_ptr< ToolBarManager > &rpManager) |
Create a new instance. More... | |
Private Member Functions | |
ToolBarManagerLock (const std::shared_ptr< sd::ToolBarManager > &rpManager) | |
~ToolBarManagerLock () | |
Private Attributes | |
::std::unique_ptr< ToolBarManager::UpdateLock, o3tl::default_delete< ToolBarManager::UpdateLock > > | mpLock |
Timer | maTimer |
The timer is used both as a safe guard to unlock the update lock when Release() is not called explicitly. More... | |
std::shared_ptr< ToolBarManagerLock > | mpSelf |
The shared_ptr to this allows the ToolBarManagerLock to control its own lifetime. More... | |
Friends | |
class | Deleter |
This update lock for the ToolBarManager exists in order to avoid problems with tool bars being displayed while the mouse button is pressed.
With docked tool bars this can lead to a size change of the view. This would change the relative mouse coordinates and thus interpret every mouse click as move command.
Definition at line 57 of file ViewShellImplementation.hxx.
|
private |
Definition at line 337 of file ViewShellImplementation.cxx.
References LINK, maTimer, Timer::SetInvokeHandler(), Timer::SetTimeout(), and Timer::Start().
|
private |
Definition at line 373 of file ViewShellImplementation.cxx.
|
static |
Create a new instance.
This allows the mpSelf member to be set automatically.
Definition at line 327 of file ViewShellImplementation.cxx.
Referenced by sd::ViewShell::MouseButtonDown().
sd::ViewShell::Implementation::ToolBarManagerLock::DECL_DLLPRIVATE_LINK | ( | TimeoutCallback | , |
Timer * | , | ||
void | |||
) |
void sd::ViewShell::Implementation::ToolBarManagerLock::Release | ( | bool | bForce = false | ) |
Release the lock.
When the UI is captured (Application::IsUICaptured() returns <TRUE>) then the lock is released later asynchronously.
bForce | When this flag is <TRUE> then the lock is released even when IsUICaptured() returns <TRUE>. |
Definition at line 363 of file ViewShellImplementation.cxx.
References Application::IsUICaptured().
|
friend |
Definition at line 94 of file ViewShellImplementation.hxx.
|
private |
The timer is used both as a safe guard to unlock the update lock when Release() is not called explicitly.
It is also used to defer the release of the lock to a time when the UI is not captured.
Definition at line 84 of file ViewShellImplementation.hxx.
Referenced by ToolBarManagerLock().
|
private |
Definition at line 78 of file ViewShellImplementation.hxx.
|
private |
The shared_ptr to this allows the ToolBarManagerLock to control its own lifetime.
This, of course, does work only when no one holds another shared_ptr longer than only temporary.
Definition at line 89 of file ViewShellImplementation.hxx.