xref: /trunk/main/sd/source/ui/inc/docprev.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SD_DOCPREV_HXX_
29 #define _SD_DOCPREV_HXX_
30 
31 #include <com/sun/star/presentation/FadeEffect.hpp>
32 #include <vcl/window.hxx>
33 #include <tools/gen.hxx>
34 
35 #include <rtl/ref.hxx>
36 
37 #include <svl/lstner.hxx>
38 #include <svtools/colorcfg.hxx>
39 #include "fadedef.h"
40 #include "sddllapi.h"
41 
42 namespace sd {
43 	class SlideShow;
44 }
45 
46 class GDIMetaFile;
47 
48 class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
49 {
50 protected:
51 	GDIMetaFile*    pMetaFile;
52 	sal_Bool			bInEffect;
53 	Link			aClickHdl;
54 	SfxObjectShell* mpObj;
55 	sal_uInt16		mnShowPage;
56 	Color			maDocumentColor;
57 	rtl::Reference< sd::SlideShow > mxSlideShow;
58 
59 	virtual void	Paint( const Rectangle& rRect );
60 	static void		CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint );
61 	void			ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev );
62 
63 	static const int FRAME;
64 
65     svtools::ColorConfig maColorConfig;
66 
67 	virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
68 
69 	void updateViewSettings();
70 
71 public:
72 					SdDocPreviewWin( Window* pParent, const ResId& rResId );
73 					~SdDocPreviewWin();
74 	void            SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage = 0 );
75 	virtual void    Resize();
76 	void			startPreview();
77 
78 	virtual	long	Notify( NotifyEvent& rNEvt );
79 
80 	void			SetClickHdl( const Link& rLink ) { aClickHdl = rLink; }
81 	const Link& 	GetClickHdl() const { return aClickHdl; }
82 
83 	virtual void DataChanged( const DataChangedEvent& rDCEvt );
84 
85 };
86 
87 #endif
88 
89