SlsSelectionFunction.hxx (c45d927a) SlsSelectionFunction.hxx (916729d0)
1/**************************************************************
1/**************************************************************
2 *
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24#ifndef SD_SLIDESORTER_SELECTION_FUNCTION_HXX
25#define SD_SLIDESORTER_SELECTION_FUNCTION_HXX
26
27#include "model/SlsSharedPageDescriptor.hxx"

--- 15 unchanged lines hidden (view full) ---

43} }
44
45namespace sd { namespace slidesorter { namespace controller {
46
47class SlideSorterController;
48class DragAndDropContext;
49
50
20 *************************************************************/
21
22
23
24#ifndef SD_SLIDESORTER_SELECTION_FUNCTION_HXX
25#define SD_SLIDESORTER_SELECTION_FUNCTION_HXX
26
27#include "model/SlsSharedPageDescriptor.hxx"

--- 15 unchanged lines hidden (view full) ---

43} }
44
45namespace sd { namespace slidesorter { namespace controller {
46
47class SlideSorterController;
48class DragAndDropContext;
49
50
51class SelectionFunction
51class SelectionFunction
52 : public FuPoor,
53 private ::boost::noncopyable
54{
55public:
56 TYPEINFO();
57
58 static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest );
52 : public FuPoor,
53 private ::boost::noncopyable
54{
55public:
56 TYPEINFO();
57
58 static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest );
59
59
60 // Mouse- & Key-Events
61 virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
62 virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
63 virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
64 virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
60 // Mouse- & Key-Events
61 virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
62 virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
63 virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
64 virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
65
65
66 virtual void Activate();
67 virtual void Deactivate();
66 virtual void Activate();
67 virtual void Deactivate();
68
68
69 virtual void ScrollStart();
70 virtual void ScrollEnd();
71
69 virtual void ScrollStart();
70 virtual void ScrollEnd();
71
72 /// Forward to the clipboard manager.
72 // Forward to the clipboard manager.
73 virtual void DoCut (void);
74
73 virtual void DoCut (void);
74
75 /// Forward to the clipboard manager.
75 // Forward to the clipboard manager.
76 virtual void DoCopy (void);
77
76 virtual void DoCopy (void);
77
78 /// Forward to the clipboard manager.
78 // Forward to the clipboard manager.
79 virtual void DoPaste (void);
80
81 /** is called when the current function should be aborted. <p>
82 This is used when a function gets a KEY_ESCAPE but can also
83 be called directly.
84
79 virtual void DoPaste (void);
80
81 /** is called when the current function should be aborted. <p>
82 This is used when a function gets a KEY_ESCAPE but can also
83 be called directly.
84
85 @returns
85 @returns
86 true if a active function was aborted
87 */
88 virtual bool cancel();
86 true if a active function was aborted
87 */
88 virtual bool cancel();
89
89
90 void MouseDragged (
91 const AcceptDropEvent& rEvent,
92 const sal_Int8 nDragAction);
93
94 /** Turn of substitution display and insertion indicator.
95 */
96 void NotifyDragFinished (void);
97

--- 19 unchanged lines hidden (view full) ---

117
118 void ResetShiftKeySelectionAnchor (void);
119 /** Special case handling for when the context menu is hidden. This
120 method will reinitialize the current mouse position to prevent the
121 mouse motion during the time the context menu is displayed from
122 being interpreted as drag-and-drop start.
123 */
124 void ResetMouseAnchor (void);
90 void MouseDragged (
91 const AcceptDropEvent& rEvent,
92 const sal_Int8 nDragAction);
93
94 /** Turn of substitution display and insertion indicator.
95 */
96 void NotifyDragFinished (void);
97

--- 19 unchanged lines hidden (view full) ---

117
118 void ResetShiftKeySelectionAnchor (void);
119 /** Special case handling for when the context menu is hidden. This
120 method will reinitialize the current mouse position to prevent the
121 mouse motion during the time the context menu is displayed from
122 being interpreted as drag-and-drop start.
123 */
124 void ResetMouseAnchor (void);
125
125
126protected:
127 SlideSorter& mrSlideSorter;
128 SlideSorterController& mrController;
129
130 SelectionFunction (
131 SlideSorter& rSlideSorter,
132 SfxRequest& rRequest);
133
134 virtual ~SelectionFunction();
135
136private:
137
126protected:
127 SlideSorter& mrSlideSorter;
128 SlideSorterController& mrController;
129
130 SelectionFunction (
131 SlideSorter& rSlideSorter,
132 SfxRequest& rRequest);
133
134 virtual ~SelectionFunction();
135
136private:
137
138 /// The rectangle of the mouse drag selection.
138 // The rectangle of the mouse drag selection.
139 Rectangle maDragSelectionRectangle;
140 bool mbDragSelection;
141
139 Rectangle maDragSelectionRectangle;
140 bool mbDragSelection;
141
142 /// Box of the insert marker in model coordinates.
142 // Box of the insert marker in model coordinates.
143 Rectangle maInsertionMarkerBox;
143 Rectangle maInsertionMarkerBox;
144
144
145 /** We use this flag to filter out the cases where MouseMotion() is called
146 with a pressed mouse button but without a prior MouseButtonDown()
147 call. This is an indication that the mouse button was pressed over
148 another control, e.g. the view tab bar, and that a re-layout of the
149 controls moved the slide sorter under the mouse.
150 */
151 bool mbProcessingMouseButtonDown;
152

--- 49 unchanged lines hidden ---
145 /** We use this flag to filter out the cases where MouseMotion() is called
146 with a pressed mouse button but without a prior MouseButtonDown()
147 call. This is an indication that the mouse button was pressed over
148 another control, e.g. the view tab bar, and that a re-layout of the
149 controls moved the slide sorter under the mouse.
150 */
151 bool mbProcessingMouseButtonDown;
152

--- 49 unchanged lines hidden ---