LibreOffice Module forms (master) 1
|
a helper class which monitors certain states of an XWindow2, and ensures that they're consistent with respective properties at an XModel. More...
#include <windowstateguard.hxx>
Public Member Functions | |
WindowStateGuard () | |
~WindowStateGuard () | |
void | attach (const css::uno::Reference< css::awt::XWindow2 > &_rxWindow, const css::uno::Reference< css::awt::XControlModel > &_rxModel) |
Private Attributes | |
::rtl::Reference< WindowStateGuard_Impl > | m_pImpl |
a helper class which monitors certain states of an XWindow2, and ensures that they're consistent with respective properties at an XModel.
For form controls, window states - such as "Enabled" - can be set by various means. You can set the respective control model property, you can directly manipulate the XWindow2, or the state can change implicitly due to VCL actions. In any case, we need to ensure that the state does not contradict the model property "too much".
As an example, consider a form control which, according to its model's property, is disabled. Now when the parent VCL window of the control's VCL window is enabled, then the control's window is enabled, too - which contradicts the model property.
A WindowStateGuard helps you preventing such inconsistent states.
The class is not threadsafe.
Definition at line 51 of file windowstateguard.hxx.
frm::WindowStateGuard::WindowStateGuard | ( | ) |
Definition at line 185 of file windowstateguard.cxx.
frm::WindowStateGuard::~WindowStateGuard | ( | ) |
Definition at line 190 of file windowstateguard.cxx.
void frm::WindowStateGuard::attach | ( | const css::uno::Reference< css::awt::XWindow2 > & | _rxWindow, |
const css::uno::Reference< css::awt::XControlModel > & | _rxModel | ||
) |
Definition at line 195 of file windowstateguard.cxx.
References m_pImpl.
Referenced by frm::OControl::disposing(), and frm::OControl::impl_resetStateGuard_nothrow().
|
private |
Definition at line 54 of file windowstateguard.hxx.
Referenced by attach().