CEikCapCArray Class Reference

class CEikCapCArray : public CArrayPtrFlat< CEikCaptionedControl >
Public Member Functions
CEikCapCArray ( TInt )
~CEikCapCArray ()
IMPORT_C void AdjustAllIds ( TInt )
TBool CalcItemIndexes ( TInt &, TInt &, TInt &, TSize )
void CreateExtensionL ()
IMPORT_C void DeleteLine ( TInt )
CEikCapCArrayExtension * ExtensionOrNull ()
TInt FindItemFromTextLine ( TInt )
IMPORT_C TInt FindLineIndex (const CCoeControl *)
TInt FocusableLine ( TInt , TInt )
IMPORT_C TInt LineIndexFromId ( TInt )
TInt LineIndexToYPosition ( TInt , TInt )
IMPORT_C TSize MinimumSize ()
void MoveLineToScreen ( TInt , TInt , TBool )
TInt NumberOfTextLines ()
TInt NumberOfTextLinesBeforeLine ( TInt )
TRect Rect ()
IMPORT_C void ResetMinimumSizes ()
TInt ScrollByPixels ( TInt )
IMPORT_C void SetDensePacking ( TBool )
IMPORT_C void SetRect (const TRect &)
void SetRect (const TRect &, TInt , TInt , TInt )
TInt YPosToLine (const TRect &, TInt , TInt , TInt , TInt )
TInt YPositionToLineIndex ( TInt )
Private Member Functions
void SetRealRect (const TRect &, TInt , TInt )
Inherited Functions
CArrayFix< CEikCaptionedControl * >::AppendL(const CEikCaptionedControl *&)
CArrayFix< CEikCaptionedControl * >::AppendL(const CEikCaptionedControl *&,TInt)
CArrayFix< CEikCaptionedControl * >::AppendL(const CEikCaptionedControl **,TInt)
CArrayFix< CEikCaptionedControl * >::Array()const
CArrayFix< CEikCaptionedControl * >::At(TInt)
CArrayFix< CEikCaptionedControl * >::At(TInt)const
CArrayFix< CEikCaptionedControl * >::Back(TInt)
CArrayFix< CEikCaptionedControl * >::Back(TInt)const
CArrayFix< CEikCaptionedControl * >::CArrayFix(TBufRep,TInt)
CArrayFix< CEikCaptionedControl * >::End(TInt)
CArrayFix< CEikCaptionedControl * >::End(TInt)const
CArrayFix< CEikCaptionedControl * >::ExpandL(TInt)
CArrayFix< CEikCaptionedControl * >::ExtendL()
CArrayFix< CEikCaptionedControl * >::Find(const CEikCaptionedControl *&,TKeyArrayFix &,TInt &)const
CArrayFix< CEikCaptionedControl * >::FindIsq(const CEikCaptionedControl *&,TKeyArrayFix &,TInt &)const
CArrayFix< CEikCaptionedControl * >::InsertIsqAllowDuplicatesL(const CEikCaptionedControl *&,TKeyArrayFix &)
CArrayFix< CEikCaptionedControl * >::InsertIsqL(const CEikCaptionedControl *&,TKeyArrayFix &)
CArrayFix< CEikCaptionedControl * >::InsertL(TInt,const CEikCaptionedControl *&)
CArrayFix< CEikCaptionedControl * >::InsertL(TInt,const CEikCaptionedControl *&,TInt)
CArrayFix< CEikCaptionedControl * >::InsertL(TInt,const CEikCaptionedControl **,TInt)
CArrayFix< CEikCaptionedControl * >::ResizeL(TInt)
CArrayFix< CEikCaptionedControl * >::ResizeL(TInt,const CEikCaptionedControl *&)
CArrayFix< CEikCaptionedControl * >::operator[](TInt)
CArrayFix< CEikCaptionedControl * >::operator[](TInt)const
CArrayFixBase::AtR(const CBase *,TInt)
CArrayFixBase::CArrayFixBase(TBufRep,TInt,TInt)
CArrayFixBase::Compress()
CArrayFixBase::Count()const
CArrayFixBase::CountR(const CBase *)
CArrayFixBase::Delete(TInt)
CArrayFixBase::Delete(TInt,TInt)
CArrayFixBase::Find(const TAny *,TKeyArrayFix &,TInt &)const
CArrayFixBase::FindIsq(const TAny *,TKeyArrayFix &,TInt &)const
CArrayFixBase::InsertIsqAllowDuplicatesL(const TAny *,TKeyArrayFix &)
CArrayFixBase::InsertIsqL(const TAny *,TKeyArrayFix &)
CArrayFixBase::InsertL(TInt,const TAny *)
CArrayFixBase::InsertL(TInt,const TAny *,TInt)
CArrayFixBase::InsertRepL(TInt,const TAny *,TInt)
CArrayFixBase::Length()const
CArrayFixBase::Reset()
CArrayFixBase::ResizeL(TInt,const TAny *)
CArrayFixBase::SetKey(TKeyArrayFix &)const
CArrayFixBase::SetReserveFlatL(TInt)
CArrayFixBase::Sort(TKeyArrayFix &)
CArrayFixBase::~CArrayFixBase()
CArrayPtr< CEikCaptionedControl >::CArrayPtr(TBufRep,TInt)
CArrayPtr< CEikCaptionedControl >::ResetAndDestroy()
CArrayPtrFlat< CEikCaptionedControl >::CArrayPtrFlat(TInt)
CArrayPtrFlat< CEikCaptionedControl >::SetReserveL(TInt)
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TBool iDensePacking
CEikCapCArrayExtension * iExtension

