UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikGenericBuildingBlock.h
Link against: qikctl.lib

Class CQikGenericBuildingBlock

class CQikGenericBuildingBlock : public CQikBuildingBlock;

Description

The class for custom building blocks.

A building block is a compound control used to layout the controls in a view. The CQikGenericBuildingBlock class can be used when none of the System Building Blocks can fulfill the requirements and a customized building block is needed.

A view can consist of multiple building blocks. Each building block has a defined layout and a certain number of slots where controls or captions can be inserted. UIQ provides a set of System Building Blocks that can be used by application developers.

If none of the System Building Blocks fits the purpose of the application developer, it is possible to create Custom Building Blocks. This should, however, only be a last resort when no System Building Block fits the purpose.

Use the QIK_GENERIC_BUILDING_BLOCK struct when a resource is needed.

More information about building blocks is available in the UIQ Developer Library.

An example of how to create a generic building block:

CQikGenericBuildingBlock* block = new(ELeave) CQikGenericBuildingBlock;
Controls().AppendLC(block);

TResourceReader blockReader;
iCoeEnv->CreateResourceReaderLC(blockReader, R_MY_GENERIC_BUILDING_BLOCK);
block->ConstructFromResourceL(blockReader, *ControlProvider());
block->SetUniqueHandle(EMyViewGenericBuildingBlock);
CleanupStack::PopAndDestroy(); //blockReader
CleanupStack::Pop(block);

Derivation

Members

Defined in CQikGenericBuildingBlock:
AddControlLC(), CQikGenericBuildingBlock(), ComponentControl(), ConstructFromResourceL(), ConstructFromResourceL(), ConstructL(), CountComponentControls(), MinimumSize(), MopSupplyObject(), ReleaseControls(), RemoveControl(), SetMirrored(), SetTextBaselineSpacing(), WriteInternalStateL(), ~CQikGenericBuildingBlock()

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 CQikBuildingBlock:
ActivateL(), BaseConstructL(), BlockGroup(), CreateSystemBuildingBlockL(), DebugMode(), Draw(), DrawControlHighlight(), DrawHighlight(), ETypeId, FocusChanged(), ForcedDrawControlHighlight(), GetColorUseListL(), GetHelpContext(), GetTextDrawer(), GroupId(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleResourceChange(), HasBorder(), HasDividerBelow(), InputCapabilities(), IsPressed(), MakeVisible(), Mirrored(), NumFocusingControls(), OfferKeyEventL(), PersistsAfterRelayout(), PointerDownOccurredInsideBlock(), PointerDownOccurredInsideComponent(), PositionChanged(), PrepareForFocusGainL(), PrepareForFocusLossL(), RequestRelayout(), SetAdjacent(), SetBlockGroupL(), SetBlockGroupLayoutManagerL(), SetCaptionL(), SetContainerWindowL(), SetDebugMode(), SetDefaultCaptionL(), SetDefaultLayoutManagerL(), SetDimmed(), SetDividerBelow(), SetForcedDrawControlHighlight(), SetGroupId(), SetLayoutManagerL(), SetNeighbor(), SetParent(), SetPressed(), SizeChanged(), TextBaselineOffset(), anonymous

Inherited from MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()

See also:


Construction and destruction


CQikGenericBuildingBlock()

IMPORT_C CQikGenericBuildingBlock();

Description

Creates a system building block


~CQikGenericBuildingBlock()

IMPORT_C ~CQikGenericBuildingBlock();

Description

Destructor


ConstructL()

virtual IMPORT_C void ConstructL();

Description

Second phase constructor

[Top]


Member functions


ConstructFromResourceL()

virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);

Description

Constructs the building block reading a QIK_GENERIC_BLOCK . It also creates caption controls, but if you want to create other controls see ConstructFromResourceL(TResourceReader&, MQikControlProvider&) .

Parameters

TResourceReader &aReader

The resource reader

See also:


ConstructFromResourceL()

virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader, MQikControlProvider &aControlProvider);

Description

Constructs the building block reading a QIK_GENERIC_BLOCK . It also creates the controls that should be in the slots using aControlProvider .

Parameters

TResourceReader &aReader

The resource reader

MQikControlProvider &aControlProvider

The control provider


ReleaseControls()

virtual IMPORT_C void ReleaseControls(RQikReleasedControlsArray &aReleasedControls);

Description

Parameters

RQikReleasedControlsArray &aReleasedControls

See also:


AddControlLC()

virtual IMPORT_C void AddControlLC(CCoeControl *aControl, TInt aSlotId);

Description

Adds aControl to the building block.

Parameters

CCoeControl *aControl

The control that will be added

TInt aSlotId

The slot id

Panic codes

EQikPanicIllegalSlotId

DEBUG_BUILDS: The slot is already taken by another control. RELEASE_BUILDS: does nothing.

See also:


RemoveControl()

virtual IMPORT_C TInt RemoveControl(CCoeControl &aControl);

Description

Removes aControl from the building block.

Parameters

CCoeControl &aControl

The control that will be removed

Return value

TInt

KErrNone if successful

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:


MinimumSize()

virtual IMPORT_C TSize MinimumSize();

Description

Return value

TSize

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:


SetMirrored()

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

Description

Parameters

CQikLayoutManager::TMirroring aMirrored

See also:


SetTextBaselineSpacing()

virtual IMPORT_C void SetTextBaselineSpacing(TInt aSpacing);

Description

Parameters

TInt aSpacing

See also:


WriteInternalStateL()

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

Description

Parameters

RWriteStream &aWriteStream

Terms and conditions of use of the material