diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-09-06 11:06:57 -0300 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2013-11-14 11:30:37 +0000 |
commit | a6e09b196a1cf530a9d0c028c7a337e08a347577 (patch) | |
tree | 8da94fab669c506f90c5334d9d2bbd5fcfe93c35 /slideshow/source/inc | |
parent | 686ab95e97e3a432fcccc88ae30b8ad6eed1b2b4 (diff) |
Moved some hxx that were included once...
..and are included by another headers
Change-Id: I1adfac86525105188b68f512bcbf3b4f4a0fc490
Diffstat (limited to 'slideshow/source/inc')
-rw-r--r-- | slideshow/source/inc/animationfunction.hxx | 65 | ||||
-rw-r--r-- | slideshow/source/inc/eventmultiplexer.hxx | 110 | ||||
-rw-r--r-- | slideshow/source/inc/expressionnode.hxx | 30 | ||||
-rw-r--r-- | slideshow/source/inc/listenercontainer.hxx | 178 | ||||
-rw-r--r-- | slideshow/source/inc/listenercontainerimpl.hxx | 218 | ||||
-rw-r--r-- | slideshow/source/inc/shapeattributelayer.hxx | 31 | ||||
-rw-r--r-- | slideshow/source/inc/shapecursoreventhandler.hxx | 61 | ||||
-rw-r--r-- | slideshow/source/inc/state.hxx | 67 | ||||
-rw-r--r-- | slideshow/source/inc/userpainteventhandler.hxx | 59 | ||||
-rw-r--r-- | slideshow/source/inc/viewrepainthandler.hxx | 67 |
10 files changed, 338 insertions, 548 deletions
diff --git a/slideshow/source/inc/animationfunction.hxx b/slideshow/source/inc/animationfunction.hxx deleted file mode 100644 index db214a2a6eef..000000000000 --- a/slideshow/source/inc/animationfunction.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SLIDESHOW_ANIMATIONFUNCTION_HXX -#define INCLUDED_SLIDESHOW_ANIMATIONFUNCTION_HXX - -#include <sal/config.h> -#include <boost/shared_ptr.hpp> - - -/* Definition of AnimationFunction interface */ - -namespace slideshow -{ - namespace internal - { - /** Interface describing an abstract animation function. - - Use this interface to model time-dependent animation - functions of one variable. - */ - class AnimationFunction - { - public: - virtual ~AnimationFunction() {} - - /** Operator to calculate function value. - - This method calculates the function value for the - given time instant t. - - @param t - Current time instant, must be in the range [0,1] - - @return the function value, typically in relative - user coordinate space ([0,1] range). - */ - virtual double operator()( double t ) const = 0; - - }; - - typedef ::boost::shared_ptr< AnimationFunction > AnimationFunctionSharedPtr; - - } -} - -#endif /* INCLUDED_SLIDESHOW_ANIMATIONFUNCTION_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx index cb75b37f9898..6c80c38a1ae7 100644 --- a/slideshow/source/inc/eventmultiplexer.hxx +++ b/slideshow/source/inc/eventmultiplexer.hxx @@ -20,19 +20,24 @@ #define INCLUDED_SLIDESHOW_EVENTMULTIPLEXER_HXX #include "eventhandler.hxx" -#include "hyperlinkhandler.hxx" #include "mouseeventhandler.hxx" #include "animationeventhandler.hxx" #include "pauseeventhandler.hxx" #include "shapelistenereventhandler.hxx" -#include "shapecursoreventhandler.hxx" -#include "userpainteventhandler.hxx" #include "vieweventhandler.hxx" -#include "viewrepainthandler.hxx" -#include <boost/scoped_ptr.hpp> #include <boost/noncopyable.hpp> +#include <boost/scoped_ptr.hpp> +#include <boost/shared_ptr.hpp> +#include <boost/weak_ptr.hpp> +#include <com/sun/star/uno/Reference.hxx> + +#include "unoview.hxx" +namespace com { namespace sun { namespace star { namespace drawing +{ + class XShape; +} } } } namespace slideshow { namespace internal { @@ -43,6 +48,100 @@ class AnimationNode; struct EventMultiplexerImpl; +class RGBColor; + +/** Interface for handling view repaint events. + + Classes implementing this interface can be added to an + EventMultiplexer object, and are called from there to + handle view repaint events. +*/ +class ViewRepaintHandler +{ +public: + virtual ~ViewRepaintHandler() {} + + /** Notify clobbered view. + + Reasons for a viewChanged notification can be + different view size, transformation, or other device + properties (color resolution or profile, etc.) + + @param rView + The changed view + */ + virtual void viewClobbered( const UnoViewSharedPtr& rView ) = 0; +}; + +typedef ::boost::shared_ptr< ViewRepaintHandler > ViewRepaintHandlerSharedPtr; +typedef ::boost::weak_ptr< ViewRepaintHandler > ViewRepaintHandlerWeakPtr; + +/** Interface for handling hyperlink clicks. + + Classes implementing this interface can be added to an + EventMultiplexer object, and are called from there to + handle hyperlink events. + */ +class HyperlinkHandler +{ +public: + /** Handle the event. + + @param rLink + The actual hyperlink URI + + @return true, if this handler has successfully + processed the event. When this method returns false, + possibly other, less prioritized handlers are called, + too. + */ + virtual bool handleHyperlink( OUString const& rLink ) = 0; + +protected: + ~HyperlinkHandler() {} +}; + +typedef ::boost::shared_ptr< HyperlinkHandler > HyperlinkHandlerSharedPtr; + +/** Interface for handling user paint state changes. + + Classes implementing this interface can be added to an + EventMultiplexer object, and are called from there to + handle user paint events. +*/ +class UserPaintEventHandler +{ +public: + virtual ~UserPaintEventHandler() {} + virtual bool colorChanged( RGBColor const& rUserColor ) = 0; + virtual bool widthChanged( double nUserStrokeWidth ) = 0; + virtual bool eraseAllInkChanged(bool const& rEraseAllInk) =0; + virtual bool eraseInkWidthChanged(sal_Int32 rEraseInkSize) =0; + virtual bool switchEraserMode() = 0; + virtual bool switchPenMode() = 0; + virtual bool disable() = 0; +}; + +typedef ::boost::shared_ptr< UserPaintEventHandler > UserPaintEventHandlerSharedPtr; + +/** Interface for handling view events. + + Classes implementing this interface can be added to an + EventMultiplexer object, and are called from there to + handle view events. +*/ +class ShapeCursorEventHandler +{ +public: + virtual ~ShapeCursorEventHandler() {} + + virtual bool cursorChanged( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& xShape, + sal_Int16 nCursor ) = 0; +}; + +typedef ::boost::shared_ptr< ShapeCursorEventHandler > ShapeCursorEventHandlerSharedPtr; + /** This class multiplexes user-activated and slide-show global events. @@ -81,7 +180,6 @@ public: UnoViewContainer const& rViewContainer ); ~EventMultiplexer(); - // Management methods // ========================================================= diff --git a/slideshow/source/inc/expressionnode.hxx b/slideshow/source/inc/expressionnode.hxx index 589f1cb616b8..4548363ee6a7 100644 --- a/slideshow/source/inc/expressionnode.hxx +++ b/slideshow/source/inc/expressionnode.hxx @@ -20,8 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_EXPRESSIONNODE_HXX #define INCLUDED_SLIDESHOW_EXPRESSIONNODE_HXX -#include "animationfunction.hxx" - +#include <boost/shared_ptr.hpp> /* Definition of ExpressionNode interface */ @@ -29,6 +28,33 @@ namespace slideshow { namespace internal { + /** Interface describing an abstract animation function. + + Use this interface to model time-dependent animation + functions of one variable. + */ + class AnimationFunction + { + public: + virtual ~AnimationFunction() {} + + /** Operator to calculate function value. + + This method calculates the function value for the + given time instant t. + + @param t + Current time instant, must be in the range [0,1] + + @return the function value, typically in relative + user coordinate space ([0,1] range). + */ + virtual double operator()( double t ) const = 0; + + }; + + typedef ::boost::shared_ptr< AnimationFunction > AnimationFunctionSharedPtr; + /** Refinement of AnimationFunction This interface is used by the SMIL function parser, to diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx index b89a0145bd46..463790cd481d 100644 --- a/slideshow/source/inc/listenercontainer.hxx +++ b/slideshow/source/inc/listenercontainer.hxx @@ -24,11 +24,185 @@ #include <algorithm> #include <vector> -#include "listenercontainerimpl.hxx" - namespace slideshow { namespace internal { +struct EmptyBase +{ + struct EmptyGuard{ explicit EmptyGuard(EmptyBase) {} }; + struct EmptyClearableGuard + { + explicit EmptyClearableGuard(EmptyBase) {} + void clear() {} + void reset() {} + }; + + typedef EmptyGuard Guard; + typedef EmptyClearableGuard ClearableGuard; +}; + +class MutexBase +{ +public: + struct Guard : public osl::MutexGuard + { + explicit Guard(MutexBase const& rBase) : + osl::MutexGuard(rBase.maMutex) + {} + }; + struct ClearableGuard : public osl::ClearableMutexGuard + { + explicit ClearableGuard(MutexBase const& rBase) : + osl::ClearableMutexGuard(rBase.maMutex) + {} + }; + + mutable osl::Mutex maMutex; +}; + +template< typename result_type, typename ListenerTargetT > struct FunctionApply +{ + template<typename FuncT> static bool apply( + FuncT func, + ListenerTargetT const& rArg ) + { + return func(rArg); + } +}; + +template<typename ListenerTargetT> struct FunctionApply<void,ListenerTargetT> +{ + template<typename FuncT> static bool apply( + FuncT func, + ListenerTargetT const& rArg ) + { + func(rArg); + return true; + } +}; + +template< typename ListenerT > struct ListenerOperations +{ + /// Notify a single one of the listeners + template< typename ContainerT, + typename FuncT > + static bool notifySingleListener( ContainerT& rContainer, + FuncT func ) + { + const typename ContainerT::const_iterator aEnd( rContainer.end() ); + + // true: a handler in this queue processed the event + // false: no handler in this queue finally processed the event + return (std::find_if( rContainer.begin(), + aEnd, + func ) != aEnd); + } + + /// Notify all listeners + template< typename ContainerT, + typename FuncT > + static bool notifyAllListeners( ContainerT& rContainer, + FuncT func ) + { + bool bRet(false); + typename ContainerT::const_iterator aCurr( rContainer.begin() ); + typename ContainerT::const_iterator const aEnd ( rContainer.end() ); + while( aCurr != aEnd ) + { + if( FunctionApply< typename FuncT::result_type, + typename ContainerT::value_type >::apply( + func, + *aCurr) ) + { + bRet = true; + } + + ++aCurr; + } + + // true: at least one handler returned true + // false: not a single handler returned true + return bRet; + } + + /// Prune container from deceased listeners + template< typename ContainerT > + static void pruneListeners( ContainerT&, size_t ) + { + } +}; + +template< typename ListenerTargetT > +struct ListenerOperations< boost::weak_ptr<ListenerTargetT> > +{ + template< typename ContainerT, + typename FuncT > + static bool notifySingleListener( ContainerT& rContainer, + FuncT func ) + { + typename ContainerT::const_iterator aCurr( rContainer.begin() ); + typename ContainerT::const_iterator const aEnd ( rContainer.end() ); + while( aCurr != aEnd ) + { + boost::shared_ptr<ListenerTargetT> pListener( aCurr->lock() ); + + if( pListener && func(pListener) ) + return true; + + ++aCurr; + } + + return false; + } + + template< typename ContainerT, + typename FuncT > + static bool notifyAllListeners( ContainerT& rContainer, + FuncT func ) + { + bool bRet(false); + typename ContainerT::const_iterator aCurr( rContainer.begin() ); + typename ContainerT::const_iterator const aEnd ( rContainer.end() ); + while( aCurr != aEnd ) + { + boost::shared_ptr<ListenerTargetT> pListener( aCurr->lock() ); + + if( pListener.get() && + FunctionApply< typename FuncT::result_type, + boost::shared_ptr<ListenerTargetT> >::apply(func,pListener) ) + { + bRet = true; + } + + ++aCurr; + } + + return bRet; + } + template< typename ContainerT > + static void pruneListeners( ContainerT& rContainer, + size_t nSizeThreshold ) + { + if( rContainer.size() <= nSizeThreshold ) + return; + + ContainerT aAliveListeners; + aAliveListeners.reserve(rContainer.size()); + + typename ContainerT::const_iterator aCurr( rContainer.begin() ); + typename ContainerT::const_iterator const aEnd ( rContainer.end() ); + while( aCurr != aEnd ) + { + if( !aCurr->expired() ) + aAliveListeners.push_back( *aCurr ); + + ++aCurr; + } + + std::swap( rContainer, aAliveListeners ); + } +}; + /** Container for objects that can be notified. This templatized container holds listener objects, than can get diff --git a/slideshow/source/inc/listenercontainerimpl.hxx b/slideshow/source/inc/listenercontainerimpl.hxx deleted file mode 100644 index c4c313c857d8..000000000000 --- a/slideshow/source/inc/listenercontainerimpl.hxx +++ /dev/null @@ -1,218 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SLIDESHOW_LISTENERCONTAINERIMPL_HXX -#define INCLUDED_SLIDESHOW_LISTENERCONTAINERIMPL_HXX - -#include <sal/config.h> -#include <boost/weak_ptr.hpp> - -namespace slideshow { -namespace internal { - -//////////////////////////////////////////////////////////////////////////// - -struct EmptyBase -{ - struct EmptyGuard{ explicit EmptyGuard(EmptyBase) {} }; - struct EmptyClearableGuard - { - explicit EmptyClearableGuard(EmptyBase) {} - void clear() {} - void reset() {} - }; - - typedef EmptyGuard Guard; - typedef EmptyClearableGuard ClearableGuard; -}; - -class MutexBase -{ -public: - struct Guard : public osl::MutexGuard - { - explicit Guard(MutexBase const& rBase) : - osl::MutexGuard(rBase.maMutex) - {} - }; - struct ClearableGuard : public osl::ClearableMutexGuard - { - explicit ClearableGuard(MutexBase const& rBase) : - osl::ClearableMutexGuard(rBase.maMutex) - {} - }; - - mutable osl::Mutex maMutex; -}; - -//////////////////////////////////////////////////////////////////////////// - -template< typename result_type, typename ListenerTargetT > struct FunctionApply -{ - template<typename FuncT> static bool apply( - FuncT func, - ListenerTargetT const& rArg ) - { - return func(rArg); - } -}; - -template<typename ListenerTargetT> struct FunctionApply<void,ListenerTargetT> -{ - template<typename FuncT> static bool apply( - FuncT func, - ListenerTargetT const& rArg ) - { - func(rArg); - return true; - } -}; - -//////////////////////////////////////////////////////////////////////////// - -template< typename ListenerT > struct ListenerOperations -{ - /// Notify a single one of the listeners - template< typename ContainerT, - typename FuncT > - static bool notifySingleListener( ContainerT& rContainer, - FuncT func ) - { - const typename ContainerT::const_iterator aEnd( rContainer.end() ); - - // true: a handler in this queue processed the event - // false: no handler in this queue finally processed the event - return (std::find_if( rContainer.begin(), - aEnd, - func ) != aEnd); - } - - /// Notify all listeners - template< typename ContainerT, - typename FuncT > - static bool notifyAllListeners( ContainerT& rContainer, - FuncT func ) - { - bool bRet(false); - typename ContainerT::const_iterator aCurr( rContainer.begin() ); - typename ContainerT::const_iterator const aEnd ( rContainer.end() ); - while( aCurr != aEnd ) - { - if( FunctionApply< typename FuncT::result_type, - typename ContainerT::value_type >::apply( - func, - *aCurr) ) - { - bRet = true; - } - - ++aCurr; - } - - // true: at least one handler returned true - // false: not a single handler returned true - return bRet; - } - - /// Prune container from deceased listeners - template< typename ContainerT > - static void pruneListeners( ContainerT&, size_t ) - { - } -}; - -// specializations for weak_ptr -// ---------------------------- -template< typename ListenerTargetT > -struct ListenerOperations< boost::weak_ptr<ListenerTargetT> > -{ - template< typename ContainerT, - typename FuncT > - static bool notifySingleListener( ContainerT& rContainer, - FuncT func ) - { - typename ContainerT::const_iterator aCurr( rContainer.begin() ); - typename ContainerT::const_iterator const aEnd ( rContainer.end() ); - while( aCurr != aEnd ) - { - boost::shared_ptr<ListenerTargetT> pListener( aCurr->lock() ); - - if( pListener && func(pListener) ) - return true; - - ++aCurr; - } - - return false; - } - - template< typename ContainerT, - typename FuncT > - static bool notifyAllListeners( ContainerT& rContainer, - FuncT func ) - { - bool bRet(false); - typename ContainerT::const_iterator aCurr( rContainer.begin() ); - typename ContainerT::const_iterator const aEnd ( rContainer.end() ); - while( aCurr != aEnd ) - { - boost::shared_ptr<ListenerTargetT> pListener( aCurr->lock() ); - - if( pListener.get() && - FunctionApply< typename FuncT::result_type, - boost::shared_ptr<ListenerTargetT> >::apply(func,pListener) ) - { - bRet = true; - } - - ++aCurr; - } - - return bRet; - } - - template< typename ContainerT > - static void pruneListeners( ContainerT& rContainer, - size_t nSizeThreshold ) - { - if( rContainer.size() <= nSizeThreshold ) - return; - - ContainerT aAliveListeners; - aAliveListeners.reserve(rContainer.size()); - - typename ContainerT::const_iterator aCurr( rContainer.begin() ); - typename ContainerT::const_iterator const aEnd ( rContainer.end() ); - while( aCurr != aEnd ) - { - if( !aCurr->expired() ) - aAliveListeners.push_back( *aCurr ); - - ++aCurr; - } - - std::swap( rContainer, aAliveListeners ); - } -}; - -} // namespace internal -} // namespace Presentation - -#endif /* INCLUDED_SLIDESHOW_LISTENERCONTAINERIMPL_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/inc/shapeattributelayer.hxx b/slideshow/source/inc/shapeattributelayer.hxx index ac4bf3de9bf7..cdecabc85cb7 100644 --- a/slideshow/source/inc/shapeattributelayer.hxx +++ b/slideshow/source/inc/shapeattributelayer.hxx @@ -29,7 +29,6 @@ #include <basegfx/range/b2drectangle.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include "state.hxx" #include "rgbcolor.hxx" #include <stack> @@ -40,6 +39,36 @@ namespace slideshow { namespace internal { + + /** This interface represents a stateful object. + + The state ID returned by the getStateId() method + abstractly encodes the object's state. When this ID + changes, clients can assume that the object's state has + changed. + */ + class State + { + public: + virtual ~State() {} + + /// Abstract, numerically encoded state ID + typedef ::std::size_t StateId; + + /** This method returns a numerical state identifier. + + The state ID returned by this method abstractly + encodes the object's state. When this ID changes, + clients can assume that the object's state has + changed. + + @return an abstract, numerical state ID. + */ + virtual StateId getStateId() const = 0; + }; + + typedef ::boost::shared_ptr< State > StateSharedPtr; + class ShapeAttributeLayer; typedef ::boost::shared_ptr< ShapeAttributeLayer > ShapeAttributeLayerSharedPtr; diff --git a/slideshow/source/inc/shapecursoreventhandler.hxx b/slideshow/source/inc/shapecursoreventhandler.hxx deleted file mode 100644 index 864936f31f4c..000000000000 --- a/slideshow/source/inc/shapecursoreventhandler.hxx +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SLIDESHOW_SHAPECURSOREVENTHANDLER_HXX -#define INCLUDED_SLIDESHOW_SHAPECURSOREVENTHANDLER_HXX - -#include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> - -namespace com { namespace sun { namespace star { namespace drawing -{ - class XShape; -} } } } - -/* Definition of ShapeCursorEventHandler interface */ - -namespace slideshow -{ - namespace internal - { - - /** Interface for handling view events. - - Classes implementing this interface can be added to an - EventMultiplexer object, and are called from there to - handle view events. - */ - class ShapeCursorEventHandler - { - public: - virtual ~ShapeCursorEventHandler() {} - - virtual bool cursorChanged( const ::com::sun::star::uno::Reference< - ::com::sun::star::drawing::XShape>& xShape, - sal_Int16 nCursor ) = 0; - }; - - typedef ::boost::shared_ptr< ShapeCursorEventHandler > ShapeCursorEventHandlerSharedPtr; - - } -} - -#endif /* INCLUDED_SLIDESHOW_SHAPECURSOREVENTHANDLER_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/inc/state.hxx b/slideshow/source/inc/state.hxx deleted file mode 100644 index df6042764f64..000000000000 --- a/slideshow/source/inc/state.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SLIDESHOW_STATE_HXX -#define INCLUDED_SLIDESHOW_STATE_HXX - -#include <sal/types.h> -#include <boost/shared_ptr.hpp> - - -/* Definition of State interface */ - -namespace slideshow -{ - namespace internal - { - - /** This interface represents a stateful object. - - The state ID returned by the getStateId() method - abstractly encodes the object's state. When this ID - changes, clients can assume that the object's state has - changed. - */ - class State - { - public: - virtual ~State() {} - - /// Abstract, numerically encoded state ID - typedef ::std::size_t StateId; - - /** This method returns a numerical state identifier. - - The state ID returned by this method abstractly - encodes the object's state. When this ID changes, - clients can assume that the object's state has - changed. - - @return an abstract, numerical state ID. - */ - virtual StateId getStateId() const = 0; - }; - - typedef ::boost::shared_ptr< State > StateSharedPtr; - } -} - -#endif /* INCLUDED_SLIDESHOW_STATE_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/inc/userpainteventhandler.hxx b/slideshow/source/inc/userpainteventhandler.hxx deleted file mode 100644 index 8f68db42a487..000000000000 --- a/slideshow/source/inc/userpainteventhandler.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SLIDESHOW_USERPAINTEVENTHANDLER_HXX -#define INCLUDED_SLIDESHOW_USERPAINTEVENTHANDLER_HXX - -#include <boost/shared_ptr.hpp> - -/* Definition of UserPaintEventHandler interface */ - -namespace slideshow -{ - namespace internal - { - class RGBColor; - - /** Interface for handling user paint state changes. - - Classes implementing this interface can be added to an - EventMultiplexer object, and are called from there to - handle user paint events. - */ - class UserPaintEventHandler - { - public: - virtual ~UserPaintEventHandler() {} - virtual bool colorChanged( RGBColor const& rUserColor ) = 0; - virtual bool widthChanged( double nUserStrokeWidth ) = 0; - virtual bool eraseAllInkChanged(bool const& rEraseAllInk) =0; - virtual bool eraseInkWidthChanged(sal_Int32 rEraseInkSize) =0; - virtual bool switchEraserMode() = 0; - virtual bool switchPenMode() = 0; - virtual bool disable() = 0; - }; - - typedef ::boost::shared_ptr< UserPaintEventHandler > UserPaintEventHandlerSharedPtr; - - } -} - -#endif /* INCLUDED_SLIDESHOW_USERPAINTEVENTHANDLER_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/inc/viewrepainthandler.hxx b/slideshow/source/inc/viewrepainthandler.hxx deleted file mode 100644 index d08feabc15b2..000000000000 --- a/slideshow/source/inc/viewrepainthandler.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SLIDESHOW_VIEWREPAINTHANDLER_HXX -#define INCLUDED_SLIDESHOW_VIEWREPAINTHANDLER_HXX - -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> - -#include "unoview.hxx" - - -/* Definition of ViewRepaintHandler interface */ - -namespace slideshow -{ - namespace internal - { - - /** Interface for handling view repaint events. - - Classes implementing this interface can be added to an - EventMultiplexer object, and are called from there to - handle view repaint events. - */ - class ViewRepaintHandler - { - public: - virtual ~ViewRepaintHandler() {} - - /** Notify clobbered view. - - Reasons for a viewChanged notification can be - different view size, transformation, or other device - properties (color resolution or profile, etc.) - - @param rView - The changed view - */ - virtual void viewClobbered( const UnoViewSharedPtr& rView ) = 0; - }; - - typedef ::boost::shared_ptr< ViewRepaintHandler > ViewRepaintHandlerSharedPtr; - typedef ::boost::weak_ptr< ViewRepaintHandler > ViewRepaintHandlerWeakPtr; - - } -} - -#endif /* INCLUDED_SLIDESHOW_VIEWREPAINTHANDLER_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |