TAknLayoutRect Class Reference

class TAknLayoutRect

Low level rectangle management based on European LAF document (can be used by application's custom controls)

This allows you to draw images, rectangles, lines or just calculate rectangles based on LAF spec.

This class reads AVKON_LAYOUT_RECT resources.

Instances of this class should be placed inside controls for reading low level layout from resources.

Public Member Functions
TAknLayoutRect()
IMPORT_C TRgbColor()
IMPORT_C voidDrawImage(CBitmapContext &, CFbsBitmap *, CFbsBitmap *)
IMPORT_C voidDrawOutLineRect(CWindowGc &)
IMPORT_C voidDrawRect(CWindowGc &)
IMPORT_C voidLayoutRect(const TRect &, TInt)
IMPORT_C voidLayoutRect(const TRect &, TResourceReader &)
IMPORT_C voidLayoutRect(const TRect &, const AknLayoutUtils::SAknLayoutRect &)
IMPORT_C voidLayoutRect(const TRect &, const TAknWindowLineLayout &)
IMPORT_C voidLayoutRect(const TRect &, TInt, TInt, TInt, TInt, TInt, TInt, TInt)
IMPORT_C TRectRect()
TBool Valid()
Private Attributes
TInt iColor
TRect iRect

Constructor & Destructor Documentation

TAknLayoutRect()

IMPORT_CTAknLayoutRect()

Member Functions Documentation

Color()

IMPORT_C TRgbColor()const

Color() can be called from control's Draw() method.

DO NOT CALL it in SizeChanged(), ConstructL() or ActivateL() method, because it messes up color scheme changes. Especially if you're using colors 226-248. If you store color values, be prepared to update TRgb's you store when color palette is changed! Best thing to do is to make your Draw() methods call AKN_LAF_COLOR().

DrawImage(CBitmapContext &, CFbsBitmap *, CFbsBitmap *)

IMPORT_C voidDrawImage(CBitmapContext &aGc,
CFbsBitmap *aBitmap,
CFbsBitmap *aMask
)const

Parameters

CBitmapContext & aGc
CFbsBitmap * aBitmap
CFbsBitmap * aMask

DrawOutLineRect(CWindowGc &)

IMPORT_C voidDrawOutLineRect(CWindowGc &aGc)const

Parameters

CWindowGc & aGc

DrawRect(CWindowGc &)

IMPORT_C voidDrawRect(CWindowGc &aGc)const

DrawRect() and DrawImage() should be called from control's Draw() method.

Parameters

CWindowGc & aGc

LayoutRect(const TRect &, TInt)

IMPORT_C voidLayoutRect(const TRect &aParent,
TIntaResourceId
)

LayoutRect should be called from control's SizeChanged() method.

Parameters

const TRect & aParent
TInt aResourceId

LayoutRect(const TRect &, TResourceReader &)

IMPORT_C voidLayoutRect(const TRect &aParent,
TResourceReader &aReader
)

Parameters

const TRect & aParent
TResourceReader & aReader

LayoutRect(const TRect &, const AknLayoutUtils::SAknLayoutRect &)

IMPORT_C voidLayoutRect(const TRect &aParent,
const AknLayoutUtils::SAknLayoutRect &aLayout
)

Parameters

const TRect & aParent
const AknLayoutUtils::SAknLayoutRect & aLayout

LayoutRect(const TRect &, const TAknWindowLineLayout &)

IMPORT_C voidLayoutRect(const TRect &aParent,
const TAknWindowLineLayout &aLayout
)

Parameters

const TRect & aParent
const TAknWindowLineLayout & aLayout

LayoutRect(const TRect &, TInt, TInt, TInt, TInt, TInt, TInt, TInt)

IMPORT_C voidLayoutRect(const TRect &aParent,
TIntC,
TIntl,
TIntt,
TIntr,
TIntb,
TIntW,
TIntH
)

Parameters

const TRect & aParent
TInt C
TInt l
TInt t
TInt r
TInt b
TInt W
TInt H

Rect()

IMPORT_C TRectRect()const

Rect() can be called from control's Draw() or in SizeChanged() as input for some other table's layout code.

Valid()

TBool Valid()const

Member Data Documentation

TInt iColor

TInt iColor[private]

TRect iRect

TRect iRect[private]