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, ::osl::MutexGuard, css::uno::XInterface >
typedef Base BaseType
 
typedef ::osl::MutexGuard MutexType
 
typedef css::uno::XInterface 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, ::osl::MutexGuard, css::uno::XInterface >
 GraphicDeviceBase ()
 
virtual void disposeThis () override
 
virtual css::uno::Reference< css::rendering::XBufferController > SAL_CALL getBufferController () override
 
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
 

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, ::osl::MutexGuard, css::uno::XInterface >
DeviceHelper maDeviceHelper
 
PropertySetHelper maPropHelper
 
bool mbDumpScreenContent
 

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, ::osl::MutexGuard, css::uno::XInterface >
 ~GraphicDeviceBase ()
 
css::uno::Any getDumpScreenContent () const
 
void setDumpScreenContent (const css::uno::Any &rAny)
 

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: \n 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: \n 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: \n 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: \n 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 75 of file bufferedgraphicdevicebase.hxx.

Member Typedef Documentation

◆ BaseType

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 79 of file bufferedgraphicdevicebase.hxx.

◆ MutexType

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 80 of file bufferedgraphicdevicebase.hxx.

Constructor & Destructor Documentation

◆ BufferedGraphicDeviceBase()

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

◆ boundsChanged()

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

◆ createBuffers()

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 98 of file bufferedgraphicdevicebase.hxx.

References canvas::tools::verifyRange().

◆ destroyBuffers()

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 105 of file bufferedgraphicdevicebase.hxx.

◆ disposeEventSource()

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

◆ disposeThis()

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

◆ getBufferController()

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

◆ getXWindow()

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

◆ setWindow()

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 135 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().

◆ showBuffer()

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

◆ switchBuffer()

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

◆ transformBounds()

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

◆ windowHidden()

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

◆ windowMoved()

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

◆ windowResized()

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

◆ windowShown()

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

◆ maBounds

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

◆ mbIsTopLevel

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

◆ mbIsVisible

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

◆ mxWindow

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: