»
UIQ 3 SDK »
UIQ Developer Library »
UIQ API Reference »
UIQ C++ Component reference »
Qikon »
CQikBuildingBlock
Location:
QikBuildingBlock.h
Link against: qikctl.lib
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
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 blocks
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
virtual void ConstructL()=0;
Description
Second phase constructor
IMPORT_C ~CQikBuildingBlock();
Description
Destructor
protected: IMPORT_C CQikBuildingBlock();
Description
Default constructor
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
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
|
|
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 |
|
IMPORT_C void SetGroupId(TInt aGroupId);
Description
Sets the group id and calls CQikBlockGroup::SynchroniceWithSiblingsL() .
Parameters
See also:
IMPORT_C TInt GroupId() const;
Description
Gets the group id
Return value
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:
IMPORT_C CQikBlockGroup *BlockGroup() const;
Description
Gets the current block group
Return value
SetBlockGroupLayoutManagerL()
virtual IMPORT_C void SetBlockGroupLayoutManagerL(CQikColumnLayoutManager &aLayoutManager);
Description
Sets the column layout manager that is used for the block group
Parameters
virtual IMPORT_C void SetMirrored(CQikLayoutManager::TMirroring aMirrored);
Description
Sets how the building block should handle mirroring
Parameters
CQikLayoutManager::TMirroring aMirrored |
The mirriring setting |
|
IMPORT_C CQikLayoutManager::TMirroring Mirrored() const;
Description
Checks how the building block should handle mirroring.
Return value
CQikLayoutManager::TMirroring
|
The mirroring setting |
|
IMPORT_C TBool HasDividerBelow() const;
Description
Return value
IMPORT_C void SetDividerBelow(TBool aDivider);
Description
Parameters
IMPORT_C TBool DebugMode() const;
Description
Return value
IMPORT_C void SetDebugMode(TBool aDebugMode);
Description
Parameters
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 |
|
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:
virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
Description
Parameters
See also:
CCoeControl::ConstructFromResourceL
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
See also:
CCoeControl::HandlePointerEvent()
virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
Description
Supports CQikBuildingBlock , MQikRelayoutSensitiveControl , MQikUserOfControlProvider , and MQikContainer .
Parameters
Return value
See also:
virtual IMPORT_C TInt SetParent(CCoeControl *aParent);
Description
Calls CQikBlockGroup::SynchroniceWithSiblingsL() .
Parameters
Return value
See also:
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
See also:
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
See also:
virtual IMPORT_C void ReleaseControls(RQikReleasedControlsArray &aReleasedControls);
Description
Parameters
See also:
virtual IMPORT_C TBool PersistsAfterRelayout() const;
Description
Returns EFalse
Return value
See also:
void ConstructFromResourceL(TResourceReader &aReader, MQikControlProvider &aControlProvider)=0;
Description
Same as CCoeControl::ConstructFromResourceL() but with a control provider.
Parameters
See also:
CCoeControl::ConstructFromResourceL
protected: IMPORT_C void BaseConstructL();
Description
Constructs a building block
protected: IMPORT_C void DrawHighlight(const CCoeControl &aCompound, CWindowGc &aGc, TRect aRect) const;
Description
Parameters
protected: static IMPORT_C TInt NumFocusingControls(const CCoeControl &aCompound);
Description
Parameters
Return value
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
protected: IMPORT_C TBool IsPressed() const;
Description
Checks if the block is pressed by the pen.
Return value
TBool
|
ETrue if pressed, otherwise EFalse
|
|
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
PointerDownOccurredInsideComponent()
protected: IMPORT_C TBool PointerDownOccurredInsideComponent() const;
Description
Return value
protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);
Description
Parameters
See also:
protected: virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;
Description
Parameters
protected: virtual IMPORT_C void Draw(const TRect &aRect) const;
Description
Draws the building block and control highlight if needed
Parameters
See also:
protected: virtual IMPORT_C void GetTextDrawer(CCoeTextDrawerBase *&aTextDrawer, const CCoeControl *aDrawingControl, TInt aKey) const;
Description
Parameters
See also:
CCoeControl::TextProperties
virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Description
Parameters
Return value
See also:
virtual IMPORT_C void SetDimmed(TBool aDimmed);
Description
Parameters
See also:
virtual IMPORT_C void PrepareForFocusLossL();
Description
See also:
virtual IMPORT_C void PrepareForFocusGainL();
Description
See also:
virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;
Description
Parameters
See also:
virtual IMPORT_C void HandleResourceChange(TInt aType);
Description
Parameters
See also:
virtual IMPORT_C TSize MinimumSize();
Description
Return value
See also:
virtual IMPORT_C TInt CountComponentControls() const;
Description
Return value
See also:
virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;
Description
Parameters
Return value
See also:
virtual IMPORT_C void SetContainerWindowL(const CCoeControl &aContainer);
Description
Parameters
See also:
virtual IMPORT_C void ActivateL();
Description
See also:
virtual IMPORT_C void SetAdjacent(TInt aAdjacent);
Description
Parameters
See also:
virtual IMPORT_C void SetNeighbor(CCoeControl *aNeighbor);
Description
Parameters
See also:
virtual IMPORT_C TBool HasBorder() const;
Description
Return value
See also:
virtual IMPORT_C void GetHelpContext(TCoeHelpContext &aContext) const;
Description
Parameters
See also:
virtual IMPORT_C void SetLayoutManagerL(MCoeLayoutManager *aLayout);
Description
Parameters
MCoeLayoutManager *aLayout |
|
|
See also:
virtual IMPORT_C TBool RequestRelayout(const CCoeControl *aChildControl);
Description
Parameters
Return value
See also:
virtual IMPORT_C TInt TextBaselineOffset(const TSize &aSize) const;
Description
Parameters
Return value
See also:
virtual IMPORT_C void SetTextBaselineSpacing(TInt aSpacing);
Description
Parameters
See also:
protected: virtual IMPORT_C void SizeChanged();
Description
See also:
HandlePointerBufferReadyL()
protected: virtual IMPORT_C void HandlePointerBufferReadyL();
Description
See also:
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
See also:
n/a
Description
The MOP interface UID for the class. Used by the object provider framework.
See also:
Terms and conditions of use of the material