CFepUiLayout Class Reference

class CFepUiLayout : public CBase

class CFepUiLayout

This is main class for Fep UI framework.

peninputlayoutcontrol.lib
Since
S60 v4.0

Inherits from

Public Member Functions
~CFepUiLayout()
IMPORT_C voidAddControlL(CFepUiBaseCtrl *, TBool)
IMPORT_C voidAddControlL(CCoeControl *, TBool)
IMPORT_C voidBaseConstructL()
IMPORT_C voidChangeFeedbackArea(TInt, const TRect &, const TRect &)
IMPORT_C voidChangeFeedbackType(TInt, TInt)
const RPointerArray< CFepUiBaseCtrl > &ControlList()
IMPORT_C CFepUiCursor *CreateCursor()
IMPORT_C voidDeRegisterFeedbackArea(TInt, const TRect &)
IMPORT_C voidDestroy()
IMPORT_C voidDisableLayoutDrawing(TBool)
IMPORT_C voidDoTactileFeedback(TInt)
IMPORT_C voidDoTactileFeedback(TInt, TBool, TBool)
IMPORT_C voidDraw()
IMPORT_C voidEnableLayoutMoving(CDragBar *)
IMPORT_C TIntGetEnabledPluginMode()
IMPORT_C TIntGetInputContextFieldMaxLen()
IMPORT_C voidHandleAppInfoChange(const TDesC &, TPeninputAppInfo)
IMPORT_C TIntHandleCommand(TInt, TUint8 *)
IMPORT_C TBoolHandleEventL(TEventType, const TAny *)
IMPORT_C TRectInit()
IMPORT_C TBoolIsValidDestination(const TRect &, CDragBar *, TBool &, TBool &, TBool)
MLayoutOwner *LayoutOwner()
TBool LayoutReady()
IMPORT_C voidLockArea(const TRect &, CFepUiBaseCtrl *)
const CFepUiBaseCtrl *LockareaOwner()
const TRect &LockedArea()
IMPORT_C TBoolNotDrawToLayoutDevice()
IMPORT_C voidOnActivate()
IMPORT_C TIntOnAppEditorTextComing(const TFepInputContextFieldData &)
IMPORT_C voidOnDeActivate()
IMPORT_C TIntOnResourceChange(TInt)
IMPORT_C TPointPosition()
IMPORT_C TRectRect()
IMPORT_C voidRegisterFeedbackArea(TInt, const TRect &)
IMPORT_C voidRegisterFeedbackArea(TInt, const TRect &, TInt)
IMPORT_C voidRemoveControl(CFepUiBaseCtrl *)
IMPORT_C voidRemoveControl(CCoeControl *)
CFepUiLayoutRootCtrl *RootControl()
const TSize &ScreenSize()
IMPORT_C TBoolSemiTransparencyRequired()
IMPORT_C voidSetAppEditorCursor(const TCursorSelection &, TBool)
IMPORT_C voidSetLayoutPos(const TPoint &)
IMPORT_C voidSetPositionFromOutside(const TPoint &)
IMPORT_C voidSetRect(const TRect &)
voidSetScreenSize(const TSize &)
IMPORT_C voidSetShadowAreaRect(const TRect &, TShadowBitmapIndex)
IMPORT_C voidSetShadowBmp(CFbsBitmap *, CFbsBitmap *, TShadowBitmapIndex)
IMPORT_C voidSetShadowRect(const TRect &)
IMPORT_C voidSignalOwner(TInt, const TDesC &)
MAknsSkinInstance *SkinInstance()
IMPORT_C TBoolSupportTactileFeedback()
MTouchFeedback *TouchFeedbackInstance()
IMPORT_C voidUnLockArea(const TRect &, CFepUiBaseCtrl *)
IMPORT_C voidUpdateArea(const CFepUiBaseCtrl *, const TRect &, TBool, TBool)
Protected Member Functions
CFepUiLayout(MLayoutOwner *)
IMPORT_C TIntOnSkinChange()
Private Member Functions
IMPORT_C TBoolHandleRawKeyEventL(const TRawEvent &)
TBool IsSemiTransparencyRequired(const RPointerArray< CFepUiBaseCtrl > &)
NONSHARABLE_CLASS(CFepUiLayoutExt)
IMPORT_C TBoolOnPointerEventOutsideLayout(const TRawEvent &)
voidSendEditorTextAndCursorPosL(TUint8 *)
voidSetSelfBmpDeviceFlag(TBool)
IMPORT_C TIntSizeChanged(const TAny *)
Inherited Functions
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
CDragBar *iDragbarList
TInt iDragbarNum
CFepUiLayoutExt *iExtension
TPoint iLayoutDraggingPos
MLayoutOwner *iLayoutOwner
TInt iLayoutReady
TRect iLockedArea
CFepUiBaseCtrl *iLockedAreaOwner
TInt iReserved1
CFepUiLayoutRootCtrl *iRootCtrl
TSize iScreenSize

