CPslnFWBaseView Class Reference

class CPslnFWBaseView : public CPslnFWPluginInterface

CPslnFWBaseView view class. Base class for Psln plugin views.

PslnFramework.lib
Since
S60 v3.1

Inherits from

Public Member Functions
CPslnFWBaseView ()
~CPslnFWBaseView ()
IMPORT_C void ConstructL ()
IMPORT_C CPslnFWBaseContainer * Container ()
IMPORT_C void DoActivateL (const TVwsViewId &, TUid , const TDesC8 &)
IMPORT_C void DoDeactivate ()
IMPORT_C TInt GetTabIndex ()
IMPORT_C void OpenLocalizedResourceFileL (const TDesC &, RConeResourceLoader &)
IMPORT_C void OpenLocalizedResourceFileL (const TDesC &, RConeResourceLoader &, const TDesC *)
IMPORT_C void SetCurrentItem ( TInt )
IMPORT_C void SetNaviPaneDecorator ( CAknNavigationDecorator *)
IMPORT_C void SetTabIndex ( TInt )
Protected Member Functions
IMPORT_C void CreateContainerL ()
IMPORT_C void CreateNaviPaneContextL ( TInt )
IMPORT_C void HandleCommandL ( TInt )
void HandleListBoxEventL ( CEikListBox *, TListBoxEvent)
IMPORT_C void NewContainerL ()
IMPORT_C void SetMiddleSoftKeyLabelL (const TInt , const TInt )
IMPORT_C void SetNaviPaneL ()
IMPORT_C void SetNaviPaneL (const TInt )
IMPORT_C void SetTitlePaneL ( TInt &)
Private Member Functions
void HandleListBoxSelectionL ()
TBool IsValidLocation (const TInt &)
Inherited Functions
CAknView::ActivateViewL(const TVwsViewId &)
CAknView::ActivateViewL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::AknViewActivatedL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::AknViewDeactivated()
CAknView::AppUi()const
CAknView::BaseConstructL(TInt)
CAknView::CAknView()
CAknView::Cba()const
CAknView::ClientRect()const
CAknView::ConstructMenuAndCbaEarlyL()
CAknView::CreateAndSetToolbarL(TInt)
CAknView::HandleForegroundEventL(TBool)
CAknView::HandleStatusPaneSizeChange()
CAknView::HandleViewRectChange()
CAknView::Id()const
CAknView::IsForeground()const
CAknView::MenuBar()const
CAknView::MopNext()
CAknView::MopSupplyObject(TTypeUid)
CAknView::ProcessCommandL(TInt)
CAknView::ProcessForegroundEventL(TBool)
CAknView::Redraw()const
CAknView::SaveToolbarStatus(TBool,TBool)
CAknView::SetEmphasis(CCoeControl *,TBool)
CAknView::SetToolbar(CAknToolbar *)
CAknView::ShowToolbarOnViewActivation(TBool)
CAknView::StatusPane()const
CAknView::StopDisplayingMenuBar()
CAknView::StopDisplayingToolbar()
CAknView::Toolbar()const
CAknView::ToolbarShownOnViewActivation()const
CAknView::ViewActivatedL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::ViewDeactivated()
CAknView::ViewId()const
CAknView::ViewScreenDeviceChangedL()
CAknView::~CAknView()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CPslnFWPluginInterface::CreateIconL()
CPslnFWPluginInterface::CustomOperationL(TAny *,TAny *)
CPslnFWPluginInterface::GetCaptionL(TDes &)const
CPslnFWPluginInterface::GetLocationTypeAndIndex(TPslnFWLocationType &,TInt &)const
CPslnFWPluginInterface::GetTabTextL(TDes &)const
CPslnFWPluginInterface::NewL(const TUid,CAknViewAppUi *)
CPslnFWPluginInterface::~CPslnFWPluginInterface()
Inherited Enumerations
CPslnFWPluginInterface:TPslnFWLocationType
Protected Attributes
CPslnFWBaseContainer * iContainer
TInt iCurrentItem
TInt iMyTabIndex
CAknNavigationControlContainer * iNaviControlContainer
CAknNavigationDecorator * iNaviPaneContext
TVwsViewId iPrevViewId
RConeResourceLoader iResourceLoader
TInt iTopItemIndex
Inherited Attributes
CAknView::iCoeEnv
CPslnFWPluginInterface::iAppUi

