Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eikctgrp.h
Link against: eikcoctl.lib

Class CEikControlGroup

CEikControlGroup

Support

Supported from 6.0

Description

This class holds an array of controls wrapped with related information. This related information is an ID, whether the control is of a fixed size or is stretchable and, if a set size, the control’s length.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCoeControlControl base class from which all other controls are derived
CEikBorderedControlA control which is drawn surrounded by a rectangular border
CEikControlGroupThis class holds an array of controls wrapped with related information

Defined in CEikControlGroup:
AddControlL(), CEikControlGroup(), ComponentControl(), ConstructL(), Control(), ControlArray(), ControlById(), ControlId(), CountComponentControls(), DeleteControl(), EFromBottomLeft, EFromBottomRight, EFromTopLeft, EFromTopRight, ELayHorizontally, ELayVertically, GetColorUseListL(), HandleResourceChange(), IndexById(), InsertControlL(), LayoutControls(), MinimumSize(), Reset(), SetBreadthInPixels(), SetControlLayout(), SetControlSpacing(), SetControlsAllSameSize(), SetLengthInPixels(), SetNumberOfLines(), TOrientation, TStartCorner, iControlArray, ~CEikControlGroup()

Inherited from CBase:
operator new()

Inherited from CCoeControl:
ActivateGc(), ActivateL(), BackedUpWindow(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), ConstructFromResourceL(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawDeferred(), DrawNow(), DrawableWindow(), EnableDragEvents(), FocusChanged(), GetColor(), GetHelpContext(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleRedrawEvent(), IgnoreEventsUntilNextPointerUp(), Index(), InputCapabilities(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), MakeVisible(), Observer(), OfferKeyEventL(), OverrideColorL(), OwnsWindow(), Position(), PositionChanged(), PositionRelativeToScreen(), PrepareForFocusGainL(), PrepareForFocusLossL(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), ResetGc(), SetAllowStrayPointers(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetContainerWindow(), SetContainerWindowL(), SetControlContext(), SetCornerAndSize(), SetCornerAndSizeL(), SetDimmed(), SetExtent(), SetExtentL(), SetExtentToWholeScreen(), SetExtentToWholeScreenL(), SetFocus(), SetFocusing(), SetGloballyCapturing(), SetNeighbor(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetRectL(), SetSize(), SetSizeL(), SetSizeWithoutNotification(), SetSizeWithoutNotificationL(), Size(), SizeChanged(), SizeChangedL(), SystemGc(), Window()

Inherited from CEikBorderedControl:
Border(), Draw(), HasBorder(), SetAdjacent(), SetBorder(), iBorder

See also:


Construction and destruction


CEikControlGroup()

CEikControlGroup();

Description

Default constructor.


ConstructL()

void ConstructL(TStartCorner aStart,TOrientation aOrientation);

Description

Completes construction of the control group.

Parameters

TStartCorner aStart

The corner of the control from which to start control layout.

TOrientation aOrientation

The control group’s orientation.


~CEikControlGroup()

~CEikControlGroup();

Description

Destructor. Deletes all component controls.

[Top]


Adding and removing controls


AddControlL()

void AddControlL(CCoeControl* aControl,TInt aId);

Description

Wraps, then adds, a control to the control group array. Wraps aControl with aId to generate a TEikGroupControl which is appended to the control group array.

Parameters

CCoeControl* aControl

The control to add to the control group.

TInt aId

The control’s ID.


AddControlL()

void AddControlL(TEikGroupControl& aGroupControl);

Description

Adds a wrapped control to the control group array.

Parameters

TEikGroupControl& aGroupControl

The control to add.


InsertControlL()

void InsertControlL(TEikGroupControl& aGroupControl,TInt aIndex);

Description

Adds a wrapped control to the control group array at the given index position.

Parameters

TEikGroupControl& aGroupControl

The control to add to the group.

TInt aIndex

The index for the added control.


DeleteControl()

void DeleteControl(TInt aIndex,TInt aCount);

Description

Deletes the specified controls.

Parameters

TInt aIndex

The index at which to start deletion.

TInt aCount

The number of controls to delete from the group, starting with the control at aIndex.


Reset()

void Reset();

Description

Deletes all controls from the control group array.

[Top]


Accessing controls


Control()

CCoeControl* Control(TInt aIndex) const;

Description

Gets the control identified by the given index.

Parameters

TInt aIndex

The index of the control to get.

Return value

CCoeControl*

The control identified by aIndex.


IndexById()

TInt IndexById(TInt aId) const;

Description

Gets the index of the control with the given ID.

Parameters

TInt aId

The ID of the control for which the index is obtained.

Return value

TInt

The control’s index.


ControlById()

CCoeControl* ControlById(TInt aId) const;

Description

Gets the control identified by the given ID.

Parameters

TInt aId

The ID of the control to get.

Return value

CCoeControl*

The control identified by aId.


ControlId()

TInt ControlId(CCoeControl* aControl) const;

Description

Gets the specified control’s ID.

Parameters

CCoeControl* aControl

The control for which the ID is obtained.

Return value

TInt

The control’s ID.


ControlArray()

CArrayFix<TEikGroupControl>* ControlArray() const;

Description

Gets the control array.

Return value

CArrayFix<TEikGroupControl>*

The control array.


CountComponentControls()

TInt CountComponentControls() const;

Description

Gets the number of controls in the control group.

Return value

TInt

The number of controls in the control group.


GetColorUseListL()

virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;

Description

Gets the list of logical colours used to draw the control. Appends the list to aColorUseList paired with an explanation of how the colours are used.

Parameters

CArrayFix<TCoeColorUse>& aColorUseList

List of logical colours.


ComponentControl()

protected:
CCoeControl* ComponentControl(TInt aIndex) const;

Description

Gets the component control identified by the given index.

Parameters

TInt aIndex

The index of the component control to get.

Return value

CCoeControl*

The component control.

[Top]


Control size and layout


LayoutControls()

void LayoutControls();

Description

Lays out the controls in the control group.


MinimumSize()

TSize MinimumSize();

Description

Gets the minimum size required to draw the control group.

Return value

TSize

The minimum size required to draw the control group.


SetBreadthInPixels()

void SetBreadthInPixels(TInt aBreadth);

Description

Sets the control group’s breadth in pixels.

Parameters

TInt aBreadth

The control group’s breadth in pixels.


SetLengthInPixels()

void SetLengthInPixels(TInt aLength);

Description

Sets the control group’s length in pixels.

Parameters

TInt aLength

The control group’s length in pixels.


SetControlLayout()

void SetControlLayout(TStartCorner aStart,TOrientation aOrientation);

Description

Sets the control group’s layout.

Parameters

TStartCorner aStart

The corner of the control from which to start control layout.

TOrientation aOrientation

The control group’s orientation.


SetControlSpacing()

void SetControlSpacing(TInt aHSpacing,TInt aVSpacing);

Description

Sets the control group’s horizontal and vertical spacing.

Parameters

TInt aHSpacing

The control group’s horizontal spacing.

TInt aVSpacing

The control group’s vertical spacing.


SetControlsAllSameSize()

void SetControlsAllSameSize();

Description

Sets all controls within the control group to be the same size.


SetNumberOfLines()

void SetNumberOfLines(TInt aNumLines,TBool aDistributeEvenly);

Description

Sets the control group’s number of lines and whether to distribute the controls in the group evenly.

Parameters

TInt aNumLines

The number of lines in the control group.

TBool aDistributeEvenly

If ETrue, distributes the controls evenly.

[Top]


Handling resource changes


HandleResourceChange()

virtual void HandleResourceChange(TInt aType);

Description

Handles a change to the control's resources which are shared across the environment. For example, colours or fonts.

Parameters

TInt aType

The type of resource that has changed.

[Top]


Member enumerations


Enum TOrientation

TOrientation

Description

Specifies the control group’s orientation.

ELayHorizontally

Sets the control group’s orientation to horizontal.

ELayVertically

Sets the control group’s orientation to vertical.


Enum TStartCorner

TStartCorner

Description

Specifies the corner of the control group from which to start control layout.

EFromTopLeft

Layout begins from the top left corner of the control group.

EFromTopRight

Layout begins from the top right corner of the control group.

EFromBottomLeft

Layout begins from the bottom left corner of the control group.

EFromBottomRight

Layout begins from the bottom right corner of the control group.

[Top]


Protected data

Description

Provides an array of wrapped controls.


iControlArray

CArrayFix<TEikGroupControl>* iControlArray

Description

Array of wrapped controls.