textrendering/textformatting/test/src/TestPicture.h
changeset 0 1fb32624e06b
equal deleted inserted replaced
-1:000000000000 0:1fb32624e06b
       
     1 /*
       
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * TestPicture.h test picture.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <gdi.h>
       
    21 
       
    22 class CTestPicture : public CPicture
       
    23 	{
       
    24 public:
       
    25 	CTestPicture();
       
    26 	void Draw(CGraphicsContext&, const TPoint&,
       
    27 		const TRect&, MGraphicsDeviceMap*) const;
       
    28 	void ExternalizeL(RWriteStream&) const;
       
    29 	void GetOriginalSizeInTwips(TSize& aSize) const;
       
    30 	TBool LineBreakPossible(TUint,
       
    31 		TBool aBeforePicture, TBool aHaveSpaces) const;
       
    32 	void SetLineBreaksAllowed(TBool aBeforeWithoutSpaces,
       
    33 		TBool aBeforeWithSpaces, TBool aAfterWithoutSpaces,
       
    34 		TBool aAfterWithSpaces);
       
    35 
       
    36 	void SetSizeInTwips(TSize aSize);
       
    37 	void SetSizeInPixels(TSize aSize, const MGraphicsDeviceMap& aMap);
       
    38 
       
    39 private:
       
    40 	TBool iLineBreaksAllowed[4];
       
    41 	TSize iSizeInTwips;
       
    42 	};