btnviewcontainer.h

来自「symbian下自制按钮实现」· C头文件 代码 · 共 49 行

H
49
字号
// BtnViewContainer.h: interface for the CBtnViewContainer class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __BTNVIEWCONTAINER_HH__
#define __BTNVIEWCONTAINER_HH__

#include <coecntrl.h>	

#include "BtnCtrl.h"

#include <eiklabel.h>

class CBtnViewContainer :public CCoeControl
{
public:
	CBtnViewContainer( );
	virtual ~CBtnViewContainer();

	static CBtnViewContainer* NewL( const TRect& aRect,	const CCoeControl* aParent );
	static CBtnViewContainer* NewLC(const TRect& aRect, const CCoeControl* aParent) ;        
	void ConstructL( const TRect& aRect, const CCoeControl* aParent );

public: //来自于 CCoeControl 
	TInt CountComponentControls( ) const;
	CCoeControl* ComponentControl( TInt aIndex ) const;
	TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );

protected:
    void Draw( const TRect& aRect ) const ;
	void SizeChanged(  ) ;

private: //来自于 CCoeControl 
	void LayoutControls( ) ;
	

private:
	void InitControlsL( ) ;

private: //私有数据

   CBtnCtrl *  igBtn[3] ;
   TInt   inCurrBtn ;  //当前焦点的按钮
  // CEikLabel * iLabel1 ; 
   enum TControls{ EBtnUp=0, EBtnDown ,EBtnView, ELastControl } ;

};

#endif // !defined(AFX_BTNVIEWCONTAINER_H__7BDB0876_3CF0_439E_9E63_3933AEF22950__INCLUDED_)

⌨️ 快捷键说明

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