⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mylistboxappview.h

📁 symbian界面设计.关于LISTBOX的经典的例子,适合所有初学者和爱好SYMBIAN的工程师
💻 H
字号:
/*
============================================================================
 Name		: MyListBoxAppView.h
 Author	  : davey
 Copyright   : It is a software by davey
 Description : Declares view class for application.
============================================================================
*/

#ifndef __MYLISTBOXAPPVIEW_h__
#define __MYLISTBOXAPPVIEW_h__

// INCLUDES
#include <coecntrl.h>
#include <eiklbo.h>  // MEikListBoxObserver
   
// FORWARD DECLARATIONS
class CCustomListBox;

// CLASS DECLARATION

/**
 *  CMyListBoxAppView container control class.
 */
class CMyListBoxAppView: public CCoeControl,
						 public MEikListBoxObserver
	{
public: // constructors and destructor
	void ConstructL(const TRect& aRect);
	~CMyListBoxAppView();

public:
	CCustomListBox* ListBox()
	{ return iListBox; }
	
	static CMyListBoxAppView* CMyListBoxAppView::NewL( const TRect& aRect );
    static CMyListBoxAppView* CMyListBoxAppView::NewLC( const TRect& aRect );

	TBool IsDoubleLine()
	{ return iIsDoubleLine; }

	void UpdateListBoxL(TBool aIsDoubleLine);

private: // from CCoeControl
	void SizeChanged();
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl(TInt aIndex) const;
	void Draw(const TRect& aRect) const;
	virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
		TEventCode aType);

private: // from MEikListBoxObserver
	virtual void HandleListBoxEventL(CEikListBox* aListBox,
		TListBoxEvent aEventType);

private: // New functions
	void CreateListBoxL();
        
private: //data
	CCustomListBox* iListBox;
	TBool           iIsDoubleLine;
		// ETrue if the list box displays double line item.
		// EFalse if the list box displayes one line item.
	};

#endif // __MYLISTBOXAPPVIEW_h__

// End of File

⌨️ 快捷键说明

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