Constructor & Destructor Documentation

CEikCapCArray(TInt)

IMPORT_C CEikCapCArray ( TInt aGranularity )

Constructor

Creates CEikCapCArray with a granilarity.

Parameters

TInt aGranularity how many items will be allocated each time allocation happens

~CEikCapCArray()

IMPORT_C ~CEikCapCArray ( )

Destructor

Destroys CEikCapCArray

Member Functions Documentation

AdjustAllIds(TInt)

IMPORT_C void AdjustAllIds ( TInt aControlIdDelta )

AdjustAllIds() modified iId fields of the captionedcontrols

Parameters

TInt aControlIdDelta how much to increase or decrease control id's

CalcItemIndexes(TInt &, TInt &, TInt &, TSize)

TBool CalcItemIndexes ( TInt & aTopItemIndex,
TInt & aMiddleItems,
TInt & aBottomItemIndex,
TSize aAreaSize
)

Parameters

TInt & aTopItemIndex
TInt & aMiddleItems
TInt & aBottomItemIndex
TSize aAreaSize

CreateExtensionL()

void CreateExtensionL ( )

DeleteLine(TInt)

IMPORT_C void DeleteLine ( TInt aIndex )

DeleteLine() removes line from captionedcontrolarray

Elements from CaptionedControlArray can be removed by calling DeleteLine method.

Parameters

TInt aIndex index of the line to be removed

ExtensionOrNull()

CEikCapCArrayExtension * ExtensionOrNull ( ) const

FindItemFromTextLine(TInt)

TInt FindItemFromTextLine ( TInt aTextLine ) const

Parameters

TInt aTextLine

FindLineIndex(const CCoeControl *)

IMPORT_C TInt FindLineIndex ( const CCoeControl * aControl ) const

FindLineIndex() finds line index based on control

Every captionedcontrol has iControl CCoeControl which implements the control for the DLG_LINE. FindLineIndex goes through all captionedcontrols and finds the one which has aControl as it's control.

Parameters

const CCoeControl * aControl control to be found

FocusableLine(TInt, TInt)

TInt FocusableLine ( TInt aCurrentLine,
TInt aTopY
)

Calculates the line that should be focused when a navigation key is pressed while in form view mode.

Since
S60 5.2

Parameters

TInt aCurrentLine Current line's index.
TInt aTopY View's top y coordinate.

LineIndexFromId(TInt)

IMPORT_C TInt LineIndexFromId ( TInt aControlId ) const

LineIndexFromId() provides line index in array based on id number

Every captionedcontrol has iId and based on the id, LineIndexFromId goes through the captionedcontrolarray and finds the captionedcontrol's position in the array based on the id provided

Parameters

TInt aControlId captionedcontrol's iId.

