xref: /aoo42x/main/sc/source/ui/inc/gridwin.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef SC_GRIDWIN_HXX
29*cdf0e10cSrcweir #define SC_GRIDWIN_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <tools/string.hxx>
32*cdf0e10cSrcweir #include <svtools/transfer.hxx>
33*cdf0e10cSrcweir #include "viewutil.hxx"
34*cdf0e10cSrcweir #include "viewdata.hxx"
35*cdf0e10cSrcweir #include "cbutton.hxx"
36*cdf0e10cSrcweir #include <svx/sdr/overlay/overlayobject.hxx>
37*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
38*cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #include <vector>
41*cdf0e10cSrcweir #include <memory>
42*cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir // ---------------------------------------------------------------------------
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir struct ScTableInfo;
47*cdf0e10cSrcweir class ScViewSelectionEngine;
48*cdf0e10cSrcweir class ScDPObject;
49*cdf0e10cSrcweir class ScDPFieldPopupWindow;
50*cdf0e10cSrcweir class ScDPFieldButton;
51*cdf0e10cSrcweir class ScOutputData;
52*cdf0e10cSrcweir class ScFilterListBox;
53*cdf0e10cSrcweir class AutoFilterPopup;
54*cdf0e10cSrcweir class SdrObject;
55*cdf0e10cSrcweir class SdrEditView;
56*cdf0e10cSrcweir class ScNoteMarker;
57*cdf0e10cSrcweir class FloatingWindow;
58*cdf0e10cSrcweir class SdrHdlList;
59*cdf0e10cSrcweir class ScTransferObj;
60*cdf0e10cSrcweir struct SpellCallbackInfo;
61*cdf0e10cSrcweir 
62*cdf0e10cSrcweir 		//	Maus-Status (nMouseStatus)
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir #define SC_GM_NONE			0
65*cdf0e10cSrcweir #define SC_GM_TABDOWN		1
66*cdf0e10cSrcweir #define SC_GM_DBLDOWN		2
67*cdf0e10cSrcweir #define SC_GM_FILTER		3
68*cdf0e10cSrcweir #define SC_GM_IGNORE		4
69*cdf0e10cSrcweir #define SC_GM_WATERUNDO		5
70*cdf0e10cSrcweir #define SC_GM_URLDOWN		6
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir 		//	Page-Drag-Modus
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir #define SC_PD_NONE			0
75*cdf0e10cSrcweir #define SC_PD_RANGE_L		1
76*cdf0e10cSrcweir #define SC_PD_RANGE_R		2
77*cdf0e10cSrcweir #define SC_PD_RANGE_T		4
78*cdf0e10cSrcweir #define SC_PD_RANGE_B		8
79*cdf0e10cSrcweir #define SC_PD_RANGE_TL		(SC_PD_RANGE_T|SC_PD_RANGE_L)
80*cdf0e10cSrcweir #define SC_PD_RANGE_TR		(SC_PD_RANGE_T|SC_PD_RANGE_R)
81*cdf0e10cSrcweir #define SC_PD_RANGE_BL		(SC_PD_RANGE_B|SC_PD_RANGE_L)
82*cdf0e10cSrcweir #define SC_PD_RANGE_BR		(SC_PD_RANGE_B|SC_PD_RANGE_R)
83*cdf0e10cSrcweir #define SC_PD_BREAK_H		16
84*cdf0e10cSrcweir #define SC_PD_BREAK_V		32
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir class ScHideTextCursor
88*cdf0e10cSrcweir {
89*cdf0e10cSrcweir private:
90*cdf0e10cSrcweir 	ScViewData*	pViewData;
91*cdf0e10cSrcweir 	ScSplitPos	eWhich;
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir public:
94*cdf0e10cSrcweir 			ScHideTextCursor( ScViewData* pData, ScSplitPos eW );
95*cdf0e10cSrcweir 			~ScHideTextCursor();
96*cdf0e10cSrcweir };
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir // ---------------------------------------------------------------------------
99*cdf0e10cSrcweir // predefines
100*cdf0e10cSrcweir namespace sdr { namespace overlay { class OverlayObjectList; }}
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir class ScGridWindow : public Window, public DropTargetHelper, public DragSourceHelper
103*cdf0e10cSrcweir {
104*cdf0e10cSrcweir 	//	ScFilterListBox wird immer fuer Auswahlliste benutzt
105*cdf0e10cSrcweir 	friend class ScFilterListBox;
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir private:
108*cdf0e10cSrcweir 	// #114409#
109*cdf0e10cSrcweir 	::sdr::overlay::OverlayObjectList*				mpOOCursors;
110*cdf0e10cSrcweir     ::sdr::overlay::OverlayObjectList*              mpOOSelection;
111*cdf0e10cSrcweir     ::sdr::overlay::OverlayObjectList*              mpOOAutoFill;
112*cdf0e10cSrcweir     ::sdr::overlay::OverlayObjectList*              mpOODragRect;
113*cdf0e10cSrcweir     ::sdr::overlay::OverlayObjectList*              mpOOHeader;
114*cdf0e10cSrcweir     ::sdr::overlay::OverlayObjectList*              mpOOShrink;
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir     ::boost::shared_ptr<Rectangle> mpAutoFillRect;
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir     /**
119*cdf0e10cSrcweir      * Stores current visible column and row ranges, used to avoid expensive
120*cdf0e10cSrcweir      * operations on objects that are outside visible area.
121*cdf0e10cSrcweir      */
122*cdf0e10cSrcweir     struct VisibleRange
123*cdf0e10cSrcweir     {
124*cdf0e10cSrcweir         SCCOL mnCol1;
125*cdf0e10cSrcweir         SCCOL mnCol2;
126*cdf0e10cSrcweir         SCROW mnRow1;
127*cdf0e10cSrcweir         SCROW mnRow2;
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir         VisibleRange();
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir         bool isInside(SCCOL nCol, SCROW nRow) const;
132*cdf0e10cSrcweir     };
133*cdf0e10cSrcweir     VisibleRange maVisibleRange;
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir private:
136*cdf0e10cSrcweir 	ScViewData*				pViewData;
137*cdf0e10cSrcweir 	ScSplitPos				eWhich;
138*cdf0e10cSrcweir 	ScHSplitPos				eHWhich;
139*cdf0e10cSrcweir 	ScVSplitPos				eVWhich;
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir 	ScNoteMarker*			pNoteMarker;
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir 	ScFilterListBox*		pFilterBox;
144*cdf0e10cSrcweir 	FloatingWindow*			pFilterFloat;
145*cdf0e10cSrcweir     ::std::auto_ptr<ScDPFieldPopupWindow> mpDPFieldPopup;
146*cdf0e10cSrcweir     ::std::auto_ptr<ScDPFieldButton>      mpFilterButton;
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 	sal_uInt16					nCursorHideCount;
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir 	sal_Bool					bMarking;
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir 	sal_uInt16					nButtonDown;
153*cdf0e10cSrcweir 	sal_Bool					bEEMouse;				// Edit-Engine hat Maus
154*cdf0e10cSrcweir 	sal_uInt8					nMouseStatus;
155*cdf0e10cSrcweir     sal_uInt8                    nNestedButtonState;     // track nested button up/down calls
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir 	sal_Bool					bDPMouse;				// DataPilot-D&D (neue Pivottabellen)
158*cdf0e10cSrcweir 	long					nDPField;
159*cdf0e10cSrcweir 	ScDPObject*				pDragDPObj;	//! name?
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir 	sal_Bool					bRFMouse;				// RangeFinder-Drag
162*cdf0e10cSrcweir 	sal_Bool					bRFSize;
163*cdf0e10cSrcweir 	sal_uInt16					nRFIndex;
164*cdf0e10cSrcweir 	SCsCOL					nRFAddX;
165*cdf0e10cSrcweir 	SCsROW					nRFAddY;
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 	sal_uInt16					nPagebreakMouse;		// Pagebreak-Modus Drag
168*cdf0e10cSrcweir 	SCCOLROW				nPagebreakBreak;
169*cdf0e10cSrcweir 	SCCOLROW				nPagebreakPrev;
170*cdf0e10cSrcweir 	ScRange					aPagebreakSource;
171*cdf0e10cSrcweir 	ScRange					aPagebreakDrag;
172*cdf0e10cSrcweir 	sal_Bool					bPagebreakDrawn;
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir 	sal_uInt8					nPageScript;
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 	long					nLastClickX;
177*cdf0e10cSrcweir 	long					nLastClickY;
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	sal_Bool					bDragRect;
180*cdf0e10cSrcweir 	SCCOL					nDragStartX;
181*cdf0e10cSrcweir 	SCROW					nDragStartY;
182*cdf0e10cSrcweir 	SCCOL					nDragEndX;
183*cdf0e10cSrcweir 	SCROW					nDragEndY;
184*cdf0e10cSrcweir     InsCellCmd              meDragInsertMode;
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 	sal_uInt16					nCurrentPointer;
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir 	sal_Bool					bIsInScroll;
189*cdf0e10cSrcweir 	sal_Bool					bIsInPaint;
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 	ScDDComboBoxButton		aComboButton;
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 	Point					aCurMousePos;
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 	sal_uInt16					nPaintCount;
196*cdf0e10cSrcweir 	Rectangle				aRepaintPixel;
197*cdf0e10cSrcweir 	sal_Bool					bNeedsRepaint;
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 	sal_Bool					bAutoMarkVisible;
200*cdf0e10cSrcweir 	ScAddress				aAutoMarkPos;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	sal_Bool					bListValButton;
203*cdf0e10cSrcweir 	ScAddress				aListValPos;
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir 	Rectangle				aInvertRect;
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir 	DECL_LINK( PopupModeEndHdl, FloatingWindow* );
208*cdf0e10cSrcweir     DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 	sal_Bool			TestMouse( const MouseEvent& rMEvt, sal_Bool bAction );
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir 	sal_Bool			DoPageFieldSelection( SCCOL nCol, SCROW nRow );
213*cdf0e10cSrcweir     bool            DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
214*cdf0e10cSrcweir 	void			DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir 	void			DPMouseMove( const MouseEvent& rMEvt );
217*cdf0e10cSrcweir 	void			DPMouseButtonUp( const MouseEvent& rMEvt );
218*cdf0e10cSrcweir 	void			DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove );
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir     /**
221*cdf0e10cSrcweir      * Check if the mouse click is on a field popup button.
222*cdf0e10cSrcweir      *
223*cdf0e10cSrcweir      * @return bool true if the field popup menu has been launched and no
224*cdf0e10cSrcweir      *         further mouse event handling is necessary, false otherwise.
225*cdf0e10cSrcweir      */
226*cdf0e10cSrcweir     bool            DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj);
227*cdf0e10cSrcweir     void            DPLaunchFieldPopupMenu(
228*cdf0e10cSrcweir         const Point& rScrPos, const Size& rScrSize, const ScAddress& rPos, ScDPObject* pDPObj);
229*cdf0e10cSrcweir 
230*cdf0e10cSrcweir 	void			RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp );
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 	void			PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp );
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir 	void			UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect );
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 	sal_Bool 			IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
237*cdf0e10cSrcweir 	void			ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow,
238*cdf0e10cSrcweir                                 const String& aValue, bool bCheckForDates );
239*cdf0e10cSrcweir 	void			FilterSelect( sal_uLong nSel );
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir 	void			ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr );
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir 	void			ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr );
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir 	sal_Bool			HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir 	sal_Bool			DropScroll( const Point& rMousePos );
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir 	sal_Int8		AcceptPrivateDrop( const AcceptDropEvent& rEvt );
250*cdf0e10cSrcweir 	sal_Int8		ExecutePrivateDrop( const ExecuteDropEvent& rEvt );
251*cdf0e10cSrcweir 	sal_Int8		DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPosX, SCROW nDestPosY,
252*cdf0e10cSrcweir 									const Point& rLogicPos, sal_Int8 nDndAction );
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir     void            HandleMouseButtonDown( const MouseEvent& rMEvt );
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir 	sal_Bool			DrawMouseButtonDown(const MouseEvent& rMEvt);
257*cdf0e10cSrcweir 	sal_Bool			DrawMouseButtonUp(const MouseEvent& rMEvt);
258*cdf0e10cSrcweir 	sal_Bool			DrawMouseMove(const MouseEvent& rMEvt);
259*cdf0e10cSrcweir 	sal_Bool			DrawKeyInput(const KeyEvent& rKEvt);
260*cdf0e10cSrcweir 	sal_Bool			DrawCommand(const CommandEvent& rCEvt);
261*cdf0e10cSrcweir 	sal_Bool			DrawHasMarkedObj();
262*cdf0e10cSrcweir 	void			DrawEndAction();
263*cdf0e10cSrcweir 	void			DrawMarkDropObj( SdrObject* pObj );
264*cdf0e10cSrcweir 	SdrObject*		GetEditObject();
265*cdf0e10cSrcweir 	sal_Bool			IsMyModel(SdrEditView* pSdrView);
266*cdf0e10cSrcweir 	//void			DrawStartTimer();
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir 	void			DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer );
269*cdf0e10cSrcweir     void            DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev );
270*cdf0e10cSrcweir 	//sal_Bool			DrawBeforeScroll();
271*cdf0e10cSrcweir 	void			DrawAfterScroll(/*sal_Bool bVal*/);
272*cdf0e10cSrcweir 	//void			DrawMarks();
273*cdf0e10cSrcweir 	//sal_Bool			NeedDrawMarks();
274*cdf0e10cSrcweir 	void 			DrawComboButton( const Point&	rCellPos,
275*cdf0e10cSrcweir 									 long			nCellSizeX,
276*cdf0e10cSrcweir 									 long			nCellSizeY,
277*cdf0e10cSrcweir                                      sal_Bool           bArrowState,
278*cdf0e10cSrcweir 									 sal_Bool			bBtnIn  = sal_False );
279*cdf0e10cSrcweir 	Rectangle		GetListValButtonRect( const ScAddress& rButtonPos );
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir     void            DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, OutputDevice* pContentDev );
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir 	sal_Bool			GetEditUrl( const Point& rPos,
284*cdf0e10cSrcweir 								String* pName=0, String* pUrl=0, String* pTarget=0 );
285*cdf0e10cSrcweir 	sal_Bool			GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
286*cdf0e10cSrcweir 								String* pName=0, String* pUrl=0, String* pTarget=0 );
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir 	sal_Bool			HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, sal_uInt16* pIndex = NULL,
289*cdf0e10cSrcweir 										SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir 	sal_uInt16			HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
292*cdf0e10cSrcweir 									SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir 	void			PasteSelection( const Point& rPosPixel );
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir     void			SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, SCsROW nCellY );
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir     void            GetSelectionRects( ::std::vector< Rectangle >& rPixelRects );
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir protected:
301*cdf0e10cSrcweir     using Window::Resize;
302*cdf0e10cSrcweir 	virtual void 	Resize( const Size& rSize );
303*cdf0e10cSrcweir 	virtual void 	PrePaint();
304*cdf0e10cSrcweir 	virtual void 	Paint( const Rectangle& rRect );
305*cdf0e10cSrcweir 	virtual void	KeyInput(const KeyEvent& rKEvt);
306*cdf0e10cSrcweir 	virtual void	GetFocus();
307*cdf0e10cSrcweir 	virtual void	LoseFocus();
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir 	virtual void	RequestHelp( const HelpEvent& rEvt );
310*cdf0e10cSrcweir 	virtual void	Command( const CommandEvent& rCEvt );
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir 	virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
313*cdf0e10cSrcweir 	virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
314*cdf0e10cSrcweir 	virtual void	StartDrag( sal_Int8 nAction, const Point& rPosPixel );
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir public:
317*cdf0e10cSrcweir 	ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhichPos );
318*cdf0e10cSrcweir 	~ScGridWindow();
319*cdf0e10cSrcweir 
320*cdf0e10cSrcweir 	// #i70788# flush and get overlay
321*cdf0e10cSrcweir 	::sdr::overlay::OverlayManager* getOverlayManager();
322*cdf0e10cSrcweir 	void flushOverlayManager();
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir 	virtual void	DataChanged( const DataChangedEvent& rDCEvt );
325*cdf0e10cSrcweir 
326*cdf0e10cSrcweir 	virtual void 	MouseButtonDown( const MouseEvent& rMEvt );
327*cdf0e10cSrcweir 	virtual void	MouseButtonUp( const MouseEvent& rMEvt );
328*cdf0e10cSrcweir 	virtual void	MouseMove( const MouseEvent& rMEvt );
329*cdf0e10cSrcweir     virtual long    PreNotify( NotifyEvent& rNEvt );
330*cdf0e10cSrcweir     virtual void	Tracking( const TrackingEvent& rTEvt );
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
333*cdf0e10cSrcweir 
334*cdf0e10cSrcweir 	void			FakeButtonUp();
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 	Point			GetMousePosPixel() const;
337*cdf0e10cSrcweir 	void			UpdateStatusPosSize();
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir 	void			ClickExtern();
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir 	void			SetPointer( const Pointer& rPointer );
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir 	void			MoveMouseStatus( ScGridWindow &rDestWin );
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir 	void			ScrollPixel( long nDifX, long nDifY );
346*cdf0e10cSrcweir 	void			UpdateEditViewPos();
347*cdf0e10cSrcweir 
348*cdf0e10cSrcweir 	void			UpdateFormulas();
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir 	void			DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect );
351*cdf0e10cSrcweir 	void			DoScenarioMenue( const ScRange& rScenRange );
352*cdf0e10cSrcweir 
353*cdf0e10cSrcweir     void            LaunchPageFieldMenu( SCCOL nCol, SCROW nRow );
354*cdf0e10cSrcweir     void            LaunchDPFieldMenu( SCCOL nCol, SCROW nRow );
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir     ::com::sun::star::sheet::DataPilotFieldOrientation GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const;
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir 	void			DrawButtons( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
359*cdf0e10cSrcweir                                     ScTableInfo& rTabInfo, OutputDevice* pContentDev );
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir     using Window::Draw;
362*cdf0e10cSrcweir 	void			Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
363*cdf0e10cSrcweir 						ScUpdateMode eMode = SC_UPDATE_ALL );
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 	void			InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
366*cdf0e10cSrcweir 									sal_Bool bTestMerge = sal_False, sal_Bool bRepeat = sal_False );
367*cdf0e10cSrcweir 
368*cdf0e10cSrcweir //UNUSED2008-05  void			DrawDragRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
369*cdf0e10cSrcweir 
370*cdf0e10cSrcweir 	void			CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir 	void			HideCursor();
373*cdf0e10cSrcweir 	void			ShowCursor();
374*cdf0e10cSrcweir 	void 			DrawCursor();
375*cdf0e10cSrcweir 	void			DrawAutoFillMark();
376*cdf0e10cSrcweir 	void			UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange);
377*cdf0e10cSrcweir 
378*cdf0e10cSrcweir 	void			UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos );
379*cdf0e10cSrcweir 
380*cdf0e10cSrcweir 	sal_Bool			ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard );
381*cdf0e10cSrcweir 	void			HideNoteMarker();
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir 	MapMode			GetDrawMapMode( sal_Bool bForce = sal_False );
384*cdf0e10cSrcweir 
385*cdf0e10cSrcweir 	void			ContinueDrag();
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir 	void			StopMarking();
388*cdf0e10cSrcweir 	void			UpdateInputContext();
389*cdf0e10cSrcweir 
390*cdf0e10cSrcweir 	void			CheckInverted()		{ if (nPaintCount) bNeedsRepaint = sal_True; }
391*cdf0e10cSrcweir 
392*cdf0e10cSrcweir 	void			DoInvertRect( const Rectangle& rPixel );
393*cdf0e10cSrcweir 
394*cdf0e10cSrcweir 	void			CheckNeedsRepaint();
395*cdf0e10cSrcweir 
396*cdf0e10cSrcweir     void            UpdateDPFromFieldPopupMenu();
397*cdf0e10cSrcweir 
398*cdf0e10cSrcweir     void            UpdateVisibleRange();
399*cdf0e10cSrcweir 
400*cdf0e10cSrcweir 	// #114409#
401*cdf0e10cSrcweir 	void CursorChanged();
402*cdf0e10cSrcweir 	void DrawLayerCreated();
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir     void            DeleteCursorOverlay();
405*cdf0e10cSrcweir     void            UpdateCursorOverlay();
406*cdf0e10cSrcweir     void            DeleteSelectionOverlay();
407*cdf0e10cSrcweir     void            UpdateSelectionOverlay();
408*cdf0e10cSrcweir     void            DeleteAutoFillOverlay();
409*cdf0e10cSrcweir     void            UpdateAutoFillOverlay();
410*cdf0e10cSrcweir     void            DeleteDragRectOverlay();
411*cdf0e10cSrcweir     void            UpdateDragRectOverlay();
412*cdf0e10cSrcweir     void            DeleteHeaderOverlay();
413*cdf0e10cSrcweir     void            UpdateHeaderOverlay();
414*cdf0e10cSrcweir     void            DeleteShrinkOverlay();
415*cdf0e10cSrcweir     void            UpdateShrinkOverlay();
416*cdf0e10cSrcweir     void            UpdateAllOverlays();
417*cdf0e10cSrcweir 
418*cdf0e10cSrcweir protected:
419*cdf0e10cSrcweir 	// #114409#
420*cdf0e10cSrcweir 	void ImpCreateOverlayObjects();
421*cdf0e10cSrcweir 	void ImpDestroyOverlayObjects();
422*cdf0e10cSrcweir 
423*cdf0e10cSrcweir };
424*cdf0e10cSrcweir 
425*cdf0e10cSrcweir 
426*cdf0e10cSrcweir 
427*cdf0e10cSrcweir #endif
428*cdf0e10cSrcweir 
429