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 void ConstructFromResourceL ( TResourceReader &)
IMPORT_C CFbsBitmap * CreateBitmapL ( TInt )
IMPORT_C CGulIcon * CreateSetDynRangeStyleListBoxIconL ( TInt , TInt , TInt )
IMPORT_C CGulIcon * CreateSetStyleListBoxIconL ( TInt )
IMPORT_C void GetRange ( TInt &, TInt &)
IMPORT_C void HandleNaviDecoratorEventL ( TInt )
void HandleNaviStackChange ( TBool )
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C void HandleResourceChange ( TInt )
TSize MinimumSize ()
TKeyResponse OfferKeyEventL (const TKeyEvent &, TEventCode )
IMPORT_C void SetRange ( TInt , TInt )
IMPORT_C void SetValue ( TInt )
void SuppressDrawing ( TBool )
IMPORT_C TInt Value ()
Protected Member Functions
void Draw (const TRect &)
void SizeChanged ()
Private Member Functions
void CalcVolumeIconAreas (const TInt , const TRect &, TRect &, TRect &)
void CreateNaviIconL ()
void DrawDefaultStyleVolumeControl (const TRect &)
void DrawDynRangeSettingsStyleVolumeControl (const TRect &)
void DrawSettingsStyleVolumeControl (const TRect &)
void DrawSkinnedDefaultStyleVolumeControl (const TRect &)
IMPORT_C void * ExtensionInterface ( TUid )
TInt IndicationDrawCallbackL ( TAny *)
TInt ScaledValue ()
void SetVolumeLayout ( TInt )
void SmallDirectionIndicationL ()
void StartTimerL ()
void UseExtendedTouchArea ()
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_C CAknVolumeControl ( )

C++ default constructor.

~CAknVolumeControl()

IMPORT_C ~CAknVolumeControl ( )

Destructor.

Member Functions Documentation

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

void CalcVolumeIconAreas ( const TInt aVolume,
const TRect & aDrawArea,
TRect & aActiveRect,
TRect & aInactiveRect
) const [private]

Calculates the volume icon areas using given volume value.

Parameters

const TInt aVolume Volume used as the ratio between active and inactive areas.
const TRect & aDrawArea The whole drawing area.
TRect & aActiveRect Drawing area for the active icon.
TRect & aInactiveRect Drawing area for the inactive icon.

ConstructFromResourceL(TResourceReader &)

IMPORT_C void ConstructFromResourceL ( TResourceReader & aReader ) [virtual]

From CCoeControl .

Construct item from given resource.

Parameters

TResourceReader & aReader Resource reader reading the wanted resource set.

CreateBitmapL(TInt)

IMPORT_C CFbsBitmap * CreateBitmapL ( TInt aValue ) [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 aValue Current value (1-10)

CreateNaviIconL()

void CreateNaviIconL ( ) [private]

(Re)create the navi icon

CreateSetDynRangeStyleListBoxIconL(TInt, TInt, TInt)

IMPORT_C CGulIcon * CreateSetDynRangeStyleListBoxIconL ( TInt aValue,
TInt aMinimum,
TInt aMaximum
) [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 aValue Current value (1-10)
TInt aMinimum Minimum for Hi-res volume control
TInt aMaximum Maximum for Hi-res volume control

CreateSetStyleListBoxIconL(TInt)

IMPORT_C CGulIcon * CreateSetStyleListBoxIconL ( TInt aValue ) [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 aValue Current value (1-10)

Draw(const TRect &)

void Draw ( const TRect & aRect ) const [protected, virtual]

From CCoeControl .

Draws every visible item into the specified rectangle.

Parameters

const TRect & aRect the specified rectangle.

DrawDefaultStyleVolumeControl(const TRect &)

void DrawDefaultStyleVolumeControl ( const TRect & aRect ) const [private]

Parameters

const TRect & aRect

DrawDynRangeSettingsStyleVolumeControl(const TRect &)

void DrawDynRangeSettingsStyleVolumeControl ( const TRect & aVolumeArea ) const [private]

Parameters

const TRect & aVolumeArea

DrawSettingsStyleVolumeControl(const TRect &)

void DrawSettingsStyleVolumeControl ( const TRect & aRect ) const [private]

Parameters

const TRect & aRect

DrawSkinnedDefaultStyleVolumeControl(const TRect &)

void DrawSkinnedDefaultStyleVolumeControl ( const TRect & aRect ) const [private]

Parameters

const TRect & aRect

ExtensionInterface(TUid)

IMPORT_C void * ExtensionInterface ( TUid aInterface ) [private, virtual]

Parameters

TUid aInterface

GetRange(TInt &, TInt &)

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

Parameters

TInt & aMinimumValue The minimum value of the volume control
TInt & aMaximumValue The maximum value of the volume control

HandleNaviDecoratorEventL(TInt)

IMPORT_C void HandleNaviDecoratorEventL ( TInt aEventID )

From MAknNaviDecoratorObserver

Handles Navidecorator events (Arrow left and arrow right)

Parameters

TInt aEventID ID of event to be handled

HandleNaviStackChange(TBool)

void HandleNaviStackChange ( TBool aIsOnNaviStack )

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

Parameters

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

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( const TPointerEvent & aPointerEvent ) [virtual]

From CCoeControl .

Handles pointer events.

Parameters

const TPointerEvent & aPointerEvent Pointer event to be handled

HandleResourceChange(TInt)

IMPORT_C void HandleResourceChange ( TInt aType ) [virtual]

From CCoeControl .

Handles the change of CAknVolumeControl's resources.

Parameters

TInt aType Type of resource to change

IndicationDrawCallbackL(TAny *)

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

A callback function for feedback effect.

Parameters

TAny * aThis Pointer 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,
TEventCode aType
) [virtual]

From CCoeControl

Handles key events.

Parameters

const TKeyEvent & aKeyEvent Key event to be handled.
TEventCode aType Type 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 void SetRange ( TInt aMinimumValue,
TInt aMaximumValue
)

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 aMinimumValue The minimum value of the volume control
TInt aMaximumValue The maximum value of the volume control

SetValue(TInt)

IMPORT_C void SetValue ( TInt aValue )

Sets volume.

Parameters

TInt aValue The new volume.

SetVolumeLayout(TInt)

void SetVolumeLayout ( TInt aStyle ) [private]

Parameters

TInt aStyle

SizeChanged()

void SizeChanged ( ) [protected, virtual]

From CCoeControl .

Handles layout change.

SmallDirectionIndicationL()

void SmallDirectionIndicationL ( ) [private]

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

StartTimerL()

void StartTimerL ( ) [private]

Starts a timer for feedback effect visualization

SuppressDrawing(TBool)

void SuppressDrawing ( TBool aSuppress )

Parameters

TBool aSuppress

UseExtendedTouchArea()

void UseExtendedTouchArea ( ) [private]

Value()

IMPORT_C TInt Value ( ) 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]