Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <CoeLayoutMan.h>
Link against: cone.lib
This item is not part of the S60 5th Edition SDK

Class MCoeLayoutManager

class MCoeLayoutManager;

Description

Base class for layout managers.

A layout manager can be attached to one, or many (depending on the concrete layout manager), compound controls. The layout manager handles the layout of the components of the attached compound controls, and calculates the attached compound controls' minimum size.

Members

Defined in MCoeLayoutManager:


Construction and destruction


MCoeLayoutManager()

protected: IMPORT_C MCoeLayoutManager();

Description

[Top]


Member functions


CanAttach()const

virtual TBool CanAttach() const=0;

Description

Determines if it is possible to attach another control to the layout manager.

Return value

TBool

ETrue if possible, otherwise EFalse


AttachL(CCoeControl &)

virtual void AttachL(CCoeControl &aCompoundControl)=0;

Description

Attaches aCompoundControl to the layout manager. Is normally not called manually since CCoeControl::SetLayoutManagerL() calls this function. Once a compound control is attached to a layout manager, the layout manager owns itself.

Parameters

CCoeControl &aCompoundControl

The compound control.

See also:


Detach(CCoeControl &)

virtual void Detach(CCoeControl &aCompoundControl)=0;

Description

Detaches aCompoundControl from the layout manager. Is normally not called manually since CCoeControl::SetLayoutManagerL() calls this function when you switch layout managers on a control. It is also called from CCoeControl::~CCoeControl When the last attached compound control detaches, the layout manager deletes itself.

Parameters

CCoeControl &aCompoundControl

The compound control.

See also:


CalcMinimumSize(const CCoeControl &)const

virtual TSize CalcMinimumSize(const CCoeControl &aCompoundControl) const=0;

Description

Calculates the minimum size of aCompoundControl Is normally not called manually since CCoeControl::MinimumSize() calls this function in the default implementation on controls with layout managers.

To calculate the minimum size is almost as time consuming as performing an actual layout and should be used with caution. The minimum size depends on aCompoundControl 's maximum width.

Parameters

const CCoeControl &aCompoundControl

The compound control

Return value

TSize

The minimum size

See also:


PerformLayout()

virtual void PerformLayout()=0;

Description

Performs the layout of the attached controls Is normally not called manually since CCoeControl::SizeChanged() calls this function in the default implementation on controls with layout managers.

The layout is generally performed by calling the component controls' SetMaximumWidth() , followed by MinimumSize() , and then the layout manager tries to place the component controls according to their minimum sizes and the settings.

See also:


CalcTextBaselineOffset(const CCoeControl &,const TSize &)const

virtual TInt CalcTextBaselineOffset(const CCoeControl &aCompoundControl, const TSize &aSize) const=0;

Description

Gets the offset to the first text baseline relative to the top of the control.

Parameters

const CCoeControl &aCompoundControl

The control

const TSize &aSize

The size of the control

Return value

TInt

The baseline

See also:


SetTextBaselineSpacing(TInt)

virtual void SetTextBaselineSpacing(TInt aBaselineSpacing)=0;

Description

Sets the spacing between text baselines.

Parameters

TInt aBaselineSpacing

The new value for the baseline


TextBaselineSpacing()const

virtual TInt TextBaselineSpacing() const=0;

Description

Returns the baseline spacing.

Return value

TInt

The baseline value.


HandleAddedControlL(const CCoeControl &,const CCoeControl &)

virtual void HandleAddedControlL(const CCoeControl &aCompoundControl, const CCoeControl &aAddedControl)=0;

Description

Handles when a component control is added to an attached compound control Is normally not called manually since CCoeControlArray::InsertLC() calls this function for controls with layout managers. Is used by layout managers to prepare to layout one more component control.

Parameters

const CCoeControl &aCompoundControl

The compound control.

const CCoeControl &aAddedControl

The added control

See also:


HandleRemovedControl(const CCoeControl &,const CCoeControl &)

virtual void HandleRemovedControl(const CCoeControl &aCompoundControl, const CCoeControl &aRemovedControl)=0;

Description

Handles when a component control is removed from an attached compound control Is normally not called manually since CCoeControlArray::Remove() calls this function for controls with layout managers. Is used by layout managers to remove all settings and similar that are specific for aRemovedControl .

Parameters

const CCoeControl &aCompoundControl

The compound control.

const CCoeControl &aRemovedControl

The removed control

See also:


HandleControlReplaced(const CCoeControl &,const CCoeControl &)

virtual TInt HandleControlReplaced(const CCoeControl &aOldControl, const CCoeControl &aNewControl)=0;

Description

Handles when a component control is replaced by another component control in an attached compound control

Is not called by CCoeControl . Is used by layout managers to move settings and similar that are specified for aOldControl to aNewControl If this function is called, neither HandleAddedControlL nor HandleRemovedControl is allowed to be called.

Parameters

const CCoeControl &aOldControl

The old component control

const CCoeControl &aNewControl

The new component control

Return value

TInt

KErrNone if no error. KErrNotFound if the layout manager cannot find aOldControl


Reserved_MCoeLayoutManager_1()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_1();

Description


Reserved_MCoeLayoutManager_2()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_2();

Description


Reserved_MCoeLayoutManager_3()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_3();

Description


Reserved_MCoeLayoutManager_4()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_4();

Description


Reserved_MCoeLayoutManager_5()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_5();

Description


Reserved_MCoeLayoutManager_6()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_6();

Description


Reserved_MCoeLayoutManager_7()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_7();

Description


Reserved_MCoeLayoutManager_8()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_8();

Description


Reserved_MCoeLayoutManager_9()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_9();

Description


Reserved_MCoeLayoutManager_10()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_10();

Description


Reserved_MCoeLayoutManager_11()

private: IMPORT_C virtual void Reserved_MCoeLayoutManager_11();

Description