|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #ifndef EDGEDWIN_H |
|
23 #define EDGEDWIN_H |
|
24 |
|
25 #include <w32std.h> |
|
26 #include "compwin.h" |
|
27 |
|
28 |
|
29 /******************************************************************************* |
|
30 These windows draw a bordered rectangle (opaque) within a bordered rectangle |
|
31 (translucent). The inner rectangle is consistently drawn as a separate |
|
32 redraw segment. |
|
33 *******************************************************************************/ |
|
34 _LIT8(KEdgedWindowType, "Edged"); |
|
35 class CEdgedWin : public CCompWin |
|
36 { |
|
37 public: |
|
38 static CEdgedWin* NewLC(RWsSession& aWs, RWindowGroup* aGroup, CCompWin* aParent, CWindowGc& aGc); |
|
39 static void LoadConfiguration(const MTestStepConfigurationContext* aContext); |
|
40 static TBool IsEnabled() { return iEnabled; } |
|
41 ~CEdgedWin(); |
|
42 |
|
43 void Redraw(const TRect& aRect); |
|
44 void DrawBitmap(CFbsBitGc* aGc, TRect& aClip, TPoint& aOrigin); |
|
45 void SetSize(const TSize & aSize); |
|
46 virtual const TDesC8& TypeName() { return KEdgedWindowType; } |
|
47 void DumpDetails(RFile & aFile, TInt aDepth); |
|
48 |
|
49 protected: |
|
50 CEdgedWin(RWsSession& aWs, RWindowGroup* aGroup, CCompWin* aParent, CWindowGc& aGc); |
|
51 void ConstructL(); |
|
52 |
|
53 private: |
|
54 static TBool iEnabled; |
|
55 static TBool iTransparent; |
|
56 static TBool iRandomizeAlpha; |
|
57 static TBool iRandomizePenStyle; |
|
58 static TBool iRandomizeBrushStyle; |
|
59 TRect iOpaqueRect; |
|
60 TRegionFix<4> iTransparentRegion; |
|
61 TRgb iTransBgColor; //outer rectangle, pen colour |
|
62 TRgb iTransFgColor; //outer rectangle, brush colour |
|
63 TRgb iBgColor; //inner rectangle, brush colour |
|
64 TRgb iFgColor; //inner rectangle, pen colour |
|
65 CGraphicsContext::TPenStyle iPenStyle; |
|
66 CGraphicsContext::TBrushStyle iBrushStyle; |
|
67 }; |
|
68 |
|
69 |
|
70 #endif // EDGEDWIN_H |