Symbian S60 3rd 滚动条控件模块
2010-04-20 15:54:00 来源:WEB开发网MMyEikVScrollBarFrameObserver& iObserver;
CEikScrollBarFrame* iScrollBarFrame;
CCoeControl* iParentControl;
TInt iRangeVScroll;
TInt iPosVScroll;
};
///////////////////////////////////////////////////
#endif//__MY_EIK_V_SCROLL_BAR_FRAME_H__
//////////////////////////////////////////////////
//MyEikVScrollBarFrame.h
///////////////////////////////////////////////////
#include
#include
#include “MyEikVScrollBarFrame.h”
///////////////////////////////////////////////////
CMyEikVScrollBarFrame* CMyEikVScrollBarFrame::NewL(CCoeControl* aParentWindow,
MMyEikVScrollBarFrameObserver& aObserver,TInt aPos,TInt aRange,TBool aShow)
{
CMyEikVScrollBarFrame* self = new ( ELeave ) CMyEikVScrollBarFrame(aObserver);
CleanupStack::PushL( self );
self->ConstructL(aParentWindow,aPos,aRange,aShow);
CleanupStack::Pop( self );
return self;
}
CMyEikVScrollBarFrame::~CMyEikVScrollBarFrame()
{
if (iScrollBarFrame){delete iScrollBarFrame;iScrollBarFrame = NULL;}
}
CMyEikVScrollBarFrame::CMyEikVScrollBarFrame(
MMyEikVScrollBarFrameObserver& aObserver):iObserver(aObserver)
{
iScrollBarFrame = NULL;
iParentControl = NULL;
iPosVScroll = 0;
iRangeVScroll = 0;
}
TAny CMyEikVScrollBarFrame::ConstructL(CCoeControl* aParentWindow,TInt aPos,TInt aRange,TBool aShow)
{
iParentControl = aParentWindow;
CreateVScrollBar(aParentWindow);
Show(aShow);
SetPosAndRange(aPos,aRange);
}
TAny CMyEikVScrollBarFrame::UpdateScroolBarPosition(TInt aPos,TInt
更多精彩
赞助商链接