TAknLayoutRect Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikcore.lib

Capability Information

Required Capabilities

None


#include <aknutils.h>

Detailed Description

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

IMPORT_C  TAknLayoutRect ()
IMPORT_C void  LayoutRect (const TRect &aParent, TInt aResourceId)
  LayoutRect should be called from control's SizeChanged() method.
IMPORT_C void  LayoutRect (const TRect &aParent, TResourceReader &aReader)
IMPORT_C void  LayoutRect (const TRect &aParent, const AknLayoutUtils::SAknLayoutRect &aLayout)
IMPORT_C void  LayoutRect (const TRect &aParent, const TAknWindowLineLayout &aLayout)
IMPORT_C void  LayoutRect (const TRect &aParent, TInt C, TInt l, TInt t, TInt r, TInt b, TInt W, TInt H)
IMPORT_C TRgb  Color () const
  Color() can be called from control's Draw() method.
IMPORT_C TRect  Rect () const
  Rect() can be called from control's Draw() or in SizeChanged() as input for some other table's layout code.
TBool  Valid () const
IMPORT_C void  DrawRect (CWindowGc &aGc) const
  DrawRect() and DrawImage() should be called from control's Draw() method.
IMPORT_C void  DrawOutLineRect (CWindowGc &aGc) const
IMPORT_C void  DrawImage (CBitmapContext &aGc, CFbsBitmap *aBitmap, CFbsBitmap *aMask) const

Constructor & Destructor Documentation

IMPORT_C TAknLayoutRect::TAknLayoutRect  ) 
 

Member Function Documentation

IMPORT_C TRgb TAknLayoutRect::Color  )  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().

IMPORT_C void TAknLayoutRect::DrawImage CBitmapContext &  aGc,
CFbsBitmap *  aBitmap,
CFbsBitmap *  aMask
const
 
IMPORT_C void TAknLayoutRect::DrawOutLineRect CWindowGc &  aGc  )  const
 
IMPORT_C void TAknLayoutRect::DrawRect CWindowGc &  aGc  )  const
 

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

IMPORT_C void TAknLayoutRect::LayoutRect const TRect &  aParent,
TInt  C,
TInt  l,
TInt  t,
TInt  r,
TInt  b,
TInt  W,
TInt  H
 
IMPORT_C void TAknLayoutRect::LayoutRect const TRect &  aParent,
const TAknWindowLineLayout &  aLayout
 
IMPORT_C void TAknLayoutRect::LayoutRect const TRect &  aParent,
const AknLayoutUtils::SAknLayoutRect aLayout
 
IMPORT_C void TAknLayoutRect::LayoutRect const TRect &  aParent,
TResourceReader &  aReader
 
IMPORT_C void TAknLayoutRect::LayoutRect const TRect &  aParent,
TInt  aResourceId
 

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

IMPORT_C TRect TAknLayoutRect::Rect  )  const
 

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

TBool TAknLayoutRect::Valid  )  const
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top