summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-11-26 14:18:40 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-11-26 14:18:40 +0000
commit01be1f312a26a30c3322e092c612f41e48c21f85 (patch)
tree6e67d21437d487080bd77f1352eb6875a07e8363 /sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
parentd708ad915308ceecd8475cc0c3ee42ea522f2ee8 (diff)
INTEGRATION: CWS impress10 (1.2.78); FILE MERGED
2004/10/15 10:44:35 af 1.2.78.2: RESYNC: (1.2-1.3); FILE MERGED 2004/10/11 09:20:38 af 1.2.78.1: #i34491# Rewrite of mouse event processing to handle single-, multi-, and range selection properly.
Diffstat (limited to 'sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx')
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx66
1 files changed, 64 insertions, 2 deletions
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index 21508370f308..585549674d78 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SlsSelectionFunction.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hr $ $Date: 2004-11-26 15:01:47 $
+ * last change: $Author: rt $ $Date: 2004-11-26 15:18:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -133,6 +133,10 @@ private:
bool mbPageHit;
/// This flag indicates whether the selection rectangle is visible.
+ bool mbRectangleSelection;
+
+ /// The rectangle of the mouse drag selection.
+ Rectangle maDragSelectionRectangle;
bool mbDragSelection;
/// Box of the insert marker in model coordinates.
@@ -141,6 +145,8 @@ private:
class ShowingEffectInfo;
ShowingEffectInfo* mpShowingEffectInfo;
+ model::PageDescriptor* mpRangeSelectionAnchor;
+
/** Show the effect of the specified page.
*/
@@ -172,6 +178,62 @@ private:
forward. When it is zero then ignore the call.
*/
void GotoNextPage (int nOffset);
+
+ void ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent);
+
+ // What follows are a couple of helper methods that are used by
+ // ProcessMouseEvent().
+
+ /// Select the specified page and set the selection anchor.
+ void SelectHitPage (model::PageDescriptor& rDescriptor);
+ /// Deselect the specified page.
+ void DeselectHitPage (model::PageDescriptor& rDescriptor);
+ /// Deselect all pages.
+ void DeselectAllPages (void);
+
+ /** for a possibly following mouse motion by starting the drag timer
+ that after a short time of pressed but un-moved mouse starts a drag
+ operation.
+ */
+ void PrepareMouseMotion (const Point& aMouseModelPosition);
+
+ /** Set the current page of the main view to the one specified by the
+ given descriptor.
+ */
+ void SetCurrentPage (model::PageDescriptor& rDescriptor);
+ /** Select all pages between and including the selection anchor and the
+ specified page.
+ */
+ void RangeSelect (model::PageDescriptor& rDescriptor);
+
+ /** Start a rectangle selection at the given position.
+ */
+ void StartRectangleSelection (const Point& aMouseModelPosition);
+
+ /** Update the rectangle selection so that the given position becomes
+ the new second point of the selection rectangle.
+ */
+ void UpdateRectangleSelection (const Point& aMouseModelPosition);
+
+ /** Select all pages that lie completly in the selection rectangle.
+ */
+ void ProcessRectangleSelection (bool bToggleSelection);
+
+
+ /** Create a substitution display of the currently selected pages and
+ use the given position as the anchor point.
+ */
+ void CreateSubstitution (const Point& rMouseModelPosition);
+
+ /** Move the substitution display by the distance the mouse has
+ travelled since the last call to this method or to
+ CreateSubstitution(). The given point becomes the new anchor.
+ */
+ void UpdateSubstitution (const Point& rMouseModelPosition);
+
+ /** Move the substitution display of the currently selected pages.
+ */
+ void MoveSubstitution (void);
};
} } } // end of namespace ::sd::slidesorter::controller