CAknVolumeControl Class Reference

class CAknVolumeControl : public CAknControl

Used for controlling the volume setting on the phone.

Inherits from

Public Member Functions
CAknVolumeControl()
~CAknVolumeControl()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C CFbsBitmap *CreateBitmapL(TInt)
IMPORT_C CGulIcon *CreateSetDynRangeStyleListBoxIconL(TInt, TInt, TInt)
IMPORT_C CGulIcon *CreateSetStyleListBoxIconL(TInt)
IMPORT_C voidGetRange(TInt &, TInt &)
IMPORT_C voidHandleNaviDecoratorEventL(TInt)
voidHandleNaviStackChange(TBool)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C voidHandleResourceChange(TInt)
TSize MinimumSize()
TKeyResponse OfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidSetRange(TInt, TInt)
IMPORT_C voidSetValue(TInt)
voidSuppressDrawing(TBool)
IMPORT_C TIntValue()
Protected Member Functions
voidDraw(const TRect &)
voidSizeChanged()
Private Member Functions
voidCalcVolumeIconAreas(const TInt, const TRect &, TRect &, TRect &)
voidCreateNaviIconL()
voidDrawDefaultStyleVolumeControl(const TRect &)
voidDrawDynRangeSettingsStyleVolumeControl(const TRect &)
voidDrawSettingsStyleVolumeControl(const TRect &)
voidDrawSkinnedDefaultStyleVolumeControl(const TRect &)
IMPORT_C void *ExtensionInterface(TUid)
TInt IndicationDrawCallbackL(TAny *)
TInt ScaledValue()
voidSetVolumeLayout(TInt)
voidSmallDirectionIndicationL()
voidStartTimerL()
voidUseExtendedTouchArea()
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::ComponentControl(TInt)const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CountComponentControls()const
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::FocusChanged(TDrawNow)
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HasBorder()const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::InputCapabilities()const
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAdjacent(TInt)
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateL(RWriteStream &)const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
Inherited Enumerations
CCoeControl:TZoomType
Private Attributes
CFbsBitmap *iBitmap
TPoint iBmpPos
CVolumeExtension *iExtension
CFbsBitmap *iMaskBitmap
TInt iSpare1
TPoint iStartPos
TInt iStyle
TInt iValue
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize

Constructor & Destructor Documentation

CAknVolumeControl()

IMPORT_CCAknVolumeControl()

C++ default constructor.

~CAknVolumeControl()

IMPORT_C~CAknVolumeControl()

Destructor.

Member Functions Documentation

CalcVolumeIconAreas(const TInt, const TRect &, TRect &, TRect &)

voidCalcVolumeIconAreas(const TIntaVolume,
const TRect &aDrawArea,
TRect &aActiveRect,
TRect &aInactiveRect
)const [private]

Calculates the volume icon areas using given volume value.

Parameters

const TInt aVolumeVolume used as the ratio between active and inactive areas.
const TRect & aDrawAreaThe whole drawing area.
TRect & aActiveRectDrawing area for the active icon.
TRect & aInactiveRectDrawing area for the inactive icon.

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

From CCoeControl.

Construct item from given resource.

Parameters

TResourceReader & aReaderResource reader reading the wanted resource set.

CreateBitmapL(TInt)

IMPORT_C CFbsBitmap *CreateBitmapL(TIntaValue)[static]

Creates volume bitmap to "list pane for setting item" (setting option item volume graphic). Ownership of the returned bitmap is transfered to the caller.

Parameters

TInt aValueCurrent value (1-10)

CreateNaviIconL()

voidCreateNaviIconL()[private]

(Re)create the navi icon

CreateSetDynRangeStyleListBoxIconL(TInt, TInt, TInt)

IMPORT_C CGulIcon *CreateSetDynRangeStyleListBoxIconL(TIntaValue,
TIntaMinimum,
TIntaMaximum
)[static]

Creates Hi-res volume icon to "list pane for setting item" (setting option item volume graphic). Ownership of the returned icon is transfered to the caller.

Since
3.2

Parameters

TInt aValueCurrent value (1-10)
TInt aMinimumMinimum for Hi-res volume control
TInt aMaximumMaximum for Hi-res volume control

CreateSetStyleListBoxIconL(TInt)

IMPORT_C CGulIcon *CreateSetStyleListBoxIconL(TIntaValue)[static]

Creates general volume icon to "list pane for setting item" (setting option item volume graphic). Ownership of the returned icon is transfered to the caller.

Parameters

TInt aValueCurrent value (1-10)

Draw(const TRect &)

voidDraw(const TRect &aRect)const [protected, virtual]

From CCoeControl.

Draws every visible item into the specified rectangle.

