Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: eikspane.h
Link against: eikcoctl.lib

Class CEikStatusPaneBase

CEikStatusPaneBase

Support

Supported from 6.0

Description

The base class for the concrete status pane class CEikStatusPane. This class is not intended for user derivation.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CEikStatusPaneBaseThe base class for the concrete status pane class CEikStatusPane

Defined in CEikStatusPaneBase:
CEikStatusPaneBase(), ContainerControlL(), ControlL(), HandleResourceChange(), IsDimmed(), IsFaded(), IsVisible(), MakeVisible(), PaneCapabilities(), PaneRectL(), ReduceRect(), SetDimmed(), SetFaded(), SetFlags(), SetObserver(), SwapControlL(), SwitchLayoutL(), TPaneCapabilities, ~CEikStatusPaneBase()

Inherited from CBase:
operator new()


Construction and destruction


CEikStatusPaneBase()

protected: CEikStatusPaneBase(CEikonEnv& aEikEnv, RWindowGroup* aParent);

Description

Constructor

The constructor is protected, and is called by the derived class CEikStatusPane. It is documented only for completeness.

Parameters

CEikonEnv& aEikEnv

The Uikon environment in which the control is created.

RWindowGroup* aParent

Its parent window group.


~CEikStatusPaneBase()

~CEikStatusPaneBase();

Description

Destructor

[Top]


Public member functions


ContainerControlL()

CCoeControl* ContainerControlL (TPaneId aPaneId) const;

Description

Gets the subpane container control

The function provides the container control for the subpane identified by aPaneId. You need access to the container control for a subpane if you want to swap in a new control. The container control should be set as the parent window of the new control. This also provides a fast way to get the rectangle of the subpane (see PaneRect()). Applications can only access their own subpanes, the server can only access server owned panes.

Parameters

TPaneId aPaneId

ID of the subpane.

Return value

CCoeControl*

A pointer to the container control for the subpane identified by aPaneID in this status pane base.

Leave codes

KErrNotFound

The subpane ID is not valid.


ControlL()

CCoeControl* ControlL (TPaneId aPaneId) const;

Description

Gets a subpane control by ID

The function provides the control currently inside the subpane identified by aPaneId. This gives the application direct access to the contents of a subpane. A TPaneId is a TUid under another name. Applications can only access their own subpanes, the server can only access server owned panes.

Parameters

TPaneId aPaneId

ID of the subpane.

Return value

CCoeControl*

The container control for the subpane identified by aPaneID.

Leave codes

KErrNotFound

The subpane ID is not valid.


HandleResourceChange()

void HandleResourceChange(TInt aType);

Description

Handles changes in resources which are shared across the environment.

This function responds to the changes in resources by propagating them to sub-parts of the status pane.

Parameters

TInt aType

Message type. See KEikMessageFadeAllWindows and KEikMessageColorSchemeChange in eikdef.h for example.


PaneCapabilities()

TPaneCapabilities PaneCapabilities (TPaneId aPaneId) const;

Description

Gets the capabilities of a subpane

The function returns a set of flags that indicate the capabilities of the subpane identified by aPaneId.

Parameters

TPaneId aPaneId

ID of the subpane.

Return value

TPaneCapabilities

Set of flags indicating whether the subpane is: present, part of the current status pane layout, owned by an application.


PaneRectL()

TRect PaneRectL(TPaneId aPaneId) const;

Description

Gets the size and location of a subpane.

The function returns the size and position of the screen rectangle belonging to the subpane identified by aPaneId. This can be used to set the size of a new control you want to place in the status pane.

Parameters

TPaneId aPaneId

ID of the subpane.

Return value

Trect

The subpane's size and position inside the status pane.

Leave codes

KErrNotFound

The subpane ID is not valid.


ReduceRect()

void ReduceRect(TRect& aBoundingRect) const;

Description

Modifies the bounding rectangle passed in so that the application's main window area lies next to the status pane rectangle.

The status pane always places itself along the edge of the screen, so that it is consistent across applications and the server. It is assumed that the bounding rectangle passed in does not extend beyond the screen area. This is used to calculate the client application's main window area, after the status pane is taken into account.

Parameters

TRect& aBoundingRect

Rectangle to be modified.


SetObserver()

void SetObserver(MEikStatusPaneObserver* aObserver);

Description

Sets the status pane observer.

This function allows an observer of the status pane to register itself to be notified about changes to the size of the status pane. The observer must implement the MEikHandleStatusPaneSizeChange() function.

Parameters

MEikStatusPaneObserver* aObserver

The status pane observer.


SwapControlL()

CCoeControl* SwapControlL(TPaneId aPaneId, CCoeControl* aNewControl);

Description

Swaps a subpane control.

The function replaces the control currently in the subpane identified by aPaneId, by aNewControl. The new control must be a fully constructed control. It is placed inside the subpane and the current content is returned. After this call, the calling application is responsible for deleting the old control, the status pane is responsible for deleting the new control.

Parameters

TPaneId aPaneId

ID of the subpane.

CCoeControl* aNewControl

A fully constructed control to place at aPaneId.

Return value

CCoeControl*

The control which was at aPaneId.

Leave codes

KErrNotFound

This can occur before ownership of the new control is taken, if the subpane ID is not valid.


SwitchLayoutL()

void SwitchLayoutL(TInt aLayoutResourceId);

Description

Changes the entire status pane layout to the one specified in the resource aLayoutResourceId.

Parameters

TInt aLayoutResourceId

Resource ID for the layout.

Leave codes

KErrNotFound

The specified layout does not exist in the status pane resource structures.

[Top]


Visibility, fading and dimming


IsDimmed()

TBool IsDimmed() const;

Description

Test whether the status pane is dimmed.

Same as CCoeControl::IsDimmed().

Return value

TBool

ETrue if the status pane is dimmed, EFalse otherwise.


SetDimmed()

void SetDimmed(TBool aDimmed);

Description

Sets the dimmed state of the status pane and its contents.

Use SetDimmed to prevent acceptance of user input and to display the status pane in a lighter or darker shade of grey. Same as CCoeControl::SetDimmed().

Parameters

TBool aDimmed

If ETrue, the status pane is dimmed.


IsFaded()

TBool IsFaded() const;

Description

Tests whether the status pane is faded.

Same as CCoeControl::IsFaded().

Return value

TBool

ETrue if the status pane is faded.


SetFaded()

void SetFaded(TBool aFaded);

Description

Sets the faded state of the status pane and its contents.

Same as CCoeControl::SetFaded(). Use SetFaded() to display the status pane in a lighter or darker colour. The aim of fading is to give the window with focus greater emphasis by contrast with the surrounding windows.

Parameters

TBool aFaded

If ETrue, the status pane is drawn faded.


IsVisible()

TBool IsVisible() const;

Description

Tests whether the status pane is visible.

Same as CCoeControl::IsVisible().

Return value

TBool

ETrue if the status pane is visible.


MakeVisible()

void MakeVisible(TBool aVisible);

Description

Sets the visibility of the status pane and its contents.

Same as CCoeControl::MakeVisible().

Parameters

TBool aVisible

If ETrue, the status pane is drawn.


SetFlags()

void SetFlags(TInt aFlags);

Description

Sets all the CCoeControl visual flags at once (faded, dimmed and visible).

Parameters

TInt aFlags

A bitwise OR of visual flags. See KEikStatusPaneBaseFadedBit KEikStatusPaneBaseVisibleBit and KEikStatusPaneBaseDimmedBit.

[Top]


Class TPaneCapabilities

TPaneCapabilities

Description

Describes the capabilities of a subpane.

Defined in CEikStatusPaneBase::TPaneCapabilities:
IsAppOwned(), IsPresent(), TPaneCapabilities()


TPaneCapabilities()

TPaneCapabilities();

Description

Constructor


IsAppOwned()

TBool IsAppOwned() const;

Description

Tests whether the pane is owned by the application or the server.

Applications can only interact directly with application owned subpanes.

Return value

TBool

If ETrue, the subpane is owned by the application.


IsPresent()

TBool IsPresent() const;

Description

Tests whether the subpane exists in the status pane.

This returns true if the subpane can be used, even if it is not visible.

Return value

TBool

If ETrue, the subpane exists in the status pane and can be used by the application.