Files
libreoffice/slideshow/source/engine/rehearsetimingsactivity.cxx

573 lines
17 KiB
C++
Raw Normal View History

/* -*- 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 .
*/
#include <boost/current_function.hpp>
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
#include <rtl/ustrbuf.hxx>
#include <vcl/svapp.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/virdev.hxx>
#include <vcl/metric.hxx>
#include <cppcanvas/vclfactory.hxx>
#include <cppcanvas/basegfxfactory.hxx>
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
#include <basegfx/range/b2drange.hxx>
#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
#include <com/sun/star/awt/MouseButton.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
#include <com/sun/star/rendering/XBitmap.hpp>
#include "eventqueue.hxx"
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
#include "screenupdater.hxx"
#include "eventmultiplexer.hxx"
#include "activitiesqueue.hxx"
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
#include "slideshowcontext.hxx"
#include "mouseeventhandler.hxx"
#include "rehearsetimingsactivity.hxx"
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
#include <boost/bind.hpp>
#include <o3tl/compat_functional.hxx>
#include <algorithm>
using namespace com::sun::star;
using namespace com::sun::star::uno;
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
namespace slideshow {
namespace internal {
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
class RehearseTimingsActivity::WakeupEvent : public Event,
private ::boost::noncopyable
{
public:
WakeupEvent( boost::shared_ptr< ::canvas::tools::ElapsedTime > const& pTimeBase,
ActivitySharedPtr const& rActivity,
ActivitiesQueue & rActivityQueue ) :
Event("WakeupEvent"),
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maTimer(pTimeBase),
mnNextTime(0.0),
mpActivity(rActivity),
mrActivityQueue( rActivityQueue )
{}
virtual void dispose() {}
virtual bool fire()
{
ActivitySharedPtr pActivity( mpActivity.lock() );
if( !pActivity )
return false;
return mrActivityQueue.addActivity( pActivity );
}
virtual bool isCharged() const { return true; }
virtual double getActivationTime( double nCurrentTime ) const
{
const double nElapsedTime( maTimer.getElapsedTime() );
return ::std::max( nCurrentTime,
nCurrentTime - nElapsedTime + mnNextTime );
}
/// Start the internal timer
void start() { maTimer.reset(); }
/** Set the next timeout this object should generate.
@param nextTime
Absolute time, measured from the last start() call,
when this event should wakeup the Activity again. If
your time is relative, simply call start() just before
every setNextTimeout() call.
*/
void setNextTimeout( double nextTime ) { mnNextTime = nextTime; }
private:
::canvas::tools::ElapsedTime maTimer;
double mnNextTime;
boost::weak_ptr<Activity> mpActivity;
ActivitiesQueue& mrActivityQueue;
};
class RehearseTimingsActivity::MouseHandler : public MouseEventHandler,
private boost::noncopyable
{
public:
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
explicit MouseHandler( RehearseTimingsActivity& rta );
void reset();
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
bool hasBeenClicked() const { return mbHasBeenClicked; }
// MouseEventHandler
virtual bool handleMousePressed( awt::MouseEvent const & evt );
virtual bool handleMouseReleased( awt::MouseEvent const & evt );
virtual bool handleMouseEntered( awt::MouseEvent const & evt );
virtual bool handleMouseExited( awt::MouseEvent const & evt );
virtual bool handleMouseDragged( awt::MouseEvent const & evt );
virtual bool handleMouseMoved( awt::MouseEvent const & evt );
private:
bool isInArea( com::sun::star::awt::MouseEvent const & evt ) const;
void updatePressedState( const bool pressedState ) const;
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
RehearseTimingsActivity& mrActivity;
bool mbHasBeenClicked;
bool mbMouseStartedInArea;
};
const sal_Int32 LEFT_BORDER_SPACE = 10;
const sal_Int32 LOWER_BORDER_SPACE = 30;
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
RehearseTimingsActivity::RehearseTimingsActivity( const SlideShowContext& rContext ) :
mrEventQueue(rContext.mrEventQueue),
mrScreenUpdater(rContext.mrScreenUpdater),
mrEventMultiplexer(rContext.mrEventMultiplexer),
mrActivitiesQueue(rContext.mrActivitiesQueue),
maElapsedTime( rContext.mrEventQueue.getTimer() ),
maViews(),
maSpriteRectangle(),
maFont( Application::GetSettings().GetStyleSettings().GetInfoFont() ),
mpWakeUpEvent(),
mpMouseHandler(),
maSpriteSizePixel(),
mnYOffset(0),
mbActive(false),
mbDrawPressed(false)
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maFont.SetHeight( maFont.GetHeight() * 2 );
maFont.SetWidth( maFont.GetWidth() * 2 );
maFont.SetAlign( ALIGN_BASELINE );
maFont.SetColor( COL_BLACK );
// determine sprite size (in pixel):
VirtualDevice blackHole;
blackHole.EnableOutput(false);
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
blackHole.SetFont( maFont );
blackHole.SetMapMode( MAP_PIXEL );
Rectangle rect;
const FontMetric metric( blackHole.GetFontMetric() );
blackHole.GetTextBoundRect(
rect, String("XX:XX:XX") );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maSpriteSizePixel.setX( rect.getWidth() * 12 / 10 );
maSpriteSizePixel.setY( metric.GetLineHeight() * 11 / 10 );
mnYOffset = (metric.GetAscent() + (metric.GetLineHeight() / 20));
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
std::for_each( rContext.mrViewContainer.begin(),
rContext.mrViewContainer.end(),
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
boost::bind( &RehearseTimingsActivity::viewAdded,
this,
_1 ));
}
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
RehearseTimingsActivity::~RehearseTimingsActivity()
{
try
{
stop();
}
catch (uno::Exception &)
{
OSL_FAIL( rtl::OUStringToOString(
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
comphelper::anyToString(
cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
boost::shared_ptr<RehearseTimingsActivity> RehearseTimingsActivity::create(
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
const SlideShowContext& rContext )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
boost::shared_ptr<RehearseTimingsActivity> pActivity(
new RehearseTimingsActivity( rContext ));
pActivity->mpMouseHandler.reset(
new MouseHandler(*pActivity.get()) );
pActivity->mpWakeUpEvent.reset(
new WakeupEvent( rContext.mrEventQueue.getTimer(),
pActivity,
rContext.mrActivitiesQueue ));
rContext.mrEventMultiplexer.addViewHandler( pActivity );
return pActivity;
}
void RehearseTimingsActivity::start()
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maElapsedTime.reset();
mbDrawPressed = false;
mbActive = true;
// paint and show all sprites:
paintAllSprites();
for_each_sprite( boost::bind( &cppcanvas::Sprite::show, _1 ) );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mrActivitiesQueue.addActivity( shared_from_this() );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mpMouseHandler->reset();
mrEventMultiplexer.addClickHandler(
mpMouseHandler, 42 /* highest prio of all, > 3.0 */ );
mrEventMultiplexer.addMouseMoveHandler(
mpMouseHandler, 42 /* highest prio of all, > 3.0 */ );
}
double RehearseTimingsActivity::stop()
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mrEventMultiplexer.removeMouseMoveHandler( mpMouseHandler );
mrEventMultiplexer.removeClickHandler( mpMouseHandler );
mbActive = false; // will be removed from queue
for_each_sprite( boost::bind( &cppcanvas::Sprite::hide, _1 ) );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
return maElapsedTime.getElapsedTime();
}
bool RehearseTimingsActivity::hasBeenClicked() const
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if (mpMouseHandler)
return mpMouseHandler->hasBeenClicked();
return false;
}
// Disposable:
void RehearseTimingsActivity::dispose()
{
stop();
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mpWakeUpEvent.reset();
mpMouseHandler.reset();
ViewsVecT().swap( maViews );
}
// Activity:
INTEGRATION: CWS presfixes01 (1.2.2); FILE MERGED 2005/03/03 14:17:27 thb 1.2.2.6: #i43927# Slightly changed the way updateScreen() is handled: since just lately, there were several places introduced which had to call View::updateScreen() manually (RehearsetimtinActivity, WaitSymbol, etc.). Together with the recent change regarding #i42499#, this resulted in the unfortunate situation that LayerManager::update() was not called before updateScreen(). Now, the view update is centrally handled by the EventMultiplexer (which also knows the LayerManager), I've therefore changed all direct calls to View::updateScreen() to EventMultiplexer::updateScreenContent() 2005/02/17 23:56:51 thb 1.2.2.5: #i42499# Made de-spriting of shape effects happen in new Activity::dequeued() method; removed Activity::end() method; fixed calculation of XSlideShow::update() wait interval; slightly modified pres time handling, pres time is now held during _all_ queue processing, including EventQueue (generated funny bounce and break effects, because delayed activities got out of sync); clarified documentation 2005/02/16 11:17:44 fs 1.2.2.4: #i42558# drafts.com.sun.star.drawing/rendering/geometry moved to com.sun.star.* 2005/02/02 22:46:58 dbo 1.2.2.3: #i37777# - timing changes for activities queue - minor fixes Issue number: Submitted by: Reviewed by: 2005/01/30 16:00:56 dbo 1.2.2.2: #i37777# - using single presentation time base - activities queue detects and sets timing lag (calcTimeLag()) Issue number: Submitted by: Reviewed by: 2005/01/27 15:58:17 dbo 1.2.2.1: #i39662# using shared timer for correct pausing Issue number: Submitted by: Reviewed by:
2005-03-10 12:43:34 +00:00
double RehearseTimingsActivity::calcTimeLag() const
{
return 0.0;
}
bool RehearseTimingsActivity::perform()
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( !isActive() )
return false;
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( !mpWakeUpEvent )
return false;
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mpWakeUpEvent->start();
mpWakeUpEvent->setNextTimeout( 0.5 );
mrEventQueue.addEvent( mpWakeUpEvent );
paintAllSprites();
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
// sprites changed, need screen update
mrScreenUpdater.notifyUpdate();
return false; // don't reinsert, WakeupEvent will perform
// that after the given timeout
}
bool RehearseTimingsActivity::isActive() const
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
return mbActive;
}
INTEGRATION: CWS presfixes01 (1.2.2); FILE MERGED 2005/03/03 14:17:27 thb 1.2.2.6: #i43927# Slightly changed the way updateScreen() is handled: since just lately, there were several places introduced which had to call View::updateScreen() manually (RehearsetimtinActivity, WaitSymbol, etc.). Together with the recent change regarding #i42499#, this resulted in the unfortunate situation that LayerManager::update() was not called before updateScreen(). Now, the view update is centrally handled by the EventMultiplexer (which also knows the LayerManager), I've therefore changed all direct calls to View::updateScreen() to EventMultiplexer::updateScreenContent() 2005/02/17 23:56:51 thb 1.2.2.5: #i42499# Made de-spriting of shape effects happen in new Activity::dequeued() method; removed Activity::end() method; fixed calculation of XSlideShow::update() wait interval; slightly modified pres time handling, pres time is now held during _all_ queue processing, including EventQueue (generated funny bounce and break effects, because delayed activities got out of sync); clarified documentation 2005/02/16 11:17:44 fs 1.2.2.4: #i42558# drafts.com.sun.star.drawing/rendering/geometry moved to com.sun.star.* 2005/02/02 22:46:58 dbo 1.2.2.3: #i37777# - timing changes for activities queue - minor fixes Issue number: Submitted by: Reviewed by: 2005/01/30 16:00:56 dbo 1.2.2.2: #i37777# - using single presentation time base - activities queue detects and sets timing lag (calcTimeLag()) Issue number: Submitted by: Reviewed by: 2005/01/27 15:58:17 dbo 1.2.2.1: #i39662# using shared timer for correct pausing Issue number: Submitted by: Reviewed by:
2005-03-10 12:43:34 +00:00
void RehearseTimingsActivity::dequeued()
{
INTEGRATION: CWS presfixes01 (1.2.2); FILE MERGED 2005/03/03 14:17:27 thb 1.2.2.6: #i43927# Slightly changed the way updateScreen() is handled: since just lately, there were several places introduced which had to call View::updateScreen() manually (RehearsetimtinActivity, WaitSymbol, etc.). Together with the recent change regarding #i42499#, this resulted in the unfortunate situation that LayerManager::update() was not called before updateScreen(). Now, the view update is centrally handled by the EventMultiplexer (which also knows the LayerManager), I've therefore changed all direct calls to View::updateScreen() to EventMultiplexer::updateScreenContent() 2005/02/17 23:56:51 thb 1.2.2.5: #i42499# Made de-spriting of shape effects happen in new Activity::dequeued() method; removed Activity::end() method; fixed calculation of XSlideShow::update() wait interval; slightly modified pres time handling, pres time is now held during _all_ queue processing, including EventQueue (generated funny bounce and break effects, because delayed activities got out of sync); clarified documentation 2005/02/16 11:17:44 fs 1.2.2.4: #i42558# drafts.com.sun.star.drawing/rendering/geometry moved to com.sun.star.* 2005/02/02 22:46:58 dbo 1.2.2.3: #i37777# - timing changes for activities queue - minor fixes Issue number: Submitted by: Reviewed by: 2005/01/30 16:00:56 dbo 1.2.2.2: #i37777# - using single presentation time base - activities queue detects and sets timing lag (calcTimeLag()) Issue number: Submitted by: Reviewed by: 2005/01/27 15:58:17 dbo 1.2.2.1: #i39662# using shared timer for correct pausing Issue number: Submitted by: Reviewed by:
2005-03-10 12:43:34 +00:00
// not used here
}
void RehearseTimingsActivity::end()
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if (isActive())
{
stop();
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mbActive = false;
}
}
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
basegfx::B2DRange RehearseTimingsActivity::calcSpriteRectangle( UnoViewSharedPtr const& rView ) const
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
const Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
UNO_QUERY );
if( !xBitmap.is() )
return basegfx::B2DRange();
const geometry::IntegerSize2D realSize( xBitmap->getSize() );
// pixel:
basegfx::B2DPoint spritePos(
std::min<sal_Int32>( realSize.Width, LEFT_BORDER_SPACE ),
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
std::max<sal_Int32>( 0, realSize.Height - maSpriteSizePixel.getY()
- LOWER_BORDER_SPACE ) );
basegfx::B2DHomMatrix transformation( rView->getTransformation() );
transformation.invert();
spritePos *= transformation;
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
basegfx::B2DSize spriteSize( maSpriteSizePixel.getX(),
maSpriteSizePixel.getY() );
spriteSize *= transformation;
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
return basegfx::B2DRange(
spritePos.getX(), spritePos.getY(),
spritePos.getX() + spriteSize.getX(),
spritePos.getY() + spriteSize.getY() );
}
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
void RehearseTimingsActivity::viewAdded( const UnoViewSharedPtr& rView )
{
cppcanvas::CustomSpriteSharedPtr sprite(
rView->createSprite( basegfx::B2DSize(
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maSpriteSizePixel.getX()+2,
maSpriteSizePixel.getY()+2 ),
1001.0 )); // sprite should be in front of all
// other sprites
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
sprite->setAlpha( 0.8 );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
const basegfx::B2DRange spriteRectangle(
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
calcSpriteRectangle( rView ) );
sprite->move( basegfx::B2DPoint(
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
spriteRectangle.getMinX(),
spriteRectangle.getMinY() ) );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( maViews.empty() )
maSpriteRectangle = spriteRectangle;
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maViews.push_back( ViewsVecT::value_type( rView, sprite ) );
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
if (isActive())
sprite->show();
}
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
void RehearseTimingsActivity::viewRemoved( const UnoViewSharedPtr& rView )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maViews.erase(
std::remove_if(
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maViews.begin(), maViews.end(),
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
// select view:
boost::bind( o3tl::select1st<ViewsVecT::value_type>(), _1 ))),
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maViews.end() );
}
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
void RehearseTimingsActivity::viewChanged( const UnoViewSharedPtr& rView )
{
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
// find entry corresponding to modified view
ViewsVecT::iterator aModifiedEntry(
std::find_if(
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maViews.begin(),
maViews.end(),
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
// select view:
boost::bind( o3tl::select1st<ViewsVecT::value_type>(), _1 ))));
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
OSL_ASSERT( aModifiedEntry != maViews.end() );
if( aModifiedEntry == maViews.end() )
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
return;
// new sprite pos, transformation might have changed:
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maSpriteRectangle = calcSpriteRectangle( rView );
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
// reposition sprite:
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
aModifiedEntry->second->move( maSpriteRectangle.getMinimum() );
// sprites changed, need screen update
mrScreenUpdater.notifyUpdate( rView );
}
void RehearseTimingsActivity::viewsChanged()
{
if( !maViews.empty() )
{
// new sprite pos, transformation might have changed:
maSpriteRectangle = calcSpriteRectangle( maViews.front().first );
// reposition sprites
for_each_sprite( boost::bind( &cppcanvas::Sprite::move,
_1,
boost::cref(maSpriteRectangle.getMinimum())) );
// sprites changed, need screen update
mrScreenUpdater.notifyUpdate();
}
}
void RehearseTimingsActivity::paintAllSprites() const
{
for_each_sprite(
boost::bind( &RehearseTimingsActivity::paint, this,
// call getContentCanvas() on each sprite:
boost::bind(
&cppcanvas::CustomSprite::getContentCanvas, _1 ) ) );
}
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
void RehearseTimingsActivity::paint( cppcanvas::CanvasSharedPtr const & canvas ) const
{
// build timer string:
const sal_Int32 nTimeSecs =
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
static_cast<sal_Int32>(maElapsedTime.getElapsedTime());
rtl::OUStringBuffer buf;
sal_Int32 n = (nTimeSecs / 3600);
if (n < 10)
buf.append( static_cast<sal_Unicode>('0') );
buf.append( n );
buf.append( static_cast<sal_Unicode>(':') );
n = ((nTimeSecs % 3600) / 60);
if (n < 10)
buf.append( static_cast<sal_Unicode>('0') );
buf.append( n );
buf.append( static_cast<sal_Unicode>(':') );
n = (nTimeSecs % 60);
if (n < 10)
buf.append( static_cast<sal_Unicode>('0') );
buf.append( n );
const rtl::OUString time = buf.makeStringAndClear();
// create the MetaFile:
GDIMetaFile metaFile;
VirtualDevice blackHole;
metaFile.Record( &blackHole );
metaFile.SetPrefSize( Size( 1, 1 ) );
blackHole.EnableOutput(false);
blackHole.SetMapMode( MAP_PIXEL );
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
blackHole.SetFont( maFont );
INTEGRATION: CWS presfixes09 (1.7.16); FILE MERGED 2006/10/18 19:50:13 thb 1.7.16.7: RESYNC: (1.7-1.9); FILE MERGED 2006/04/24 13:25:25 thb 1.7.16.6: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:03 thb 1.7.16.5: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/04/12 19:25:05 thb 1.7.16.4: #i37778# Making slideshow engine much more robust against missing/unsupported interfaces and properties; fixed RehearseTimings output offset issue; fixed WaitSymbol output position 2006/04/03 16:18:56 thb 1.7.16.3: #i37778# Now passing down ComponentContext to all interested parties; building a second, all-exports version of the slideshow component (to facilitate unit testing also for internal classes) - this made necessary renaming ImportFailedException to ShapeLoadFailedException (because of silly i63703); applied relevant parts of #i63770# (const-correctness); reworked view handling in such a way that views are now kept in one central repository (and are not duplicated across all interested objects); moved code from namespace presentation to namespace slideshow 2006/03/24 18:23:09 thb 1.7.16.2: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow 2006/03/06 22:14:29 thb 1.7.16.1: #i53194# #i55294# #i59324# Overhauled IntrinsicAnimationActivity; fixes GIF animation import; corrected rehearse timings sprite size; several cosmetic changes (removed external header guards); prepared scene for sprite prio
2006-12-13 14:18:12 +00:00
Rectangle rect = Rectangle( 0,0,
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
maSpriteSizePixel.getX(),
maSpriteSizePixel.getY());
if (mbDrawPressed)
{
blackHole.SetTextColor( COL_BLACK );
blackHole.SetFillColor( COL_LIGHTGRAY );
blackHole.SetLineColor( COL_GRAY );
}
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
else
{
blackHole.SetTextColor( COL_BLACK );
blackHole.SetFillColor( COL_WHITE );
blackHole.SetLineColor( COL_GRAY );
}
blackHole.DrawRect( rect );
blackHole.GetTextBoundRect( rect, time );
blackHole.DrawText(
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
Point( (maSpriteSizePixel.getX() - rect.getWidth()) / 2,
mnYOffset ), time );
metaFile.Stop();
metaFile.WindStart();
cppcanvas::RendererSharedPtr renderer(
cppcanvas::VCLFactory::getInstance().createRenderer(
canvas, metaFile, cppcanvas::Renderer::Parameters() ) );
const bool succ = renderer->draw();
OSL_ASSERT( succ );
(void)succ;
}
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
RehearseTimingsActivity::MouseHandler::MouseHandler( RehearseTimingsActivity& rta ) :
mrActivity(rta),
mbHasBeenClicked(false),
mbMouseStartedInArea(false)
{}
void RehearseTimingsActivity::MouseHandler::reset()
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mbHasBeenClicked = false;
mbMouseStartedInArea = false;
}
bool RehearseTimingsActivity::MouseHandler::isInArea(
awt::MouseEvent const & evt ) const
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
return mrActivity.maSpriteRectangle.isInside(
basegfx::B2DPoint( evt.X, evt.Y ) );
}
void RehearseTimingsActivity::MouseHandler::updatePressedState(
const bool pressedState ) const
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( pressedState != mrActivity.mbDrawPressed )
INTEGRATION: CWS presfixes01 (1.2.2); FILE MERGED 2005/03/03 14:17:27 thb 1.2.2.6: #i43927# Slightly changed the way updateScreen() is handled: since just lately, there were several places introduced which had to call View::updateScreen() manually (RehearsetimtinActivity, WaitSymbol, etc.). Together with the recent change regarding #i42499#, this resulted in the unfortunate situation that LayerManager::update() was not called before updateScreen(). Now, the view update is centrally handled by the EventMultiplexer (which also knows the LayerManager), I've therefore changed all direct calls to View::updateScreen() to EventMultiplexer::updateScreenContent() 2005/02/17 23:56:51 thb 1.2.2.5: #i42499# Made de-spriting of shape effects happen in new Activity::dequeued() method; removed Activity::end() method; fixed calculation of XSlideShow::update() wait interval; slightly modified pres time handling, pres time is now held during _all_ queue processing, including EventQueue (generated funny bounce and break effects, because delayed activities got out of sync); clarified documentation 2005/02/16 11:17:44 fs 1.2.2.4: #i42558# drafts.com.sun.star.drawing/rendering/geometry moved to com.sun.star.* 2005/02/02 22:46:58 dbo 1.2.2.3: #i37777# - timing changes for activities queue - minor fixes Issue number: Submitted by: Reviewed by: 2005/01/30 16:00:56 dbo 1.2.2.2: #i37777# - using single presentation time base - activities queue detects and sets timing lag (calcTimeLag()) Issue number: Submitted by: Reviewed by: 2005/01/27 15:58:17 dbo 1.2.2.1: #i39662# using shared timer for correct pausing Issue number: Submitted by: Reviewed by:
2005-03-10 12:43:34 +00:00
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mrActivity.mbDrawPressed = pressedState;
mrActivity.paintAllSprites();
INTEGRATION: CWS presfixes01 (1.2.2); FILE MERGED 2005/03/03 14:17:27 thb 1.2.2.6: #i43927# Slightly changed the way updateScreen() is handled: since just lately, there were several places introduced which had to call View::updateScreen() manually (RehearsetimtinActivity, WaitSymbol, etc.). Together with the recent change regarding #i42499#, this resulted in the unfortunate situation that LayerManager::update() was not called before updateScreen(). Now, the view update is centrally handled by the EventMultiplexer (which also knows the LayerManager), I've therefore changed all direct calls to View::updateScreen() to EventMultiplexer::updateScreenContent() 2005/02/17 23:56:51 thb 1.2.2.5: #i42499# Made de-spriting of shape effects happen in new Activity::dequeued() method; removed Activity::end() method; fixed calculation of XSlideShow::update() wait interval; slightly modified pres time handling, pres time is now held during _all_ queue processing, including EventQueue (generated funny bounce and break effects, because delayed activities got out of sync); clarified documentation 2005/02/16 11:17:44 fs 1.2.2.4: #i42558# drafts.com.sun.star.drawing/rendering/geometry moved to com.sun.star.* 2005/02/02 22:46:58 dbo 1.2.2.3: #i37777# - timing changes for activities queue - minor fixes Issue number: Submitted by: Reviewed by: 2005/01/30 16:00:56 dbo 1.2.2.2: #i37777# - using single presentation time base - activities queue detects and sets timing lag (calcTimeLag()) Issue number: Submitted by: Reviewed by: 2005/01/27 15:58:17 dbo 1.2.2.1: #i39662# using shared timer for correct pausing Issue number: Submitted by: Reviewed by:
2005-03-10 12:43:34 +00:00
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mrActivity.mrScreenUpdater.notifyUpdate();
}
}
// MouseEventHandler
bool RehearseTimingsActivity::MouseHandler::handleMousePressed(
awt::MouseEvent const & evt )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( evt.Buttons == awt::MouseButton::LEFT && isInArea(evt) )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mbMouseStartedInArea = true;
updatePressedState(true);
return true; // consume event
}
return false;
}
bool RehearseTimingsActivity::MouseHandler::handleMouseReleased(
awt::MouseEvent const & evt )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( evt.Buttons == awt::MouseButton::LEFT && mbMouseStartedInArea )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
mbHasBeenClicked = isInArea(evt); // fini if in
mbMouseStartedInArea = false;
updatePressedState(false);
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( !mbHasBeenClicked )
return true; // consume event, else next slide (manual advance)
}
return false;
}
bool RehearseTimingsActivity::MouseHandler::handleMouseEntered(
awt::MouseEvent const & /*evt*/ )
{
return false;
}
bool RehearseTimingsActivity::MouseHandler::handleMouseExited(
awt::MouseEvent const & /*evt*/ )
{
return false;
}
bool RehearseTimingsActivity::MouseHandler::handleMouseDragged(
awt::MouseEvent const & evt )
{
INTEGRATION: CWS presfixes12 (1.11.12); FILE MERGED 2007/03/05 13:47:06 thb 1.11.12.4: #i37778# Removed Activity::needsScreenUpdate() method - this is now handled by notifying ScreenUpdater explicitely; reorg of SlideShowImpl members, to align lifetime with mutual references; fixed (hopefully) last repaint issues with new LayerManager; added more tests 2007/02/25 01:10:23 thb 1.11.12.3: #i37778# Cleared up error handling a lot: no longer quenching RuntimeExceptions; reporting assertions in the debug case; ViewLayer now reports resized sprite (which needs re-render from all shapes); fixed missing subset area reduction for glyph-level animations; added return of resize state from Layer::commitLayerBounds(); adapted unit tests to corrected behaviour 2007/01/29 15:15:29 thb 1.11.12.2: #i37778# Fixed Forte8 compiler breakages 2007/01/29 14:01:54 thb 1.11.12.1: Issue number: #i37778# Larger slideshow refactoring. Wrote design and coding style manifest, and adapted the code to actually conform to this. In detail: - cleaned up ownership/disposable/weak_ptr story. removed hacks and explicit Disposable implementations, where workaround were available - removed object mutices, where superfluous - reworked EventMultiplexer (using templatized listener class now), added more events. EventMultiplexer now serves as a true blackboard - reworked directory structure: disjunct parts are now physically separated into directories, instantiation happens via factories & abstract interfaces - added CursorManager, to make setting mouse cursor less hackish - reworked DrawShape, to implement SeparateListener pattern - reworked IntrinsicAnimationActivity, to avoid cyclic references - modified hyperlink & shape cursor handling to communicate via EventMultiplexer - renamed & cleaned up files (presentation.cxx now named slideshowimpl.cxx, etc.) - added first version of the z-order fix to layer/layermanager - cleaned up include guards and include syntax
2007-07-17 13:38:24 +00:00
if( mbMouseStartedInArea )
updatePressedState( isInArea(evt) );
return false;
}
bool RehearseTimingsActivity::MouseHandler::handleMouseMoved(
awt::MouseEvent const & /*evt*/ )
{
return false;
}
} // namespace internal
} // namespace presentation
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */