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 void AddControlL ( CFepUiBaseCtrl *, TBool )
IMPORT_C void AddControlL ( CCoeControl *, TBool )
IMPORT_C void BaseConstructL ()
IMPORT_C void ChangeFeedbackArea ( TInt , const TRect &, const TRect &)
IMPORT_C void ChangeFeedbackType ( TInt , TInt )
const RPointerArray < CFepUiBaseCtrl > & ControlList ()
IMPORT_C CFepUiCursor * CreateCursor ()
IMPORT_C void DeRegisterFeedbackArea ( TInt , const TRect &)
IMPORT_C void Destroy ()
IMPORT_C void DisableLayoutDrawing ( TBool )
IMPORT_C void DoTactileFeedback ( TInt )
IMPORT_C void DoTactileFeedback ( TInt , TBool , TBool )
IMPORT_C void Draw ()
IMPORT_C void EnableLayoutMoving ( CDragBar *)
IMPORT_C TInt GetEnabledPluginMode ()
IMPORT_C TInt GetInputContextFieldMaxLen ()
IMPORT_C void HandleAppInfoChange (const TDesC &, TPeninputAppInfo )
IMPORT_C TInt HandleCommand ( TInt , TUint8 *)
IMPORT_C TBool HandleEventL ( TEventType , const TAny *)
IMPORT_C TRect Init ()
IMPORT_C TBool IsValidDestination (const TRect &, CDragBar *, TBool &, TBool &, TBool )
MLayoutOwner * LayoutOwner ()
TBool LayoutReady ()
IMPORT_C void LockArea (const TRect &, CFepUiBaseCtrl *)
const CFepUiBaseCtrl * LockareaOwner ()
const TRect & LockedArea ()
IMPORT_C TBool NotDrawToLayoutDevice ()
IMPORT_C void OnActivate ()
IMPORT_C TInt OnAppEditorTextComing (const TFepInputContextFieldData &)
IMPORT_C void OnDeActivate ()
IMPORT_C TInt OnResourceChange ( TInt )
IMPORT_C TPoint Position ()
IMPORT_C TRect Rect ()
IMPORT_C void RegisterFeedbackArea ( TInt , const TRect &)
IMPORT_C void RegisterFeedbackArea ( TInt , const TRect &, TInt )
IMPORT_C void RemoveControl ( CFepUiBaseCtrl *)
IMPORT_C void RemoveControl ( CCoeControl *)
CFepUiLayoutRootCtrl * RootControl ()
const TSize & ScreenSize ()
IMPORT_C TBool SemiTransparencyRequired ()
IMPORT_C void SetAppEditorCursor (const TCursorSelection &, TBool )
IMPORT_C void SetLayoutPos (const TPoint &)
IMPORT_C void SetPositionFromOutside (const TPoint &)
IMPORT_C void SetRect (const TRect &)
void SetScreenSize (const TSize &)
IMPORT_C void SetShadowAreaRect (const TRect &, TShadowBitmapIndex )
IMPORT_C void SetShadowBmp ( CFbsBitmap *, CFbsBitmap *, TShadowBitmapIndex )
IMPORT_C void SetShadowRect (const TRect &)
IMPORT_C void SignalOwner ( TInt , const TDesC &)
MAknsSkinInstance * SkinInstance ()
IMPORT_C TBool SupportTactileFeedback ()
MTouchFeedback * TouchFeedbackInstance ()
IMPORT_C void UnLockArea (const TRect &, CFepUiBaseCtrl *)
IMPORT_C void UpdateArea (const CFepUiBaseCtrl *, const TRect &, TBool , TBool )
Protected Member Functions
CFepUiLayout ( MLayoutOwner *)
IMPORT_C TInt OnSkinChange ()
Private Member Functions
IMPORT_C TBool HandleRawKeyEventL (const TRawEvent &)
TBool IsSemiTransparencyRequired (const RPointerArray < CFepUiBaseCtrl > &)
NONSHARABLE_CLASS (CFepUiLayoutExt)
IMPORT_C TBool OnPointerEventOutsideLayout (const TRawEvent &)
void SendEditorTextAndCursorPosL ( TUint8 *)
void SetSelfBmpDeviceFlag ( TBool )
IMPORT_C TInt SizeChanged (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_C CFepUiLayout ( MLayoutOwner * aLayoutOwner ) [protected]

Constructor

Since
S60 v4.0

Parameters

MLayoutOwner * aLayoutOwner The layout owner

~CFepUiLayout()

IMPORT_C ~CFepUiLayout ( ) [virtual]

Destructor.

Since
S60 v4.0

Member Functions Documentation

AddControlL(CFepUiBaseCtrl *, TBool)

IMPORT_C void AddControlL ( CFepUiBaseCtrl * aControl,
TBool aEventObserverFlag = ETrue
)

AddControlL Add a control to layout.

Since
S60 v4.0

Parameters

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

AddControlL(CCoeControl *, TBool)

IMPORT_C void AddControlL ( CCoeControl * aControl,
TBool aEventObserverFlag = ETrue
)

AddControlL Add a control to layout.

Since
S60 v4.0

Parameters

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

BaseConstructL()

IMPORT_C void BaseConstructL ( ) [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 void ChangeFeedbackArea ( TInt aId,
const TRect & aNew,
const TRect & aOld
)

ChangeFeedbackArea. Change the area which has required tactile feedback.

Since
S60 v4.0

Parameters

TInt aId The unique id of this area
const TRect & aNew The new registered area
const TRect & aOld Previous area for tactile feedback.

ChangeFeedbackType(TInt, TInt)

IMPORT_C void ChangeFeedbackType ( TInt aId,
TInt aNewTactileType
)

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

Since
S60 v4.0

Parameters

TInt aId The unique id of this feedback type
TInt aNewTactileType new 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 void DeRegisterFeedbackArea ( TInt aId,
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 aId The unique id of this area. Don't use negative id.
const TRect & aRect The tactile area.

Destroy()

IMPORT_C void Destroy ( ) [virtual]

From MPenUiLayoutBase Destroy layout

Since
S60 v4.0

DisableLayoutDrawing(TBool)

IMPORT_C void DisableLayoutDrawing ( TBool aFlag )

Parameters

TBool aFlag

DoTactileFeedback(TInt)

IMPORT_C void DoTactileFeedback ( TInt aType )

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 void DoTactileFeedback ( TInt aType,
TBool aVibraEnable,
TBool aAudioEnable
)

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 void Draw ( ) [virtual]

From MPenUiLayoutBase Draw layout.

Since
S60 v4.0

EnableLayoutMoving(CDragBar *)

IMPORT_C void EnableLayoutMoving ( CDragBar * aDragbar )

Enable whole layout moved by a dragbar.

Since
S60 v4.0

Parameters

CDragBar * aDragbar

GetEnabledPluginMode()

IMPORT_C TInt GetEnabledPluginMode ( )

GetInputContextFieldMaxLen()

IMPORT_C TInt GetInputContextFieldMaxLen ( ) [virtual]

HandleAppInfoChange(const TDesC &, TPeninputAppInfo)

IMPORT_C void HandleAppInfoChange ( const TDesC & aInfo,
TPeninputAppInfo aType
) [virtual]

From MPenUiLayoutBase HandleAppInfoChange. Inform UI that application infomation changed.

Since
S60 v5.0

Parameters

const TDesC & aInfo The information.
TPeninputAppInfo aType The information type

HandleCommand(TInt, TUint8 *)

IMPORT_C TInt HandleCommand ( TInt aCmd,
TUint8 * aData
)

From MPenUiLayoutBase HandleCommand. Handle layout command event.

Since
S60 v4.0

Parameters

TInt aCmd Command Id.
TUint8 * aData Data for command.

HandleEventL(TEventType, const TAny *)

IMPORT_C TBool HandleEventL ( TEventType aType,
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 aType The event type. See TEventType
const TAny * aEventData The event data.

HandleRawKeyEventL(const TRawEvent &)

IMPORT_C TBool HandleRawKeyEventL ( 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 & aKeyEvent Key event

Init()

IMPORT_C TRect Init ( )

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 > & aCtrlList The control list

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

IMPORT_C TBool IsValidDestination ( const TRect & aRect,
CDragBar * aDragBar,
TBool & aVInfo,
TBool & aHInfo,
TBool aFlag
) [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 & aRect The rect to be checked.
CDragBar * aDragBar
TBool & aVInfo The 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 & aHInfo The 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 aFlag ETrue 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 void LockArea ( const TRect & aRect,
CFepUiBaseCtrl * aOwner
)

Lock a area

Since
S60 v4.0

Parameters

const TRect & aRect The locked area
CFepUiBaseCtrl * aOwner The 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 TBool NotDrawToLayoutDevice ( )

OnActivate()

IMPORT_C void OnActivate ( )

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

Since
S60 v4.0

OnAppEditorTextComing(const TFepInputContextFieldData &)

IMPORT_C TInt OnAppEditorTextComing ( 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 & aData The fep input context field data

OnDeActivate()

IMPORT_C void OnDeActivate ( )

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

Since
S60 v4.0

OnPointerEventOutsideLayout(const TRawEvent &)

IMPORT_C TBool OnPointerEventOutsideLayout ( 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 & aEvent The raw event

OnResourceChange(TInt)

IMPORT_C TInt OnResourceChange ( TInt aType ) [virtual]

From MPenUiLayoutBase OnResourceChange. Inform layout the system resource changed.

Since
S60 v4.0

Parameters

TInt aType the event type

OnSkinChange()

IMPORT_C TInt OnSkinChange ( ) [protected, virtual]

OnSkinChange. Called when system skin changed.

Since
S60 v4.0

Position()

IMPORT_C TPoint Position ( ) [virtual]

Get layout start position

Since
S60 v4.0

Rect()

IMPORT_C TRect Rect ( ) [virtual]

Get layout area

Since
S60 v4.0

RegisterFeedbackArea(TInt, const TRect &)

IMPORT_C void RegisterFeedbackArea ( TInt aId,
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 aId The unique id of this area
const TRect & aRect The tactile area.

RegisterFeedbackArea(TInt, const TRect &, TInt)

IMPORT_C void RegisterFeedbackArea ( TInt aId,
const TRect & aRect,
TInt aTactileType
)

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 aId The unique id of this area
const TRect & aRect The tactile area.
TInt aTactileType

RemoveControl(CFepUiBaseCtrl *)

IMPORT_C void RemoveControl ( CFepUiBaseCtrl * aControl )

RemoveControl Remove a control from layout.

Since
S60 v4.0

Parameters

CFepUiBaseCtrl * aControl The control to be removed.

RemoveControl(CCoeControl *)

IMPORT_C void RemoveControl ( CCoeControl * aControl )

RemoveControl Remove a control from layout.

Since
S60 v4.0

Parameters

CCoeControl * aControl The 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 TBool SemiTransparencyRequired ( )

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 *)

void SendEditorTextAndCursorPosL ( TUint8 * aData ) [private]

Send editor text and cursor pos

Since
S60 v4.0

Parameters

TUint8 * aData Editor text and cursor pos information

SetAppEditorCursor(const TCursorSelection &, TBool)

IMPORT_C void SetAppEditorCursor ( const TCursorSelection & aCursorSel,
TBool aReqMoreText = 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 & aCursorSel Current cursor selection in input context field
TBool aReqMoreText = EFalse

SetLayoutPos(const TPoint &)

IMPORT_C void SetLayoutPos ( const TPoint & aPt )

Set layout position

Since
S60 v4.0

Parameters

const TPoint & aPt

SetPositionFromOutside(const TPoint &)

IMPORT_C void SetPositionFromOutside ( 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 void SetRect ( 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 & aRect The layout size.

SetScreenSize(const TSize &)

void SetScreenSize ( const TSize & aSize ) [inline]

Set whole screen size.

Since
S60 v4.0

Parameters

const TSize & aSize The screen size

SetSelfBmpDeviceFlag(TBool)

void SetSelfBmpDeviceFlag ( TBool aFlag ) [private]

Parameters

TBool aFlag

SetShadowAreaRect(const TRect &, TShadowBitmapIndex)

IMPORT_C void SetShadowAreaRect ( const TRect & aRect,
TShadowBitmapIndex aIndex
)

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

Since
S60 V4.0

Parameters

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

SetShadowBmp(CFbsBitmap *, CFbsBitmap *, TShadowBitmapIndex)

IMPORT_C void SetShadowBmp ( CFbsBitmap * aBmp,
CFbsBitmap * aMaskBmp,
TShadowBitmapIndex aIndex
)
set layout's shadow bitmap and mask bmp
Since
S60 V4.0

Parameters

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

SetShadowRect(const TRect &)

IMPORT_C void SetShadowRect ( 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 & aRect The layout shadow size.

SignalOwner(TInt, const TDesC &)

IMPORT_C void SignalOwner ( TInt aEventType,
const TDesC & aEventData =  KNullDesC
)

Report layout event to layout owner

Since
S60 v4.0

Parameters

TInt aEventType the event type
const TDesC & aEventData =  KNullDesC Event data

SizeChanged(const TAny *)

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

SizeChanged. Called when screen size changed.

Since
S60 v4.0

Parameters

const TAny * aData the event data

SkinInstance()

MAknsSkinInstance * SkinInstance ( ) [inline]

Get the layout SkinInstance

Since
S60 v4.0

SupportTactileFeedback()

IMPORT_C TBool SupportTactileFeedback ( )

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 void UnLockArea ( const TRect & aRect,
CFepUiBaseCtrl * aCtrl
)

unlock a area

Since
S60 v4.0

Parameters

const TRect & aRect The locked area
CFepUiBaseCtrl * aCtrl The owner of the locked area

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

IMPORT_C void UpdateArea ( const CFepUiBaseCtrl * aCtrl,
const TRect & aRect,
TBool aUpdateFlag,
TBool aImmedFlag = EFalse
)

Update layout area, cause flush in screen

Since
S60 V4.0

Parameters

const CFepUiBaseCtrl * aCtrl The control who requires the update
const TRect & aRect the rect to be flushed in screen
TBool aUpdateFlag ETrue if full update.
TBool aImmedFlag = EFalse flag 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