|
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Demonstration handwriting class |
|
15 // |
|
16 // |
|
17 |
|
18 #if !defined(__HNDLODR_H__) |
|
19 #define __HNDLODR_H__ |
|
20 |
|
21 #if !defined(__E32STD_H__) |
|
22 #include <e32std.h> |
|
23 #endif |
|
24 #if !defined(__E32BASE_H__) |
|
25 #include <e32base.h> |
|
26 #endif |
|
27 #if !defined(__W32STD_H__) |
|
28 #include "W32STD.H" |
|
29 #endif |
|
30 #if !defined(__HANDCMD_H__) |
|
31 #include "HANDCMD.H" |
|
32 #endif |
|
33 |
|
34 |
|
35 class RHandWritingAnim : public RAnim |
|
36 { |
|
37 public: |
|
38 inline RHandWritingAnim(RAnimDll& aDll) :RAnim(aDll) {} |
|
39 TInt Construct(const RWsSprite& aDevice); |
|
40 void Activate(); |
|
41 void Deactivate(); |
|
42 TInt SpriteMaskChange(TBool aUsingSeparateMask); |
|
43 void SetDrawData(const THandwritingDrawData& aDrawData); |
|
44 TInt GetLastGeneratedCharacter(); |
|
45 }; |
|
46 |
|
47 class CHandWriting : public CBase |
|
48 { |
|
49 public: |
|
50 CHandWriting(RWsSession& aSession); |
|
51 void ConstructL(TSize aScreenSize,RWindowGroup& aGroup,TBool aUseSeparateMask); |
|
52 ~CHandWriting(); |
|
53 void SetMaskL(TBool aUseSeparateMask); |
|
54 void ToggleStatus(); |
|
55 private: |
|
56 void CreateSpriteL(TSize aScreenSize,RWindowGroup& aGroup,TBool aUseSeparateMask); |
|
57 void LoadDllL(); |
|
58 void FillInSpriteMember(TSpriteMember& aMember); |
|
59 private: |
|
60 RWsSession& iSession; |
|
61 RAnimDll iAnimDll; |
|
62 RHandWritingAnim iAnim; |
|
63 RWsSprite iSprite; |
|
64 CFbsBitmap *iBitmap; |
|
65 CFbsBitmap *iMaskBitmap; |
|
66 TBool iActive; |
|
67 }; |
|
68 |
|
69 #endif |