sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent sl@0: */ sl@0: sl@0: #ifndef EDGEDWIN_H sl@0: #define EDGEDWIN_H sl@0: sl@0: #include sl@0: #include "compwin.h" sl@0: sl@0: sl@0: /******************************************************************************* sl@0: These windows draw a bordered rectangle (opaque) within a bordered rectangle sl@0: (translucent). The inner rectangle is consistently drawn as a separate sl@0: redraw segment. sl@0: *******************************************************************************/ sl@0: _LIT8(KEdgedWindowType, "Edged"); sl@0: class CEdgedWin : public CCompWin sl@0: { sl@0: public: sl@0: static CEdgedWin* NewLC(RWsSession& aWs, RWindowGroup* aGroup, CCompWin* aParent, CWindowGc& aGc); sl@0: static void LoadConfiguration(const MTestStepConfigurationContext* aContext); sl@0: static TBool IsEnabled() { return iEnabled; } sl@0: ~CEdgedWin(); sl@0: sl@0: void Redraw(const TRect& aRect); sl@0: void DrawBitmap(CFbsBitGc* aGc, TRect& aClip, TPoint& aOrigin); sl@0: void SetSize(const TSize & aSize); sl@0: virtual const TDesC8& TypeName() { return KEdgedWindowType; } sl@0: void DumpDetails(RFile & aFile, TInt aDepth); sl@0: sl@0: protected: sl@0: CEdgedWin(RWsSession& aWs, RWindowGroup* aGroup, CCompWin* aParent, CWindowGc& aGc); sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: static TBool iEnabled; sl@0: static TBool iTransparent; sl@0: static TBool iRandomizeAlpha; sl@0: static TBool iRandomizePenStyle; sl@0: static TBool iRandomizeBrushStyle; sl@0: TRect iOpaqueRect; sl@0: TRegionFix<4> iTransparentRegion; sl@0: TRgb iTransBgColor; //outer rectangle, pen colour sl@0: TRgb iTransFgColor; //outer rectangle, brush colour sl@0: TRgb iBgColor; //inner rectangle, brush colour sl@0: TRgb iFgColor; //inner rectangle, pen colour sl@0: CGraphicsContext::TPenStyle iPenStyle; sl@0: CGraphicsContext::TBrushStyle iBrushStyle; sl@0: }; sl@0: sl@0: sl@0: #endif // EDGEDWIN_H