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

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

#include <graphicdevicebase.hxx>

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

Public Types

typedef Base BaseType
 
typedef Mutex MutexType
 
typedef UnambiguousBase UnambiguousBaseType
 
typedef ::rtl::Reference< GraphicDeviceBaseReference
 

Public Member Functions

 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 Member Functions

 ~GraphicDeviceBase ()
 
css::uno::Any getDumpScreenContent () const
 
void setDumpScreenContent (const css::uno::Any &rAny)
 

Protected Attributes

DeviceHelper maDeviceHelper
 
PropertySetHelper maPropHelper
 
bool mbDumpScreenContent
 

Private Member Functions

 GraphicDeviceBase (const GraphicDeviceBase &)=delete
 
GraphicDeviceBaseoperator= (const GraphicDeviceBase &)=delete
 

Detailed Description

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

Helper template base class for XGraphicDevice implementations.

This base class provides partial implementations of the XGraphicDevice-related interface, such as XColorSpace.

This template basically interposes itself between the full interface you implement (i.e. not restricted to XGraphicDevice etc.). The problem with UNO partial interface implementation actually is, that you cannot do it the plain way, since deriving from a common base subclass always introduces the whole set of pure virtuals, that your baseclass helper just overridden) and your implementation class. You then only have to implement the functionality besides XGraphicDevice. If you want to support the optional debug XUpdatable interface, also add that to the base classes (client code will call the corresponding update() method, whenever a burst of animations is over).

Example:
typedef ::cppu::WeakComponentImplHelper < css::rendering::XGraphicDevice,
                                          css::rendering::XColorSpace,
                                          css::rendering::XPropertySet,
                                          css::lang::XServiceInfo,
                                          css::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::canvas::internal::GraphicDeviceBase< GraphicDeviceBase, DeviceHelper > ExampleDevice_Base;

class ExampleDevice : public ExampleDevice_Base
{
};
Template parameter: \n Base
Base class to use, most probably the WeakComponentImplHelper template 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 WeakComponentImplHelper template has). 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 DisambiguationHelper-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 107 of file graphicdevicebase.hxx.

Member Typedef Documentation

◆ BaseType

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

Definition at line 111 of file graphicdevicebase.hxx.

◆ MutexType

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

Definition at line 112 of file graphicdevicebase.hxx.

◆ Reference

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

Definition at line 115 of file graphicdevicebase.hxx.

◆ UnambiguousBaseType

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

Definition at line 113 of file graphicdevicebase.hxx.

Constructor & Destructor Documentation

◆ GraphicDeviceBase() [1/2]

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

◆ ~GraphicDeviceBase()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::~GraphicDeviceBase ( )
inlineprotected

Definition at line 324 of file graphicdevicebase.hxx.

◆ GraphicDeviceBase() [2/2]

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::GraphicDeviceBase ( const GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase > &  )
privatedelete

Member Function Documentation

◆ addPropertyChangeListener()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::addPropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
inlineoverridevirtual

◆ addVetoableChangeListener()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::addVetoableChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  xListener 
)
inlineoverridevirtual

◆ createCompatibleAlphaBitmap()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XBitmap > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleAlphaBitmap ( const css::geometry::IntegerSize2D &  size)
inlineoverridevirtual

◆ createCompatibleBezierPolyPolygon()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XBezierPolyPolygon2D > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleBezierPolyPolygon ( const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > > &  points)
inlineoverridevirtual

◆ createCompatibleBitmap()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XBitmap > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleBitmap ( const css::geometry::IntegerSize2D &  size)
inlineoverridevirtual

◆ createCompatibleLinePolyPolygon()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XLinePolyPolygon2D > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleLinePolyPolygon ( const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > > &  points)
inlineoverridevirtual

◆ createInstance()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createInstance ( const OUString &  aServiceSpecifier)
inlineoverridevirtual

Definition at line 245 of file graphicdevicebase.hxx.

References canvas::ParametricPolyPolygon::create().

