Symbian S60 3rd 滚动条控件模块
2010-04-20 15:54:00 来源:WEB开发网//Symbian S60 3rd 滚动条控件模块
//MyEikVScrollBarFrame.h
///////////////////////////////////////////////////
#ifndef __MY_EIK_V_SCROLL_BAR_FRAME_H__
#define __MY_EIK_V_SCROLL_BAR_FRAME_H__
///////////////////////////////////////////////////
#include
#include
//eikcoctl.lib
///////////////////////////////////////////////////
class CEikScrollBarFrame;
class CCoeControl;
///////////////////////////////////////////////////
class MMyEikVScrollBarFrameObserver
{
public:
virtual TAny HandleVScrollBarEvent(TInt aPosVScroll,TInt aRangeVScroll) = 0;
};
///////////////////////////////////////////////////
class CMyEikVScrollBarFrame : public CBase
{
public:
static CMyEikVScrollBarFrame* NewL(CCoeControl* aParentWindow,
MMyEikVScrollBarFrameObserver& aObserver,
TInt aPos = 0,TInt aRange = 100,TBool aShow = ETrue);
~CMyEikVScrollBarFrame();
private:
CMyEikVScrollBarFrame(MMyEikVScrollBarFrameObserver& aObserver);
TAny ConstructL(CCoeControl* aParentWindow,TInt aPos,TInt aRange,TBool aShow);
public:
TAny Show(TBool aShow);
TBool SetPosAndRange(TInt aPosVScroll,TInt aRangeVScroll);
TAny GetPosAndRange(TInt* aPosVScroll,TInt* aRangeVScroll);
public:
TAny SizeChanged();
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
private:
TAny CreateVScrollBar(CCoeControl* aParentWindow);
TAny UpdateScroolBarPosition(TInt aPos,TInt aRange);
private:
TAknDoubleSpanScrollBarModel iVDsSbarModel;
更多精彩
赞助商链接