Constructor & Destructor Documentation

CFepUiLayout(MLayoutOwner *)

IMPORT_CCFepUiLayout(MLayoutOwner *aLayoutOwner)[protected]

Constructor

Since
S60 v4.0

Parameters

MLayoutOwner * aLayoutOwnerThe layout owner

~CFepUiLayout()

IMPORT_C~CFepUiLayout()[virtual]

Destructor.

Since
S60 v4.0

Member Functions Documentation

AddControlL(CFepUiBaseCtrl *, TBool)

IMPORT_C voidAddControlL(CFepUiBaseCtrl *aControl,
TBoolaEventObserverFlag = ETrue
)

AddControlL Add a control to layout.

Since
S60 v4.0

Parameters

CFepUiBaseCtrl * aControlThe control to be added. The ownership transferred to layout
TBool aEventObserverFlag = ETrueETrue if layout is this control's event observer. Otherwise not. Default value is ETrue.

AddControlL(CCoeControl *, TBool)

IMPORT_C voidAddControlL(CCoeControl *aControl,
TBoolaEventObserverFlag = ETrue
)

AddControlL Add a control to layout.

Since
S60 v4.0

Parameters

CCoeControl * aControlThe control to be added. The ownership transferred to layout
TBool aEventObserverFlag = ETrueETrue if layout is this control's event observer. Otherwise not. Default value is ETrue.

BaseConstructL()

IMPORT_C voidBaseConstructL()[virtual]

BaseConstructL Does the base construction. Derivated class must call this when constructed.

Since
S60 v4.0

ChangeFeedbackArea(TInt, const TRect &, const TRect &)

IMPORT_C voidChangeFeedbackArea(TIntaId,
const TRect &aNew,
const TRect &aOld
)

ChangeFeedbackArea. Change the area which has required tactile feedback.

Since
S60 v4.0

Parameters

TInt aIdThe unique id of this area
const TRect & aNewThe new registered area
const TRect & aOldPrevious area for tactile feedback.

ChangeFeedbackType(TInt, TInt)

IMPORT_C voidChangeFeedbackType(TIntaId,
TIntaNewTactileType
)

ChangeFeedbackType. Change the tactile feedback which has required tactile feedback.

Since
S60 v4.0

Parameters

TInt aIdThe unique id of this feedback type
TInt aNewTactileTypenew feedback type.

ControlList()

const RPointerArray< CFepUiBaseCtrl > &ControlList()[inline]

Get ui layout control list

Since
S60 v4.0

CreateCursor()

IMPORT_C CFepUiCursor *CreateCursor()

Create the cursor. There is only one cursor within a pen ui.

Since
S60 v4.0

DeRegisterFeedbackArea(TInt, const TRect &)

IMPORT_C voidDeRegisterFeedbackArea(TIntaId,
const TRect &aRect
)

DeRegisterFeedbackArea. Remove the area which has required tactile feedback. Nothing happends if the area not registered before.

Since
S60 v4.0

Parameters

TInt aIdThe unique id of this area. Don't use negative id.
const TRect & aRectThe tactile area.