Parameters

const TRect & aRectthe specified rectangle.

DrawDefaultStyleVolumeControl(const TRect &)

voidDrawDefaultStyleVolumeControl(const TRect &aRect)const [private]

Parameters

const TRect & aRect

DrawDynRangeSettingsStyleVolumeControl(const TRect &)

voidDrawDynRangeSettingsStyleVolumeControl(const TRect &aVolumeArea)const [private]

Parameters

const TRect & aVolumeArea

DrawSettingsStyleVolumeControl(const TRect &)

voidDrawSettingsStyleVolumeControl(const TRect &aRect)const [private]

Parameters

const TRect & aRect

DrawSkinnedDefaultStyleVolumeControl(const TRect &)

voidDrawSkinnedDefaultStyleVolumeControl(const TRect &aRect)const [private]

Parameters

const TRect & aRect

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Parameters

TUid aInterface

GetRange(TInt &, TInt &)

IMPORT_C voidGetRange(TInt &aMinimumValue,
TInt &aMaximumValue
)
Gets the range of the volume control.
Since
3.2

Parameters

TInt & aMinimumValueThe minimum value of the volume control
TInt & aMaximumValueThe maximum value of the volume control

HandleNaviDecoratorEventL(TInt)

IMPORT_C voidHandleNaviDecoratorEventL(TIntaEventID)

From MAknNaviDecoratorObserver

Handles Navidecorator events (Arrow left and arrow right)

Parameters

TInt aEventIDID of event to be handled

HandleNaviStackChange(TBool)

voidHandleNaviStackChange(TBoolaIsOnNaviStack)

Informs the volume control about whether or not it's placed on the navi pane's control stack

Parameters

TBool aIsOnNaviStackETrue if the control is on the navi stack, EFalse otherwise.

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl.

Handles pointer events.

Parameters

const TPointerEvent & aPointerEventPointer event to be handled

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CCoeControl.

Handles the change of CAknVolumeControl's resources.

Parameters

TInt aTypeType of resource to change

IndicationDrawCallbackL(TAny *)

TInt IndicationDrawCallbackL(TAny *aThis)[private, static]

A callback function for feedback effect.

Parameters

TAny * aThisPointer to this volume control.

MinimumSize()

TSize MinimumSize()[virtual]

From CCoeControl.

Gets minimun size of layout rectangle.

OfferKeyEventL(const TKeyEvent &, TEventCode)

TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

From CCoeControl

Handles key events.

Parameters

const TKeyEvent & aKeyEventKey event to be handled.
TEventCode aTypeType of the event.

ScaledValue()

TInt ScaledValue()const [private]

Utility function for scaling the value between iMiminumValue and iMaximumValue to a range of [0-10]. This is needed for old drawing functions that assume only 10 step volume control.

SetRange(TInt, TInt)

IMPORT_C voidSetRange(TIntaMinimumValue,
TIntaMaximumValue
)

Sets the range of the volume control. Maximum value must be greater than the minimum value, or the method will Panic.

Since
3.2
Exceptions:
Will panic with EAknPanicInvalidValue if the minimum value is greater or equal than maximum value.

Parameters

TInt aMinimumValueThe minimum value of the volume control
TInt aMaximumValueThe maximum value of the volume control

SetValue(TInt)

IMPORT_C voidSetValue(TIntaValue)

Sets volume.

Parameters

TInt aValueThe new volume.

SetVolumeLayout(TInt)

voidSetVolumeLayout(TIntaStyle)[private]

Parameters

TInt aStyle

SizeChanged()

voidSizeChanged()[protected, virtual]

From CCoeControl.

Handles layout change.

SmallDirectionIndicationL()

voidSmallDirectionIndicationL()[private]

Implementation of the feedback effect (Blinking when the volume value is set to the max/min value).

StartTimerL()

voidStartTimerL()[private]

Starts a timer for feedback effect visualization

SuppressDrawing(TBool)

voidSuppressDrawing(TBoolaSuppress)

Parameters

TBool aSuppress

UseExtendedTouchArea()

voidUseExtendedTouchArea()[private]

Value()

IMPORT_C TIntValue()const

Gets volume.

Member Data Documentation

CFbsBitmap * iBitmap

CFbsBitmap *iBitmap[private]

TPoint iBmpPos

TPoint iBmpPos[private]

CVolumeExtension * iExtension

CVolumeExtension *iExtension[private]

CFbsBitmap * iMaskBitmap

CFbsBitmap *iMaskBitmap[private]

TInt iSpare1

TInt iSpare1[private]

TPoint iStartPos

TPoint iStartPos[private]

TInt iStyle

TInt iStyle[private]

TInt iValue

TInt iValue[private]