UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikListBoxLayoutElement.h
Link against: qiklbx.lib

Class CQikListBoxLayoutElement

class CQikListBoxLayoutElement : public CBase;

Description

Base class for CQikListBoxColumn and CQikListBoxRow .

Derivation

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

const TQikListBoxPropertiesBase &aProperties

TQikListBoxPropertiesBase dervied object of the same type as the content type of this element. The properties to be applied to the content type.

const RArray< TInt > &aSlotsToSwap

The slots arrow content types use to swap.

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.


SetContentTypeL()

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

const TQikListBoxPropertiesBase &aProperties

TQikListBoxPropertiesBase derived object containing needed parameters to create a component.

const RArray< TInt > &aSlotsToSwap

Used when creating arrow components to set which slots to swap between,

Panic codes

EQikListBoxPanicContentTypeMismatch

Raised if this element is a parent to other elements since such an element can not contain a concrete content type.


ContentType()

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

TQikListBoxContentsType

The content type this element contains.


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

TQikListBoxPropertiesIcon &aProperties

Will have a copy of the component's properties on return.

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

TQikListBoxPropertiesThumbnail &aProperties

Will have a copy of the content type's properties on return.

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

TQikListBoxPropertiesText &aProperties

Will have a copy of the content type's properties on return.

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.


SetMargins()

virtual void SetMargins(const TMargins8 &aMargins)=0;

Description

Parameters

const TMargins8 &aMargins


Margins()

virtual TMargins8 Margins() const=0;

Description

Return value

TMargins8


CalculateSize()

virtual void CalculateSize(TSize &aSize)=0;

Description

Parameters

TSize &aSize


FixedSized()

virtual TBool FixedSized() const=0;

Description

Return value

TBool


SemiFixedSized()

virtual TBool SemiFixedSized() const=0;

Description

Return value

TBool


FromSubTreeSized()

virtual TBool FromSubTreeSized() const=0;

Description

Return value

TBool


DynamicSized()

virtual TBool DynamicSized() const=0;

Description

Return value

TBool


SizeInPixels()

virtual TInt SizeInPixels() const=0;

Description

Return value

TInt


SizeGrabWeight()

virtual TInt SizeGrabWeight() const=0;

Description

Return value

TInt


IsHideIfEmpty()

virtual TBool IsHideIfEmpty() const=0;

Description

Return value

TBool


DoColumnInterlacing()

virtual void DoColumnInterlacing()=0;

Description


ApplyRect()

virtual void ApplyRect(TRect &aRect)=0;

Description

Parameters

TRect &aRect


Column()

virtual CQikListBoxColumn *Column(TInt aSlotId)=0;

Description

Parameters

TInt aSlotId

Return value

CQikListBoxColumn *


Row()

virtual CQikListBoxRow *Row(TInt aSlotId)=0;

Description

Parameters

TInt aSlotId

Return value

CQikListBoxRow *


MinimumSize()

virtual TSize MinimumSize() const=0;

Description

Return value

TSize

[Top]


Member data


iFirstElement

protected: CQikListBoxLayoutElement * iFirstElement;

Description

Tree data


iRightElement

protected: CQikListBoxLayoutElement * iRightElement;

Description


iLeftElement

protected: CQikListBoxLayoutElement * iLeftElement;

Description


iSlotId

protected: TInt iSlotId;

Description

Slot Id for this layout element


iRect

protected: TRect iRect;

Description

The rect for this layout element.


iComponent

protected: CQikListBoxComponentBase * iComponent;

Description

Pointer to this layout elements component.


iComponentSize

protected: TSize iComponentSize;

Description

When a component has calculated its size it is temporarily cached here.


iDrawingMargins

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.


iLayoutValues

protected: TQikListBoxLayoutValuesFrontEnd & iLayoutValues;

Description

Reference to the object keeping the centralized settings for layout needs.

Terms and conditions of use of the material