📄 s60uiexamplelist.cpp
字号:
// Copyright (c) 2006 Nokia Corporation.
#include "S60UIExampleList.h"
#include "S60UIExample.hrh"
// ----------------------------------------------------------------------------
// CAknExSettingListListbox::CreateSettingItemL()
// Updates descripter array for list box
// ----------------------------------------------------------------------------
//
CAknSettingItem* CS60UIExampleList::CreateSettingItemL(TInt aIdentifier)
{
CAknSettingItem* settingItem = NULL;
switch (aIdentifier)
{
case ESpeedSettingItem:
settingItem = new (ELeave) CAknSliderSettingItem(aIdentifier,
*iSpeed);
break;
case EBacktrackingSettingItem:
settingItem = new (ELeave) CAknBinaryPopupSettingItem(aIdentifier,
*iBacktrack);
break;
default:
break;
}
return settingItem;
}
// ------------------------------------------------------------------------------
// CS60UIExampleList::SetData()
// Set ListItem data
// ------------------------------------------------------------------------------
//
void CS60UIExampleList::SetData(TInt& aVolume, TInt& aSpeed, TBool& aBacktrack)
{
iVolume = &aVolume;
iSpeed = &aSpeed;
iBacktrack = &aBacktrack;
}
// -----------------------------------------------------------------------------
// CS60UIExampleList::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void CS60UIExampleList::SizeChanged()
{
if (ListBox())
{
ListBox()->SetRect(Rect());
}
}
// -----------------------------------------------------------------------------
// CS60UIExampleList::HandleResourceChange()
// Called by framework when screen size changes. Use to cause necessary
// resizing to be performed.
// -----------------------------------------------------------------------------
//
void CS60UIExampleList::HandleResourceChange(TInt aType)
{
CCoeControl::HandleResourceChange(aType);
if (aType == KEikDynamicLayoutVariantSwitch)
{
// Screen size has changed. Get the new Main Pane size
TRect rect;
AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
// Pass it on. Eventually SizeChanged() performs the necessary
// resizing
SetRect(rect);
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -