CEikCapCArray Class Reference

class CEikCapCArray : public CArrayPtrFlat< CEikCaptionedControl >
Public Member Functions
CEikCapCArray(TInt)
~CEikCapCArray()
IMPORT_C voidAdjustAllIds(TInt)
TBool CalcItemIndexes(TInt &, TInt &, TInt &, TSize)
voidCreateExtensionL()
IMPORT_C voidDeleteLine(TInt)
CEikCapCArrayExtension *ExtensionOrNull()
TInt FindItemFromTextLine(TInt)
IMPORT_C TIntFindLineIndex(const CCoeControl *)
TInt FocusableLine(TInt, TInt)
IMPORT_C TIntLineIndexFromId(TInt)
TInt LineIndexToYPosition(TInt, TInt)
IMPORT_C TSizeMinimumSize()
voidMoveLineToScreen(TInt, TInt, TBool)
TInt NumberOfTextLines()
TInt NumberOfTextLinesBeforeLine(TInt)
TRect Rect()
IMPORT_C voidResetMinimumSizes()
TInt ScrollByPixels(TInt)
IMPORT_C voidSetDensePacking(TBool)
IMPORT_C voidSetRect(const TRect &)
voidSetRect(const TRect &, TInt, TInt, TInt)
TInt YPosToLine(const TRect &, TInt, TInt, TInt, TInt)
TInt YPositionToLineIndex(TInt)
Private Member Functions
voidSetRealRect(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_CCEikCapCArray(TIntaGranularity)

Constructor

Creates CEikCapCArray with a granilarity.

Parameters

TInt aGranularityhow many items will be allocated each time allocation happens

~CEikCapCArray()

IMPORT_C~CEikCapCArray()

Destructor

Destroys CEikCapCArray

Member Functions Documentation

AdjustAllIds(TInt)

IMPORT_C voidAdjustAllIds(TIntaControlIdDelta)

AdjustAllIds() modified iId fields of the captionedcontrols

Parameters

TInt aControlIdDeltahow much to increase or decrease control id's

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

TBool CalcItemIndexes(TInt &aTopItemIndex,
TInt &aMiddleItems,
TInt &aBottomItemIndex,
TSizeaAreaSize
)

Parameters

TInt & aTopItemIndex
TInt & aMiddleItems
TInt & aBottomItemIndex
TSize aAreaSize

CreateExtensionL()

voidCreateExtensionL()

DeleteLine(TInt)

IMPORT_C voidDeleteLine(TIntaIndex)

DeleteLine() removes line from captionedcontrolarray

Elements from CaptionedControlArray can be removed by calling DeleteLine method.

Parameters

TInt aIndexindex of the line to be removed

ExtensionOrNull()

CEikCapCArrayExtension *ExtensionOrNull()const

FindItemFromTextLine(TInt)

TInt FindItemFromTextLine(TIntaTextLine)const

Parameters

TInt aTextLine

FindLineIndex(const CCoeControl *)

IMPORT_C TIntFindLineIndex(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 * aControlcontrol to be found

FocusableLine(TInt, TInt)

TInt FocusableLine(TIntaCurrentLine,
TIntaTopY
)

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

Since
S60 5.2

Parameters

TInt aCurrentLineCurrent line's index.
TInt aTopYView's top y coordinate.

LineIndexFromId(TInt)

IMPORT_C TIntLineIndexFromId(TIntaControlId)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 aControlIdcaptionedcontrol's iId.

LineIndexToYPosition(TInt, TInt)

TInt LineIndexToYPosition(TIntaLine,
TIntaTopY
)const

Returns line's top y coordinate.

Parameters

TInt aLine
TInt aTopY

MinimumSize()

IMPORT_C TSizeMinimumSize()

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)

voidMoveLineToScreen(TIntaLine,
TIntaTopY,
TBoolaVisible
)

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(TIntaLine)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 voidResetMinimumSizes()

ResetMinimumSizes() clears size information

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

ScrollByPixels(TInt)

TInt ScrollByPixels(TIntaDelta)

Scrolls each item by aDelta pixels in y direction.

Parameters

TInt aDelta

SetDensePacking(TBool)

IMPORT_C voidSetDensePacking(TBoolaDensePacking)

SetDensePacking() sets dense packing flag

Parameters

TBool aDensePackingwhether dense packing flag is on

SetRealRect(const TRect &, TInt, TInt)

voidSetRealRect(const TRect &aRect,
TIntaTop,
TIntaBottom
)[private]

Positions controls in real locations.

Parameters

const TRect & aRect
TInt aTop
TInt aBottom

SetRect(const TRect &)

IMPORT_C voidSetRect(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 & aRectRectangle for the whole array

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

voidSetRect(const TRect &aRect,
TIntaTop,
TIntaMiddle,
TIntaBottom
)

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 & aRectRectangle of the form window
TInt aTopNumber of items above the window
TInt aMiddleNumber of items inside the window
TInt aBottomNumber of items below the window

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

TInt YPosToLine(const TRect &aRect,
TIntaTop,
TIntaMiddle,
TIntaBottom,
TIntaYCoord
)

Parameters

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

YPositionToLineIndex(TInt)

TInt YPositionToLineIndex(TIntaYPos)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]