Constructor & Destructor Documentation

CPslnFWBaseView()

IMPORT_C CPslnFWBaseView ( )

C++ default constructor

~CPslnFWBaseView()

IMPORT_C ~CPslnFWBaseView ( )

Destructor.

Member Functions Documentation

ConstructL()

IMPORT_C void ConstructL ( ) [pure virtual]

Symbian OS default constructor.

Container()

IMPORT_C CPslnFWBaseContainer * Container ( )

Returns the container this view has.

CreateContainerL()

IMPORT_C void CreateContainerL ( ) [protected, virtual]

Creates container,

CreateNaviPaneContextL(TInt)

IMPORT_C void CreateNaviPaneContextL ( TInt aResourceId ) [protected, virtual]

Deprecated.

Parameters

TInt aResourceId

DoActivateL(const TVwsViewId &, TUid, const TDesC8 &)

IMPORT_C void DoActivateL ( const TVwsViewId & aPrevViewId,
TUid aCustomMessageId,
const TDesC8 & aCustomMessage
) [virtual]

From CAknView . Called when view is activated.

Parameters

const TVwsViewId & aPrevViewId previous view id.
TUid aCustomMessageId custom message id.
const TDesC8 & aCustomMessage custom message content.

DoDeactivate()

IMPORT_C void DoDeactivate ( ) [virtual]

From CAknView . Called when view is deactivated.

GetTabIndex()

IMPORT_C TInt GetTabIndex ( ) const

Returns the real tab index for the plugin. See API SetTabIndex for details, when using this API might be necessary. It is recommended that this API is used instead of hardcoded constants for tab index, since Psln Framework might assign the plugin to some other location than the plugin prefers.

HandleCommandL(TInt)

IMPORT_C void HandleCommandL ( TInt aCommand ) [protected, virtual]

Handles Download and Help commands. Unknown commands are forwarded to appUi.

Parameters

TInt aCommand command ID - it should match commands given in the psln.hrh.

HandleListBoxEventL(CEikListBox *, TListBoxEvent)

void HandleListBoxEventL ( CEikListBox * aListBox,
TListBoxEvent aEventType
) [protected]

From MEikListBoxObserver . Handles listbox events.

Parameters

CEikListBox * aListBox listbox pointer.
TListBoxEvent aEventType event type.

HandleListBoxSelectionL()

void HandleListBoxSelectionL ( ) [private, pure virtual]

Handles listbox selection. Called by HandleListBoxEventL. Implement by sub-class.

IsValidLocation(const TInt &)

TBool IsValidLocation ( const TInt & aLoc ) const [private]

Checks if the tab group is not one of the static views' locations.

Parameters

const TInt & aLoc

NewContainerL()

IMPORT_C void NewContainerL ( ) [protected, pure virtual]

Create new container. Called by DoActivateL() . Implemented by sub-class.

OpenLocalizedResourceFileL(const TDesC &, RConeResourceLoader &)

IMPORT_C void OpenLocalizedResourceFileL ( const TDesC & aResourceFileName,
RConeResourceLoader & aResourceLoader
)

Opens the nearest localized resourcefile using aResourceLoader. aResourceLoader should be opened only once before closing it. Otherwise it will raise a panic. Therefore it is better to have multiple resource loaders. Uses KDC_RESOURCE_FILES_DIR.

Parameters

const TDesC & aResourceFileName Drive and name of resource file in format <path>:<rsc_file_name>
RConeResourceLoader & aResourceLoader Resource loader for the resource. The loader must not be opened allready or it will raise a panic. It is caller's responsibility to close the resource loader after using the resource.

OpenLocalizedResourceFileL(const TDesC &, RConeResourceLoader &, const TDesC *)

IMPORT_C void OpenLocalizedResourceFileL ( const TDesC & aResourceFileName,
RConeResourceLoader & aResourceLoader,
const TDesC * aPath
)

Sames as above, except API user can defined path where to look for resource file.

Parameters

const TDesC & aResourceFileName Drive and name of resource file in format <path>:<rsc_file_name>
RConeResourceLoader & aResourceLoader Resource loader for the resource. The loader must not be opened allready or it will raise a panic. It is caller's responsibility to close the resource loader after using the resource.
const TDesC * aPath Path to the resource file. Preferably use data caging literals.

SetCurrentItem(TInt)

IMPORT_C void SetCurrentItem ( TInt aIndex ) [virtual]

This function is used to set the current item in the listbox.

Parameters

TInt aIndex Current item.

SetMiddleSoftKeyLabelL(const TInt, const TInt)

IMPORT_C void SetMiddleSoftKeyLabelL ( const TInt aResourceId,
const TInt aCommandId
) [protected, virtual]

Adds given resource text as MSK to CBA.

Since
S60 v3.1

Parameters

const TInt aResourceId middle softkey label.
const TInt aCommandId command that should be performed when MSK is pressed.

SetNaviPaneDecorator(CAknNavigationDecorator *)

IMPORT_C void SetNaviPaneDecorator ( CAknNavigationDecorator * aDecorator ) [virtual]

Overrides default navi pane decorator with given one.

Parameters

CAknNavigationDecorator * aDecorator navi pane decorator to use.

SetNaviPaneL()

IMPORT_C void SetNaviPaneL ( ) [protected, virtual]

Sets the correct navi pane for the view (eg. tabs, string etc.). Use when tab group is not to be shown, or plugin handles the tab group itself.

SetNaviPaneL(const TInt)

IMPORT_C void SetNaviPaneL ( const TInt aTabLocation ) [protected, virtual]

Sets the correct navi pane for the view (eg. tabs, string etc.).

Parameters

const TInt aTabLocation indicates the location of view within the Appui owned tabgroup.

SetTabIndex(TInt)

IMPORT_C void SetTabIndex ( TInt aMyTabIndex )

Sets tab index for the view. Since application might insert the view into a tab group with different location than the plugin wants. It is necessary that the application informs plugin the real location. Negative index or index that are greater than tabgroup's last position are ignored.

Parameters

TInt aMyTabIndex real tab index of the plugin in the tab group.

SetTitlePaneL(TInt &)

IMPORT_C void SetTitlePaneL ( TInt & aResourceId ) [protected, virtual]
Plugins should implement this virtual method. It allows that the plugin provides a resource ID that the framework should use as title text for the view.
Since
5.0 NOTE that the resource file should be loaded and open.

Parameters

TInt & aResourceId resource ID of title text to use.

Member Data Documentation

CPslnFWBaseContainer * iContainer

CPslnFWBaseContainer * iContainer [protected]

Pointer to the container Own.

TInt iCurrentItem

TInt iCurrentItem [protected]

Currently selected listbox item.

TInt iMyTabIndex

TInt iMyTabIndex [protected]

Real tab group index for the view.

CAknNavigationControlContainer * iNaviControlContainer

CAknNavigationControlContainer * iNaviControlContainer [protected]

Pointer to the navi control container Not own.

CAknNavigationDecorator * iNaviPaneContext

CAknNavigationDecorator * iNaviPaneContext [protected]

Navi pane. Not own.

TVwsViewId iPrevViewId

TVwsViewId iPrevViewId [protected]

View UID that was previously active before this view was activated.

RConeResourceLoader iResourceLoader

RConeResourceLoader iResourceLoader [protected]

Resource loader.

TInt iTopItemIndex

TInt iTopItemIndex [protected]

First item in the listbox.