columnlistview.h

来自「Symbian 视图中加入ListCtrl 多列应用」· C头文件 代码 · 共 97 行

H
97
字号
/*****************************************************************************

 COPYRIGHT All rights reserved Sony Ericsson Mobile Communications AB 2005.



 The software is the copyrighted work of Sony Ericsson Mobile Communications AB.

 The use of the software is subject to the terms of the end-user license

 agreement which accompanies or is included with the software. The software is

 provided "as is" and Sony Ericsson specifically disclaim any warranty or

 condition whatsoever regarding merchantability or fitness for a specific

 purpose, title or non-infringement. No warranty of any kind is made in

 relation to the condition, suitability, availability, accuracy, reliability,

 merchantability and/or non-infringement of the software provided herein.



 *****************************************************************************/

// ColumnListView.h
//
//

#ifndef __COLUMNLISTVIEW_H
#define __COLUMNLISTVIEW_H

#include "ListViews.h"

#include <eikdialg.h> // MCoeControlContext
#include <eikclb.h>   // CEikColumnListBox
#include <coeview.h>  // MCoeView


class CColumnListView : public CCoeControl,
                        public MCoeControlContext,
                        public MCoeView
{
public:

  static CColumnListView* NewL(const TRect& aRect);

  ~CColumnListView();

  void ConstructL(const TRect& aRect);

  TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

  void HandlePointerEventL(const TPointerEvent& aPointerEvent);

  void HandleCommandL(TInt aCommand);

//  void CMusicPlayerListView::HandleListBoxEventL(CEikListBox* aListBox,
//                                                    TListBoxEvent aEventType)
  TBool ListIsValid()  { return iDisplayList; }

public: // from MCoeView
  TVwsViewId ViewId() const;

private:

  void Draw(const TRect& /* aRect */) const;

  TInt CountComponentControls() const;

  CCoeControl* ComponentControl(TInt aIndex) const;

  void ViewActivatedL(const TVwsViewId& aPrevViewId,
                      TUid aCustomMessageId,
                      const TDesC8& aCustomMessage );

  void ViewDeactivated();

  void CreateList(TInt aFlag);

  void PopulateList(CDesCArray *aArray, TInt aFlag);
  
  void LoadGraphicsL();

private:
  HBufC* iTextListEmpty;
  CEikColumnListBox* iListBox;
  TBool iDisplayList;

  TVwsViewId iViewId;


};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?