»
Symbian OS v6.1 Edition for C++ »
API Reference »
Uikon Core Controls »
CEikControlGroup
Location:
eikctgrp.h
Link against:
eikcoctl.lib
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
CBase | Base class for all classes to be instantiated on the heap |
CCoeControl | Control base class from which all other controls are derived |
CEikBorderedControl | A control which is drawn surrounded by a rectangular border |
CEikControlGroup | This 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();
Description
Default constructor.
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();
Description
Destructor. Deletes all component controls.
Adding and removing controls
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.
|
|
void AddControlL(TEikGroupControl& aGroupControl);
Description
Adds a wrapped control to the control group array.
Parameters
TEikGroupControl& aGroupControl
|
The control to add.
|
|
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.
|
|
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 .
|
|
void Reset();
Description
Deletes all controls from the control group array.
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 .
|
|
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.
|
|
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 .
|
|
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
CArrayFix<TEikGroupControl>* ControlArray() const;
Description
Gets the control array.
Return value
CArrayFix<TEikGroupControl>*
|
The control array.
|
|
TInt CountComponentControls() const;
Description
Gets the number of controls in the control group.
Return value
TInt
|
The number of controls in the control group.
|
|
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.
|
|
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.
|
|
void LayoutControls();
Description
Lays out the controls in the control group.
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.
|
|
void SetBreadthInPixels(TInt aBreadth);
Description
Sets the control group’s breadth in pixels.
Parameters
TInt aBreadth
|
The control group’s breadth in pixels.
|
|
void SetLengthInPixels(TInt aLength);
Description
Sets the control group’s length in pixels.
Parameters
TInt aLength
|
The control group’s length in pixels.
|
|
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.
|
|
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.
|
|
void SetControlsAllSameSize();
Description
Sets all controls within the control group to be the same size.
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.
|
|
Handling resource changes
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.
|
|
TOrientation
Description
Specifies the control group’s orientation.
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.
|
|
Description
Provides an array of wrapped controls.
CArrayFix<TEikGroupControl>* iControlArray
Description
Array of wrapped controls.