LibreOffice Module forms (master) 1
Public Member Functions | Private Attributes | List of all members
frm::WindowStateGuard Class Reference

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>

Collaboration diagram for frm::WindowStateGuard:
[legend]

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_Implm_pImpl
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ WindowStateGuard()

frm::WindowStateGuard::WindowStateGuard ( )

Definition at line 185 of file windowstateguard.cxx.

◆ ~WindowStateGuard()

frm::WindowStateGuard::~WindowStateGuard ( )

Definition at line 190 of file windowstateguard.cxx.

Member Function Documentation

◆ attach()

void frm::WindowStateGuard::attach ( const css::uno::Reference< css::awt::XWindow2 > &  _rxWindow,
const css::uno::Reference< css::awt::XControlModel > &  _rxModel 
)

Member Data Documentation

◆ m_pImpl

::rtl::Reference< WindowStateGuard_Impl > frm::WindowStateGuard::m_pImpl
private

Definition at line 54 of file windowstateguard.hxx.

Referenced by attach().


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