Location:
eikbtgpc.h
Link against: eikcoctl.lib
CEikButtonGroupContainer
Supported from 6.0
Provides a wrapper around the different button arrays used in both pen, and no-pen devices.
|
Defined in CEikButtonGroupContainer
:
AddCommandL()
, AddCommandSetToStackL()
, AddCommandToStackL()
, AnimateCommand()
, ButtonById()
, ButtonCount()
, CalcMinimumSizeL()
, CleanupCommandPop()
, CleanupCommandPopAndDestroy()
, CleanupCommandPushL()
, CommandButtonOrNull()
, ControlOrNull()
, Current()
, DelayActivation()
, DimCommand()
, ECba
, EDialog
, EDialogButtons
, EExternal
, EHorizontal
, EInternal
, EPlainHotKey
, EShowHotKey
, EToolbar
, EVertical
, EView
, IsCommandDimmed()
, IsCommandVisible()
, Location()
, MakeCommandVisible()
, MakeVisible()
, MaxCommands()
, MinimumSize()
, NewL()
, OfferKeyEventL()
, PositionById()
, ReduceRect()
, RemoveCommandFromStack()
, RemoveCommandObserver()
, SetBoundingRect()
, SetCommandL()
, SetCommandSetL()
, SetDefaultCommand()
, THotKeyFlags
, TLocation
, TOrientation
, TUse
, UpdateCommandObserverL()
, UpdateHotKey()
, ~CEikButtonGroupContainer()
Inherited from CBase
:
operator new()
Inherited from CCoeControl
:
ActivateGc()
,
ActivateL()
,
BackedUpWindow()
,
CapturesPointer()
,
ClaimPointerGrab()
,
CloseWindow()
,
ComponentControl()
,
ConstructFromResourceL()
,
ControlContext()
,
ControlEnv()
,
CopyControlContextFrom()
,
CountComponentControls()
,
CreateBackedUpWindowL()
,
CreateWindowL()
,
DeactivateGc()
,
DrawDeferred()
,
DrawNow()
,
DrawableWindow()
,
EnableDragEvents()
,
FocusChanged()
,
GetColor()
,
GetColorUseListL()
,
GetHelpContext()
,
GrabbingComponent()
,
HandleComponentControlsResourceChange()
,
HandlePointerBufferReadyL()
,
HandlePointerEventL()
,
HandleRedrawEvent()
,
HandleResourceChange()
,
HasBorder()
,
IgnoreEventsUntilNextPointerUp()
,
Index()
,
InputCapabilities()
,
IsActivated()
,
IsBackedUp()
,
IsBeingDestroyed()
,
IsBlank()
,
IsDimmed()
,
IsFocused()
,
IsNonFocusing()
,
IsReadyToDraw()
,
IsVisible()
,
Observer()
,
OverrideColorL()
,
OwnsWindow()
,
Position()
,
PositionChanged()
,
PositionRelativeToScreen()
,
PrepareForFocusGainL()
,
PrepareForFocusLossL()
,
Rect()
,
RecursivelyMergedInputCapabilities()
,
ReportEventL()
,
ResetGc()
,
SetAdjacent()
,
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 MEikCommandObserver
:
CreateCustomCommandControlL()
,
ProcessCommandL()
static CEikButtonGroupContainer* NewL(TUse aUse,TOrientation aOrientation,MEikCommandObserver* aCommandObserver,TInt aResourceId,const CCoeControl& aParent,TUint aFlags);
Creates a button group container in its own window, or if specified, in its parent control's window.
|
|
void SetDefaultCommand(TInt aCommandId);
Sets the default command ID for buttons in this container.
|
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC& aText);
void AddCommandL (TInt aPosition, TInt aCommandId, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC& aText, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC& aText, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
Adds a command button at the specified position in the container. The button may have an optional text string or a bitmap image; bitmaps may optionally have a mask.
|
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC& aText);
void SetCommandL (TInt aPosition, TInt aCommandId, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC& aText, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
void SetCommandL (TInt aPosition, TInt aResourceId);
void SetCommandL (TInt aCommandId, const TDesC& aText);
void SetCommandL (TInt aCommandId, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void SetCommandL (TInt aCommandId, const TDesC& aText, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void SetCommandL (TInt aCommandId, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
void SetCommandL (TInt aCommandId, const TDesC& aText, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
Sets a command button's content, overwriting any previous contents at that position.
There are several overloads of this function which allow the command button's image and text to be optionally set. All these functions will raise a panic if the supplied position is out of range.
If an image is set, a mask must also be specified to guarantee compliance with different colour schemes. Ownership of bitmap arguments is transferred at the end of the function.
If a button position is not supplied,
CEikButtonGroupContainer
attempts to identify which button to
overwrite by command ID. If two buttons have the same ID, which will be altered
is not defined. The behaviour is also undefined if aCommandId
can't be matched to any button.
|
void SetCommandSetL(TInt aResourceId);
Sets the buttons' text, bitmaps and command ids from a resource.
The type of resource depends on the type of button.
|
Each command button slot can contain a stack of controls, the top control of which is visible and active. This allows an application to use different command buttons depending on which of its views is currently visible.
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC& aText);
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC& aText, const CFbsBitmap& aBitmap,const CFbsBitmap& aMask);
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC& aText, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
void AddCommandToStackL (TInt aPosition, TInt aResourceId);
void AddCommandToStackL (TInt aCommandId, const TDesC& aText);
void AddCommandToStackL (TInt aCommandId, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void AddCommandToStackL (TInt aCommandId, const TDesC& aText, const CFbsBitmap& aBitmap, const CFbsBitmap& aMask);
void AddCommandToStackL (TInt aCommandId, const TDesC& aFile, TInt aBitmapId, TInt aMaskId);
void AddCommandToStackL (TInt aCommandId, const TDesC& aText, const TDesC& aFile,TInt aBitmapId,TInt aMaskId);
Pushes a command button onto a position's button stack.
As
with SetCommandL()
but allows the previous command to be retrieved
at any time by calling RemoveCommand()
.
There are several overloads of this function which allow the command button's image and text to be optionally set. All these functions will raise a panic if the supplied position is out of range.
If an image is set, a mask must also be specified to guarantee compliance with different colour schemes. Ownership of bitmap arguments is transferred at the end of the function.
If a button position is not
supplied, CEikButtonGroupContainer
attempts to identify which
button to overwrite by command ID. If two buttons have the same ID, which will
be altered is not defined. The behaviour is also undefined
if aCommandId
can't be matched to any button.
|
void AddCommandSetToStackL(TInt aResourceId);
As with SetCommandL()
but for a set of buttons, also allows
the previous command to be retrieved at any time by
calling RemoveCommand()
.
|
void RemoveCommandFromStack(TInt aPosition,TInt aCommandId);
Removes the command identified by aCommandId
, in
position aPosition
in the group, from the command stack.
Automatically retrieves the previous command details.
Commands are added to the stack by
calling AddCommandToStackL
.
|
The following interface to the
thread-local CleanupStack
should be used when an application changes
the contents of more than one button in the body of one function
call.
void CleanupCommandPushL(TInt aPosition);
Places the command in position aPosition in the group on the cleanup
stack. Typically used when a control or view changes the contents of two or
more buttons on receipt of focus. After altering one command with a call
to AddCommandToStackL()
the push is made to guarantee the display
will be left in a consistent state if the second (and any subsequent) calls
to AddCommandToStackL()
fail.
Only a single command can be pushed for each position.
|
void CleanupCommandPop();
Removes a command from the cleanup stack without destroying it.
void CleanupCommandPop(TInt aCount);
Removes one or more commands from the cleanup stack without destroying them.
|
void CleanupCommandPopAndDestroy();
void CleanupCommandPopAndDestroy(TInt aCount);
Removes one or more commands which were pushed onto the cleanup stack.
It does this by
calling CleanupCommandPushL()
, rolling back to the previous
details. The command buttons popped are destroyed.
|
void DimCommand(TInt aCommandId,TBool aDimmed);
Dims or undims a button without drawing it.
If two buttons in the container have the same ID, the behaviour is undefined. Dimming prevents acceptance of user input.
|
TBool IsCommandDimmed(TInt aCommandId) const;
Determines whether the button with the specified command ID is dimmed.
Returns true if the button with the specified command ID is dimmed. If two buttons have the same ID, the results of this check are undefined.
|
|
TBool IsCommandVisible(TInt aCommandId) const;
Tests whether the button with the specified command ID is visible.
If two buttons have the same ID, the results are undefined.
|
|
void MakeCommandVisible(TInt aCommandId,TBool aVisible);
Makes the button with the specified id either visible, or invisible.
If two buttons have the same ID, the button to be altered is undefined.
|
void MakeVisible(TBool aVisible);
Makes the button group either visible, or invisible.
|
CEikCommandButton* ButtonById(TInt aCommandId) const;
Gets a pointer to the the button with the specified command Id.
|
|
void UpdateCommandObserverL(TInt aPos,MEikCommandObserver& aCommandObserver);
Changes the command observer for the button
at aPos
to aCommandObserver
. Panics if an updated
observer is already present. This function should be followed
by RemoveCommandObserver()
when you need to put back the original
observer.
|
void RemoveCommandObserver(TInt aPos);
Remove temporary observer.
Removes the temporary observer for the button at aPos
,
replacing it with the observer that was present
when UpdateCommandObserverL()
was called.
|
TInt MaxCommands() const;
Gets the maximum number of buttons that can be supported by the device.
|
CCoeControl* ControlOrNull(TInt aCommandId) const;
Gets a pointer to the control (button) with the specified command Id.
This
method is intended to allow access to
standard CCoeControl
functionality only. Casting the return value is
likely to fail on different devices.
|
|
CEikCommandButton* CommandButtonOrNull(TInt aCommandId) const;
Supported from 6.1
Gets a pointer to the command button with the specified command Id.
|
|
TInt PositionById(TInt aCommandId) const;
Gets the position in the group of the button with the specified command Id.
The return value is undefined if two buttons share the same id.
|
|
void AnimateCommand(TInt aCommandId);
Animates the button with the specified id.
If two buttons have the same ID, this function's behaviour is undefined.
|
void UpdateHotKey(TInt aCommandId,THotKeyFlags aFlags,TInt aKeyId);
Updates a command's hotkey and whether the key is displayed.
This function is only supported by containers being used for dialog buttons.
|
TInt ButtonCount() const;
Gets the total number of buttons currently present in the group.
|
static CEikButtonGroupContainer* Current();
Gets a pointer to an application's currently
active CEikButtonGroupContainer
(if any).
Returns NULL if there are no containers active or none suitable for sharing. Ownership of the returned pointer is not transferred.
|
TBool DelayActivation() const;
Tests whether the button group been explicitly instructed to suppress redraws.
Some button groups may not activate themselves during construction, in which case, they need to be activated by the client. This method allows the client to enquire whether this is necessary.
|
TLocation Location() const;
Gets the button group's location.
Typically the button group is external to the view which is using it. In some cases, such as in dialogs with button panels, the button group is internal to the control which is using it.
|
void SetBoundingRect(const TRect& aRect);
Sets the boundary rectangle for externally-positioned button groups.
For use by EExternal
button groups
only.
|
void ReduceRect(TRect& aBoundingRect) const;
Subtracts the area occupied by the button group from the specified bounding rectangle.
This method should be used in preference to querying the container's area at all times.
|
TSize CalcMinimumSizeL(TInt aResourceId) const;
Calculates minimum size required to display the buttons defined in the specified resource structure.
|
|
TSize MinimumSize();
Gets the minimum size required to display the current button group.
See CCoeControl::MinimumSize()
.
|
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
Offers a key event to the control
Offers the key event aKeyEvent
with code aType
to
the control. See CCoeControl::OfferKeyEventL()
.
|
|
TUse
Describes how the container is being used.
The enumeration is used by the system to create the appropriate (DFRD specific) button group for the specified type. From 6.1 only two use types can be specified: EView
or EDialog
.
|
THotKeyFlags
Flags for the display of hotkeys.
|
TOrientation
Describes the orientation of the container
|
TLocation
Relative positions of the container and the control which uses it
|