xref: /trunk/main/sd/source/ui/inc/docprev.hxx (revision 67e470da)
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 _SD_DOCPREV_HXX_
25 #define _SD_DOCPREV_HXX_
26 
27 #include <com/sun/star/presentation/FadeEffect.hpp>
28 #include <vcl/window.hxx>
29 #include <tools/gen.hxx>
30 
31 #include <rtl/ref.hxx>
32 
33 #include <svl/lstner.hxx>
34 #include <svtools/colorcfg.hxx>
35 #include "fadedef.h"
36 #include "sddllapi.h"
37 
38 namespace sd {
39 	class SlideShow;
40 }
41 
42 class GDIMetaFile;
43 
44 class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
45 {
46 protected:
47 	GDIMetaFile*    pMetaFile;
48 	sal_Bool			bInEffect;
49 	Link			aClickHdl;
50 	SfxObjectShell* mpObj;
51 	sal_uInt16		mnShowPage;
52 	Color			maDocumentColor;
53 	rtl::Reference< sd::SlideShow > mxSlideShow;
54 
55 	virtual void	Paint( const Rectangle& rRect );
56 	static void		CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint );
57 	void			ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev );
58 
59 	static const int FRAME;
60 
61     svtools::ColorConfig maColorConfig;
62 
63 	virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
64 
65 	void updateViewSettings();
66 
67 public:
68 					SdDocPreviewWin( Window* pParent, const ResId& rResId );
69 					~SdDocPreviewWin();
70 	void            SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage = 0 );
71 	virtual void    Resize();
72 	void			startPreview();
73 
74 	virtual	long	Notify( NotifyEvent& rNEvt );
75 
SetClickHdl(const Link & rLink)76 	void			SetClickHdl( const Link& rLink ) { aClickHdl = rLink; }
GetClickHdl() const77 	const Link& 	GetClickHdl() const { return aClickHdl; }
78 
79 	virtual void DataChanged( const DataChangedEvent& rDCEvt );
80 
81 };
82 
83 #endif
84 
85