📄 s60uicodeexrotatecontrol.cpp
字号:
/*
* ==============================================================================
* Name : S60UICodeExRotateControl.cpp
* Part of : S60UICodeEx
* Interface :
* Description :
* Version :
*
* Copyright (c) 2005-2006 Nokia Corporation.
* This material, including documentation and any related
* computer programs, is protected by copyright controlled by
* Nokia Corporation.
* ==============================================================================
*/
// INCLUDE FILES
#include <gulicon.h>
#include <coemain.h>
#include <akniconutils.h>
#include <aknsdrawutils.h>
#include <aknsdatacontext.h>
#include <barsread.h>
#include "S60UICodeEx.h"
#include "S60UICodeExRotateControl.h"
// ============================ MEMBER FUNCTIONS ==============================
// ----------------------------------------------------------------------------
// CS60UICodeExTextControl::NewL
// Two-phased constructor.
// ----------------------------------------------------------------------------
//
CS60UICodeExRotateControl* CS60UICodeExRotateControl::NewL(
const TRect& aRect,
const CCoeControl* aParent )
{
CS60UICodeExRotateControl* self = new ( ELeave )CS60UICodeExRotateControl;
CleanupStack::PushL( self );
self->ConstructL( aRect, aParent );
CleanupStack::Pop(self);
return self;
}
// ----------------------------------------------------------------------------
// CS60UICodeExTextControl::ConstructL
//
// ----------------------------------------------------------------------------
//
void CS60UICodeExRotateControl::ConstructL(
const TRect& aRect,
const CCoeControl* aParent )
{
iFocus = ETrue;
SetContainerWindowL( *aParent );
SetRect( aRect );
ActivateL();
}
// ----------------------------------------------------------------------------
// CS60UICodeExRotateControl::~CS60UICodeExRotateControl
//
// ----------------------------------------------------------------------------
//
CS60UICodeExRotateControl::~CS60UICodeExRotateControl()
{
}
// ----------------------------------------------------------------------------
// CS60UICodeExTextControl::SizeChanged
//
// ----------------------------------------------------------------------------
//
void CS60UICodeExRotateControl::SizeChanged()
{
DrawDeferred();
}
// ----------------------------------------------------------------------------
// CS60UICodeExTextControl::Draw
//
// ----------------------------------------------------------------------------
//
void CS60UICodeExRotateControl::Draw( const TRect& /*aRect*/ ) const
{
CWindowGc& gc = SystemGc();
TRect rect( Rect() );
if(iFocus)
{
// red color
gc.SetPenColor( TRgb( 255, 0, 0 ) );
}
gc.SetPenStyle( CWindowGc::ESolidPen );
gc.SetPenSize( TSize( 1, 1 ) );
gc.DrawRoundRect( rect, TSize( 4, 4 ) );
gc.SetBrushStyle( CWindowGc::ESolidBrush );
gc.SetBrushColor( TRgb(0, 128, 255 ) );
gc.SetPenSize( TSize( 0, 0 ) );
gc.SetPenColor(TRgb( 0, 0, 0 ) );
gc.DrawEllipse(
TRect( rect.iTl.iX + 6, rect.iTl.iY + 6,
rect.iBr.iX - 6, rect.iBr.iY - 6 ) );
}
// ----------------------------------------------------------------------------
// CS60UICodeExTextControl::ControlFocusGained
//
// ----------------------------------------------------------------------------
//
void CS60UICodeExRotateControl::ControlFocusGained(TBool aFocus)
{
iFocus = aFocus;
DrawDeferred();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -