xref: /trunk/main/sfx2/source/inc/preview.hxx (revision 353d8f4d)
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 #ifndef _SFXPREVIEW_HXX
24 #define _SFXPREVIEW_HXX
25 
26 
27 #include <sfx2/doctempl.hxx>
28 #include <sfx2/basedlgs.hxx>
29 
30 class SfxObjectShell;
31 //REMOVE	class SvStorageRef;
32 class SfxFrameWindow;
33 
34 class SfxFrame;
35 class GDIMetaFile;
36 
37 class SfxPreviewBase_Impl : public Window
38 {
39 protected:
40 	::boost::shared_ptr<GDIMetaFile> pMetaFile;
41 public:
42 					SfxPreviewBase_Impl( Window* pParent,
43 										 const ResId& rResId );
44 					SfxPreviewBase_Impl( Window* pParent );
45 					~SfxPreviewBase_Impl(  );
46 	void            SetObjectShell( SfxObjectShell* pObj );
47 	void            SetGDIFile( ::boost::shared_ptr<GDIMetaFile> pFile );
48 	virtual void    Resize();
49 };
50 
51 
52 
53 class SfxPreviewWin_Impl: public SfxPreviewBase_Impl
54 {
55 protected:
56 	virtual void	Paint( const Rectangle& rRect );
57 public:
SfxPreviewWin_Impl(Window * pParent,const ResId & rResId)58 					SfxPreviewWin_Impl( Window* pParent,
59 									const ResId& rResId )
60 					: SfxPreviewBase_Impl( pParent, rResId ){};
SfxPreviewWin_Impl(Window * pParent)61 					SfxPreviewWin_Impl( Window* pParent )
62 					: SfxPreviewBase_Impl( pParent ){};
63 	static void     ImpPaint(
64 		const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow );
65 	static SfxFrameWindow*
66 					PreviewFactory( SfxFrame* pFrame, const String& rName );
67 };
68 
69 #endif
70