os/graphics/graphicscomposition/surfaceupdate/tsrc/twindows.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicscomposition/surfaceupdate/tsrc/twindows.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,88 @@
     1.4 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @test
    1.24 + @internalComponent - Internal Symbian test code 
    1.25 +*/
    1.26 +
    1.27 +#ifndef __TWINDOWS_H__
    1.28 +#define __TWINDOWS_H__
    1.29 +
    1.30 +#include <e32base.h>
    1.31 +
    1.32 +class TWsEvent;
    1.33 +class TWsRedrawEvent;
    1.34 +class RWindowTreeNode;
    1.35 +class RWindow;
    1.36 +class RWindowGroup;
    1.37 +class RBlankWindow;
    1.38 +class RBackedUpWindow;
    1.39 +class RWsSession;
    1.40 +class CWindowGc;
    1.41 +class CWsScreenDevice;
    1.42 +
    1.43 +/**
    1.44 + * The class handles redrawing of the window tree node standard class 
    1.45 + */
    1.46 +class CTWindowTreeNode : public CBase
    1.47 +	{
    1.48 +public:
    1.49 +	virtual void Event(TWsEvent & aEvent) = 0;
    1.50 +	virtual void Redraw(TWsRedrawEvent & aEvent) = 0;
    1.51 +	virtual RWindowTreeNode* WindowTreeNode() 	{ return iWin; }
    1.52 +protected:
    1.53 +	RWindowTreeNode* iWin;
    1.54 +	};
    1.55 +
    1.56 +/**
    1.57 + * The class handles redrawing of the window window group
    1.58 + */
    1.59 +class CTWindowGroup : public CTWindowTreeNode
    1.60 +	{
    1.61 +public:
    1.62 +	static CTWindowGroup* NewL(RWsSession& aWs, CWsScreenDevice* aScreenDevice);
    1.63 +	~CTWindowGroup();
    1.64 +	void Event(TWsEvent & aEvent);
    1.65 +	void Redraw(TWsRedrawEvent & aEvent);
    1.66 +	RWindowGroup* WindowGroup() { return reinterpret_cast<RWindowGroup*>(iWin); }
    1.67 +private:
    1.68 +	CTWindowGroup();
    1.69 +	void ConstructL(RWsSession & aWs, CWsScreenDevice* aScreenDevice);
    1.70 +	};
    1.71 +
    1.72 +/**
    1.73 + * Base class for windows.
    1.74 + */
    1.75 +class CTWindow : public CTWindowTreeNode
    1.76 +	{
    1.77 +public:
    1.78 +	static CTWindow* NewL(RWsSession& aWs, CTWindowTreeNode& aGroup, CWindowGc& aGc);
    1.79 +	~CTWindow();
    1.80 +	void Event(TWsEvent & aEvent);
    1.81 +	void Redraw(TWsRedrawEvent & aEvent);
    1.82 +	RWindow* Window() { return reinterpret_cast<RWindow*>(iWin); }
    1.83 +	virtual void Draw();
    1.84 +private:
    1.85 +	CWindowGc& iGc;
    1.86 +private:
    1.87 +	CTWindow(CWindowGc& aGc);
    1.88 +	void ConstructL(RWsSession& aWs, CTWindowTreeNode& aGroup);
    1.89 +	};
    1.90 +
    1.91 +#endif //__TWINDOWS_H__