xref: /aoo42x/main/svx/inc/svx/svdpntv.hxx (revision 3334a7e6)
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
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
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.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SVDPNTV_HXX
25 #define _SVDPNTV_HXX
26 
27 #include <svl/brdcst.hxx>
28 #include <svl/lstner.hxx>
29 #include <svl/smplhint.hxx>
30 #include <svl/undo.hxx>
31 #include <svx/svddrag.hxx>
32 #include <svx/svdlayer.hxx>  // fuer SetOfByte
33 #include <vcl/window.hxx>
34 #include <svtools/colorcfg.hxx>
35 #include <com/sun/star/awt/XControlContainer.hpp>
36 #include <svl/itemset.hxx>
37 #include <vcl/timer.hxx>
38 #include "svx/svxdllapi.h"
39 #include <svtools/optionsdrawinglayer.hxx>
40 #include <unotools/options.hxx>
41 
42 //************************************************************
43 //   Pre-Defines
44 //************************************************************
45 
46 class SdrPageWindow;
47 
48 namespace com { namespace sun { namespace star { namespace awt {
49 	class XControlContainer;
50 }}}}
51 
52 class SdrPage;
53 class SdrView;
54 class SfxItemSet;
55 class SfxStyleSheet;
56 class SdrOle2Obj;
57 class SdrModel;
58 class SdrObject;
59 class SdrViewUserMarker;
60 class B2dIAOManager;
61 
62 #ifdef DBG_UTIL
63 class SdrItemBrowser;
64 #endif
65 
66 namespace sdr {	namespace contact {
67 	class ViewObjectContactRedirector;
68 }}
69 
70 //************************************************************
71 //   Defines for AnimationMode
72 //************************************************************
73 
74 enum SdrAnimationMode
75 {
76 	SDR_ANIMATION_ANIMATE,
77 	SDR_ANIMATION_DONT_ANIMATE,
78 	SDR_ANIMATION_DISABLE
79 };
80 
81 //************************************************************
82 //   Typedef's und defines
83 //************************************************************
84 
85 typedef unsigned char TRISTATE;
86 #define FUZZY					(2)
87 #define SDR_ANYFORMAT			(0xFFFFFFFF)
88 #define SDR_ANYITEM				(0xFFFF)
89 #define SDRVIEWWIN_NOTFOUND		(0xFFFF)
90 
91 
92 ////////////////////////////////////////////////////////////////////////////////////////////////////
93 class SdrPaintView;
94 
95 namespace sdr
96 {
97 	namespace contact
98 	{
99 		class ViewObjectContactRedirector;
100 	} // end of namespace contact
101 } // end of namespace sdr
102 
103 ////////////////////////////////////////////////////////////////////////////////////////////////////
104 
105 
106 class SVX_DLLPUBLIC SvxViewHint : public SfxHint
107 {
108 public:
109     enum HintType { SVX_HINT_VIEWCHANGED };
110     TYPEINFO();
111     SvxViewHint (HintType eType);
112     HintType GetHintType (void) const;
113 
114 private:
115     HintType meHintType;
116 };
117 
118 // typedefs for a list of SdrPaintWindows
119 class SdrPaintWindow;
120 typedef ::std::vector< SdrPaintWindow* > SdrPaintWindowVector;
121 
122 ////////////////////////////////////////////////////////////////////////////////////////////////////
123 
124 class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, public SfxBroadcaster, public ::utl::ConfigurationListener
125 {
126 	friend class				SdrPageView;
127 	friend class				FrameAnimator;
128 	friend class				SdrGrafObj;
129 
130 protected:
131 	// #114409#-2 Migrate Encirclement
132 	class ImplEncirclementOverlay*				mpEncirclementOverlay;
133 
134 	SdrModel*					pMod;
135 #ifdef DBG_UTIL
136 	SdrItemBrowser*				pItemBrowser;
137 #endif
138 	const OutputDevice*			pActualOutDev; // Nur zum vergleichen
139 	OutputDevice*				pDragWin;
140 	SfxStyleSheet*				pDefaultStyleSheet;
141 
142 	String						aAktLayer;     // Aktueller Zeichenlayer
143 	String						aMeasureLayer; // Aktueller Layer fuer Bemassung
144 
145 //	Container					aPagV;         // Liste von SdrPageViews
146 	SdrPageView*				mpPageView;
147 
148 	// All windows this view is displayed on
149 	SdrPaintWindowVector		maPaintWindows;
150 
151 	MapMode						aActualMapMode;
152 	Size						aGridBig; // muss dann mal raus
153 	Size						aGridFin; // muss dann mal raus
154 	SdrDragStat					aDragStat;
155 	Rectangle					aMaxWorkArea;
156 	SfxItemSet					aDefaultAttr;
157 	Timer						aComeBackTimer;
158 
159 	SdrAnimationMode			eAnimationMode;
160 
161 	sal_uInt16						nHitTolPix;
162 	sal_uInt16						nMinMovPix;
163 	sal_uInt16						nHitTolLog;
164 	sal_uInt16						nMinMovLog;
165 	sal_uIntPtr						nMasterCacheMode;
166 	sal_uIntPtr                       nGraphicManagerDrawMode;
167 
168 	// hold an incarnation of Drawinglayer configuration options
169     SvtOptionsDrawinglayer		maDrawinglayerOpt;
170 
171 	unsigned					bPageVisible : 1;
172     unsigned                    bPageBorderVisible : 1;
173 	unsigned					bBordVisible : 1;
174 	unsigned					bGridVisible : 1;
175 	unsigned					bGridFront : 1;
176 	unsigned					bHlplVisible : 1;
177 	unsigned					bHlplFront : 1;
178 	unsigned					bGlueVisible : 1;    // Persistent. Klebepunkte anzeigen
179 	unsigned					bGlueVisible2 : 1;   // Klebepunkte auch bei GluePointEdit anzeigen
180 	unsigned					bGlueVisible3 : 1;   // Klebepunkte auch bei EdgeTool anzeigen
181 	unsigned					bGlueVisible4 : 1;   // Klebepunkte anzeigen, wenn 1 Edge markiert
182 	unsigned					bRestoreColors : 1;   // Pens und Brushes werden zurueckgesetzt.
183 	unsigned					bSomeObjChgdFlag : 1;
184 	unsigned					bSwapAsynchron : 1;
185 	unsigned					bPrintPreview : 1;
186 
187 	// sal_Bool fuer die Verwaltung des anzuzeigenden Status
188 	// Gruppe Betreten/Verlassen. Default ist sal_True, wird aber
189 	// beispielsweise beim Chart auf sal_False gesetzt, da dort
190 	// die Ghosted-Effekte zur Darstellug unerwuenscht sind.
191 	unsigned					bVisualizeEnteredGroup : 1;
192 	unsigned					bAnimationPause : 1;
193 
194 	// #114898#
195 	// Flag which decides if buffered output for this view is allowed. When
196 	// set, PreRendering for PageView rendering will be used. Default is sal_False
197 	unsigned					mbBufferedOutputAllowed : 1;
198 
199 	// #114898#
200 	// Flag which decides if buffered overlay for this view is allowed. When
201 	// set, the output will be buffered in an overlay vdev. When not, overlay is
202 	// directly painted to OutDev. Default is sal_False.
203 	unsigned					mbBufferedOverlayAllowed : 1;
204 
205 	// allow page painting at all?
206 	unsigned					mbPagePaintingAllowed : 1;
207 
208 	// is this a preview renderer?
209 	unsigned					mbPreviewRenderer : 1;
210 
211     // flags for calc and sw for suppressing OLE, CHART or DRAW objects
212     unsigned                    mbHideOle : 1;
213     unsigned                    mbHideChart : 1;
214     unsigned                    mbHideDraw : 1;             // hide draw objects other than form controls
215     unsigned                    mbHideFormControl : 1;      // hide form controls only
216 
217 public:
218 	// #114898#
219 	// interface for PagePaintingAllowed flag
220 	bool IsBufferedOutputAllowed() const;
221 	void SetBufferedOutputAllowed(bool bNew);
222 
223 	// interface for BufferedOverlayAllowed flag
224 	bool IsBufferedOverlayAllowed() const;
225 	void SetBufferedOverlayAllowed(bool bNew);
226 
227 	// allow page painting at all?
228 	sal_Bool IsPagePaintingAllowed() const;
229 	void SetPagePaintingAllowed(bool bNew);
230 
231 protected:
232 	svtools::ColorConfig            maColorConfig;
233 	Color							maGridColor;
234 
235 	// interface to SdrPaintWindow
236 protected:
237 	void AppendPaintWindow(SdrPaintWindow& rNew);
238 	SdrPaintWindow* RemovePaintWindow(SdrPaintWindow& rOld);
239 	void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 );
240 
241 public:
242 	sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
243 	SdrPaintWindow* FindPaintWindow(const OutputDevice& rOut) const;
244 	SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const;
245 	// replacement for GetWin(0), may return 0L (!)
246 	OutputDevice* GetFirstOutputDevice() const;
247 
248 private:
249 	SVX_DLLPRIVATE void ImpClearVars();
250 	DECL_LINK(ImpComeBackHdl,Timer*);
251 
252 protected:
253 	sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const;
254 	sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const;
255 
256 	// Wenn man den IdleStatus des Systems nicht abwarten will (auf const geschummelt):
257 	void FlushComeBackTimer() const;
258 	void TheresNewMapMode();
259 	void ImpSetGlueVisible2(bool bOn) { if (bGlueVisible2!=(unsigned)bOn) { bGlueVisible2=bOn; if (!bGlueVisible && !bGlueVisible3 && !bGlueVisible4) GlueInvalidate(); } }
260 	void ImpSetGlueVisible3(bool bOn) { if (bGlueVisible3!=(unsigned)bOn) { bGlueVisible3=bOn; if (!bGlueVisible && !bGlueVisible2 && !bGlueVisible4) GlueInvalidate(); } }
261 	void ImpSetGlueVisible4(bool bOn) { if (bGlueVisible4!=(unsigned)bOn) { bGlueVisible4=bOn; if (!bGlueVisible && !bGlueVisible2 && !bGlueVisible3) GlueInvalidate(); } }
262 	sal_Bool ImpIsGlueVisible2() const { return bGlueVisible2; }
263 	sal_Bool ImpIsGlueVisible3() const { return bGlueVisible3; }
264 	sal_Bool ImpIsGlueVisible4() const { return bGlueVisible4; }
265 
266 public:
267 	sal_Bool ImpIsGlueVisible() { return bGlueVisible || bGlueVisible2 || bGlueVisible3 || bGlueVisible4; }
268 protected:
269 
270 	virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
271 	void GlueInvalidate() const;
272 
273 	void ShowEncirclement(OutputDevice* pOut);
274 	void HideEncirclement(OutputDevice* pOut);
275 	void DrawEncirclement(OutputDevice* pOut) const;
276 
277 	// ModelHasChanged wird gerufen, sobald nach beliebig vielen HINT_OBJCHG
278 	// das System wieder idle ist (StarView-Timer). Wer diese Methode ueberlaed,
279 	// muss unbedingt ModelHasChanged() der Basisklasse rufen.
280 	virtual void ModelHasChanged();
281 
282 protected:
283 	// #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
284 	SdrPaintView(SdrModel* pModel1, OutputDevice* pOut = 0L);
285 	virtual ~SdrPaintView();
286 
287 public:
288 	TYPEINFO();
289 
290 	virtual void ClearPageView();
291 //	virtual void ClearAll();
292 //	virtual void Clear(); // PageViews loeschen, Markierungen weg, ...
293 	SdrModel* GetModel() const { return pMod; }
294 
295 	virtual sal_Bool IsAction() const;
296 	virtual void MovAction(const Point& rPnt);
297 	virtual void EndAction();
298 	virtual void BckAction();
299 	virtual void BrkAction(); // Alle Actions z.B. Draggen abbrechen.
300 	virtual void TakeActionRect(Rectangle& rRect) const;
301 
302 	// info about TextEdit. Default is sal_False.
303 	virtual bool IsTextEdit() const;
304 
305 	// info about TextEditPageView. Default is 0L.
306 	virtual SdrPageView* GetTextEditPageView() const;
307 
308 	// Muss dann bei jedem Fensterwechsel (wenn die SdrView in mehreren
309 	// Fenstern gleichzeitig dargestellt wird (->z.B. Splitter)) und bei
310 	// jedem MapMode(Scaling)-wechsel gerufen werden, damit ich aus meinen
311 	// Pixelwerten logische Werte berechnen kann.
312 	void SetActualWin(const OutputDevice* pWin);
313 	void SetMinMoveDistancePixel(sal_uInt16 nVal) { nMinMovPix=nVal; TheresNewMapMode(); }
314 	sal_uInt16 GetMinMoveDistancePixel() const { return (sal_uInt16)nMinMovPix; }
315 	void SetHitTolerancePixel(sal_uInt16 nVal) { nHitTolPix=nVal; TheresNewMapMode(); }
316 	sal_uInt16 GetHitTolerancePixel() const { return (sal_uInt16)nHitTolPix; }
317 
318     // data read access on logic HitTolerance and MinMoveTolerance
319     sal_uInt16 getHitTolLog() const { return nHitTolLog; }
320     sal_uInt16 getMinMovLog() const { return nMinMovLog; }
321 
322 	// Flag zur Visualisierung von Gruppen abfragen/testen
323 	sal_Bool DoVisualizeEnteredGroup() const { return bVisualizeEnteredGroup; }
324 	void SetVisualizeEnteredGroup(sal_Bool bNew) { bVisualizeEnteredGroup = bNew; }
325 
326 	// Am DragStatus laesst sich beispielsweise erfragen, welche
327 	// entfernung bereits gedraggd wurde, etc.
328 	const SdrDragStat& GetDragStat() const { return aDragStat; }
329 
330 	// Anmelden/Abmelden einer PageView an der View.
331 	// Dieselbe // Seite kann nicht mehrfach angemeldet werden.
332 	// Methoden mit dem Suffix PgNum erwarten als numerischen Parameter
333 	// eine Seitennummer (0...). Methoden mit dem Suffix PvNum erwarten
334 	// degagen als numerischen Parameter die Nummer der PageView an der
335 	// SdrView (Iterieren ueber alle angemeldeten Pages).
336 	virtual SdrPageView* ShowSdrPage(SdrPage* pPage);
337 	virtual void HideSdrPage();
338 
339 	// Iterieren ueber alle angemeldeten PageViews
340 //	sal_uInt16 GetPageViewCount() const { return sal_uInt16(aPagV.Count()); }
341 //	SdrPageView* GetPageViewByIndex(sal_uInt16 nPvNum) const { return ((SdrPageView*)aPagV.GetObject(nPvNum)); }
342 	SdrPageView* GetSdrPageView() const { return mpPageView; }
343 
344 	// Pageview einer bestimmten Seite ermitteln
345 //	SdrPageView* GetPageViewByPage(const SdrPage* pPage) const;
346 //	sal_uInt16 GetIndexByPageView(const SdrPageView* pPV) const;
347 
348 	// Test, ob eine Seite getroffen
349 //	SdrPageView* HitPage(const Point& rPnt) const;
350 
351 	// Die Seite, die dem Punkt am naechsten ist. Liefert nur NULL,
352 	// wenn absolut keine Seite angemeldet ist.
353 //	SdrPageView* GetPageViewByPosition(const Point& rPnt) const;
354 
355 	// Eine SdrView kann auf mehreren Fenstern gleichzeitig abgebiltet sein:
356 	virtual void AddWindowToPaintView(OutputDevice* pNewWin);
357 	virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
358 
359 	void SetLayerVisible(const String& rName, sal_Bool bShow=sal_True);
360 	bool IsLayerVisible(const String& rName) const;
361 	void SetAllLayersVisible(sal_Bool bShow=sal_True);
362 
363 	void SetLayerLocked(const String& rName, sal_Bool bLock=sal_True);
364 	bool IsLayerLocked(const String& rName) const;
365 	void SetAllLayersLocked(sal_Bool bLock=sal_True);
366 
367 	void SetLayerPrintable(const String& rName, sal_Bool bPrn=sal_True);
368 	bool IsLayerPrintable(const String& rName) const;
369 	void SetAllLayersPrintable(sal_Bool bPrn=sal_True);
370 
371 	// PrePaint call forwarded from app windows
372     void PrePaint();
373 
374 	// PostPaint call forwarded from app windows
375     void PostPaint();
376 
377 	////////////////////////////////////////////////////////////////////////////////////////////////////
378 	// used internally for Draw/Impress/sch/chart2
379 	virtual void CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0);
380 
381 	// #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps
382 	//
383 	// BeginCompleteRedraw returns (or even creates) a SdrPaintWindow whcih shall then be used as
384 	// target for paints. Since paints may be buffered, use it's GetTargetOutputDevice() method which will
385 	// return the buffer in case of bufered.
386 	// DoCompleteRedraw draws the DrawingLayer hierarchy then.
387 	// EndCompleteRedraw does the necessary refreshes, evtl. paints text edit and overlay and evtl destroys the
388 	// SdrPaintWindow again. This means: the SdrPaintWindow is no longer safe after this closing call.
389 	virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut);
390 	virtual void DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0);
391 	virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
392 
393 	////////////////////////////////////////////////////////////////////////////////////////////////////
394 	// used for the other applications basctl/sc/sw which call DrawLayer at PageViews
395 	// #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
396 	// #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
397 	SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false);
398 	void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
399 
400 protected:
401 	////////////////////////////////////////////////////////////////////////////////////////////////////
402 	// used to call the old PaintOutlinerView at the single PageViews. Will be replaced when the
403 	// outliner will be displayed on the overlay in edit mode.
404 	void ImpTextEditDrawing(SdrPaintWindow& rPaintWindow) const;
405 
406 	////////////////////////////////////////////////////////////////////////////////////////////////////
407 	// used to paint the form layer after the PreRender device is flushed (painted) to the window.
408 	void ImpFormLayerDrawing(SdrPaintWindow& rPaintWindow) const;
409 
410 public:
411 	sal_Bool IsPageVisible() const { return bPageVisible; }             // Seite (weisse Flaeche) malen oder nicht
412 	sal_Bool IsPageBorderVisible() const { return bPageBorderVisible; } // Seite (weisse Flaeche) malen oder nicht
413 	sal_Bool IsBordVisible() const { return bBordVisible; }             // Seitenrandlinie malen oder nicht
414 	sal_Bool IsGridVisible() const { return bGridVisible; }             // Rastergitter malen oder nicht
415 	sal_Bool IsGridFront() const { return bGridFront  ; }               // Rastergitter ueber die Objekte druebermalen oder dahinter
416 	sal_Bool IsHlplVisible() const { return bHlplVisible; }             // Hilfslinien der Seiten malen oder nicht
417 	sal_Bool IsHlplFront() const { return bHlplFront  ; }               // Hilfslinie ueber die Objekte druebermalen oder dahinter
418 	sal_Bool IsGlueVisible() const { return bGlueVisible; }             // Konnektoren der objekte sichtbar oder nicht
419 	Color GetGridColor() const;
420 	void SetPageVisible(bool bOn = true) { bPageVisible=bOn; InvalidateAllWin(); }
421 	void SetPageBorderVisible(bool bOn = true) { bPageBorderVisible=bOn; InvalidateAllWin(); }
422 	void SetBordVisible(bool bOn = true) { bBordVisible=bOn; InvalidateAllWin(); }
423 	void SetGridVisible(bool bOn = true) { bGridVisible=bOn; InvalidateAllWin(); }
424 	void SetGridFront(bool bOn = true) { bGridFront  =bOn; InvalidateAllWin(); }
425 	void SetHlplVisible(bool bOn = true) { bHlplVisible=bOn; InvalidateAllWin(); }
426 	void SetHlplFront(bool bOn = true) { bHlplFront  =bOn; InvalidateAllWin(); }
427 	void SetGlueVisible(bool bOn = true) { if (bGlueVisible!=(unsigned)bOn) { bGlueVisible=bOn; if (!bGlueVisible2 && !bGlueVisible3 && !bGlueVisible4) GlueInvalidate(); } }
428 	void SetGridColor( Color aColor );
429 
430 	sal_Bool IsPreviewRenderer() const { return (sal_Bool )mbPreviewRenderer; }
431 	void SetPreviewRenderer(bool bOn) { if((unsigned)bOn != mbPreviewRenderer) { mbPreviewRenderer=bOn; }}
432 
433     // access methods for calc and sw hide object modes
434     bool getHideOle() const { return mbHideOle; }
435     bool getHideChart() const { return mbHideChart; }
436     bool getHideDraw() const { return mbHideDraw; }
437     bool getHideFormControl() const { return mbHideFormControl; }
438     void setHideOle(bool bNew) { if(bNew != (bool)mbHideOle) mbHideOle = bNew; }
439     void setHideChart(bool bNew) { if(bNew != (bool)mbHideChart) mbHideChart = bNew; }
440     void setHideDraw(bool bNew) { if(bNew != (bool)mbHideDraw) mbHideDraw = bNew; }
441     void setHideFormControl(bool bNew) { if(bNew != (bool)mbHideFormControl) mbHideFormControl = bNew; }
442 
443     void SetGridCoarse(const Size& rSiz) { aGridBig=rSiz; }
444 	void SetGridFine(const Size& rSiz) { aGridFin=rSiz; if (aGridFin.Height()==0) aGridFin.Height()=aGridFin.Width(); if (bGridVisible) InvalidateAllWin(); } // #40479#
445 	const Size& GetGridCoarse() const { return aGridBig; }
446 	const Size& GetGridFine() const { return aGridFin; }
447 
448 	void InvalidateAllWin();
449 	void InvalidateAllWin(const Rectangle& rRect, sal_Bool bPlus1Pix=sal_False);
450 
451 	// Wenn die View kein Invalidate() an den Fenstern durchfuehren soll, muss
452 	// man diese beiden folgenden Methoden ueberladen und entsprechend anders
453 	// reagieren.
454 	virtual void InvalidateOneWin(Window& rWin);
455 	virtual void InvalidateOneWin(Window& rWin, const Rectangle& rRect);
456 
457 	void SetActiveLayer(const String& rName) { aAktLayer=rName; }
458 	const String&  GetActiveLayer() const { return aAktLayer; }
459 
460 	// Verlassen einer betretenen Objektgruppe aller sichtbaren Seiten.
461 	// (wie MsDos chdir ..)
462 	void LeaveOneGroup();
463 
464 	// Verlassen aller betretenen Objektgruppen aller sichtbaren Seiten.
465 	// (wie MsDos chdir \)
466 	void LeaveAllGroup();
467 
468 	// Feststellen, ob Leave sinnvoll ist.
469 	bool IsGroupEntered() const;
470 
471 	// DefaultAttribute an der View: Neu erzeugte Objekte bekommen diese
472 	// Attribute direkt nach dem Erzeugen erstmal zugewiesen.
473 	void SetDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll);
474 	const SfxItemSet& GetDefaultAttr() const { return aDefaultAttr; }
475 	void SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr);
476 	SfxStyleSheet* GetDefaultStyleSheet() const { return pDefaultStyleSheet; }
477 
478 	void SetNotPersistDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll);
479 	void MergeNotPersistDefaultAttr(SfxItemSet& rAttr, sal_Bool bOnlyHardAttr) const;
480 
481 	// Aufziehen eines animierten Rechtecks fuer Applikationsspeziefische
482 	// Verwendung. Alle Positionsangaben in logischen View-Koordinaten.
483 	// pOut bezeichnet das OutputDevice, in das animierte Rechteck dargestellt
484 	// werden soll. Wird NULL uebergeben, wird es in allen an der View
485 	// angemeldeten OutputDevices gleichzeitig dargestellt.
486 	void BegEncirclement(const Point& rPnt);
487 	void MovEncirclement(const Point& rPnt);
488 	Rectangle EndEncirclement(sal_Bool bNoJustify = sal_False);
489 	void BrkEncirclement();
490 	sal_Bool IsEncirclement() const { return (0L != mpEncirclementOverlay); }
491 
492 	// use this mode as mode to draw all internal GraphicManager objects with
493 	sal_uIntPtr GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode; }
494 	void SetGraphicManagerDrawMode( sal_uIntPtr nMode ) { nGraphicManagerDrawMode = nMode; }
495 
496 	// SwapIn (z.B. von Grafiken) asynchron durchfuehren. Also nicht
497 	// beim Paint sofort nachladen, sondern dort das Nachladen anstossen.
498 	// Nach Abschluss des Nachladens wird das Objekt dann angezeigt.
499 	// Hat nur z.Zt. Wirkung, wenn SwapGraphics am Model eingeschaltet ist.
500 	// Default=FALSE. Flag ist nicht persistent.
501 	sal_Bool IsSwapAsynchron() const { return bSwapAsynchron; }
502 	void SetSwapAsynchron(sal_Bool bJa=sal_True) { bSwapAsynchron=bJa; }
503 	virtual sal_Bool KeyInput(const KeyEvent& rKEvt, Window* pWin);
504 
505 	virtual sal_Bool MouseButtonDown(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return sal_False; }
506 	virtual sal_Bool MouseButtonUp(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return sal_False; }
507 	virtual sal_Bool MouseMove(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return sal_False; }
508 	virtual sal_Bool Command(const CommandEvent& /*rCEvt*/, Window* /*pWin*/) { return sal_False; }
509 	sal_Bool Cut(sal_uIntPtr /*nFormat*/=SDR_ANYFORMAT) { return sal_False; }
510 	sal_Bool Yank(sal_uIntPtr /*nFormat*/=SDR_ANYFORMAT) { return sal_False; }
511 	sal_Bool Paste(Window* /*pWin*/=NULL, sal_uIntPtr /*nFormat*/=SDR_ANYFORMAT) { return sal_False; }
512 
513 	/* new interface src537 */
514 	sal_Bool GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr=sal_False) const;
515 
516 	sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll);
517 	SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(sal_Bool& rOk) const;
518 	sal_Bool SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr);
519 
520 	virtual void MakeVisible(const Rectangle& rRect, Window& rWin);
521 
522 	// Fuer PlugIn. Wird vom Paint des OLE-Obj gerufen.
523 	virtual void DoConnect(SdrOle2Obj* pOleObj);
524 
525 	// Animation aktivieren/deaktivieren fuer ::Paint
526 	// wird z.Zt. ausgewertet von SdrGrafObj, wenn in dem eine Animation steckt
527 	// Das Unterbinden der automatischen Animation wird z.B. fuer die Dia-Show benoetigt
528 	sal_Bool IsAnimationEnabled() const { return ( SDR_ANIMATION_ANIMATE == eAnimationMode ); }
529 	void SetAnimationEnabled( sal_Bool bEnable=sal_True );
530 
531     // set/unset pause state for animations
532     bool IsAnimationPause() const { return bAnimationPause; }
533     void SetAnimationPause( bool bSet );
534 
535 	// Verhalten beim Starten von Animation im Paint-Handler:
536 	// 1. Animation normal starten( SDR_ANIMATION_ANIMATE ) => DEFAULT
537 	// 2. Nur die Ersatzdarstellung der Animation zeichnen ( SDR_ANIMATION_DONT_ANIMATE )
538 	// 3. Nicht starten und nichts ersatzweise ausgeben ( SDR_ANIMATION_DISABLE )
539 	void SetAnimationMode( const SdrAnimationMode eMode );
540 	SdrAnimationMode GetAnimationMode() const { return eAnimationMode; }
541 
542 	// bei bShow=sal_False wird der Browser destruiert
543 #ifdef DBG_UTIL
544 	void ShowItemBrowser(sal_Bool bShow=sal_True);
545 	sal_Bool IsItemBrowserVisible() const { return pItemBrowser!=NULL && ((Window*)pItemBrowser)->IsVisible(); }
546 	Window* GetItemBrowser() const { return (Window*)pItemBrowser; }
547 #endif
548 
549 	// Muss von App beim Scrollen usw. gerufen werden, damit ein u.U.
550 	// aktives FormularControl mitverschoben werden kann
551 	void VisAreaChanged(const OutputDevice* pOut=NULL);
552 	void VisAreaChanged(const SdrPageWindow& rWindow);
553 
554 	sal_Bool IsPrintPreview() const { return bPrintPreview; }
555 	void SetPrintPreview(bool bOn = true) { bPrintPreview=bOn; }
556 
557     const svtools::ColorConfig& getColorConfig() const;
558 
559 	virtual void onChangeColorConfig();
560 
561 	// #103834# Set background color for svx at SdrPageViews
562 	void SetApplicationBackgroundColor(Color aBackgroundColor);
563 
564 	// #103911# Set document color for svx at SdrPageViews
565 	void SetApplicationDocumentColor(Color aDocumentColor);
566 
567 	// #i38135#
568 	// Sets the timer for Object animations and restarts.
569 	void SetAnimationTimer(sal_uInt32 nTime);
570 
571 	// access to Drawinglayer configuration options
572 	const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
573 };
574 
575 #endif //_SVDPNTV_HXX
576 
577