Destroy()

IMPORT_C voidDestroy()[virtual]

From MPenUiLayoutBase Destroy layout

Since
S60 v4.0

DisableLayoutDrawing(TBool)

IMPORT_C voidDisableLayoutDrawing(TBoolaFlag)

Parameters

TBool aFlag

DoTactileFeedback(TInt)

IMPORT_C voidDoTactileFeedback(TIntaType)

Gives instant feedback.

Notice that the feedback might not be actually played, if for example user has disabled the feedback from the settings.

Since
S60 v4.0

Parameters

TInt aType- The logical feedback type to play.

DoTactileFeedback(TInt, TBool, TBool)

IMPORT_C voidDoTactileFeedback(TIntaType,
TBoolaVibraEnable,
TBoolaAudioEnable
)

Gives instant feedback.

Notice that the feedback might not be actually played, if for example user has disabled the feedback from the settings.

Since
S60 v4.0

Parameters

TInt aType- The logical feedback type to play.
TBool aVibraEnable- Enable Audio Feedback.
TBool aAudioEnable- Enable Vibra Feedback.

Draw()

IMPORT_C voidDraw()[virtual]

From MPenUiLayoutBase Draw layout.

Since
S60 v4.0

EnableLayoutMoving(CDragBar *)

IMPORT_C voidEnableLayoutMoving(CDragBar *aDragbar)

Enable whole layout moved by a dragbar.

Since
S60 v4.0

Parameters

CDragBar * aDragbar

GetEnabledPluginMode()

IMPORT_C TIntGetEnabledPluginMode()

GetInputContextFieldMaxLen()

IMPORT_C TIntGetInputContextFieldMaxLen()[virtual]

HandleAppInfoChange(const TDesC &, TPeninputAppInfo)

IMPORT_C voidHandleAppInfoChange(const TDesC &aInfo,
TPeninputAppInfoaType
)[virtual]

From MPenUiLayoutBase HandleAppInfoChange. Inform UI that application infomation changed.

Since
S60 v5.0

Parameters

const TDesC & aInfoThe information.
TPeninputAppInfo aTypeThe information type

HandleCommand(TInt, TUint8 *)

IMPORT_C TIntHandleCommand(TIntaCmd,
TUint8 *aData
)

From MPenUiLayoutBase HandleCommand. Handle layout command event.

Since
S60 v4.0

Parameters

TInt aCmdCommand Id.
TUint8 * aDataData for command.

HandleEventL(TEventType, const TAny *)

IMPORT_C TBoolHandleEventL(TEventTypeaType,
const TAny *aEventData
)

From MPenUiLayoutBase HandleEventL. Handle UI event. There are only 3 kinds of UI event right now: raw event, pointer and pointer buffer event.

Since
S60 v4.0

Parameters

TEventType aTypeThe event type. See TEventType
const TAny * aEventDataThe event data.

HandleRawKeyEventL(const TRawEvent &)

IMPORT_C TBoolHandleRawKeyEventL(const TRawEvent &aKeyEvent)[private, virtual]

Handle raw key event. Call back function. Called when raw key event happens Do nothing in default implementation

Since
S60 v4.0

Parameters

const TRawEvent & aKeyEventKey event

Init()

IMPORT_C TRectInit()

From MPenUiLayoutBase Init. Do layout initialization. It's called by layout owner

Since
S60 v4.0

IsSemiTransparencyRequired(const RPointerArray< CFepUiBaseCtrl > &)

TBool IsSemiTransparencyRequired(const RPointerArray< CFepUiBaseCtrl > &aCtrlList)[private]

IsSemiTransparencyRequired. Tell whether one of the contorl require transparency.

Since
S60 v4.0

Parameters

const RPointerArray< CFepUiBaseCtrl > & aCtrlListThe control list

IsValidDestination(const TRect &, CDragBar *, TBool &, TBool &, TBool)

