windowing/windowserver/test/t_stress/inc/crpwin.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     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 CRPWIN_H
       
    23 #define CRPWIN_H
       
    24 
       
    25 
       
    26 #include <w32std.h>
       
    27 #include "compwin.h"
       
    28 
       
    29 /*******************************************************************************
       
    30 Client side of the crp used by CCrpWin
       
    31 *******************************************************************************/
       
    32 class CCrpClient : public CWsGraphic
       
    33 	{
       
    34 public:
       
    35 	static CCrpClient * NewL();
       
    36 	~CCrpClient();
       
    37 	void DrawCrp(CWindowGc& aGc,const TRect& aRect);
       
    38 
       
    39 private:
       
    40 	CCrpClient();
       
    41 	void ConstructL();
       
    42 
       
    43 private: // from CWsGraphic
       
    44 	virtual void HandleMessage(const TDesC8& aData);
       
    45 	virtual void OnReplace();
       
    46 	};
       
    47 
       
    48 /*******************************************************************************
       
    49 These windows have a crp that draws over the full extent of the window.
       
    50 Currently only draws a simple square with an elipse within (NO ANIMATION).
       
    51 *******************************************************************************/
       
    52 _LIT8(KCrpWindowType, "CrpDrawer");
       
    53 class CCrpWin : public CCompWin
       
    54 	{ 
       
    55 public:
       
    56 	static CCrpWin* NewLC(RWsSession& aWs, RWindowGroup* aGroup, CCompWin* aParent, CWindowGc& aGc);
       
    57 	static void LoadConfiguration(const MTestStepConfigurationContext* aContext);
       
    58 	static TBool IsEnabled() { return iEnabled; }
       
    59 	~CCrpWin();
       
    60 	
       
    61 	void SetSize(const TSize & aSize);
       
    62 	void Redraw(const TRect& aRect);
       
    63 	void DrawBitmap(CFbsBitGc* aGc, TRect& aClip, TPoint& aOrigin);
       
    64 	virtual const TDesC8& TypeName() { return KCrpWindowType; }
       
    65 	void DumpDetails(RFile & aFile, TInt aDepth);
       
    66 	
       
    67 protected:
       
    68 	CCrpWin(RWsSession& aWs, RWindowGroup* aGroup, CCompWin* aParent, CWindowGc& aGc);
       
    69 	void ConstructL();
       
    70 	
       
    71 private:
       
    72 	static TBool iEnabled;
       
    73 	static TBool iTransparent;
       
    74 	CCrpClient* iCrp;
       
    75 	};
       
    76 
       
    77 
       
    78 
       
    79 
       
    80 #endif // CRPWIN_H