summaryrefslogtreecommitdiffstats
path: root/sdext/source/presenter/PresenterScrollBar.hxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-07-11 12:41:18 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-07-11 12:41:18 +0000
commitfc2a63a67b2a620795238b8714d027428201f2c4 (patch)
treedefa63f4919c40532e3374149ca709cf2bdce10c /sdext/source/presenter/PresenterScrollBar.hxx
parentINTEGRATION: CWS presenterfixes (1.4.2); FILE MERGED (diff)
downloadcore-fc2a63a67b2a620795238b8714d027428201f2c4.tar.gz
core-fc2a63a67b2a620795238b8714d027428201f2c4.zip
INTEGRATION: CWS presenterfixes (1.4.2); FILE MERGED
2008/06/23 12:49:11 af 1.4.2.2: Fixed build problem. 2008/06/11 07:45:58 af 1.4.2.1: #i88837# Added support for repeating scroll events.
Diffstat (limited to 'sdext/source/presenter/PresenterScrollBar.hxx')
-rw-r--r--sdext/source/presenter/PresenterScrollBar.hxx28
1 files changed, 24 insertions, 4 deletions
diff --git a/sdext/source/presenter/PresenterScrollBar.hxx b/sdext/source/presenter/PresenterScrollBar.hxx
index 4e733101a042..2f8bdc222946 100644
--- a/sdext/source/presenter/PresenterScrollBar.hxx
+++ b/sdext/source/presenter/PresenterScrollBar.hxx
@@ -8,7 +8,7 @@
*
* $RCSfile: PresenterScrollBar.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
@@ -48,6 +48,7 @@ namespace css = ::com::sun::star;
namespace sdext { namespace presenter {
+class PresenterCanvasHelper;
class PresenterPaintManager;
namespace {
@@ -87,20 +88,30 @@ public:
double nPosition,
const bool bAsynchronousRepaint);
+ double GetThumbPosition (void) const;
+
/** Set the upper border of the slider range.
*/
void SetTotalSize (const double nTotalSize);
+ double GetTotalSize (void) const;
+
/** Set the size of the movable thumb.
@param nThumbSize
A value not larger than the last value given to SetTotalSize().
*/
void SetThumbSize (const double nThumbSize);
+ double GetThumbSize (void) const;
+
+ void SetLineHeight (const double nLineHeight);
+ double GetLineHeight (void) const;
/** Set the canvas that is used for painting the scroll bar.
*/
void SetCanvas (const css::uno::Reference<css::rendering::XCanvas>& rxCanvas);
+ void SetBackground (const SharedBitmapDescriptor& rpBackgroundBitmap);
+
/** Call this after changing total size or thumb position or size to
move the thumb to a valid position.
*/
@@ -165,6 +176,9 @@ public:
throw (css::uno::RuntimeException);
+ enum Area { Total, Pager, Thumb, PagerUp, PagerDown, PrevButton, NextButton, None,
+ __AreaCount__ = None };
+
protected:
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
css::uno::Reference<css::awt::XWindow> mxParentWindow;
@@ -175,10 +189,9 @@ protected:
double mnThumbPosition;
double mnTotalSize;
double mnThumbSize;
+ double mnLineHeight;
css::geometry::RealPoint2D maDragAnchor;
::boost::function<void(double)> maThumbMotionListener;
- enum Area { Total, Pager, Thumb, PagerUp, PagerDown, PrevButton, NextButton, None,
- __AreaCount__ = None };
Area meButtonDownArea;
Area meMouseMoveArea;
css::geometry::RealRectangle2D maBox[__AreaCount__];
@@ -219,6 +232,8 @@ protected:
void Repaint (
const css::geometry::RealRectangle2D aBox,
const bool bAsynchronous);
+ void PaintBackground (
+ const css::awt::Rectangle& rRepaintBox);
void PaintBitmap(
const css::awt::Rectangle& rRepaintBox,
const Area eArea,
@@ -233,13 +248,18 @@ protected:
const Area eArea) const;
bool IsDisabled (const Area eArea) const;
double ValidateThumbPosition (double nPosition);
- void SetThumbPosition (
+ void SetThumbPosition (
double nPosition,
const bool bAsynchronousRepaint,
const bool bValidate,
const bool bNotify);
private:
+ class MousePressRepeater;
+ ::boost::shared_ptr<MousePressRepeater> mpMousePressRepeater;
+ SharedBitmapDescriptor mpBackgroundBitmap;
+ ::boost::scoped_ptr<PresenterCanvasHelper> mpCanvasHelper;
+
Area GetArea (const double nX, const double nY) const;
};