UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: QikBuildingBlock.h
Link against: qikctl.lib

Class CQikBuildingBlock

class CQikBuildingBlock : public CCoeControl, public MQikRelayoutSensitiveControl, public MQikUserOfControlProvider, public MQikContainer;

Description

A base class for building blocks.

A building block is a compound control that has the resposibility to lay out its component controls, and handle some pen interaction.

Derivation

Members

Defined in CQikBuildingBlock:
ActivateL(), BaseConstructL(), BlockGroup(), CQikBuildingBlock(), ComponentControl(), ConstructFromResourceL(), ConstructFromResourceL(), ConstructL(), CountComponentControls(), CreateSystemBuildingBlockL(), DebugMode(), Draw(), DrawControlHighlight(), DrawControlHighlight(), DrawHighlight(), ETypeId, FocusChanged(), ForcedDrawControlHighlight(), GetColorUseListL(), GetHelpContext(), GetTextDrawer(), GroupId(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleResourceChange(), HasBorder(), HasDividerBelow(), InputCapabilities(), IsPressed(), MakeVisible(), MinimumSize(), Mirrored(), MopSupplyObject(), NumFocusingControls(), OfferKeyEventL(), PersistsAfterRelayout(), PointerDownOccurredInsideBlock(), PointerDownOccurredInsideComponent(), PositionChanged(), PrepareForFocusGainL(), PrepareForFocusLossL(), ReleaseControls(), RequestRelayout(), SetAdjacent(), SetBlockGroupL(), SetBlockGroupLayoutManagerL(), SetCaptionL(), SetContainerWindowL(), SetDebugMode(), SetDefaultCaptionL(), SetDefaultLayoutManagerL(), SetDimmed(), SetDividerBelow(), SetForcedDrawControlHighlight(), SetGroupId(), SetLayoutManagerL(), SetMirrored(), SetNeighbor(), SetParent(), SetPressed(), SetTextBaselineSpacing(), SizeChanged(), TextBaselineOffset(), WriteInternalStateL(), anonymous, ~CQikBuildingBlock()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CCoeControl:
AccumulatedZoom(), ActivateGc(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), Components(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawBackground(), DrawDeferred(), DrawForeground(), DrawNow(), DrawableWindow(), EAbsoluteZoom, ERelativeZoom, EnableDragEvents(), FindBackground(), FindFontProvider(), GetColor(), GetGc(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandleRedrawEvent(), HitTest(), IgnoreEventsUntilNextPointerUp(), Index(), InitComponentArrayL(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), LayoutManager(), MaximumWidth(), Observer(), OverrideColorL(), OwnsWindow(), Parent(), Position(), PositionRelativeToScreen(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), Reserved_CCoeControl_10(), Reserved_CCoeControl_11(), Reserved_CCoeControl_12(), Reserved_CCoeControl_13(), ResetGc(), ScreenFont(), SetAllowStrayPointers(), SetBackground(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetControlContext(), SetCornerAndSize(), SetExtent(), SetExtentToWholeScreen(), SetFocus(), SetFocusing(), SetFontProviderL(), SetGc(), SetGloballyCapturing(), SetHitTest(), SetMaximumWidth(), SetMopParent(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetSize(), SetSizeWithoutNotification(), SetUniqueHandle(), SetZoomFactorL(), Size(), SystemGc(), TZoomType, TextDrawer(), UniqueHandle(), Window(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

Inherited from MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()

Inherited from MQikContainer:
AddControlLC(), RemoveControl()


Construction and destruction


ConstructL()

virtual void ConstructL()=0;

Description

Second phase constructor


~CQikBuildingBlock()

IMPORT_C ~CQikBuildingBlock();

Description

Destructor


CQikBuildingBlock()

protected: IMPORT_C CQikBuildingBlock();

Description

Default constructor

[Top]


Member functions


CreateSystemBuildingBlockL()

static IMPORT_C CQikBuildingBlock *CreateSystemBuildingBlockL(TInt aControlType);

Description

Creates a new instance of the system block identified by aControlType .

Remeber to call ConstructL() , or ConstructFromResourceL() .

Parameters

TInt aControlType

The type of the system building block (from QikStockControls.hrh )

Return value

CQikBuildingBlock *

An instance to a system building block


ForcedDrawControlHighlight()

IMPORT_C TBool ForcedDrawControlHighlight() const;

Description

Checks if the building block should always draw highlight on focused component control.

Return value

TBool

ETrue if set to draw highlight, otherwise EFalse

See also:


SetForcedDrawControlHighlight()

IMPORT_C void SetForcedDrawControlHighlight(TBool aDraw);

Description

Sets if the building block should always draw highlight on focused component control.

Parameters

TBool aDraw

ETrue if the block should draw highlight, otherwise EFalse


DrawControlHighlight()

virtual IMPORT_C void DrawControlHighlight(CWindowGc &aGc, CCoeControl &aControl, TRect aRect) const;

Description

Draws the control highlight of aControl

Parameters

CWindowGc &aGc

The graphics context

CCoeControl &aControl

The control that should get a highlight

TRect aRect

The area of the screen where the highlight is allowed to be drawn


SetGroupId()

IMPORT_C void SetGroupId(TInt aGroupId);

Description

Sets the group id and calls CQikBlockGroup::SynchroniceWithSiblingsL() .

Parameters

TInt aGroupId

See also:


GroupId()

IMPORT_C TInt GroupId() const;

Description

Gets the group id

Return value

TInt

The group id


SetBlockGroupL()

IMPORT_C void SetBlockGroupL(CQikBlockGroup *aBlockGroup);

Description

Sets a block group. Unregisters from the old block group and registers to the new block group.

This function is normally not called manually, since it is done by CQikBlockGroup::SynchroniceWithSiblingsL() .

Parameters

CQikBlockGroup *aBlockGroup

The block group, or NULL if no block group

See also:


BlockGroup()

IMPORT_C CQikBlockGroup *BlockGroup() const;

Description

Gets the current block group

Return value

CQikBlockGroup *

The current block group or NULL if none


SetBlockGroupLayoutManagerL()

virtual IMPORT_C void SetBlockGroupLayoutManagerL(CQikColumnLayoutManager &aLayoutManager);

Description

Sets the column layout manager that is used for the block group

Parameters

CQikColumnLayoutManager &aLayoutManager

The layout manager of the block group


SetMirrored()

virtual IMPORT_C void SetMirrored(CQikLayoutManager::TMirroring aMirrored);

Description

Sets how the building block should handle mirroring

Parameters

CQikLayoutManager::TMirroring aMirrored

The mirriring setting


Mirrored()

IMPORT_C CQikLayoutManager::TMirroring Mirrored() const;

Description

Checks how the building block should handle mirroring.

Return value

CQikLayoutManager::TMirroring

The mirroring setting


HasDividerBelow()

IMPORT_C TBool HasDividerBelow() const;

Description

Return value

TBool


SetDividerBelow()

IMPORT_C void SetDividerBelow(TBool aDivider);

Description

Parameters

TBool aDivider


DebugMode()

IMPORT_C TBool DebugMode() const;

Description

Return value

TBool


SetDebugMode()

IMPORT_C void SetDebugMode(TBool aDebugMode);

Description

Parameters

TBool aDebugMode


SetCaptionL()

IMPORT_C void SetCaptionL(const TDesC &aCaption, TInt aSlotId);

Description

Creates a caption control that shows the caption as text and provides a caption to the FEP.

Note that the slot must not contain any other control, or it will panic. It is however possible to call SetCaptionL() multiple times without removing the caption control in between.

Parameters

const TDesC &aCaption

The caption

TInt aSlotId

The slot id in which the caption control will be placed


SetDefaultCaptionL()

IMPORT_C void SetDefaultCaptionL(const TDesC &aDefaultCaption);

Description

Sets the default caption for the building block that is used if control placed in the building block is a MCoeCaptionRetrieverForFep .

KNullDesC deletes the current default caption.

Parameters

const TDesC &aDefaultCaption

The new default caption, or KNullDesC if no default caption should be set

See also:


ConstructFromResourceL()

virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);

Description

Parameters

TResourceReader &aReader

See also:


HandlePointerEventL()

virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);

Description

Forwards the Handle pointer event to the closest focused container control. If the pointer event is inside the building block and outside the closest focusing container, the position of the event is remapped to the bottom corner of the focused container. This enables extended hit areas in building blocks.

Parameters

const TPointerEvent &aPointerEvent

See also:


MopSupplyObject()

virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);

Description

Supports CQikBuildingBlock , MQikRelayoutSensitiveControl , MQikUserOfControlProvider , and MQikContainer .

Parameters

TTypeUid aId

Return value

TTypeUid::Ptr

See also:


SetParent()

virtual IMPORT_C TInt SetParent(CCoeControl *aParent);

Description

Calls CQikBlockGroup::SynchroniceWithSiblingsL() .

Parameters

CCoeControl *aParent

Return value

TInt

See also:


MakeVisible()

virtual IMPORT_C void MakeVisible(TBool aVisible);

Description

Unregisters from the current block group if made invisible and calls CQikBlockGroup::SynchroniceWithSiblingsL() when made visible.

Parameters

TBool aVisible

See also:


InputCapabilities()

virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;

Description

In order for the FEP to get a caption this function gets the caption retriever of the first component control that has a caption retreiver.

Return value

TCoeInputCapabilities

See also:


ReleaseControls()

virtual IMPORT_C void ReleaseControls(RQikReleasedControlsArray &aReleasedControls);

Description

Parameters

RQikReleasedControlsArray &aReleasedControls

See also:


PersistsAfterRelayout()

virtual IMPORT_C TBool PersistsAfterRelayout() const;

Description

Returns EFalse

Return value

TBool

See also:


ConstructFromResourceL()

void ConstructFromResourceL(TResourceReader &aReader, MQikControlProvider &aControlProvider)=0;

Description

Same as CCoeControl::ConstructFromResourceL() but with a control provider.

Parameters

TResourceReader &aReader

MQikControlProvider &aControlProvider

See also:


BaseConstructL()

protected: IMPORT_C void BaseConstructL();

Description

Constructs a building block


DrawHighlight()

protected: IMPORT_C void DrawHighlight(const CCoeControl &aCompound, CWindowGc &aGc, TRect aRect) const;

Description

Parameters

const CCoeControl &aCompound

CWindowGc &aGc

TRect aRect


NumFocusingControls()

protected: static IMPORT_C TInt NumFocusingControls(const CCoeControl &aCompound);

Description

Parameters

const CCoeControl &aCompound

Return value

TInt


DrawControlHighlight()

protected: virtual IMPORT_C TBool DrawControlHighlight() const;

Description

Checks if the focused component control should be drawn with a highlight. The default implementation first checks if the block is set to always draw control highlight. If not it checks if the block contains more than one focusing component controls, in such case it should draw control highlight.

Return value

TBool

ETrue if control highlight should be drawn, otherwise EFalse

See also:


SetDefaultLayoutManagerL()

protected: virtual void SetDefaultLayoutManagerL()=0;

Description

Creates and sets the default layout manager. Is called when a block is removed from a block group


IsPressed()

protected: IMPORT_C TBool IsPressed() const;

Description

Checks if the block is pressed by the pen.

Return value

TBool

ETrue if pressed, otherwise EFalse


SetPressed()

protected: IMPORT_C void SetPressed(TBool aPressed);

Description

Sets if the block is pressed by the pen.

Parameters

TBool aPressed

ETrue if true, otherwise EFalse


PointerDownOccurredInsideBlock()

protected: IMPORT_C TBool PointerDownOccurredInsideBlock() const;

Description

Return value

TBool


PointerDownOccurredInsideComponent()

protected: IMPORT_C TBool PointerDownOccurredInsideComponent() const;

Description

Return value

TBool


FocusChanged()

protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);

Description

Parameters

TDrawNow aDrawNow

See also:


WriteInternalStateL()

protected: virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;

Description

Parameters

RWriteStream &aWriteStream


Draw()

protected: virtual IMPORT_C void Draw(const TRect &aRect) const;

Description

Draws the building block and control highlight if needed

Parameters

const TRect &aRect

See also:


GetTextDrawer()

protected: virtual IMPORT_C void GetTextDrawer(CCoeTextDrawerBase *&aTextDrawer, const CCoeControl *aDrawingControl, TInt aKey) const;

Description

Parameters

CCoeTextDrawerBase *&aTextDrawer

const CCoeControl *aDrawingControl

TInt aKey

See also:


OfferKeyEventL()

virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);

Description

Parameters

const TKeyEvent &aKeyEvent

TEventCode aType

Return value

TKeyResponse

See also:


SetDimmed()

virtual IMPORT_C void SetDimmed(TBool aDimmed);

Description

Parameters

TBool aDimmed

See also:


PrepareForFocusLossL()

virtual IMPORT_C void PrepareForFocusLossL();

Description

See also:


PrepareForFocusGainL()

virtual IMPORT_C void PrepareForFocusGainL();

Description

See also:


GetColorUseListL()

virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;

Description

Parameters

CArrayFix< TCoeColorUse > &aColorUseList

See also:


HandleResourceChange()

virtual IMPORT_C void HandleResourceChange(TInt aType);

Description

Parameters

TInt aType

See also:


MinimumSize()

virtual IMPORT_C TSize MinimumSize();

Description

Return value

TSize

See also:


CountComponentControls()

virtual IMPORT_C TInt CountComponentControls() const;

Description

Return value

TInt

See also:


ComponentControl()

virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;

Description

Parameters

TInt aIndex

Return value

CCoeControl *

See also:


SetContainerWindowL()

virtual IMPORT_C void SetContainerWindowL(const CCoeControl &aContainer);

Description

Parameters

const CCoeControl &aContainer

See also:


ActivateL()

virtual IMPORT_C void ActivateL();

Description

See also:


SetAdjacent()

virtual IMPORT_C void SetAdjacent(TInt aAdjacent);

Description

Parameters

TInt aAdjacent

See also:


SetNeighbor()

virtual IMPORT_C void SetNeighbor(CCoeControl *aNeighbor);

Description

Parameters

CCoeControl *aNeighbor

See also:


HasBorder()

virtual IMPORT_C TBool HasBorder() const;

Description

Return value

TBool

See also:


GetHelpContext()

virtual IMPORT_C void GetHelpContext(TCoeHelpContext &aContext) const;

Description

Parameters

TCoeHelpContext &aContext

See also:


SetLayoutManagerL()

virtual IMPORT_C void SetLayoutManagerL(MCoeLayoutManager *aLayout);

Description

Parameters

MCoeLayoutManager *aLayout

See also:


RequestRelayout()

virtual IMPORT_C TBool RequestRelayout(const CCoeControl *aChildControl);

Description

Parameters

const CCoeControl *aChildControl

Return value

TBool

See also:


TextBaselineOffset()

virtual IMPORT_C TInt TextBaselineOffset(const TSize &aSize) const;

Description

Parameters

const TSize &aSize

Return value

TInt

See also:


SetTextBaselineSpacing()

virtual IMPORT_C void SetTextBaselineSpacing(TInt aSpacing);

Description

Parameters

TInt aSpacing

See also:


SizeChanged()

protected: virtual IMPORT_C void SizeChanged();

Description

See also:


HandlePointerBufferReadyL()

protected: virtual IMPORT_C void HandlePointerBufferReadyL();

Description

See also:


PositionChanged()

protected: virtual IMPORT_C void PositionChanged();

Description

See also:


HandleControlArrayEventL()

protected: virtual IMPORT_C void HandleControlArrayEventL(CCoeControlArray::TEvent aEvent, const CCoeControlArray *aArray, CCoeControl *aControl, TInt aControlId);

Description

Parameters

CCoeControlArray::TEvent aEvent

const CCoeControlArray *aArray

CCoeControl *aControl

TInt aControlId

See also:

[Top]


Member enumerations


Enum anonymous

n/a

Description

The MOP interface UID for the class. Used by the object provider framework.

See also:

ETypeId

Terms and conditions of use of the material