xref: /aoo42x/main/vcl/source/gdi/impanmvw.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 _SV_IMPANMVW_HXX
29 #define _SV_IMPANMVW_HXX
30 
31 #include <vcl/animate.hxx>
32 
33 // ----------------
34 // - ImplAnimView -
35 // ----------------
36 
37 class Animation;
38 class OutputDevice;
39 class VirtualDevice;
40 struct AnimationBitmap;
41 
42 class ImplAnimView
43 {
44 private:
45 
46 	Animation*		mpParent;
47 	OutputDevice*	mpOut;
48 	long			mnExtraData;
49 	Point			maPt;
50 	Point			maDispPt;
51 	Point			maRestPt;
52 	Size			maSz;
53 	Size			maSzPix;
54 	Size			maDispSz;
55 	Size			maRestSz;
56 	MapMode			maMap;
57 	Region			maClip;
58 	VirtualDevice*	mpBackground;
59 	VirtualDevice*	mpRestore;
60 	sal_uLong			mnActPos;
61 	Disposal		meLastDisposal;
62 	sal_Bool			mbPause;
63 	sal_Bool			mbFirst;
64 	sal_Bool			mbMarked;
65 	sal_Bool			mbHMirr;
66 	sal_Bool			mbVMirr;
67 
68 	void			ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
69 	void			ImplDraw( sal_uLong nPos, VirtualDevice* pVDev );
70 
71 public:
72 
73 					ImplAnimView( Animation* pParent, OutputDevice* pOut,
74 								  const Point& rPt, const Size& rSz, sal_uLong nExtraData,
75 								  OutputDevice* pFirstFrameOutDev = NULL );
76 					~ImplAnimView();
77 
78 	sal_Bool			ImplMatches( OutputDevice* pOut, long nExtraData ) const;
79 	void			ImplDrawToPos( sal_uLong nPos );
80 	void			ImplDraw( sal_uLong nPos );
81 	void			ImplRepaint();
82 	AInfo*			ImplCreateAInfo() const;
83 
84 	const Point&	ImplGetOutPos() const { return maPt; }
85 
86 	const Size&		ImplGetOutSize() const { return maSz; }
87 	const Size&		ImplGetOutSizePix() const { return maSzPix; }
88 
89 	void			ImplPause( sal_Bool bPause ) { mbPause = bPause; }
90 	sal_Bool			ImplIsPause() const { return mbPause; }
91 
92 	void			ImplSetMarked( sal_Bool bMarked ) { mbMarked = bMarked; }
93 	sal_Bool			ImplIsMarked() const { return mbMarked; }
94 };
95 
96 #endif
97