CAknSlider Class Reference

class CAknSlider : public CEikBorderedControl
Public Member Functions
CAknSlider ()
~CAknSlider ()
IMPORT_C void ConstructFromResourceL ( TResourceReader &)
IMPORT_C void ConstructFromResourceL ( CCoeControl *, TInt , TResourceReader &)
IMPORT_C CFbsBitmap * CreateBitmapL ( TInt , TInt )
IMPORT_C CFbsBitmap * CreateBitmapL ( TInt , TInt , TInt )
IMPORT_C CGulIcon * CreateSetStyleListBoxIconL ( TInt , TInt )
IMPORT_C CGulIcon * CreateSetStyleListBoxIconL ( TInt , TInt , TInt )
IMPORT_C HBufC * CreateValueTextInHBufCL ( TInt , TInt )
IMPORT_C TInt DecimalPlaces ()
IMPORT_C void EnableDrag ()
IMPORT_C void FocusChanged ( TDrawNow )
IMPORT_C void GetRange ( TInt &, TInt &)
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C void HandleResourceChange ( TInt )
TSize MinimumSize ()
IMPORT_C TInt NumberOfLines ()
TKeyResponse OfferKeyEventL (const TKeyEvent &, TEventCode )
IMPORT_C TAknOrientation Orientation ()
IMPORT_C TUint32 PositionIndicators ()
void ReportMarkerDragEvent ( TBool )
IMPORT_C void SetDecimalPlaces ( TInt )
IMPORT_C void SetGraphics ( TInt , CFbsBitmap *, CFbsBitmap *)
IMPORT_C void SetMaximumTextL (const TDesC &)
IMPORT_C void SetMinimumTextL (const TDesC &)
IMPORT_C void SetPositionIndicators ( TUint32 )
IMPORT_C void SetRange ( TInt , TInt )
IMPORT_C void SetStepSize ( TInt )
IMPORT_C void SetTickInterval ( TUint )
IMPORT_C void SetTicksEnabled ( TBool )
IMPORT_C void SetValueL ( TInt )
TInt StepSize ()
void SuppressDrawing ( TBool )
IMPORT_C TUint TickInterval ()
IMPORT_C TBool TicksEnabled ()
IMPORT_C void UseDefaultGraphics ( TInt )
IMPORT_C TBool UsesDefaultGraphics ( TInt )
IMPORT_C TInt Value ()
Protected Member Functions
IMPORT_C CCoeControl * ComponentControl ( TInt )
IMPORT_C TInt CountComponentControls ()
void Draw (const TRect &)
IMPORT_C void SetValueTextL ()
void SizeChanged ()
Private Member Functions
TInt CalcAlignedValue (const TPoint &)
void ConstructL ()
void CreateDecoratorImageFromResourceL ( TInt )
void DoSetValueTextL ( TDes &, TInt , const CAknSliderData &)
void DrawHorizontal ( TBool )
void DrawHorizontalLine ( CWindowGc &)
void DrawHorizontalTickMarks ( CWindowGc &)
void DrawVertical ( TBool )
void DrawVerticalLine ( CWindowGc &)
void DrawVerticalTickMarks ( CWindowGc &)
IMPORT_C void * ExtensionInterface ( TUid )
TInt FeedbackIntensity ()
void FetchGfx (TAknSliderGfx &, TInt , const TSize &)
void FormSliderLayout1 ()
void FormSliderLayout2 ()
void FormSliderLayout3 ()
void FormatWithOrWithoutTokenL ( TDes &, const TDesC &, const TDesC &)
void GetMarkerRect ( TRect &)
void HorizontalSliderLayout ()
TInt IndicationDrawCallbackL ( TAny *)
void InitializeBitmapsL ()
TInt Layout ()
void MIDPFormSliderLayout ()
TPoint MarkerPos ()
TSize MarkerSize ()
TInt MaximumValue ()
TInt MinimumValue ()
void ModifyFeedback ()
TInt Range ()
void SetLabelColor ()
void SettingsItemSliderLayout ()
CAknSliderData * SliderData ()
void SmallDirectionIndicationL ()
void StartFeedback (const TPointerEvent *, TTimeIntervalMicroSeconds32 )
void StartTimerL ()
void StopFeedback ()
TRect TouchActiveArea ()
void TranslateValueL ( TInt , TBool )
void VerticalSliderLayout ()
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::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
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::GetColor(TInt,TRgb &)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::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::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::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const
Public Member Enumerations
enum anonymous { EPosFilling  = 0x01, EPosMarker  = 0x02 }
enum anonymous { EDragMarkerStart  = 1000, EDragMarkerEnd }
enum TSliderGfxElements {
EElemEmptyLeftCap , EElemEmptyRightCap , EElemEmptyLine , EElemFilledLine , EElemFilledLeftCap , EElemFilledRightCap , EElemMarker , EElemTickMark , EElemMarkerSelected
}
Inherited Enumerations
CCoeControl:TZoomType
Private Attributes
TRgb iColor
CAknSliderData * iData
TBool iEditable
CAknSliderExtension * iExt
CEikImage * iImage
TRect iLineRect
TRect iMarkerArea
CFbsBitmap * iMarkerBmp
CFbsBitmap * iMarkerMaskBmp
CEikLabel * iMaxLabel
CEikLabel * iMinLabel
HBufC * iSingularText
TInt iSpare
TInt iValue
CEikLabel * iValueLabel
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CAknSlider()

IMPORT_C CAknSlider ( )

Default Constructor.

~CAknSlider()

IMPORT_C ~CAknSlider ( )

Destructor.

Member Functions Documentation

CalcAlignedValue(const TPoint &)

TInt CalcAlignedValue ( const TPoint & aPoint ) [private]

Parameters

const TPoint & aPoint

ComponentControl(TInt)

IMPORT_C CCoeControl * ComponentControl ( TInt aIndex ) const [protected, virtual]

From CCoeControl , Returns pointer to particular component

Parameters

TInt aIndex Index whose control's pointer has to returned.

ConstructFromResourceL(TResourceReader &)

IMPORT_C void ConstructFromResourceL ( TResourceReader & aReader ) [virtual]

From CCoeControl , essential for Dialog/Form construction.

Parameters

TResourceReader & aReader which reads the values specified in the resource file

ConstructFromResourceL(CCoeControl *, TInt, TResourceReader &)

IMPORT_C void ConstructFromResourceL ( CCoeControl * aParent,
TInt aValue,
TResourceReader & aReader
)

This function is used for constructing the control.

Parameters

CCoeControl * aParent Pointer to the parent control. aValue Current value of the slider control.
TInt aValue
TResourceReader & aReader which reads the values specified in the resource file.

ConstructL()

void ConstructL ( ) [private]

This function creates the bitmaps and labels. Also it sets the container window for the labels.

CountComponentControls()

IMPORT_C TInt CountComponentControls ( ) const [protected, virtual]

From CCoeControl , Returns number of components.

CreateBitmapL(TInt, TInt)

IMPORT_C CFbsBitmap * CreateBitmapL ( TInt aValue,
TInt aResourceId
) [static]

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

Parameters

TInt aValue Current value
TInt aResourceId Slider resource that contains minimum and maximum values

CreateBitmapL(TInt, TInt, TInt)

IMPORT_C CFbsBitmap * CreateBitmapL ( TInt aValue,
TInt aMinimumValue,
TInt aMaximumValue
) [static]

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

Parameters

TInt aValue Current value
TInt aMinimumValue Slider minimum value
TInt aMaximumValue Slider maximum value

CreateDecoratorImageFromResourceL(TInt)

void CreateDecoratorImageFromResourceL ( TInt aImageResourceId ) [private]

Parameters

TInt aImageResourceId

CreateSetStyleListBoxIconL(TInt, TInt)

IMPORT_C CGulIcon * CreateSetStyleListBoxIconL ( TInt aValue,
TInt aResourceId
) [static]

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

Parameters

TInt aValue Current value
TInt aResourceId Slider resource that contains minimum and maximum values

CreateSetStyleListBoxIconL(TInt, TInt, TInt)

IMPORT_C CGulIcon * CreateSetStyleListBoxIconL ( TInt aValue,
TInt aMinimumValue,
TInt aMaximumValue
) [static]

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

Parameters

TInt aValue Current value
TInt aMinimumValue Slider minimum value
TInt aMaximumValue Slider maximum value

CreateValueTextInHBufCL(TInt, TInt)

IMPORT_C HBufC * CreateValueTextInHBufCL ( TInt aValue,
TInt aResourceId
) [static]

This routine can be used to combine the resource for a Slider with a value to get the same value text that you would get if you had the instantiated control

Parameters

TInt aValue The value to format
TInt aResourceId AKN_SLIDER resource id

DecimalPlaces()

IMPORT_C TInt DecimalPlaces ( ) const

Returns the value of decimal place.

DoSetValueTextL(TDes &, TInt, const CAknSliderData &)

void DoSetValueTextL ( TDes & valueBuf,
TInt aValue,
const CAknSliderData & aResourceData
) [private, static]

static routine for setting the value text.

Parameters

TDes & valueBuf Buffer to hold the result. Must be big enough to hold value label as formatted from the resources and value provided, though it is protected from overflow. Contained text will be truncated to KValueLabelTextMaxLength
TInt aValue Slider value to format
const CAknSliderData & aResourceData resource Id to read from

Draw(const TRect &)

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

From CCoeControl , Drawing function which draws the control

Parameters

const TRect & aRect Specified area to be drawn

DrawHorizontal(TBool)

void DrawHorizontal ( TBool aDrawMarker ) const [private]

Parameters

TBool aDrawMarker

DrawHorizontalLine(CWindowGc &)

void DrawHorizontalLine ( CWindowGc & aGc ) const [private]

Parameters

CWindowGc & aGc

DrawHorizontalTickMarks(CWindowGc &)

void DrawHorizontalTickMarks ( CWindowGc & aGc ) const [private]

Parameters

CWindowGc & aGc

DrawVertical(TBool)

void DrawVertical ( TBool aDrawMarker ) const [private]

Parameters

TBool aDrawMarker

DrawVerticalLine(CWindowGc &)

void DrawVerticalLine ( CWindowGc & aGc ) const [private]

Parameters

CWindowGc & aGc

DrawVerticalTickMarks(CWindowGc &)

void DrawVerticalTickMarks ( CWindowGc & aGc ) const [private]

Parameters

CWindowGc & aGc

EnableDrag()

IMPORT_C void EnableDrag ( )

ExtensionInterface(TUid)

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

Parameters

TUid aInterface

FeedbackIntensity()

TInt FeedbackIntensity ( ) [private]

FetchGfx(TAknSliderGfx &, TInt, const TSize &)

void FetchGfx ( TAknSliderGfx & aGfx,
TInt aElement,
const TSize & aSize
) const [private]

Parameters

TAknSliderGfx & aGfx
TInt aElement
const TSize & aSize

FocusChanged(TDrawNow)

IMPORT_C void FocusChanged ( TDrawNow aDrawNow ) [virtual]

This function will be called when focus changed.

Parameters

TDrawNow aDrawNow if the control needs to call DrawNow().

FormSliderLayout1()

void FormSliderLayout1 ( ) [private]

FormSliderLayout2()

void FormSliderLayout2 ( ) [private]

FormSliderLayout3()

void FormSliderLayout3 ( ) [private]

FormatWithOrWithoutTokenL(TDes &, const TDesC &, const TDesC &)

void FormatWithOrWithoutTokenL ( TDes & aOutput,
const TDesC & aFormat,
const TDesC & aValue
) [private, static]

This class is a utility to protect StringLoader::Format from being called without a formatting token.

StringLoader is used in current implementation. See StringLoader::Format for the semantics of the parameters.

The other thing to note is that the output for descriptor must be able to accept up to KValueLabelTextMaxLength characters.

Parameters

TDes & aOutput Output of format operation
const TDesC & aFormat Formatting descriptor.
const TDesC & aValue Descriptor to substitute for the U token potentially present in the formatting descriptor.

GetMarkerRect(TRect &)

void GetMarkerRect ( TRect & aRect ) const [private]

Parameters

TRect & aRect

GetRange(TInt &, TInt &)

IMPORT_C void GetRange ( TInt & aMinimumValue,
TInt & aMaximumValue
)

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

Since
3.2

Parameters

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

HandlePointerEventL(const TPointerEvent &)

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

From CCoeControl . Handles pointer event

Parameters

const TPointerEvent & aPointerEvent Pointer event to be handled

HandleResourceChange(TInt)

IMPORT_C void HandleResourceChange ( TInt aType ) [virtual]

This function toggles between edit and view modes

Parameters

TInt aType Specifies the mode.

HorizontalSliderLayout()

void HorizontalSliderLayout ( ) [private]

IndicationDrawCallbackL(TAny *)

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

Parameters

TAny * aThis

InitializeBitmapsL()

void InitializeBitmapsL ( ) [private]

Layout()

TInt Layout ( ) const [private]

MIDPFormSliderLayout()

void MIDPFormSliderLayout ( ) [private]

MarkerPos()

TPoint MarkerPos ( ) const [private]

MarkerSize()

TSize MarkerSize ( ) const [private]

MaximumValue()

TInt MaximumValue ( ) const [private]

MinimumSize()

TSize MinimumSize ( ) [virtual]

From CCoeControl , returns the size of the control. And yes, this method is non-const.

MinimumValue()

TInt MinimumValue ( ) const [private]

ModifyFeedback()

void ModifyFeedback ( ) [private]

NumberOfLines()

IMPORT_C TInt NumberOfLines ( ) const

This function is used specifically in the forms. (For Forms/Dialogs to use with LAF) Returns the number of lines on the control.

OfferKeyEventL(const TKeyEvent &, TEventCode)

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

From CCoeControl , Handles key event.

Parameters

const TKeyEvent & aKeyEvent The key event.
TEventCode aType The type of the event.

Orientation()

IMPORT_C TAknOrientation Orientation ( ) const

Queries the current orientation status.

Since
3.2

PositionIndicators()

IMPORT_C TUint32 PositionIndicators ( ) const

Queries the current status of position indicators.

Since
3.2

Range()

TInt Range ( ) const [private]

ReportMarkerDragEvent(TBool)

void ReportMarkerDragEvent ( TBool aEnable )

Report event for thumb/marker dragging via HandleControlEventL

Since
5.0

Parameters

TBool aEnable

SetDecimalPlaces(TInt)

IMPORT_C void SetDecimalPlaces ( TInt aDecimalPlaces )

Sets the value of decimal places. The legal range is 0 - 9 inclusive.

Parameters

TInt aDecimalPlaces The value of the decimal place

SetGraphics(TInt, CFbsBitmap *, CFbsBitmap *)

IMPORT_C void SetGraphics ( TInt aElement,
CFbsBitmap * aBitmap,
CFbsBitmap * aMask
)

Allows setting custom graphics for a certain slider element. Existing icons (custom or default) for the element are discarded. Note that some elements might not be visible until the corresponding functionality is enabled, see SetPositionIndicators and SetTicksEnabled .

Slider takes care of scaling the given icons to the correct size, provided that they have been created with AknIconUtils or AknsUtils interfaces. It also handles re-scaling the icons if the slider layout changes.

If the custom icons are created by using skin items (e.g. using color from skin), remember to change the icons whenever skin changes, see CCoeControl::HandleResourceChange . In addition, note that slider can be with horizontal or vertical layout, Orientation
Exceptions:
Will panic with EAknPanicInvalidValue if the element ID is invalid or aBitmap is NULL.
Since
3.2

Parameters

TInt aElement The element ID to which the icons are assigned, one of TGfxElements.
CFbsBitmap * aBitmap The icon used for the element, must be non-NULL, ownership is transferred to slider.
CFbsBitmap * aMask Optional mask for the aBitmap, can be NULL, ownership is transferred to slider.

SetLabelColor()

void SetLabelColor ( ) [private]

SetMaximumTextL(const TDesC &)

IMPORT_C void SetMaximumTextL ( const TDesC & aText )

Sets the text to the maximum label.

Parameters

const TDesC & aText The text passed is set to the maximum label

SetMinimumTextL(const TDesC &)

IMPORT_C void SetMinimumTextL ( const TDesC & aText )

Sets the text to the minimum label.

Parameters

const TDesC & aText The text passed is set to the minimum label

SetPositionIndicators(TUint32)

IMPORT_C void SetPositionIndicators ( TUint32 aFlags )

Configures line position indicators, which display the slider's current position. Possible indicators are defined in EPositionIndicator , at least one of them must be defined (to display some position information). Multiple values can be enabled by using bitwise or, e.g. EPosFilling | EPosMarker. The new flags will fully override the old values. The default value is EPosMarker .

Exceptions:
If none of the flags in EPositionIndicator is set, the code defaults silently to EPosMarker .
Since
3.2

Parameters

TUint32 aFlags Bitmask containing flags from EPositionIndicator. At least one flag should be set.

SetRange(TInt, TInt)

IMPORT_C void SetRange ( TInt aMinimumValue,
TInt aMaximumValue
)

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

Parameters

TInt aMinimumValue The minimum value of the slider control
TInt aMaximumValue The maximum value of the slider control

SetStepSize(TInt)

IMPORT_C void SetStepSize ( TInt aStepSize )

Sets the step size. The step size must divide evenly into the Range. This routine should be called after SetRange if either is called.

Parameters

TInt aStepSize The value of the step size

SetTickInterval(TUint)

IMPORT_C void SetTickInterval ( TUint aInterval )

Sets the tick interval used for drawing the tick marks. Tick interval is in the slider range units (not in pixels). If interval value is set to 0, the slider step size is used as tick interval, see SetStepSize . The default interval value is 0.

Since
3.2

Parameters

TUint aInterval The value set as tick interval, always >= 0.

SetTicksEnabled(TBool)

IMPORT_C void SetTicksEnabled ( TBool aStatus )

Enables/disables the tick marks. Tick marks are disabled by default. Enabling tick marks affects only the visual appearance of slider. That is, enabling slider step handling is not changed.

Since
3.2

Parameters

TBool aStatus ETrue to enable tick marks, EFalse to disable.

SetValueL(TInt)

IMPORT_C void SetValueL ( TInt aValue )

Sets the value of the slider control and also updates the iValueLabel text. There are the following constraints on the value: it must be within the current range, it must be at a value that is minimum + N * stepsize. If these are not both true, then the method will Panic

Parameters

TInt aValue Sets the value of the slider.

SetValueTextL()

IMPORT_C void SetValueTextL ( ) [protected]

Sets the text to the value label

SettingsItemSliderLayout()

void SettingsItemSliderLayout ( ) [private]

SizeChanged()

void SizeChanged ( ) [protected, virtual]

From CCoeControl , Called by framework when the view size is changed.

SliderData()

CAknSliderData * SliderData ( ) const [private]

This method is used to trap all the accesses to the internal data. It panics with EAknPanicObjectNotFullyConstructed if iData is not constructed, that is, if 2nd stage construction has not taken place (or has failed).

SmallDirectionIndicationL()

void SmallDirectionIndicationL ( ) [private]

StartFeedback(const TPointerEvent *, TTimeIntervalMicroSeconds32)

void StartFeedback ( const TPointerEvent * aPointerEvent,
TTimeIntervalMicroSeconds32 aTimeout
) [private]

Parameters

const TPointerEvent * aPointerEvent
TTimeIntervalMicroSeconds32 aTimeout

StartTimerL()

void StartTimerL ( ) [private]

StepSize()

TInt StepSize ( ) const

StopFeedback()

void StopFeedback ( ) [private]

SuppressDrawing(TBool)

void SuppressDrawing ( TBool aSuppress )

Parameters

TBool aSuppress

TickInterval()

IMPORT_C TUint TickInterval ( ) const

Queries the current tick interval value.

Since
3.2

TicksEnabled()

IMPORT_C TBool TicksEnabled ( ) const

Queries the current tick mark status.

Since
3.2

TouchActiveArea()

TRect TouchActiveArea ( ) const [private]

Provides the touch active area for setting item slider.

TranslateValueL(TInt, TBool)

void TranslateValueL ( TInt aDelta,
TBool aFeedback = EFalse
) [private]

Parameters

TInt aDelta
TBool aFeedback = EFalse

UseDefaultGraphics(TInt)

IMPORT_C void UseDefaultGraphics ( TInt aElement )

Makes an element to use default graphics. Possible custom graphics for the element is discarded.

Exceptions:
Will panic with EAknPanicInvalidValue if the element index is invalid.
Since
3.2

Parameters

TInt aElement The element ID which should use default graphics, one of TGfxElements.

UsesDefaultGraphics(TInt)

IMPORT_C TBool UsesDefaultGraphics ( TInt aElement ) const

Queries whether some element is using default graphics.

Exceptions:
Will panic with EAknPanicInvalidValue if the element index is invalid.
Since
3.2

Parameters

TInt aElement The element ID which should use default graphics, one of TGfxElements.

Value()

IMPORT_C TInt Value ( ) const

Returns the value of the slider control

VerticalSliderLayout()

void VerticalSliderLayout ( ) [private]

Member Enumerations Documentation

Enum anonymous

Supported slider position indicators.

Since
3.2

Enumerators

EPosFilling = 0x01

Flag for enabling/disabling line filling. With line filling different graphics will be used for the the slider line's left and right sides (the current marker position as pivot). The left side is considered filled line and the right side empty line.

When line filling is enabled the graphics element EElemFilledLine is used for the left side and EElemEmptyLine for the right. If line filling is disabled EElemEmptyLine is used for the whole line.

EPosMarker = 0x02

Flag for enabling/disabling line marker (the knob). While disabled marker is not visible, the marker area will still be used for touch input.

Enum anonymous

Event for slider thumb/marker dragging.

Since
5.0

Enumerators

EDragMarkerStart = 1000

Slider thumb/marker drag start

EDragMarkerEnd

Slider thumb/marker drag end

Enum TSliderGfxElements

Elements that currently support custom graphics.

Since
3.2

Enumerators

EElemEmptyLeftCap

Left cap component of the slider, without filling. Left cap equals to bottom cap in vertical layout.

EElemEmptyRightCap

Right cap component of the slider, without filling. Right cap equals to top cap in vertical layout.

EElemEmptyLine

Line component of the slider, without filling.

EElemFilledLine

Line component of the slider, with filling.

EElemFilledLeftCap

Left cap component of the slider, with filling.

EElemFilledRightCap

Right cap component of the slider, with filling.

EElemMarker

Marker component of the slider.

EElemTickMark

Tick mark component of the slider. Small evenly spaced lines, placed vertically in relation to slider itself.

EElemMarkerSelected

Marker component of the slider when dragged

Member Data Documentation

TRgb iColor

TRgb iColor [private]

CAknSliderData * iData

CAknSliderData * iData [private]

TBool iEditable

TBool iEditable [private]

CAknSliderExtension * iExt

CAknSliderExtension * iExt [private]

CEikImage * iImage

CEikImage * iImage [private]

TRect iLineRect

TRect iLineRect [private]

TRect iMarkerArea

TRect iMarkerArea [private]

CFbsBitmap * iMarkerBmp

CFbsBitmap * iMarkerBmp [private]

CFbsBitmap * iMarkerMaskBmp

CFbsBitmap * iMarkerMaskBmp [private]

CEikLabel * iMaxLabel

CEikLabel * iMaxLabel [private]

CEikLabel * iMinLabel

CEikLabel * iMinLabel [private]

HBufC * iSingularText

HBufC * iSingularText [private]

TInt iSpare

TInt iSpare [private]

TInt iValue

TInt iValue [private]

CEikLabel * iValueLabel

CEikLabel * iValueLabel [private]