|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This abstract class implements MMMADisplayWindow functionality |
|
15 * in CFbsBitmap based displays. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CMMABITMAPWINDOW_H |
|
21 #define CMMABITMAPWINDOW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "mmmadisplaywindow.h" |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CFbsBitmap; |
|
30 class CFbsBitmapDevice; |
|
31 class CGraphicsContext; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * This abstract class implements MMMADisplayWindow functionality in |
|
36 * CFbsBitmap based displays. |
|
37 * |
|
38 * |
|
39 */ |
|
40 |
|
41 |
|
42 NONSHARABLE_CLASS(CMMABitmapWindow): public CBase, |
|
43 public MMMADisplayWindow |
|
44 { |
|
45 public: // Constructors and destructors |
|
46 ~CMMABitmapWindow(); // Destructor () |
|
47 |
|
48 static CMMABitmapWindow* NewL(); |
|
49 |
|
50 protected: // Constructors and destructors |
|
51 // Default constructor, protected to allow derivation |
|
52 CMMABitmapWindow(); |
|
53 |
|
54 public: // Methods derived from MMMADisplayWindow |
|
55 void SetDestinationBitmapL(CFbsBitmap* aBitmap); |
|
56 void DrawFrameL(const CFbsBitmap* aBitmap); |
|
57 void SetDrawRect(const TRect& aRect); |
|
58 void SetDrawRectThread(const TRect& aRect); |
|
59 const TRect& DrawRect(); |
|
60 TSize WindowSize(); |
|
61 void SetPosition(const TPoint& aPosition); |
|
62 void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue); |
|
63 void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType); |
|
64 const TRect& WindowRect(); |
|
65 |
|
66 protected: // Data |
|
67 /** |
|
68 * Pointer to the bitmap that is used for drawing. |
|
69 * iBitmap is owned by this class. |
|
70 */ |
|
71 CFbsBitmap* iBitmap; |
|
72 |
|
73 /** |
|
74 * Owned bitmap device |
|
75 */ |
|
76 CFbsBitmapDevice* iBitmapDevice; |
|
77 |
|
78 /** |
|
79 * Owned bitmap context |
|
80 */ |
|
81 CGraphicsContext* iBitmapContext; |
|
82 |
|
83 /** |
|
84 * Actual area used for drawing. Set by SetDrawRect method. |
|
85 */ |
|
86 TRect iDrawRect; |
|
87 TRect iClientRect; |
|
88 |
|
89 inline TDisplayWindowType GetDisplayWindowType() const |
|
90 { |
|
91 return EDisplayWindowTypeIsBitmap; |
|
92 } |
|
93 }; |
|
94 |
|
95 #endif // CMMABITMAPWINDOW_H |