◆ createInstanceWithArguments()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createInstanceWithArguments ( const OUString &  aServiceSpecifier,
const css::uno::Sequence< css::uno::Any > &  Arguments 
)
inlineoverridevirtual

Definition at line 253 of file graphicdevicebase.hxx.

References canvas::ParametricPolyPolygon::create().

◆ createVolatileAlphaBitmap()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XVolatileBitmap > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createVolatileAlphaBitmap ( const css::geometry::IntegerSize2D &  size)
inlineoverridevirtual

◆ createVolatileBitmap()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XVolatileBitmap > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createVolatileBitmap ( const css::geometry::IntegerSize2D &  size)
inlineoverridevirtual

◆ disposeThis()

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

◆ enterFullScreenMode()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual sal_Bool SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::enterFullScreenMode ( sal_Bool  )
inlineoverridevirtual

Definition at line 239 of file graphicdevicebase.hxx.

◆ getAvailableServiceNames()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Sequence< OUString > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getAvailableServiceNames ( )
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::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getBufferController ( )
inlineoverridevirtual

◆ getDeviceColorSpace()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::rendering::XColorSpace > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getDeviceColorSpace ( )
inlineoverridevirtual

◆ getDumpScreenContent()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
css::uno::Any canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getDumpScreenContent ( ) const
inlineprotected

◆ getParametricPolyPolygonFactory()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::lang::XMultiServiceFactory > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getParametricPolyPolygonFactory ( )
inlineoverridevirtual

Definition at line 229 of file graphicdevicebase.hxx.

◆ getPhysicalResolution()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::geometry::RealSize2D SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getPhysicalResolution ( )
inlineoverridevirtual

◆ getPhysicalSize()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::geometry::RealSize2D SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getPhysicalSize ( )
inlineoverridevirtual

◆ getPropertySetInfo()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getPropertySetInfo ( )
inlineoverridevirtual

◆ getPropertyValue()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual css::uno::Any SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getPropertyValue ( const OUString &  aPropertyName)
inlineoverridevirtual

◆ hasFullScreenMode()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual sal_Bool SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::hasFullScreenMode ( )
inlineoverridevirtual

Definition at line 234 of file graphicdevicebase.hxx.

◆ operator=()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
GraphicDeviceBase & canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::operator= ( const GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase > &  )
privatedelete

◆ removePropertyChangeListener()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::removePropertyChangeListener ( const OUString &  ,
const css::uno::Reference< css::beans::XPropertyChangeListener > &   
)
inlineoverridevirtual

Definition at line 305 of file graphicdevicebase.hxx.

◆ removeVetoableChangeListener()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::removeVetoableChangeListener ( const OUString &  ,
const css::uno::Reference< css::beans::XVetoableChangeListener > &   
)
inlineoverridevirtual

Definition at line 318 of file graphicdevicebase.hxx.

◆ setDumpScreenContent()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
void canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::setDumpScreenContent ( const css::uno::Any &  rAny)
inlineprotected

◆ setPropertyValue()

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
virtual void SAL_CALL canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::setPropertyValue ( const OUString &  aPropertyName,
const css::uno::Any &  aValue 
)
inlineoverridevirtual

◆ update()

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

Member Data Documentation

◆ maDeviceHelper

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

Definition at line 338 of file graphicdevicebase.hxx.

Referenced by canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::boundsChanged(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleAlphaBitmap(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleBezierPolyPolygon(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleBitmap(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createCompatibleLinePolyPolygon(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createVolatileAlphaBitmap(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::createVolatileBitmap(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::disposeThis(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getDeviceColorSpace(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getPhysicalResolution(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::getPhysicalSize(), canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::GraphicDeviceBase(), canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::showBuffer(), canvas::BufferedGraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::switchBuffer(), and canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::update().

◆ maPropHelper

template<class Base , class DeviceHelper , class Mutex = ::osl::MutexGuard, class UnambiguousBase = css::uno::XInterface>
PropertySetHelper canvas::GraphicDeviceBase< Base, DeviceHelper, Mutex, UnambiguousBase >::maPropHelper
protected

◆ mbDumpScreenContent

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

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