viscrs.hxx (1d2dbeb0) viscrs.hxx (69a74367)
1/**************************************************************
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

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

25
26#include <vcl/cursor.hxx>
27#include "swcrsr.hxx"
28#include "swrect.hxx"
29#include "swregion.hxx"
30
31class SwCrsrShell;
32class SwShellCrsr;
1/**************************************************************
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

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

25
26#include <vcl/cursor.hxx>
27#include "swcrsr.hxx"
28#include "swrect.hxx"
29#include "swregion.hxx"
30
31class SwCrsrShell;
32class SwShellCrsr;
33class SwTxtInputFld;
33
34// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------
35
36class SwVisCrsr
37#ifdef SW_CRSR_TIMER
38 : private Timer
39#endif
40{

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

71#endif
72};
73
74
75// ------ Ab hier Klassen / Methoden fuer die Selectionen -------
76
77// #i75172# predefines
78namespace sdr { namespace overlay { class OverlayObject; }}
34
35// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------
36
37class SwVisCrsr
38#ifdef SW_CRSR_TIMER
39 : private Timer
40#endif
41{

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

72#endif
73};
74
75
76// ------ Ab hier Klassen / Methoden fuer die Selectionen -------
77
78// #i75172# predefines
79namespace sdr { namespace overlay { class OverlayObject; }}
80namespace sw { namespace overlay { class OverlayRangesOutline; }}
79
80class SwSelPaintRects : public SwRects
81{
82 friend void _InitCore();
83 friend void _FinitCore();
84
85 static long nPixPtX, nPixPtY;
86 static MapMode *pMapMode;
87
88 // die Shell
89 const SwCrsrShell* pCShell;
90
91 virtual void Paint( const Rectangle& rRect );
81
82class SwSelPaintRects : public SwRects
83{
84 friend void _InitCore();
85 friend void _FinitCore();
86
87 static long nPixPtX, nPixPtY;
88 static MapMode *pMapMode;
89
90 // die Shell
91 const SwCrsrShell* pCShell;
92
93 virtual void Paint( const Rectangle& rRect );
92 virtual void FillRects() = 0;
93
94 // #i75172#
95 sdr::overlay::OverlayObject* mpCursorOverlay;
96
97 // #i75172# access to mpCursorOverlay for swapContent
98 sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
99 void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
100
94
95 // #i75172#
96 sdr::overlay::OverlayObject* mpCursorOverlay;
97
98 // #i75172# access to mpCursorOverlay for swapContent
99 sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
100 void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
101
102 bool mbShowTxtInputFldOverlay;
103 sw::overlay::OverlayRangesOutline* mpTxtInputFldOverlay;
104
105 void HighlightInputFld();
106
101public:
102 SwSelPaintRects( const SwCrsrShell& rCSh );
103 virtual ~SwSelPaintRects();
104
107public:
108 SwSelPaintRects( const SwCrsrShell& rCSh );
109 virtual ~SwSelPaintRects();
110
105 // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
111 virtual void FillRects() = 0;
112
113 // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
106 // make a complete swap access to mpCursorOverlay is needed there
107 void swapContent(SwSelPaintRects& rSwap);
108
109 void Show();
110 void Hide();
111 void Invalidate( const SwRect& rRect );
112
114 // make a complete swap access to mpCursorOverlay is needed there
115 void swapContent(SwSelPaintRects& rSwap);
116
117 void Show();
118 void Hide();
119 void Invalidate( const SwRect& rRect );
120
121 inline void SetShowTxtInputFldOverlay( const bool bShow )
122 {
123 mbShowTxtInputFldOverlay = bShow;
124 }
125
113 const SwCrsrShell* GetShell() const { return pCShell; }
114 // check current MapMode of the shell and set possibly the static members.
115 // Optional set the parameters pX, pY
116 static void Get1PixelInLogic( const ViewShell& rSh,
117 long* pX = 0, long* pY = 0 );
118};
119
120
121class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
122{
123 // Dokument-Positionen der Start/End-Charakter einer SSelection
124 Point aMkPt, aPtPt;
125 const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt
126
126 const SwCrsrShell* GetShell() const { return pCShell; }
127 // check current MapMode of the shell and set possibly the static members.
128 // Optional set the parameters pX, pY
129 static void Get1PixelInLogic( const ViewShell& rSh,
130 long* pX = 0, long* pY = 0 );
131};
132
133
134class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
135{
136 // Dokument-Positionen der Start/End-Charakter einer SSelection
137 Point aMkPt, aPtPt;
138 const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt
139
127 virtual void FillRects(); // fuer Table- und normalen Crsr
128
129 using SwCursor::UpDown;
130
131public:
132 SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos );
133 SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos,
134 const Point& rPtPos, SwPaM* pRing = 0 );
135 SwShellCrsr( SwShellCrsr& );
136 virtual ~SwShellCrsr();
137
140 using SwCursor::UpDown;
141
142public:
143 SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos );
144 SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos,
145 const Point& rPtPos, SwPaM* pRing = 0 );
146 SwShellCrsr( SwShellCrsr& );
147 virtual ~SwShellCrsr();
148
149 virtual void FillRects(); // fuer Table- und normalen Crsr
150
138 void Show(); // Update und zeige alle Selektionen an
139 void Hide(); // verstecke alle Selektionen
140 void Invalidate( const SwRect& rRect );
141
142 const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
143 Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
144 const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
145 Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }

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

177
178
179class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor
180{
181 // die Selection hat die gleiche Reihenfolge wie die
182 // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
183 // etwas geloescht, dann muss es auch im anderen erfolgen!!
184
151 void Show(); // Update und zeige alle Selektionen an
152 void Hide(); // verstecke alle Selektionen
153 void Invalidate( const SwRect& rRect );
154
155 const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
156 Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
157 const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
158 Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }

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

190
191
192class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor
193{
194 // die Selection hat die gleiche Reihenfolge wie die
195 // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
196 // etwas geloescht, dann muss es auch im anderen erfolgen!!
197
185
186public:
187 SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos );
188 SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
189 const SwPosition &rMkPos, const Point& rMkPt,
190 const SwPosition &rPtPos, const Point& rPtPt );
191 virtual ~SwShellTableCrsr();
192
193 virtual void FillRects(); // fuer Table- und normalen Crsr

--- 26 unchanged lines hidden ---
198public:
199 SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos );
200 SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
201 const SwPosition &rMkPos, const Point& rMkPt,
202 const SwPosition &rPtPos, const Point& rPtPt );
203 virtual ~SwShellTableCrsr();
204
205 virtual void FillRects(); // fuer Table- und normalen Crsr

--- 26 unchanged lines hidden ---