LibreOffice Module canvas (master)  1
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase > Class Template Reference

Helper template base class for XGraphicDevice implementations on windows. More...

#include <bufferedgraphicdevicebase.hxx>

Inheritance diagram for canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >:
[legend]
Collaboration diagram for canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >:
[legend]

Public Types

typedef GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase > BaseType
 
typedef Mutex MutexType
 
- Public Types inherited from canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >
typedef Base BaseType
 
typedef Mutex MutexType
 
typedef UnambiguousBase UnambiguousBaseType
 
typedef ::rtl::Reference< GraphicDeviceBaseReference
 

Public Member Functions

 BufferedGraphicDeviceBase ()
 
virtual css::uno::Reference< css::rendering::XBufferController > SAL_CALL getBufferController () override
 
virtual ::sal_Int32 SAL_CALL createBuffers (::sal_Int32 nBuffers) override
 
virtual void SAL_CALL destroyBuffers () override
 
virtual sal_Bool SAL_CALL showBuffer (sal_Bool bUpdateAll) override
 
virtual sal_Bool SAL_CALL switchBuffer (sal_Bool bUpdateAll) override
 
void setWindow (const css::uno::Reference< css::awt::XWindow2 > &rWindow)
 Set corresponding canvas window. More...
 
css::uno::Any getXWindow () const
 
virtual void disposeThis () override
 
css::awt::Rectangle transformBounds (const css::awt::Rectangle &rBounds)
 
void boundsChanged (const css::awt::WindowEvent &e)
 
virtual void disposeEventSource (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL windowResized (const css::awt::WindowEvent &e) override
 
virtual void SAL_CALL windowMoved (const css::awt::WindowEvent &e) override
 
virtual void SAL_CALL windowShown (const css::lang::EventObject &) override
 
virtual void SAL_CALL windowHidden (const css::lang::EventObject &) override
 
- Public Member Functions inherited from canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >
 GraphicDeviceBase ()
 
virtual css::uno::Reference< css::rendering::XColorSpace > SAL_CALL getDeviceColorSpace () override
 
virtual css::geometry::RealSize2D SAL_CALL getPhysicalResolution () override
 
virtual css::geometry::RealSize2D SAL_CALL getPhysicalSize () override
 
virtual css::uno::Reference< css::rendering::XLinePolyPolygon2D > SAL_CALL createCompatibleLinePolyPolygon (const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > > &points) override
 
virtual css::uno::Reference< css::rendering::XBezierPolyPolygon2D > SAL_CALL createCompatibleBezierPolyPolygon (const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > > &points) override
 
virtual css::uno::Reference< css::rendering::XBitmap > SAL_CALL createCompatibleBitmap (const css::geometry::IntegerSize2D &size) override
 
virtual css::uno::Reference< css::rendering::XVolatileBitmap > SAL_CALL createVolatileBitmap (const css::geometry::IntegerSize2D &size) override
 
virtual css::uno::Reference< css::rendering::XBitmap > SAL_CALL createCompatibleAlphaBitmap (const css::geometry::IntegerSize2D &size) override
 
virtual css::uno::Reference< css::rendering::XVolatileBitmap > SAL_CALL createVolatileAlphaBitmap (const css::geometry::IntegerSize2D &size) override
 
virtual css::uno::Reference< css::lang::XMultiServiceFactory > SAL_CALL getParametricPolyPolygonFactory () override
 
virtual sal_Bool SAL_CALL hasFullScreenMode () override
 
virtual sal_Bool SAL_CALL enterFullScreenMode (sal_Bool) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance (const OUString &aServiceSpecifier) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments (const OUString &aServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames () override
 
virtual void SAL_CALL update () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &aPropertyName, const css::uno::Any &aValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &aPropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &, const css::uno::Reference< css::beans::XPropertyChangeListener > &) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &, const css::uno::Reference< css::beans::XVetoableChangeListener > &) override
 
- Public Member Functions inherited from Base
 Base (uno_Environment *pEnv, cppu::Enterable *pEnterable)
 
void acquireWeak ()
 
void releaseWeak ()
 
void harden (uno_Environment **ppHardEnv)
 
void acquire ()
 
void release ()
 
void registerProxyInterface (void **ppProxy, uno_freeProxyFunc freeProxy, OUString const &oid, typelib_InterfaceTypeDescription *pTypeDescr)
 
void revokeInterface (void *pInterface)
 
void getObjectIdentifier (void *pInterface, OUString *pOid)
 
void getRegisteredInterface (void **, OUString const &oid, typelib_InterfaceTypeDescription *)
 
void getRegisteredInterfaces (void ***, sal_Int32 *pnLen, uno_memAlloc memAlloc)
 
void computeObjectIdentifier (void *pInterface, OUString *pOid)
 
void acquireInterface (void *pInterface)
 
void releaseInterface (void *pInterface)
 
virtual void v_enter () override
 
virtual void v_leave () override
 
virtual void v_callInto_v (uno_EnvCallee *pCallee, va_list *pParam) override
 
virtual void v_callOut_v (uno_EnvCallee *pCallee, va_list *pParam) override
 
virtual bool v_isValid (OUString *pReason) override
 
- Public Member Functions inherited from cppu::Enterable
virtual bool v_isValid (rtl::OUString *pReason)=0
 
virtual ~Enterable ()
 
 Enterable ()
 
void enter ()
 
void leave ()
 
void callInto_v (uno_EnvCallee *pCallee, va_list *pParam)
 
void callOut_v (uno_EnvCallee *pCallee, va_list *pParam)
 
void callInto (uno_EnvCallee *pCallee,...)
 
void callOut (uno_EnvCallee *pCallee,...)
 
int isValid (rtl::OUString *pReason)
 

Protected Attributes

css::uno::Reference< css::awt::XWindow2 > mxWindow
 
css::awt::Rectangle maBounds
 Current bounds of the owning Window. More...
 
bool mbIsVisible
 True, if the window this canvas is contained in, is visible. More...
 
- Protected Attributes inherited from canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >
DeviceHelper maDeviceHelper
 
PropertySetHelper maPropHelper
 
bool mbDumpScreenContent
 
- Protected Attributes inherited from Base
oslInterlockedCount m_nRef
 
uno_Environmentm_pEnv
 
std::unique_ptr< cppu::Enterablem_pEnterable
 
EnvFun_Pm_env_acquire
 
EnvFun_Pm_env_release
 
EnvFun_PP_Pm_env_harden
 
EnvFun_Pm_env_acquireWeak
 
EnvFun_Pm_env_releaseWeak
 
ExtEnv_registerProxyInterfacem_env_registerProxyInterface
 
ExtEnv_revokeInterfacem_env_revokeInterface
 
ExtEnv_getObjectIdentifierm_env_getObjectIdentifier
 
ExtEnv_getRegisteredInterfacem_env_getRegisteredInterface
 
ExtEnv_getRegisteredInterfacesm_env_getRegisteredInterfaces
 
ExtEnv_computeObjectIdentifierm_env_computeObjectIdentifier
 
ExtEnv_acquireInterfacem_env_acquireInterface
 
ExtEnv_releaseInterfacem_env_releaseInterface
 

Private Attributes

bool mbIsTopLevel
 True, if the window this canvas is contained in, is a toplevel window. More...
 

Additional Inherited Members

- Protected Member Functions inherited from canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >
 ~GraphicDeviceBase ()
 
css::uno::Any getDumpScreenContent () const
 
void setDumpScreenContent (const css::uno::Any &rAny)
 
- Protected Member Functions inherited from Base
virtual ~Base () override
 

Detailed Description

template<class Base, class DeviceHelper, class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
class canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >

Helper template base class for XGraphicDevice implementations on windows.

Use this base class if your target device is a window. Additionally to GraphicDeviceBase, this template provides an implementation of the awt::XWindowListener interface, to receive notifications about state changes of the associated window.

Template parameter:
Base Base class to use, most probably one of the WeakComponentImplHelperN templates with the appropriate interfaces. At least XGraphicDevice should be among them (why else would you use this template, then?). Base class must have an Base( const Mutex& ) constructor (like the WeakComponentImplHelperN templates have). As the very least, the base class must be derived from uno::XInterface, as some error reporting mechanisms rely on that.
Template parameter:
DeviceHelper Device helper implementation for the backend in question. This object will be held as a member of this template class, and basically gets forwarded all XGraphicDevice API calls that could not be handled generically.
Template parameter:
Mutex Lock strategy to use. Defaults to using the BaseMutex-provided lock. Every time one of the methods is entered, an object of type Mutex is created with m_aMutex as the sole parameter, and destroyed again when the method scope is left.
Template parameter:
UnambiguousBase Optional unambiguous base class for XInterface of Base. It's sometimes necessary to specify this parameter, e.g. if Base derives from multiple UNO interface (were each provides its own version of XInterface, making the conversion ambiguous)

Definition at line 76 of file bufferedgraphicdevicebase.hxx.

Member Typedef Documentation

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
typedef GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase > canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::BaseType

Definition at line 80 of file bufferedgraphicdevicebase.hxx.

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
typedef Mutex canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::MutexType

Definition at line 81 of file bufferedgraphicdevicebase.hxx.

Constructor & Destructor Documentation

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::BufferedGraphicDeviceBase ( )
inline

Member Function Documentation

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
void canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::boundsChanged ( const css::awt::WindowEvent &  e)
inline
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual ::sal_Int32 SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createBuffers ( ::sal_Int32  nBuffers)
inlineoverride

Definition at line 101 of file bufferedgraphicdevicebase.hxx.

References canvas::tools::verifyRange().

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::destroyBuffers ( )
inlineoverridevirtual

Definition at line 108 of file bufferedgraphicdevicebase.hxx.

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::disposeEventSource ( const css::lang::EventObject &  Source)
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::disposeThis ( )
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XBufferController > SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getBufferController ( )
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
css::uno::Any canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getXWindow ( ) const
inline
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
void canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::setWindow ( const css::uno::Reference< css::awt::XWindow2 > &  rWindow)
inline

Set corresponding canvas window.

Use this method to set the window this canvas displays on. Comes in handy when the canvas needs to adapt size or output position to the changing window.

Whenever the bounds of the window change, void notifySizeUpdate( const awt::Rectangle& rBounds ) is called, with rBounds the window bound rect relative to the frame window.

Definition at line 138 of file bufferedgraphicdevicebase.hxx.

References canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::maBounds, canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::mbIsTopLevel, canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::mbIsVisible, canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::mxWindow, and canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::transformBounds().

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual sal_Bool SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::showBuffer ( sal_Bool  bUpdateAll)
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual sal_Bool SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::switchBuffer ( sal_Bool  bUpdateAll)
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
css::awt::Rectangle canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::transformBounds ( const css::awt::Rectangle &  rBounds)
inline
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::windowHidden ( const css::lang::EventObject &  )
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::windowMoved ( const css::awt::WindowEvent &  e)
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::windowResized ( const css::awt::WindowEvent &  e)
inlineoverridevirtual
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::windowShown ( const css::lang::EventObject &  )
inlineoverridevirtual

Member Data Documentation

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
css::awt::Rectangle canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::maBounds
protected
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
bool canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::mbIsTopLevel
private
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
bool canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::mbIsVisible
protected
template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
css::uno::Reference< css::awt::XWindow2 > canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::mxWindow
protected

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