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 voidConstructL()
IMPORT_C CPslnFWBaseContainer *Container()
IMPORT_C voidDoActivateL(const TVwsViewId &, TUid, const TDesC8 &)
IMPORT_C voidDoDeactivate()
IMPORT_C TIntGetTabIndex()
IMPORT_C voidOpenLocalizedResourceFileL(const TDesC &, RConeResourceLoader &)
IMPORT_C voidOpenLocalizedResourceFileL(const TDesC &, RConeResourceLoader &, const TDesC *)
IMPORT_C voidSetCurrentItem(TInt)
IMPORT_C voidSetNaviPaneDecorator(CAknNavigationDecorator *)
IMPORT_C voidSetTabIndex(TInt)
Protected Member Functions
IMPORT_C voidCreateContainerL()
IMPORT_C voidCreateNaviPaneContextL(TInt)
IMPORT_C voidHandleCommandL(TInt)
voidHandleListBoxEventL(CEikListBox *, TListBoxEvent)
IMPORT_C voidNewContainerL()
IMPORT_C voidSetMiddleSoftKeyLabelL(const TInt, const TInt)
IMPORT_C voidSetNaviPaneL()
IMPORT_C voidSetNaviPaneL(const TInt)
IMPORT_C voidSetTitlePaneL(TInt &)
Private Member Functions
voidHandleListBoxSelectionL()
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
RConeResourceLoaderiResourceLoader
TInt iTopItemIndex
Inherited Attributes
CAknView::iCoeEnv
CPslnFWPluginInterface::iAppUi

Constructor & Destructor Documentation

CPslnFWBaseView()

IMPORT_CCPslnFWBaseView()

C++ default constructor

~CPslnFWBaseView()

IMPORT_C~CPslnFWBaseView()

Destructor.

Member Functions Documentation

ConstructL()

IMPORT_C voidConstructL()[pure virtual]

Symbian OS default constructor.

Container()

IMPORT_C CPslnFWBaseContainer *Container()

Returns the container this view has.

CreateContainerL()

IMPORT_C voidCreateContainerL()[protected, virtual]

Creates container,

CreateNaviPaneContextL(TInt)

IMPORT_C voidCreateNaviPaneContextL(TIntaResourceId)[protected, virtual]

Deprecated.

Parameters

TInt aResourceId

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

IMPORT_C voidDoActivateL(const TVwsViewId &aPrevViewId,
TUidaCustomMessageId,
const TDesC8 &aCustomMessage
)[virtual]

From CAknView. Called when view is activated.

Parameters

const TVwsViewId & aPrevViewIdprevious view id.
TUid aCustomMessageIdcustom message id.
const TDesC8 & aCustomMessagecustom message content.

DoDeactivate()

IMPORT_C voidDoDeactivate()[virtual]

From CAknView. Called when view is deactivated.

GetTabIndex()

IMPORT_C TIntGetTabIndex()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 voidHandleCommandL(TIntaCommand)[protected, virtual]

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

Parameters

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

HandleListBoxEventL(CEikListBox *, TListBoxEvent)

voidHandleListBoxEventL(CEikListBox *aListBox,
TListBoxEventaEventType
)[protected]

From MEikListBoxObserver. Handles listbox events.

Parameters

CEikListBox * aListBoxlistbox pointer.
TListBoxEvent aEventTypeevent type.

HandleListBoxSelectionL()

voidHandleListBoxSelectionL()[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 voidNewContainerL()[protected, pure virtual]

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

OpenLocalizedResourceFileL(const TDesC &, RConeResourceLoader &)

IMPORT_C voidOpenLocalizedResourceFileL(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 & aResourceFileNameDrive and name of resource file in format <path>:<rsc_file_name>
RConeResourceLoader & aResourceLoaderResource 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 voidOpenLocalizedResourceFileL(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 & aResourceFileNameDrive and name of resource file in format <path>:<rsc_file_name>
RConeResourceLoader & aResourceLoaderResource 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 * aPathPath to the resource file. Preferably use data caging literals.

SetCurrentItem(TInt)

IMPORT_C voidSetCurrentItem(TIntaIndex)[virtual]

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

Parameters

TInt aIndexCurrent item.

SetMiddleSoftKeyLabelL(const TInt, const TInt)

IMPORT_C voidSetMiddleSoftKeyLabelL(const TIntaResourceId,
const TIntaCommandId
)[protected, virtual]

Adds given resource text as MSK to CBA.

Since
S60 v3.1

Parameters

const TInt aResourceIdmiddle softkey label.
const TInt aCommandIdcommand that should be performed when MSK is pressed.

SetNaviPaneDecorator(CAknNavigationDecorator *)

IMPORT_C voidSetNaviPaneDecorator(CAknNavigationDecorator *aDecorator)[virtual]

Overrides default navi pane decorator with given one.

Parameters

CAknNavigationDecorator * aDecoratornavi pane decorator to use.

SetNaviPaneL()

IMPORT_C voidSetNaviPaneL()[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 voidSetNaviPaneL(const TIntaTabLocation)[protected, virtual]

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

Parameters

const TInt aTabLocationindicates the location of view within the Appui owned tabgroup.

SetTabIndex(TInt)

IMPORT_C voidSetTabIndex(TIntaMyTabIndex)

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 aMyTabIndexreal tab index of the plugin in the tab group.

SetTitlePaneL(TInt &)

IMPORT_C voidSetTitlePaneL(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 & aResourceIdresource 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

RConeResourceLoaderiResourceLoader[protected]

Resource loader.

TInt iTopItemIndex

TInt iTopItemIndex[protected]

First item in the listbox.