1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <svl/brdcst.hxx>
24 #include <svl/lstner.hxx>
25 #include <svl/smplhint.hxx>
26 #include <svl/undo.hxx>
27 #include <svx/svddrag.hxx>
28 #include <svx/svdlayer.hxx> // fuer SetOfByte
29 #include <vcl/window.hxx>
30 #include <svtools/colorcfg.hxx>
31 #include <com/sun/star/awt/XControlContainer.hpp>
32 #include <svl/itemset.hxx>
33 #include <vcl/timer.hxx>
34 #include "svx/svxdllapi.h"
35 #include <svtools/optionsdrawinglayer.hxx>
36 #include <unotools/options.hxx>
38 //************************************************************
40 //************************************************************
44 namespace com
{ namespace sun
{ namespace star
{ namespace awt
{
45 class XControlContainer
;
60 namespace sdr
{ namespace contact
{
61 class ViewObjectContactRedirector
;
64 //************************************************************
65 // Defines for AnimationMode
66 //************************************************************
70 SDR_ANIMATION_ANIMATE
,
71 SDR_ANIMATION_DONT_ANIMATE
,
75 //************************************************************
76 // Typedef's und defines
77 //************************************************************
79 typedef unsigned char TRISTATE
;
81 #define SDR_ANYFORMAT (0xFFFFFFFF)
82 #define SDR_ANYITEM (0xFFFF)
83 #define SDRVIEWWIN_NOTFOUND (0xFFFF)
86 ////////////////////////////////////////////////////////////////////////////////////////////////////
93 class ViewObjectContactRedirector
;
94 } // end of namespace contact
95 } // end of namespace sdr
97 ////////////////////////////////////////////////////////////////////////////////////////////////////
100 class SVX_DLLPUBLIC SvxViewHint
: public SfxHint
103 enum HintType
{ SVX_HINT_VIEWCHANGED
};
105 explicit SvxViewHint (HintType eType
);
106 HintType
GetHintType (void) const;
112 // typedefs for a list of SdrPaintWindows
113 class SdrPaintWindow
;
114 typedef ::std::vector
< SdrPaintWindow
* > SdrPaintWindowVector
;
116 //////////////////////////////////////////////////////////////////////////////
117 // helper to convert any GDIMetaFile to a good quality BitmapEx,
118 // using default parameters and graphic::XPrimitive2DRenderer
120 BitmapEx SVX_DLLPUBLIC
convertMetafileToBitmapEx(
121 const GDIMetaFile
& rMtf
,
122 const basegfx::B2DRange
& rTargetRange
,
123 const sal_uInt32 nMaximumQuadraticPixels
= 500000);
125 ////////////////////////////////////////////////////////////////////////////////////////////////////
127 class SVX_DLLPUBLIC SdrPaintView
: public SfxListener
, public SfxRepeatTarget
, public SfxBroadcaster
, public ::utl::ConfigurationListener
129 friend class SdrPageView
;
130 friend class SdrGrafObj
;
132 SdrPageView
* mpPageView
;
136 SdrItemBrowser
* pItemBrowser
;
138 const OutputDevice
* pActualOutDev
; // Nur zum vergleichen
139 OutputDevice
* pDragWin
;
140 SfxStyleSheet
* pDefaultStyleSheet
;
142 String aAktLayer
; // Aktueller Zeichenlayer
143 String aMeasureLayer
; // Aktueller Layer fuer Bemassung
145 // Container aPagV; // Liste von SdrPageViews
147 // All windows this view is displayed on
148 SdrPaintWindowVector maPaintWindows
;
150 MapMode aActualMapMode
;
151 Size aGridBig
; // muss dann mal raus
152 Size aGridFin
; // muss dann mal raus
153 SdrDragStat aDragStat
;
154 Rectangle aMaxWorkArea
;
155 SfxItemSet aDefaultAttr
;
156 Timer aComeBackTimer
;
158 SdrAnimationMode eAnimationMode
;
160 sal_uInt16 nHitTolPix
;
161 sal_uInt16 nMinMovPix
;
162 sal_uInt16 nHitTolLog
;
163 sal_uInt16 nMinMovLog
;
164 sal_uIntPtr nMasterCacheMode
;
165 sal_uIntPtr nGraphicManagerDrawMode
;
167 // hold an incarnation of Drawinglayer configuration options
168 SvtOptionsDrawinglayer maDrawinglayerOpt
;
170 unsigned bPageVisible
: 1;
171 unsigned bPageBorderVisible
: 1;
172 unsigned bBordVisible
: 1;
173 unsigned bGridVisible
: 1;
174 unsigned bGridFront
: 1;
175 unsigned bHlplVisible
: 1;
176 unsigned bHlplFront
: 1;
177 unsigned bGlueVisible
: 1; // Persistent. Klebepunkte anzeigen
178 unsigned bGlueVisible2
: 1; // Klebepunkte auch bei GluePointEdit anzeigen
179 unsigned bGlueVisible3
: 1; // Klebepunkte auch bei EdgeTool anzeigen
180 unsigned bGlueVisible4
: 1; // Klebepunkte anzeigen, wenn 1 Edge markiert
181 unsigned bRestoreColors
: 1; // Pens und Brushes werden zurueckgesetzt.
182 unsigned bSomeObjChgdFlag
: 1;
183 unsigned bSwapAsynchron
: 1;
184 unsigned bPrintPreview
: 1;
186 // sal_Bool fuer die Verwaltung des anzuzeigenden Status
187 // Gruppe Betreten/Verlassen. Default ist sal_True, wird aber
188 // beispielsweise beim Chart auf sal_False gesetzt, da dort
189 // die Ghosted-Effekte zur Darstellug unerwuenscht sind.
190 unsigned bVisualizeEnteredGroup
: 1;
191 unsigned bAnimationPause
: 1;
194 // Flag which decides if buffered output for this view is allowed. When
195 // set, PreRendering for PageView rendering will be used. Default is sal_False
196 unsigned mbBufferedOutputAllowed
: 1;
199 // Flag which decides if buffered overlay for this view is allowed. When
200 // set, the output will be buffered in an overlay vdev. When not, overlay is
201 // directly painted to OutDev. Default is sal_False.
202 unsigned mbBufferedOverlayAllowed
: 1;
204 // allow page painting at all?
205 unsigned mbPagePaintingAllowed
: 1;
207 // is this a preview renderer?
208 unsigned mbPreviewRenderer
: 1;
210 // flags for calc and sw for suppressing OLE, CHART or DRAW objects
211 unsigned mbHideOle
: 1;
212 unsigned mbHideChart
: 1;
213 unsigned mbHideDraw
: 1; // hide draw objects other than form controls
214 unsigned mbHideFormControl
: 1; // hide form controls only
218 // interface for PagePaintingAllowed flag
219 bool IsBufferedOutputAllowed() const;
220 void SetBufferedOutputAllowed(bool bNew
);
222 // interface for BufferedOverlayAllowed flag
223 bool IsBufferedOverlayAllowed() const;
224 void SetBufferedOverlayAllowed(bool bNew
);
226 // allow page painting at all?
227 sal_Bool
IsPagePaintingAllowed() const;
228 void SetPagePaintingAllowed(bool bNew
);
231 svtools::ColorConfig maColorConfig
;
234 // interface to SdrPaintWindow
236 void AppendPaintWindow(SdrPaintWindow
& rNew
);
237 SdrPaintWindow
* RemovePaintWindow(SdrPaintWindow
& rOld
);
238 void ConfigurationChanged( ::utl::ConfigurationBroadcaster
*, sal_uInt32
);
241 sal_uInt32
PaintWindowCount() const { return maPaintWindows
.size(); }
242 SdrPaintWindow
* FindPaintWindow(const OutputDevice
& rOut
) const;
243 SdrPaintWindow
* GetPaintWindow(sal_uInt32 nIndex
) const;
244 // replacement for GetWin(0), may return 0L (!)
245 OutputDevice
* GetFirstOutputDevice() const;
248 SVX_DLLPRIVATE
void ImpClearVars();
249 DECL_LINK(ImpComeBackHdl
,void*);
252 sal_uInt16
ImpGetMinMovLogic(short nMinMov
, const OutputDevice
* pOut
) const;
253 sal_uInt16
ImpGetHitTolLogic(short nHitTol
, const OutputDevice
* pOut
) const;
255 // Wenn man den IdleStatus des Systems nicht abwarten will (auf const geschummelt):
256 void FlushComeBackTimer() const;
257 void TheresNewMapMode();
258 void ImpSetGlueVisible2(bool bOn
) { if (bGlueVisible2
!=(unsigned)bOn
) { bGlueVisible2
=bOn
; if (!bGlueVisible
&& !bGlueVisible3
&& !bGlueVisible4
) GlueInvalidate(); } }
259 void ImpSetGlueVisible3(bool bOn
) { if (bGlueVisible3
!=(unsigned)bOn
) { bGlueVisible3
=bOn
; if (!bGlueVisible
&& !bGlueVisible2
&& !bGlueVisible4
) GlueInvalidate(); } }
260 void ImpSetGlueVisible4(bool bOn
) { if (bGlueVisible4
!=(unsigned)bOn
) { bGlueVisible4
=bOn
; if (!bGlueVisible
&& !bGlueVisible2
&& !bGlueVisible3
) GlueInvalidate(); } }
261 sal_Bool
ImpIsGlueVisible2() const { return bGlueVisible2
; }
262 sal_Bool
ImpIsGlueVisible3() const { return bGlueVisible3
; }
263 sal_Bool
ImpIsGlueVisible4() const { return bGlueVisible4
; }
266 sal_Bool
ImpIsGlueVisible() { return bGlueVisible
|| bGlueVisible2
|| bGlueVisible3
|| bGlueVisible4
; }
269 virtual void Notify(SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
270 void GlueInvalidate() const;
272 void ShowEncirclement(OutputDevice
* pOut
);
273 void HideEncirclement(OutputDevice
* pOut
);
274 void DrawEncirclement(OutputDevice
* pOut
) const;
276 // ModelHasChanged wird gerufen, sobald nach beliebig vielen HINT_OBJCHG
277 // das System wieder idle ist (StarView-Timer). Wer diese Methode ueberlaed,
278 // muss unbedingt ModelHasChanged() der Basisklasse rufen.
279 virtual void ModelHasChanged();
282 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
283 SdrPaintView(SdrModel
* pModel1
, OutputDevice
* pOut
= 0L);
284 virtual ~SdrPaintView();
289 virtual void ClearPageView();
290 SdrModel
* GetModel() const { return pMod
; }
292 virtual sal_Bool
IsAction() const;
293 virtual void MovAction(const Point
& rPnt
);
294 virtual void EndAction();
295 virtual void BckAction();
296 virtual void BrkAction(); // Alle Actions z.B. Draggen abbrechen.
297 virtual void TakeActionRect(Rectangle
& rRect
) const;
299 // info about TextEdit. Default is sal_False.
300 virtual bool IsTextEdit() const;
302 // info about TextEditPageView. Default is 0L.
303 virtual SdrPageView
* GetTextEditPageView() const;
305 // Muss dann bei jedem Fensterwechsel (wenn die SdrView in mehreren
306 // Fenstern gleichzeitig dargestellt wird (->z.B. Splitter)) und bei
307 // jedem MapMode(Scaling)-wechsel gerufen werden, damit ich aus meinen
308 // Pixelwerten logische Werte berechnen kann.
309 void SetActualWin(const OutputDevice
* pWin
);
310 void SetMinMoveDistancePixel(sal_uInt16 nVal
) { nMinMovPix
=nVal
; TheresNewMapMode(); }
311 sal_uInt16
GetMinMoveDistancePixel() const { return (sal_uInt16
)nMinMovPix
; }
312 void SetHitTolerancePixel(sal_uInt16 nVal
) { nHitTolPix
=nVal
; TheresNewMapMode(); }
313 sal_uInt16
GetHitTolerancePixel() const { return (sal_uInt16
)nHitTolPix
; }
315 // data read access on logic HitTolerance and MinMoveTolerance
316 sal_uInt16
getHitTolLog() const { return nHitTolLog
; }
317 sal_uInt16
getMinMovLog() const { return nMinMovLog
; }
319 // Flag zur Visualisierung von Gruppen abfragen/testen
320 sal_Bool
DoVisualizeEnteredGroup() const { return bVisualizeEnteredGroup
; }
321 void SetVisualizeEnteredGroup(sal_Bool bNew
) { bVisualizeEnteredGroup
= bNew
; }
323 // Am DragStatus laesst sich beispielsweise erfragen, welche
324 // entfernung bereits gedraggd wurde, etc.
325 const SdrDragStat
& GetDragStat() const { return aDragStat
; }
327 // Anmelden/Abmelden einer PageView an der View.
328 // Dieselbe // Seite kann nicht mehrfach angemeldet werden.
329 // Methoden mit dem Suffix PgNum erwarten als numerischen Parameter
330 // eine Seitennummer (0...). Methoden mit dem Suffix PvNum erwarten
331 // degagen als numerischen Parameter die Nummer der PageView an der
332 // SdrView (Iterieren ueber alle angemeldeten Pages).
333 virtual SdrPageView
* ShowSdrPage(SdrPage
* pPage
);
334 virtual void HideSdrPage();
336 // Iterieren ueber alle angemeldeten PageViews
337 // sal_uInt16 GetPageViewCount() const { return sal_uInt16(aPagV.Count()); }
338 // SdrPageView* GetPageViewByIndex(sal_uInt16 nPvNum) const { return ((SdrPageView*)aPagV.GetObject(nPvNum)); }
339 SdrPageView
* GetSdrPageView() const { return mpPageView
; }
341 // Pageview einer bestimmten Seite ermitteln
342 // SdrPageView* GetPageViewByPage(const SdrPage* pPage) const;
343 // sal_uInt16 GetIndexByPageView(const SdrPageView* pPV) const;
345 // Test, ob eine Seite getroffen
346 // SdrPageView* HitPage(const Point& rPnt) const;
348 // Die Seite, die dem Punkt am naechsten ist. Liefert nur NULL,
349 // wenn absolut keine Seite angemeldet ist.
350 // SdrPageView* GetPageViewByPosition(const Point& rPnt) const;
352 // Eine SdrView kann auf mehreren Fenstern gleichzeitig abgebiltet sein:
353 virtual void AddWindowToPaintView(OutputDevice
* pNewWin
);
354 virtual void DeleteWindowFromPaintView(OutputDevice
* pOldWin
);
356 void SetLayerVisible(const String
& rName
, sal_Bool bShow
=sal_True
);
357 bool IsLayerVisible(const String
& rName
) const;
359 void SetLayerLocked(const String
& rName
, sal_Bool bLock
=sal_True
);
360 bool IsLayerLocked(const String
& rName
) const;
362 void SetLayerPrintable(const String
& rName
, sal_Bool bPrn
=sal_True
);
363 bool IsLayerPrintable(const String
& rName
) const;
365 // PrePaint call forwarded from app windows
368 ////////////////////////////////////////////////////////////////////////////////////////////////////
369 // used internally for Draw/Impress/sch/chart2
370 virtual void CompleteRedraw(OutputDevice
* pOut
, const Region
& rReg
, sdr::contact::ViewObjectContactRedirector
* pRedirector
= 0);
372 // #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps
374 // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow which shall then be used as
375 // target for paints. Since paints may be buffered, use it's GetTargetOutputDevice() method which will
376 // return the buffer in case of bufered.
377 // DoCompleteRedraw draws the DrawingLayer hierarchy then.
378 // EndCompleteRedraw does the necessary refreshes, evtl. paints text edit and overlay and evtl destroys the
379 // SdrPaintWindow again. This means: the SdrPaintWindow is no longer safe after this closing call.
380 virtual SdrPaintWindow
* BeginCompleteRedraw(OutputDevice
* pOut
);
381 virtual void DoCompleteRedraw(SdrPaintWindow
& rPaintWindow
, const Region
& rReg
, sdr::contact::ViewObjectContactRedirector
* pRedirector
= 0);
382 virtual void EndCompleteRedraw(SdrPaintWindow
& rPaintWindow
, bool bPaintFormLayer
);
384 ////////////////////////////////////////////////////////////////////////////////////////////////////
385 // used for the other applications basctl/sc/sw which call DrawLayer at PageViews
386 // #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
387 // #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
388 SdrPaintWindow
* BeginDrawLayers(OutputDevice
* pOut
, const Region
& rReg
, bool bDisableIntersect
= false);
389 // used when the region passed to BeginDrawLayers needs to be changed
390 void UpdateDrawLayersRegion(OutputDevice
* pOut
, const Region
& rReg
, bool bDisableIntersect
= false);
391 void EndDrawLayers(SdrPaintWindow
& rPaintWindow
, bool bPaintFormLayer
);
394 ////////////////////////////////////////////////////////////////////////////////////////////////////
395 // used to paint the form layer after the PreRender device is flushed (painted) to the window.
396 void ImpFormLayerDrawing(SdrPaintWindow
& rPaintWindow
) const;
398 Region
OptimizeDrawLayersRegion(OutputDevice
* pOut
, const Region
& rReg
, bool bDisableIntersect
);
401 sal_Bool
IsPageVisible() const { return bPageVisible
; } // Seite (weisse Flaeche) malen oder nicht
402 sal_Bool
IsPageBorderVisible() const { return bPageBorderVisible
; } // Seite (weisse Flaeche) malen oder nicht
403 sal_Bool
IsBordVisible() const { return bBordVisible
; } // Seitenrandlinie malen oder nicht
404 sal_Bool
IsGridVisible() const { return bGridVisible
; } // Rastergitter malen oder nicht
405 sal_Bool
IsGridFront() const { return bGridFront
; } // Rastergitter ueber die Objekte druebermalen oder dahinter
406 sal_Bool
IsHlplVisible() const { return bHlplVisible
; } // Hilfslinien der Seiten malen oder nicht
407 sal_Bool
IsHlplFront() const { return bHlplFront
; } // Hilfslinie ueber die Objekte druebermalen oder dahinter
408 sal_Bool
IsGlueVisible() const { return bGlueVisible
; } // Konnektoren der objekte sichtbar oder nicht
409 Color
GetGridColor() const;
410 void SetPageVisible(bool bOn
= true) { bPageVisible
=bOn
; InvalidateAllWin(); }
411 void SetPageBorderVisible(bool bOn
= true) { bPageBorderVisible
=bOn
; InvalidateAllWin(); }
412 void SetBordVisible(bool bOn
= true) { bBordVisible
=bOn
; InvalidateAllWin(); }
413 void SetGridVisible(bool bOn
= true) { bGridVisible
=bOn
; InvalidateAllWin(); }
414 void SetGridFront(bool bOn
= true) { bGridFront
=bOn
; InvalidateAllWin(); }
415 void SetHlplVisible(bool bOn
= true) { bHlplVisible
=bOn
; InvalidateAllWin(); }
416 void SetHlplFront(bool bOn
= true) { bHlplFront
=bOn
; InvalidateAllWin(); }
417 void SetGlueVisible(bool bOn
= true) { if (bGlueVisible
!=(unsigned)bOn
) { bGlueVisible
=bOn
; if (!bGlueVisible2
&& !bGlueVisible3
&& !bGlueVisible4
) GlueInvalidate(); } }
418 void SetGridColor( Color aColor
);
420 sal_Bool
IsPreviewRenderer() const { return (sal_Bool
)mbPreviewRenderer
; }
421 void SetPreviewRenderer(bool bOn
) { if((unsigned)bOn
!= mbPreviewRenderer
) { mbPreviewRenderer
=bOn
; }}
423 // access methods for calc and sw hide object modes
424 bool getHideOle() const { return mbHideOle
; }
425 bool getHideChart() const { return mbHideChart
; }
426 bool getHideDraw() const { return mbHideDraw
; }
427 bool getHideFormControl() const { return mbHideFormControl
; }
428 void setHideOle(bool bNew
) { if(bNew
!= (bool)mbHideOle
) mbHideOle
= bNew
; }
429 void setHideChart(bool bNew
) { if(bNew
!= (bool)mbHideChart
) mbHideChart
= bNew
; }
430 void setHideDraw(bool bNew
) { if(bNew
!= (bool)mbHideDraw
) mbHideDraw
= bNew
; }
431 void setHideFormControl(bool bNew
) { if(bNew
!= (bool)mbHideFormControl
) mbHideFormControl
= bNew
; }
433 void SetGridCoarse(const Size
& rSiz
) { aGridBig
=rSiz
; }
434 void SetGridFine(const Size
& rSiz
) { aGridFin
=rSiz
; if (aGridFin
.Height()==0) aGridFin
.Height()=aGridFin
.Width(); if (bGridVisible
) InvalidateAllWin(); } // #40479#
435 const Size
& GetGridCoarse() const { return aGridBig
; }
436 const Size
& GetGridFine() const { return aGridFin
; }
438 void InvalidateAllWin();
439 void InvalidateAllWin(const Rectangle
& rRect
, sal_Bool bPlus1Pix
=sal_False
);
441 // Wenn die View kein Invalidate() an den Fenstern durchfuehren soll, muss
442 // man diese beiden folgenden Methoden ueberladen und entsprechend anders
444 virtual void InvalidateOneWin(Window
& rWin
);
445 virtual void InvalidateOneWin(Window
& rWin
, const Rectangle
& rRect
);
447 void SetActiveLayer(const String
& rName
) { aAktLayer
=rName
; }
448 const String
& GetActiveLayer() const { return aAktLayer
; }
450 // Verlassen einer betretenen Objektgruppe aller sichtbaren Seiten.
451 // (wie MsDos chdir ..)
452 void LeaveOneGroup();
454 // Verlassen aller betretenen Objektgruppen aller sichtbaren Seiten.
455 // (wie MsDos chdir \)
456 void LeaveAllGroup();
458 // Feststellen, ob Leave sinnvoll ist.
459 bool IsGroupEntered() const;
461 // DefaultAttribute an der View: Neu erzeugte Objekte bekommen diese
462 // Attribute direkt nach dem Erzeugen erstmal zugewiesen.
463 void SetDefaultAttr(const SfxItemSet
& rAttr
, sal_Bool bReplaceAll
);
464 const SfxItemSet
& GetDefaultAttr() const { return aDefaultAttr
; }
465 void SetDefaultStyleSheet(SfxStyleSheet
* pStyleSheet
, sal_Bool bDontRemoveHardAttr
);
466 SfxStyleSheet
* GetDefaultStyleSheet() const { return pDefaultStyleSheet
; }
468 void SetNotPersistDefaultAttr(const SfxItemSet
& rAttr
, sal_Bool bReplaceAll
);
469 void MergeNotPersistDefaultAttr(SfxItemSet
& rAttr
, sal_Bool bOnlyHardAttr
) const;
471 // use this mode as mode to draw all internal GraphicManager objects with
472 sal_uIntPtr
GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode
; }
473 void SetGraphicManagerDrawMode( sal_uIntPtr nMode
) { nGraphicManagerDrawMode
= nMode
; }
475 // SwapIn (z.B. von Grafiken) asynchron durchfuehren. Also nicht
476 // beim Paint sofort nachladen, sondern dort das Nachladen anstossen.
477 // Nach Abschluss des Nachladens wird das Objekt dann angezeigt.
478 // Hat nur z.Zt. Wirkung, wenn SwapGraphics am Model eingeschaltet ist.
479 // Default=FALSE. Flag ist nicht persistent.
480 sal_Bool
IsSwapAsynchron() const { return bSwapAsynchron
; }
481 void SetSwapAsynchron(sal_Bool bJa
=sal_True
) { bSwapAsynchron
=bJa
; }
482 virtual sal_Bool
KeyInput(const KeyEvent
& rKEvt
, Window
* pWin
);
484 virtual sal_Bool
MouseButtonDown(const MouseEvent
& /*rMEvt*/, Window
* /*pWin*/) { return sal_False
; }
485 virtual sal_Bool
MouseButtonUp(const MouseEvent
& /*rMEvt*/, Window
* /*pWin*/) { return sal_False
; }
486 virtual sal_Bool
MouseMove(const MouseEvent
& /*rMEvt*/, Window
* /*pWin*/) { return sal_False
; }
487 virtual sal_Bool
Command(const CommandEvent
& /*rCEvt*/, Window
* /*pWin*/) { return sal_False
; }
488 sal_Bool
Cut(sal_uIntPtr
/*nFormat*/=SDR_ANYFORMAT
) { return sal_False
; }
489 sal_Bool
Yank(sal_uIntPtr
/*nFormat*/=SDR_ANYFORMAT
) { return sal_False
; }
490 sal_Bool
Paste(Window
* /*pWin*/=NULL
, sal_uIntPtr
/*nFormat*/=SDR_ANYFORMAT
) { return sal_False
; }
492 /* new interface src537 */
493 sal_Bool
GetAttributes(SfxItemSet
& rTargetSet
, sal_Bool bOnlyHardAttr
=sal_False
) const;
495 sal_Bool
SetAttributes(const SfxItemSet
& rSet
, sal_Bool bReplaceAll
);
496 SfxStyleSheet
* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(sal_Bool& rOk) const;
497 sal_Bool
SetStyleSheet(SfxStyleSheet
* pStyleSheet
, sal_Bool bDontRemoveHardAttr
);
499 virtual void MakeVisible(const Rectangle
& rRect
, Window
& rWin
);
501 // Fuer PlugIn. Wird vom Paint des OLE-Obj gerufen.
502 virtual void DoConnect(SdrOle2Obj
* pOleObj
);
504 // Animation aktivieren/deaktivieren fuer ::Paint
505 // wird z.Zt. ausgewertet von SdrGrafObj, wenn in dem eine Animation steckt
506 // Das Unterbinden der automatischen Animation wird z.B. fuer die Dia-Show benoetigt
507 sal_Bool
IsAnimationEnabled() const { return ( SDR_ANIMATION_ANIMATE
== eAnimationMode
); }
508 void SetAnimationEnabled( sal_Bool bEnable
=sal_True
);
510 // set/unset pause state for animations
511 bool IsAnimationPause() const { return bAnimationPause
; }
512 void SetAnimationPause( bool bSet
);
514 // Verhalten beim Starten von Animation im Paint-Handler:
515 // 1. Animation normal starten( SDR_ANIMATION_ANIMATE ) => DEFAULT
516 // 2. Nur die Ersatzdarstellung der Animation zeichnen ( SDR_ANIMATION_DONT_ANIMATE )
517 // 3. Nicht starten und nichts ersatzweise ausgeben ( SDR_ANIMATION_DISABLE )
518 void SetAnimationMode( const SdrAnimationMode eMode
);
519 SdrAnimationMode
GetAnimationMode() const { return eAnimationMode
; }
521 // bei bShow=sal_False wird der Browser destruiert
523 void ShowItemBrowser(sal_Bool bShow
=sal_True
);
524 sal_Bool
IsItemBrowserVisible() const { return pItemBrowser
!=NULL
&& ((Window
*)pItemBrowser
)->IsVisible(); }
525 Window
* GetItemBrowser() const { return (Window
*)pItemBrowser
; }
528 // Muss von App beim Scrollen usw. gerufen werden, damit ein u.U.
529 // aktives FormularControl mitverschoben werden kann
530 void VisAreaChanged(const OutputDevice
* pOut
=NULL
);
531 void VisAreaChanged(const SdrPageWindow
& rWindow
);
533 sal_Bool
IsPrintPreview() const { return bPrintPreview
; }
534 void SetPrintPreview(bool bOn
= true) { bPrintPreview
=bOn
; }
536 virtual void onChangeColorConfig();
538 // #103834# Set background color for svx at SdrPageViews
539 void SetApplicationBackgroundColor(Color aBackgroundColor
);
541 // #103911# Set document color for svx at SdrPageViews
542 void SetApplicationDocumentColor(Color aDocumentColor
);
545 // Sets the timer for Object animations and restarts.
546 void SetAnimationTimer(sal_uInt32 nTime
);
548 // access to Drawinglayer configuration options
549 const SvtOptionsDrawinglayer
& getOptionsDrawinglayer() const { return maDrawinglayerOpt
; }
552 #endif //_SVDPNTV_HXX
554 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */