📄 smsexamplelistboxview.h
字号:
/*
* ============================================================================
* Name : CListboxView from SMSExampleListboxView.h
* Part of : SMSExample
* Created : 12.03.2005 by Forum Nokia
* Description: ListBox view.
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef __MULTIVIEWS_VIEW2_H__
#define __MULTIVIEWS_VIEW2_H__
// INCLUDES
#include <aknview.h>
#include <badesca.h> // CDesC16ArrayFlat
#include <msvstd.h> // TMsvId
// FORWARD DECLARATIONS
class CMarkableListContainer;
class CSMSExampleMtmsEngine;
class CLogView;
/**
* ListBox view.
*/
class CListboxView: public CAknView
{
public:
/**
* Create a CListboxView object.
* @param aEngine Pointer to CSMSExampleMtmsEngine.
* @param aView1 Pointer to CLogView.
* @result a pointer to the created instance of CListboxView.
*/
static CListboxView* NewL(CSMSExampleMtmsEngine* aEngine, CLogView* aView1);
/**
* Create a CListboxView object.
* @param aEngine Pointer to CSMSExampleMtmsEngine.
* @param aView1 Pointer to CLogView.
* @result a pointer to the created instance of CListboxView.
*/
static CListboxView* NewLC(CSMSExampleMtmsEngine* aEngine, CLogView* aView1);
/**
* Destroy the object
*/
~CListboxView();
public:
/**
* Set ListBoxMode (delete, copy, move).
* @see SMSExample.hrh.
* @param aMode ListBox mode.
*/
void SetListBoxMode(TInt aMode);
/**
* Load source folder messages into
* ListBox.
*/
void InitializeListBoxL();
/**
* Set source folder (from which copy or move is performed).
*/
void SetFolderID(TMsvId aFolderID);
/**
* Set target folder (to which folder copy or move is targeted).
*/
void SetTargetFolderID(TMsvId aTargetFolderID);
public: // from CAknView
/**
* Identity of this view to the system.
* @result the ID of view.
*/
TUid Id() const;
/**
* Handle a user command.
* @param aCommand Command to be handled.
*/
void HandleCommandL(TInt aCommand);
/**
* Create the Container class object.
* @param aPrevViewId The id of the previous view.
* @param aCustomMessageId message identifier.
* @param aCustomMessage custom message provided when the view is changed.
*/
void DoActivateL(const TVwsViewId& aPrevViewId,
TUid aCustomMessageId,
const TDesC8& aCustomMessage);
/**
* Remove the container class instance from the App UI's stack and
* deletes the instance.
*/
void DoDeactivate();
/**
* From CAknView reaction if size change.
*/
void HandleClientRectChange();
private:
/**
* Act based on ListBox mode that is currently activated.
* Means moving, copying or deleting messages.
*/
void HandleBasedOnMode();
/**
* Perform the first phase of two phase construction .
* @param aEngine Pointer to CSMSExampleMtmsEngine.
* @param aView1 Pointer to CLogView.
*/
CListboxView(CSMSExampleMtmsEngine* aEngine, CLogView* aView1);
/**
* Perform the second phase construction of a CListboxView object.
*/
void ConstructL();
private:
// Container for this view
CMarkableListContainer* iListBoxContainer;
// SMS engine.
CSMSExampleMtmsEngine* iEngine;
// Log
CLogView* iLogView;
// ListBox action modes. See SMSExample.hrh for modes.
TInt iMode;
// Source folder Id
TMsvId iFolderID;
// Target folder Id
TMsvId iTargetFolderID;
// iIdentifier identifier for this view.
TUid iIdentifier;
};
#endif // __MULTIVIEWS_VIEW2_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -