|
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: smilarea declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SMILAREA_H |
|
21 #define SMILAREA_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "smilanchor.h" |
|
27 #include "smilobject.h" |
|
28 |
|
29 #include <smillength.h> |
|
30 #include <smiltime.h> |
|
31 |
|
32 #include <smilmedia.h> |
|
33 #include <smilfocusinterface.h> |
|
34 // FORWARD DECLARATIONS |
|
35 class CGraphicsContext; |
|
36 template <class T> class CLinkedList; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 |
|
41 class CSmilArea : public CSmilObject, public MSmilFocus |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 virtual ~CSmilArea(); |
|
49 |
|
50 void ConstructL(CSmilPresentation* aPresentation); |
|
51 static CSmilArea* NewL(CSmilPresentation* aPresentation); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 |
|
56 TBool IsFocusable() const; |
|
57 TBool IsVisible() const; |
|
58 void SetFocus(TBool aVal) { iFocus = aVal; } |
|
59 TBool HasFocus() { return iFocus; } |
|
60 |
|
61 void BeginL( const TSmilTime& aTime ); |
|
62 void EndL( const TSmilTime& aTime ); |
|
63 void Unfreeze(); |
|
64 |
|
65 TBool IsArea() const { return ETrue; } |
|
66 |
|
67 void Draw(CGraphicsContext& aGc, const TRect& aRect); |
|
68 void ResolveL( const TSmilTime& aTps ); |
|
69 |
|
70 void SetTimeContainer(CSmilTimeContainer* aTimeContainer); |
|
71 CSmilMedia* LinkedMedia(); |
|
72 |
|
73 TPoint Center() const; |
|
74 |
|
75 void Redraw(); |
|
76 |
|
77 TBool Contains(const TPoint& aPoint); |
|
78 TInt GetDistance(const TPoint& aPoint, const TPoint& bPoint); |
|
79 TInt CrossLine(const TPoint& Point1, const TPoint& Point2, const TPoint& aPoint); |
|
80 |
|
81 protected: |
|
82 |
|
83 // from MSmilFocus |
|
84 TRect Rect() const; |
|
85 TShape Shape() const; |
|
86 const CArrayFixFlat<TPoint>* PolyPoints() const; |
|
87 TBool IsSelected() const { return EFalse; } |
|
88 |
|
89 |
|
90 CSmilTimeContainer* iTimeContainer; |
|
91 /** |
|
92 * C++ default constructor. |
|
93 */ |
|
94 CSmilArea(); |
|
95 |
|
96 public: |
|
97 |
|
98 TShape iShape; |
|
99 CLinkedList<TSmilLength>* iCoords; |
|
100 |
|
101 TBool iActive; |
|
102 TBool iFocus; |
|
103 |
|
104 CArrayFixFlat<TPoint> iPoints; |
|
105 |
|
106 }; |
|
107 |
|
108 #endif // ?INCLUDE_H |
|
109 |
|
110 // End of File |