IMPORT_C TBoolIsValidDestination(const TRect &aRect,
CDragBar *aDragBar,
TBool &aVInfo,
TBool &aHInfo,
TBoolaFlag
)[virtual]

Test whether the position is valid. This is used to test the target position when draging controls to some place

Since
S60 v4.0

Parameters

const TRect & aRectThe rect to be checked.
CDragBar * aDragBar
TBool & aVInfoThe valid information in vertial dirtection. ETrue is vertical moving is valid.It's only used when aRect is not valid but moving in vertical direction is valid.
TBool & aHInfoThe valid information in horizontal dirtection. ETrue is horizontal moving is valid.It's only used when aRect is not valid but moving in vertical direction is valid.
TBool aFlagETrue if whole layout is moving, otherwise, only components moving

LayoutOwner()

MLayoutOwner *LayoutOwner()[inline]

Get the layout owner

Since
S60 v4.0

LayoutReady()

TBool LayoutReady()[inline]
Get layout status. Layout is only ready after initialized.
Since
S60 v4.0

LockArea(const TRect &, CFepUiBaseCtrl *)

IMPORT_C voidLockArea(const TRect &aRect,
CFepUiBaseCtrl *aOwner
)

Lock a area

Since
S60 v4.0

Parameters

const TRect & aRectThe locked area
CFepUiBaseCtrl * aOwnerThe owner of the locked area

LockareaOwner()

const CFepUiBaseCtrl *LockareaOwner()const [inline]

get the locked area owner

Since
S60 v5.0 return current locked area owner.

LockedArea()

const TRect &LockedArea()[inline]

get the locked area

Since
S60 v5.0 return current locked area.

NONSHARABLE_CLASS(CFepUiLayoutExt)

NONSHARABLE_CLASS(CFepUiLayoutExt)[private, inline]

Parameters

CFepUiLayoutExt

NotDrawToLayoutDevice()

IMPORT_C TBoolNotDrawToLayoutDevice()

OnActivate()

IMPORT_C voidOnActivate()

From MPenUiLayoutBase OnActivate. Called by owner when the layout is going to be shown.

Since
S60 v4.0

OnAppEditorTextComing(const TFepInputContextFieldData &)

IMPORT_C TIntOnAppEditorTextComing(const TFepInputContextFieldData &aData)[virtual]

Handle editor text coming Called by animation dll when app editor text is coming. If a ui layout has a editor area, it must implements this function to get the text

Since
S60 v4.0

Parameters

const TFepInputContextFieldData & aDataThe fep input context field data

OnDeActivate()

IMPORT_C voidOnDeActivate()

From MPenUiLayoutBase OnDeActivate. Called by owner when the layout is going to be hidden

Since
S60 v4.0

OnPointerEventOutsideLayout(const TRawEvent &)

IMPORT_C TBoolOnPointerEventOutsideLayout(const TRawEvent &aEvent)[private, virtual]

Handle pointer down/up event while this event is outside of the layout Do nothing in default implementation

Since
S60 v4.0

Parameters

const TRawEvent & aEventThe raw event

OnResourceChange(TInt)

IMPORT_C TIntOnResourceChange(TIntaType)[virtual]

From MPenUiLayoutBase OnResourceChange. Inform layout the system resource changed.

Since
S60 v4.0

Parameters

TInt aTypethe event type

OnSkinChange()

IMPORT_C TIntOnSkinChange()[protected, virtual]

OnSkinChange. Called when system skin changed.

Since
S60 v4.0

Position()

IMPORT_C TPointPosition()[virtual]

Get layout start position

Since
S60 v4.0

Rect()

IMPORT_C TRectRect()[virtual]

Get layout area

Since
S60 v4.0

RegisterFeedbackArea(TInt, const TRect &)

IMPORT_C voidRegisterFeedbackArea(TIntaId,
const TRect &aRect
)

RegisterFeedbackArea. Register the area which requires tactile feedback. Note, if two control have the same area, you need to register twice.

Since
S60 v4.0

Parameters

TInt aIdThe unique id of this area
const TRect & aRectThe tactile area.

