»
UIQ 3 SDK »
UIQ Developer Library »
UIQ API Reference »
UIQ C++ Component reference »
Qikon »
CQikListBoxLayoutElement
Location:
QikListBoxLayoutElement.h
Link against: qiklbx.lib
Class CQikListBoxLayoutElement
class CQikListBoxLayoutElement : public CBase;
Description
Base class for CQikListBoxColumn and CQikListBoxRow .
Derivation
CBase - Base class for all classes to be instantiated on the heapCQikListBoxLayoutElement - Base class for CQikListBoxColumn and CQikListBoxRow
Members
Defined in CQikListBoxLayoutElement:
ApplyRect(), CalculateSize(), Column(), ContentType(), DoColumnInterlacing(), DynamicSized(), FixedSized(), FromSubTreeSized(), GetContentTypeProperties(), GetContentTypeProperties(), GetContentTypeProperties(), GetContentTypePropertiesL(), IsHideIfEmpty(), Margins(), MinimumSize(), Row(), SemiFixedSized(), SetContentTypeL(), SetContentTypePropertiesL(), SetMargins(), SizeGrabWeight(), SizeInPixels(), iComponent, iComponentSize, iDrawingMargins, iFirstElement, iLayoutValues, iLeftElement, iRect, iRightElement, iSlotId
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Member functions
SetContentTypePropertiesL()
IMPORT_C void SetContentTypePropertiesL(const TQikListBoxPropertiesBase &aProperties, const RArray< TInt > &aSlotsToSwap);
Description
Set properties for the content type of this row/column. The parameter passed must be of the correct type for the content type this element contains. Parameter aSlotsToSwap must always be supplied but is only used when setting properties upon a arrow content type, hence it can be an empty array when setting other properties, but do not forget to close it.
void Class::FooL() { const TQikListBoxContentsType type = iMyListBoxColumn->ContentType(); RArray<TInt> slotsToSwap; slotsToSwap.AppendL(ESlot1); slotsToSwap.AppendL(ESlot2);
makes sure to build properties of the correct type switch(type) { case EQikListBoxIcon: { TQikListBoxPropertiesIcon props; props.iSizeType = EQikListBoxMedium; iMyListBoxColumn->SetContentTypePropertiesL(props, slotsToSwap); break; } case EQikListBoxText: { TQikListBoxPropertiesText props; props.iMinLines = 1; props.iMaxLines = 1; iMyListBoxColumn->SetContentTypePropertiesL(props, slotsToSwap); break; } case EQikListBoxLeftArrow: { TQikListBoxPropertiesArrowLeft props; iMyListBoxColumn->SetContentTypePropertiesL(props, slotsToSwap); break; } case EQikListBoxRigthArrow: { TQikListBoxPropertiesArrowRight props; iMyListBoxColumn->SetContentTypePropertiesL(props, slotsToSwap); break; } default: break; }
slotsToSwap.Close(); }
Parameters
Panic codes
EQikListBoxPanicNotApplicableToParentType |
Raised if this element has parent content type. Debug builds only. |
EQikListBoxPanicTryingToApplyPropertiesOfIncorrectType |
Raised if aProperties is not of the correct type for the content type this element contains. Debug builds only. |
|
IMPORT_C void SetContentTypeL(const TQikListBoxPropertiesBase &aProperties, const RArray< TInt > &aSlotsToSwap);
Description
Constructs a new component based upon the properties supplied adding it to this element and replacing any previous component. Passing a TQikListBoxPropertiesParent will delete the component making the element a parent capable of having child elements.
Parameters
Panic codes
EQikListBoxPanicContentTypeMismatch |
Raised if this element is a parent to other elements since such an element can not contain a concrete content type. |
|
IMPORT_C TQikListBoxContentsType ContentType() const;
Description
Gets the type of component this element has. Based upon the type of component the correct SetProperties function can be called to set properties.
Return value
GetContentTypeProperties()
IMPORT_C void GetContentTypeProperties(TQikListBoxPropertiesIcon &aProperties) const;
Description
Gets the properties of the icon content type of this element. Always make sure to get the properties using the correct GetContentTypeProperties function for the content type this element contains.
void Class::Foo() const { const TQikListBoxContentsType type = iMyListBoxColumn->ContentType(); switch(type) { case EQikListBoxIcon: { TQikListBoxPropertiesIcon props; iMyListBoxColumn->GetContentTypeProperties(props); break; } case EQikListBoxImage: { TQikListBoxPropertiesThumbnail props; iMyListBoxColumn->GetContentTypeProperties(props); break; } default: break; } }
Parameters
Panic codes
EQikListBoxPanicNotApplicableToParentType |
Raised if this elements content type is parent. |
EQikListBoxPanicContentTypeMismatch |
Raised if this component is not of type EQikListBoxIcon. |
|
GetContentTypeProperties()
IMPORT_C void GetContentTypeProperties(TQikListBoxPropertiesThumbnail &aProperties) const;
Description
Gets the properties of the thumbnail content type of this element. Always make sure to get the properties using the correct GetContentTypeProperties function for the content type this element contains.
Parameters
Panic codes
EQikListBoxPanicNotApplicableToParentType |
Raised if this elements content type is parent. |
EQikListBoxPanicContentTypeMismatch |
Raised if this component is not of type EQikListBoxImage. |
|
GetContentTypeProperties()
IMPORT_C void GetContentTypeProperties(TQikListBoxPropertiesText &aProperties) const;
Description
Gets the properties of the text content type of this element. Always make sure to get the properties using the correct GetContentTypeProperties function for the content type this element contains.
Parameters
Panic codes
EQikListBoxPanicNotApplicableToParentType |
Raised if this elements content type is parent. |
EQikListBoxPanicContentTypeMismatch |
Raised if this component is not of type EQikListBoxText. |
|
GetContentTypePropertiesL()
IMPORT_C void GetContentTypePropertiesL(RArray< TInt > &aSlotsToSwap) const;
Description
Sets the properties of the arrow content type of this element. Always make sure to get the properties using the correct GetContentTypePropertiesL function for the content type this element contains.
Parameters
RArray< TInt > &aSlotsToSwap |
Will contain the slot ids the arrow content type uses for content swapping. |
|
Panic codes
EQikListBoxPanicNotApplicableToParentType |
Raised if this elements content type is parent. |
EQikListBoxPanicContentTypeMismatch |
Raised if this component is not of type EQikListBoxLeftArrow nor EQikListBoxRigthArrow. |
|
virtual void SetMargins(const TMargins8 &aMargins)=0;
Description
Parameters
virtual TMargins8 Margins() const=0;
Description
Return value
virtual void CalculateSize(TSize &aSize)=0;
Description
Parameters
virtual TBool FixedSized() const=0;
Description
Return value
virtual TBool SemiFixedSized() const=0;
Description
Return value
virtual TBool FromSubTreeSized() const=0;
Description
Return value
virtual TBool DynamicSized() const=0;
Description
Return value
virtual TInt SizeInPixels() const=0;
Description
Return value
virtual TInt SizeGrabWeight() const=0;
Description
Return value
virtual TBool IsHideIfEmpty() const=0;
Description
Return value
virtual void DoColumnInterlacing()=0;
Description
virtual void ApplyRect(TRect &aRect)=0;
Description
Parameters
virtual CQikListBoxColumn *Column(TInt aSlotId)=0;
Description
Parameters
Return value
virtual CQikListBoxRow *Row(TInt aSlotId)=0;
Description
Parameters
Return value
virtual TSize MinimumSize() const=0;
Description
Return value
protected: CQikListBoxLayoutElement * iFirstElement;
Description
Tree data
protected: CQikListBoxLayoutElement * iRightElement;
Description
protected: CQikListBoxLayoutElement * iLeftElement;
Description
protected: TInt iSlotId;
Description
Slot Id for this layout element
protected: TRect iRect;
Description
The rect for this layout element.
protected: CQikListBoxComponentBase * iComponent;
Description
Pointer to this layout elements component.
protected: TSize iComponentSize;
Description
When a component has calculated its size it is temporarily cached here.
protected: TMargins8 iDrawingMargins;
Description
The margins that will actually be used when laying out the element. This may differ from the margins property of the element since vertical margins are overriden in row aware mode.
protected: TQikListBoxLayoutValuesFrontEnd & iLayoutValues;
Description
Reference to the object keeping the centralized settings for layout needs.
Terms and conditions of use of the material