Location:
QikGenericBuildingBlock.h
Link against: qikctl.lib
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
MQikContainer - A mixin for controls that allows other classes to add and remove controls via a generic APIMQikUserOfControlProvider - A mixin that should be implemented by all controls wanting a MQikControlProvider in their ConstructFromResourceL()MQikRelayoutSensitiveControl - A mixin for controls that have a special behaviour when a view changes layouts
MObjectProvider - An interface that allows an object to be part of a network of object providersCBase - Base class for all classes to be instantiated on the heapCCoeControl - Control base class from which all other controls are derivedCQikBuildingBlock - A base class for building blocksCQikGenericBuildingBlock - The class for custom building blocks
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:
IMPORT_C CQikGenericBuildingBlock();
Description
Creates a system building block
IMPORT_C ~CQikGenericBuildingBlock();
Description
Destructor
virtual IMPORT_C void ConstructL();
Description
Second phase constructor
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
See also:
ConstructFromResourceL(TResourceReader&, MQikControlProvider&)
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
virtual IMPORT_C void ReleaseControls(RQikReleasedControlsArray &aReleasedControls);
Description
Parameters
See also:
MQikRelayoutSensitiveControl::ReleaseControls
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:
MQikContainer::AddControlLC
virtual IMPORT_C TInt RemoveControl(CCoeControl &aControl);
Description
Removes aControl from the building block.
Parameters
Return value
TInt
|
KErrNone if successful |
|
See also:
MQikContainer::RemoveControl
virtual IMPORT_C TInt CountComponentControls() const;
Description
Return value
See also:
CCoeControl::CountComponentControls
virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;
Description
Parameters
Return value
See also:
CCoeControl::ComponentControl
virtual IMPORT_C TSize MinimumSize();
Description
Return value
See also:
virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
Description
Supports CQikBuildingBlock , MQikRelayoutSensitiveControl , MQikUserOfControlProvider , and MQikContainer .
Parameters
Return value
See also:
virtual IMPORT_C void SetMirrored(CQikLayoutManager::TMirroring aMirrored);
Description
Parameters
CQikLayoutManager::TMirroring aMirrored |
|
|
See also:
CQikBuildingBlock::SetMirrored
virtual IMPORT_C void SetTextBaselineSpacing(TInt aSpacing);
Description
Parameters
See also:
protected: virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;
Description
Parameters