RegisterFeedbackArea(TInt, const TRect &, TInt)

IMPORT_C voidRegisterFeedbackArea(TIntaId,
const TRect &aRect,
TIntaTactileType
)

RegisterFeedbackArea. Register the area which requires tactile feedback. Note, if two control have the same area, you need to register twice.

Since
S60 v4.0

Parameters

TInt aIdThe unique id of this area
const TRect & aRectThe tactile area.
TInt aTactileType

RemoveControl(CFepUiBaseCtrl *)

IMPORT_C voidRemoveControl(CFepUiBaseCtrl *aControl)

RemoveControl Remove a control from layout.

Since
S60 v4.0

Parameters

CFepUiBaseCtrl * aControlThe control to be removed.

RemoveControl(CCoeControl *)

IMPORT_C voidRemoveControl(CCoeControl *aControl)

RemoveControl Remove a control from layout.

Since
S60 v4.0

Parameters

CCoeControl * aControlThe control to be removed.

RootControl()

CFepUiLayoutRootCtrl *RootControl()[inline]

Get ui layout root control

Since
S60 v4.0

ScreenSize()

const TSize &ScreenSize()[inline]

get whole screen size.

Since
S60 v4.0

SemiTransparencyRequired()

IMPORT_C TBoolSemiTransparencyRequired()

SemiTransparencyRequired. Tell whether this layout requires semi-transparency. This is to save memory used in mask bitmap. If transparency not deeded, We use black-white bitmap.

Since
S60 v4.0

SendEditorTextAndCursorPosL(TUint8 *)

voidSendEditorTextAndCursorPosL(TUint8 *aData)[private]

Send editor text and cursor pos

Since
S60 v4.0

Parameters

TUint8 * aDataEditor text and cursor pos information

SetAppEditorCursor(const TCursorSelection &, TBool)

IMPORT_C voidSetAppEditorCursor(const TCursorSelection &aCursorSel,
TBoolaReqMoreText = EFalse
)[virtual]

Call back function. Called when cursor in input context field changed by pointer. Just signal layout owner this event in default implementation

Since
S60 v4.0

Parameters

const TCursorSelection & aCursorSelCurrent cursor selection in input context field
TBool aReqMoreText = EFalse

SetLayoutPos(const TPoint &)

IMPORT_C voidSetLayoutPos(const TPoint &aPt)

Set layout position

Since
S60 v4.0

Parameters

const TPoint & aPt

SetPositionFromOutside(const TPoint &)

IMPORT_C voidSetPositionFromOutside(const TPoint &aNewPos)

SetPositionFromOutside. Inform UI that the position is change from outside of UI.

Since
S60 v5.0

Parameters

const TPoint & aNewPos

SetRect(const TRect &)

IMPORT_C voidSetRect(const TRect &aRect)

Set the layout size. It will update region-aware control's valid region It will call owner's LayoutSizeChanged if size changed.

Since
S60 v4.0

Parameters

const TRect & aRectThe layout size.

SetScreenSize(const TSize &)

voidSetScreenSize(const TSize &aSize)[inline]

Set whole screen size.

Since
S60 v4.0

Parameters

const TSize & aSizeThe screen size

SetSelfBmpDeviceFlag(TBool)

voidSetSelfBmpDeviceFlag(TBoolaFlag)[private]

Parameters

TBool aFlag

SetShadowAreaRect(const TRect &, TShadowBitmapIndex)

IMPORT_C voidSetShadowAreaRect(const TRect &aRect,
TShadowBitmapIndexaIndex
)

Set shadow rect for a shadow area. The nth shadow is drawn in this shadow rect

Since
S60 V4.0

Parameters

const TRect & aRectThe shadow rect.The rect's coordinate is relative to layout.
TShadowBitmapIndex aIndexThe index position for shadow rect

SetShadowBmp(CFbsBitmap *, CFbsBitmap *, TShadowBitmapIndex)

