summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/rehearsetimingsactivity.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-10 12:43:34 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-10 12:43:34 +0000
commit80ee6f9bafba9a5067871fd03580e1a6cde4f9f6 (patch)
treef34238828c28ab0cf50bd107521eded31e2edb17 /slideshow/source/engine/rehearsetimingsactivity.cxx
parenta4e9678c79220484795b2d3d5747b47062df9f7d (diff)
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:
Diffstat (limited to 'slideshow/source/engine/rehearsetimingsactivity.cxx')
-rw-r--r--slideshow/source/engine/rehearsetimingsactivity.cxx44
1 files changed, 25 insertions, 19 deletions
diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx
index 583e1f710e42..3812eddac851 100644
--- a/slideshow/source/engine/rehearsetimingsactivity.cxx
+++ b/slideshow/source/engine/rehearsetimingsactivity.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: rehearsetimingsactivity.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-01-27 14:16:22 $
+ * last change: $Author: vg $ $Date: 2005-03-10 13:43:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,13 +71,13 @@
#include "activitiesqueue.hxx"
#include "mouseeventhandler.hxx"
#include "rehearsetimingsactivity.hxx"
-#include "drafts/com/sun/star/rendering/XCanvas.hpp"
-#include "drafts/com/sun/star/rendering/XBitmap.hpp"
+#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/rendering/XBitmap.hpp>
#include "boost/bind.hpp"
#include <algorithm>
-using namespace ::drafts::com::sun::star;
+using namespace ::com::sun::star;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -95,11 +95,12 @@ RehearseTimingsActivity::RehearseTimingsActivity(
m_rEventMultiplexer(rEventMultiplexer),
m_rActivitiesQueue(rActivitiesQueue),
m_this(),
- m_elapsedTime(),
+ m_elapsedTime( rEventQueue.getTimer() ),
m_views(),
m_spriteRectangle(),
m_font( Application::GetSettings().GetStyleSettings().GetInfoFont() ),
- m_wakeUpEvent( new WakeupEvent(rActivitiesQueue) ),
+ m_wakeUpEvent( new WakeupEvent( rEventQueue.getTimer(),
+ rActivitiesQueue ) ),
m_mouseHandler(),
m_bActive(false),
m_drawPressed(false)
@@ -192,6 +193,11 @@ void RehearseTimingsActivity::dispose()
}
// Activity:
+double RehearseTimingsActivity::calcTimeLag() const
+{
+ return 0.0;
+}
+
bool RehearseTimingsActivity::perform()
{
if (! isActive())
@@ -220,9 +226,9 @@ bool RehearseTimingsActivity::needsScreenUpdate() const
return isActive();
}
-void RehearseTimingsActivity::end()
+void RehearseTimingsActivity::dequeued()
{
- dispose();
+ // not used here
}
basegfx::B2DRectangle RehearseTimingsActivity::calcSpriteRectangle(
@@ -250,13 +256,15 @@ basegfx::B2DRectangle RehearseTimingsActivity::calcSpriteRectangle(
void RehearseTimingsActivity::addView( UnoViewSharedPtr const & rView )
{
+ const ViewsVecT::iterator iEnd( m_views.end() );
if (std::find_if(
- m_views.begin(), m_views.end(),
+ m_views.begin(), iEnd,
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
// select view:
- boost::bind( std::select1st<ViewsVecT::value_type>(), _1 ) ) ))
+ boost::bind( std::select1st<ViewsVecT::value_type>(), _1 ) ) )!=
+ iEnd)
return; // already added
cppcanvas::CustomSpriteSharedPtr sprite(
@@ -402,16 +410,14 @@ bool RehearseTimingsActivity::MouseHandler::isInArea(
void RehearseTimingsActivity::MouseHandler::updatePressedState(
const bool pressedState ) const
{
- if (pressedState != m_rta->m_drawPressed) {
+ if (pressedState != m_rta->m_drawPressed)
+ {
m_rta->m_drawPressed = pressedState;
m_rta->paintAllSprites();
- // update screen immediately:
- std::for_each(
- m_rta->m_views.begin(), m_rta->m_views.end(),
- boost::bind( &View::updateScreen,
- // select view:
- boost::bind(
- std::select1st<ViewsVecT::value_type>(), _1 ) ) );
+
+ // update screen immediately (cannot wait for next
+ // ActivitiesQueue loop)
+ m_rta->m_rEventMultiplexer.updateScreenContent( true );
}
}