1 /* |
|
2 * Copyright (c) 2003 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: Stores a single bitmap animation item: image with its |
|
15 * properties (position, timing et al) |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_CBMPANIMITEM_H |
|
22 #define C_CBMPANIMITEM_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> // e32def, e32std |
|
26 #include <gulicon.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // Item flags |
|
33 #define BAIF_OWNSICON 0x01 |
|
34 |
|
35 |
|
36 // DATA TYPES |
|
37 |
|
38 // EXTERNAL DATA STRUCTURES |
|
39 |
|
40 // FUNCTION PROTOTYPES |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 |
|
44 // CLASS DEFINITIONS |
|
45 class CBmpAnimItem : public CBase |
|
46 { |
|
47 public: |
|
48 // Public constructor, doesn't need a two-phase construction |
|
49 CBmpAnimItem(); |
|
50 |
|
51 // Destructor |
|
52 virtual ~CBmpAnimItem(); |
|
53 |
|
54 // Set icon. If owned, an icon is deleted by the item |
|
55 void SetIcon(CGulIcon* aIcon, TBool aItemOwnsIcon = ETrue); |
|
56 |
|
57 // Set icon from bitmaps. If owned, an icon is deleted by the item |
|
58 void SetIconL( |
|
59 CFbsBitmap* aBitmap, |
|
60 CFbsBitmap* aMask = NULL, |
|
61 TBool aItemOwnsIcon = ETrue); |
|
62 |
|
63 // Get icon |
|
64 CGulIcon* Icon() const { return iIcon; } |
|
65 |
|
66 // Set timing (microsecs to display the image) |
|
67 void SetTiming(TInt aMicros) { iTiming = aMicros; } |
|
68 |
|
69 // Get timing |
|
70 TInt Timing() { return iTiming; } |
|
71 |
|
72 // Set position |
|
73 void SetPosition(TPoint aPos) { iPosition = aPos; } |
|
74 |
|
75 // Get position |
|
76 TPoint Position() { return iPosition; } |
|
77 |
|
78 // Get flags |
|
79 TInt Flags() const { return iFlags; } |
|
80 protected: |
|
81 private: |
|
82 // Type flags |
|
83 TInt iFlags; |
|
84 |
|
85 // Icon |
|
86 CGulIcon* iIcon; |
|
87 |
|
88 // Timing |
|
89 TInt iTiming; |
|
90 |
|
91 // Position |
|
92 TPoint iPosition; |
|
93 }; |
|
94 |
|
95 #endif // C_CBMPANIMITEM_H |
|