IMPORT_C voidSetShadowBmp(CFbsBitmap *aBmp,
CFbsBitmap *aMaskBmp,
TShadowBitmapIndexaIndex
)
set layout's shadow bitmap and mask bmp
Since
S60 V4.0

Parameters

CFbsBitmap * aBmp
CFbsBitmap * aMaskBmp
TShadowBitmapIndex aIndexThe shadow bitmap position index. See CFepUiBaseCtrl's SetShadowBmp the defination of TShadowBitmapIndex

SetShadowRect(const TRect &)

IMPORT_C voidSetShadowRect(const TRect &aRect)

Set the layout shadow size. Shadow will draw between shadow rect and layout rect. Ui layout rect is then changed to shadow rect.

Since
S60 v4.0

Parameters

const TRect & aRectThe layout shadow size.

SignalOwner(TInt, const TDesC &)

IMPORT_C voidSignalOwner(TIntaEventType,
const TDesC &aEventData =  KNullDesC
)

Report layout event to layout owner

Since
S60 v4.0

Parameters

TInt aEventTypethe event type
const TDesC & aEventData =  KNullDesC Event data

SizeChanged(const TAny *)

IMPORT_C TIntSizeChanged(const TAny *aData)[private, virtual]

SizeChanged. Called when screen size changed.

Since
S60 v4.0

Parameters

const TAny * aDatathe event data

SkinInstance()

MAknsSkinInstance *SkinInstance()[inline]

Get the layout SkinInstance

Since
S60 v4.0

SupportTactileFeedback()

IMPORT_C TBoolSupportTactileFeedback()

This function can be used to check, whether touch feedback is supported at all in the device.

Since
S60 v4.0

TouchFeedbackInstance()

MTouchFeedback *TouchFeedbackInstance()[inline]

Get the layout TouchFeedbackInstance

Since
S60 v4.0

UnLockArea(const TRect &, CFepUiBaseCtrl *)

IMPORT_C voidUnLockArea(const TRect &aRect,
CFepUiBaseCtrl *aCtrl
)

unlock a area

Since
S60 v4.0

Parameters

const TRect & aRectThe locked area
CFepUiBaseCtrl * aCtrlThe owner of the locked area

UpdateArea(const CFepUiBaseCtrl *, const TRect &, TBool, TBool)

IMPORT_C voidUpdateArea(const CFepUiBaseCtrl *aCtrl,
const TRect &aRect,
TBoolaUpdateFlag,
TBoolaImmedFlag = EFalse
)

Update layout area, cause flush in screen

Since
S60 V4.0

Parameters

const CFepUiBaseCtrl * aCtrlThe control who requires the update
const TRect & aRectthe rect to be flushed in screen
TBool aUpdateFlagETrue if full update.
TBool aImmedFlag = EFalseflag tells whethere updating is executing immediately

Member Data Documentation

CDragBar * iDragbarList

CDragBar *iDragbarList[private]

dragbar list

TInt iDragbarNum

TInt iDragbarNum[private]

layout dragbar number.

CFepUiLayoutExt * iExtension

CFepUiLayoutExt *iExtension[private]

TPoint iLayoutDraggingPos

TPoint iLayoutDraggingPos[private]

Layout dragging position. Same as iLayoutPos, but only used when layout is dragging.

MLayoutOwner * iLayoutOwner

MLayoutOwner *iLayoutOwner[private]

Layout owner. Not own

TInt iLayoutReady

TInt iLayoutReady[private]

State indicates layout ready to be drawn

TRect iLockedArea

TRect iLockedArea[private]

locked area. There may be one locked area which only the locker can update the area.

CFepUiBaseCtrl * iLockedAreaOwner

CFepUiBaseCtrl *iLockedAreaOwner[private]

The owner of the locked area

TInt iReserved1

TInt iReserved1[private]

Reserved item1

CFepUiLayoutRootCtrl * iRootCtrl

CFepUiLayoutRootCtrl *iRootCtrl[private]

Root control. It's a control group. Own

TSize iScreenSize

TSize iScreenSize[private]

screen size