LineIndexToYPosition(TInt, TInt)

TInt LineIndexToYPosition ( TInt aLine,
TInt aTopY
) const

Returns line's top y coordinate.

Parameters

TInt aLine
TInt aTopY

MinimumSize()

IMPORT_C TSize MinimumSize ( )

MinimumSize() returns minimum size for the array

MinimumSize calculates minimum possible size for the captioned control array.

Calculate the size of all the component controls stacked vertically. For Avkon Forms the controls overlap by 2 pixels (hard coded)

MoveLineToScreen(TInt, TInt, TBool)

void MoveLineToScreen ( TInt aLine,
TInt aTopY,
TBool aVisible
)

Moves aLine to the visible screen area or out of it.

Parameters

TInt aLine
TInt aTopY
TBool aVisible

NumberOfTextLines()

TInt NumberOfTextLines ( ) const

NumberOfTextLinesBeforeLine(TInt)

TInt NumberOfTextLinesBeforeLine ( TInt aLine ) const

Parameters

TInt aLine

Rect()

TRect Rect ( ) const

Position all of the component controls in a vertical pile. For Avkon Forms the controls overlap by two pixels. (hard coded)

ResetMinimumSizes()

IMPORT_C void ResetMinimumSizes ( )

ResetMinimumSizes() clears size information

ResetMinimumSizes goes through all captionedcontrols and resets the minimum size information of the captionedcontrols

ScrollByPixels(TInt)

TInt ScrollByPixels ( TInt aDelta )

Scrolls each item by aDelta pixels in y direction.

Parameters

TInt aDelta

SetDensePacking(TBool)

IMPORT_C void SetDensePacking ( TBool aDensePacking )

SetDensePacking() sets dense packing flag

Parameters

TBool aDensePacking whether dense packing flag is on

SetRealRect(const TRect &, TInt, TInt)

void SetRealRect ( const TRect & aRect,
TInt aTop,
TInt aBottom
) [private]

Positions controls in real locations.

Parameters

const TRect & aRect
TInt aTop
TInt aBottom

SetRect(const TRect &)

IMPORT_C void SetRect ( const TRect & aRect )

SetRect() sets the rectangle of the captionedcontrolarray

SetRect layouts the captionedcontrolarray. Captioned control rectangles are calculated based on provided rectangle and sizes of the captioned controls.

Parameters

const TRect & aRect Rectangle for the whole array

SetRect(const TRect &, TInt, TInt, TInt)

void SetRect ( const TRect & aRect,
TInt aTop,
TInt aMiddle,
TInt aBottom
)

Places the dialog items according to the current visible window position. When hiding items, uses SetExtent() instead of just SetPosition() in order to call SizeChanged() of the moved item. For example, this is needed for the editor to change its cursor accordingly.

Parameter value equal to -1 means that the parameter is not defined and will be calculated automatically. Normally, either the top number or the bottom one is only defined. If aTop is defined, the items will be placed from top downwards, leaving aTop items above the window. If aBottom is defined, the items will be placed from bottom upwards, leaving aBottom items below the window.

This function panics, if neither aTop nor aBottom are defined.

The function first checks if the provided aTop and aBottom are consistent with the item sizes and the given window rectangle. If they are not, they will be corrected. Usually, aTop and aBottom come out of sync with the item sizes after the dynamic layout change.

Parameters

const TRect & aRect Rectangle of the form window
TInt aTop Number of items above the window
TInt aMiddle Number of items inside the window
TInt aBottom Number of items below the window

YPosToLine(const TRect &, TInt, TInt, TInt, TInt)

TInt YPosToLine ( const TRect & aRect,
TInt aTop,
TInt aMiddle,
TInt aBottom,
TInt aYCoord
)

Parameters

const TRect & aRect
TInt aTop
TInt aMiddle
TInt aBottom
TInt aYCoord

YPositionToLineIndex(TInt)

TInt YPositionToLineIndex ( TInt aYPos ) const

Return the index of the line at aYPos.

Parameters

TInt aYPos

Member Data Documentation

TBool iDensePacking

TBool iDensePacking [private]

CEikCapCArrayExtension * iExtension

CEikCapCArrayExtension * iExtension [private]