chxavselectsettingsview.cpp
来自「symbian 下的helix player源代码」· C++ 代码 · 共 131 行
CPP
131 行
/****************************************************************************
* chxavselectsettingsview.cpp
* ---------------------------
*
* Synopsis:
*
* Target:
* Symbian OS
*
*
* (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
*
*****************************************************************************/
// Includes from this project...
#include "chxavmisc.h"
#include "chxavplayerui.h"
#include "chxavsettingsview.h"
#include "chxavselectsettingsview.h"
#include "chxavselectsettingsviewwindow.h"
#include "hxapihelp.h"
#include "realplayer.hrh"
#include "realplayer.mbg"
#include "hxsym_debug.h"
#include "chxavcleanupstack.h"
///////////////////////////////////
//
CHXAvSelectSettingsView::CHXAvSelectSettingsView(TInt idxView, CHXAvPlayerUI* playerUI)
: CHXAvViewBase(idxView, playerUI)
, m_idxCurrent(0)
{
}
CHXAvSelectSettingsView::~CHXAvSelectSettingsView()
{
}
////////////////////////////////////////////////////////////
//
void CHXAvSelectSettingsView::ConstructL()
{
BaseConstructL(R_AVP_SELECT_SETTINGS_VIEW_INFO);
}
///////////////////////////////////
//
void CHXAvSelectSettingsView::UpdateViewStateL()
{
m_spWindow->UpdateTopAndBottomL();
}
///////////////////////////////////
//
CCoeControl* CHXAvSelectSettingsView::CreateViewWindowForActivatingViewL()
{
DPRINTF(SYMP_INFO, ("CHXAvSelectSettingsView::CreateViewWindowForActivatingViewL()\n"));
if( !m_spWindow )
{
m_spWindow = new (ELeave) CHXAvSelectSettingsViewWindow(this);
m_spWindow->ConstructL(ClientRect(), m_idxCurrent);
}
return m_spWindow.raw_ptr();
}
///////////////////////////////////
//
void CHXAvSelectSettingsView::FinishViewDeactivateL()
{
DPRINTF(SYMP_INFO, ("CHXAvSelectSettingsView::FinishViewDeactivateL()\n"));
m_spWindow = 0;
}
////////////////////////////////////////////////////////////////
//
void CHXAvSelectSettingsView::LaunchSettingsViewL()
{
HX_ASSERT(m_spWindow);
// prepare the settings view with the page to initially show
CAknView* pView = m_playerUI->View(TUid::Uid(CHXAvPlayerUI::VID_SettingsView));
HX_ASSERT(pView);
CHXAvSettingsView* pSettingsView = static_cast<CHXAvSettingsView*>(pView);
m_idxCurrent = m_spWindow->GetCurrentSelectionIndex();
pSettingsView->SetActivePageIndexL(m_idxCurrent);
// activate settings view
m_playerUI->ActivateLocalViewL(TUid::Uid(CHXAvPlayerUI::VID_SettingsView));
}
////////////////////////////////////////////////////////////////
//
void CHXAvSelectSettingsView::ResetCurrentIndex(TInt idx)
{
m_idxCurrent = idx;
}
///////////////////////////////////
//
void
CHXAvSelectSettingsView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
{
if(R_AVP_SELECT_SETTINGS_MENU_PANE == aResourceId)
{
CHXAvMisc::InitHelpMenuItem(aMenuPane);
}
}
////////////////////////////////////////////////////////////////
//
// this view gets first crack at command; unknowns forwarded to appui
//
void CHXAvSelectSettingsView::HandleCommandL(TInt command)
{
DPRINTF(SYMP_INFO, ("CHXAvSelectSettingsView::SaveChangesL(): HandleCommandL(%d)\n", command));
switch(command)
{
case EOpenSettings:
case EAknSoftkeyOk:
LaunchSettingsViewL();
break;
default:
AppUi()->HandleCommandL(command);
break;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?