CAknSlider Class Reference

class CAknSlider : public CEikBorderedControl
Public Member Functions
CAknSlider()
~CAknSlider()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructFromResourceL(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 TIntDecimalPlaces()
IMPORT_C voidEnableDrag()
IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C voidGetRange(TInt &, TInt &)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C voidHandleResourceChange(TInt)
TSize MinimumSize()
IMPORT_C TIntNumberOfLines()
TKeyResponse OfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C TAknOrientationOrientation()
IMPORT_C TUint32PositionIndicators()
voidReportMarkerDragEvent(TBool)
IMPORT_C voidSetDecimalPlaces(TInt)
IMPORT_C voidSetGraphics(TInt, CFbsBitmap *, CFbsBitmap *)
IMPORT_C voidSetMaximumTextL(const TDesC &)
IMPORT_C voidSetMinimumTextL(const TDesC &)
IMPORT_C voidSetPositionIndicators(TUint32)
IMPORT_C voidSetRange(TInt, TInt)
IMPORT_C voidSetStepSize(TInt)
IMPORT_C voidSetTickInterval(TUint)
IMPORT_C voidSetTicksEnabled(TBool)
IMPORT_C voidSetValueL(TInt)
TInt StepSize()
voidSuppressDrawing(TBool)
IMPORT_C TUintTickInterval()
IMPORT_C TBoolTicksEnabled()
IMPORT_C voidUseDefaultGraphics(TInt)
IMPORT_C TBoolUsesDefaultGraphics(TInt)
IMPORT_C TIntValue()
Protected Member Functions
IMPORT_C CCoeControl *ComponentControl(TInt)
IMPORT_C TIntCountComponentControls()
voidDraw(const TRect &)
IMPORT_C voidSetValueTextL()
voidSizeChanged()
Private Member Functions
TInt CalcAlignedValue(const TPoint &)
voidConstructL()
voidCreateDecoratorImageFromResourceL(TInt)
voidDoSetValueTextL(TDes &, TInt, const CAknSliderData &)
voidDrawHorizontal(TBool)
voidDrawHorizontalLine(CWindowGc &)
voidDrawHorizontalTickMarks(CWindowGc &)
voidDrawVertical(TBool)
voidDrawVerticalLine(CWindowGc &)
voidDrawVerticalTickMarks(CWindowGc &)
IMPORT_C void *ExtensionInterface(TUid)
TInt FeedbackIntensity()
voidFetchGfx(TAknSliderGfx &, TInt, const TSize &)
voidFormSliderLayout1()
voidFormSliderLayout2()
voidFormSliderLayout3()
voidFormatWithOrWithoutTokenL(TDes &, const TDesC &, const TDesC &)
voidGetMarkerRect(TRect &)
voidHorizontalSliderLayout()
TInt IndicationDrawCallbackL(TAny *)
voidInitializeBitmapsL()
TInt Layout()
voidMIDPFormSliderLayout()
TPoint MarkerPos()
TSize MarkerSize()
TInt MaximumValue()
TInt MinimumValue()
voidModifyFeedback()
TInt Range()
voidSetLabelColor()
voidSettingsItemSliderLayout()
CAknSliderData *SliderData()
voidSmallDirectionIndicationL()
voidStartFeedback(const TPointerEvent *, TTimeIntervalMicroSeconds32)
voidStartTimerL()
voidStopFeedback()
TRect TouchActiveArea()
voidTranslateValueL(TInt, TBool)
voidVerticalSliderLayout()
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
enumanonymous { EPosFilling = 0x01, EPosMarker = 0x02 }
enumanonymous { EDragMarkerStart = 1000, EDragMarkerEnd }
enumTSliderGfxElements {
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_CCAknSlider()

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(TIntaIndex)const [protected, virtual]

From CCoeControl, Returns pointer to particular component

Parameters

TInt aIndexIndex whose control's pointer has to returned.

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

From CCoeControl, essential for Dialog/Form construction.

Parameters

TResourceReader & aReaderwhich reads the values specified in the resource file

ConstructFromResourceL(CCoeControl *, TInt, TResourceReader &)

IMPORT_C voidConstructFromResourceL(CCoeControl *aParent,
TIntaValue,
TResourceReader &aReader
)

This function is used for constructing the control.

Parameters

CCoeControl * aParentPointer to the parent control. aValue Current value of the slider control.
TInt aValue
TResourceReader & aReaderwhich reads the values specified in the resource file.

ConstructL()

voidConstructL()[private]

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

CountComponentControls()

IMPORT_C TIntCountComponentControls()const [protected, virtual]

From CCoeControl, Returns number of components.

CreateBitmapL(TInt, TInt)

IMPORT_C CFbsBitmap *CreateBitmapL(TIntaValue,
TIntaResourceId
)[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 aValueCurrent value
TInt aResourceIdSlider resource that contains minimum and maximum values

CreateBitmapL(TInt, TInt, TInt)

IMPORT_C CFbsBitmap *CreateBitmapL(TIntaValue,
TIntaMinimumValue,
TIntaMaximumValue
)[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 aValueCurrent value
TInt aMinimumValueSlider minimum value
TInt aMaximumValueSlider maximum value

CreateDecoratorImageFromResourceL(TInt)

voidCreateDecoratorImageFromResourceL(TIntaImageResourceId)[private]

Parameters

TInt aImageResourceId

CreateSetStyleListBoxIconL(TInt, TInt)

IMPORT_C CGulIcon *CreateSetStyleListBoxIconL(TIntaValue,
TIntaResourceId
)[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 aValueCurrent value
TInt aResourceIdSlider resource that contains minimum and maximum values

CreateSetStyleListBoxIconL(TInt, TInt, TInt)

IMPORT_C CGulIcon *CreateSetStyleListBoxIconL(TIntaValue,
TIntaMinimumValue,
TIntaMaximumValue
)[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 aValueCurrent value
TInt aMinimumValueSlider minimum value
TInt aMaximumValueSlider maximum value

CreateValueTextInHBufCL(TInt, TInt)

IMPORT_C HBufC *CreateValueTextInHBufCL(TIntaValue,
TIntaResourceId
)[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 aValueThe value to format
TInt aResourceIdAKN_SLIDER resource id

DecimalPlaces()

IMPORT_C TIntDecimalPlaces()const

Returns the value of decimal place.

DoSetValueTextL(TDes &, TInt, const CAknSliderData &)

voidDoSetValueTextL(TDes &valueBuf,
TIntaValue,
const CAknSliderData &aResourceData
)[private, static]

static routine for setting the value text.

Parameters

TDes & valueBufBuffer 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 aValueSlider value to format
const CAknSliderData & aResourceDataresource Id to read from

Draw(const TRect &)

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

From CCoeControl, Drawing function which draws the control

Parameters

const TRect & aRectSpecified area to be drawn

DrawHorizontal(TBool)

voidDrawHorizontal(TBoolaDrawMarker)const [private]

Parameters

TBool aDrawMarker

DrawHorizontalLine(CWindowGc &)

voidDrawHorizontalLine(CWindowGc &aGc)const [private]

Parameters

CWindowGc & aGc

DrawHorizontalTickMarks(CWindowGc &)

voidDrawHorizontalTickMarks(CWindowGc &aGc)const [private]

Parameters

CWindowGc & aGc

DrawVertical(TBool)

voidDrawVertical(TBoolaDrawMarker)const [private]

Parameters

TBool aDrawMarker

DrawVerticalLine(CWindowGc &)

voidDrawVerticalLine(CWindowGc &aGc)const [private]

Parameters

CWindowGc & aGc

DrawVerticalTickMarks(CWindowGc &)

voidDrawVerticalTickMarks(CWindowGc &aGc)const [private]

Parameters

CWindowGc & aGc

EnableDrag()

IMPORT_C voidEnableDrag()

ExtensionInterface(TUid)

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

Parameters

TUid aInterface

FeedbackIntensity()

TInt FeedbackIntensity()[private]

FetchGfx(TAknSliderGfx &, TInt, const TSize &)

voidFetchGfx(TAknSliderGfx &aGfx,
TIntaElement,
const TSize &aSize
)const [private]

Parameters

TAknSliderGfx & aGfx
TInt aElement
const TSize & aSize

FocusChanged(TDrawNow)

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[virtual]

This function will be called when focus changed.

Parameters

TDrawNow aDrawNowif the control needs to call DrawNow().

FormSliderLayout1()

voidFormSliderLayout1()[private]

FormSliderLayout2()

voidFormSliderLayout2()[private]

FormSliderLayout3()

voidFormSliderLayout3()[private]

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

voidFormatWithOrWithoutTokenL(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 & aOutputOutput of format operation
const TDesC & aFormatFormatting descriptor.
const TDesC & aValueDescriptor to substitute for the U token potentially present in the formatting descriptor.

GetMarkerRect(TRect &)

voidGetMarkerRect(TRect &aRect)const [private]

Parameters

TRect & aRect

GetRange(TInt &, TInt &)

IMPORT_C voidGetRange(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 & aMinimumValueThe minimum value of the slider control
TInt & aMaximumValueThe maximum value of the slider control

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl. Handles pointer event

Parameters

const TPointerEvent & aPointerEventPointer event to be handled

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

This function toggles between edit and view modes

Parameters

TInt aTypeSpecifies the mode.

HorizontalSliderLayout()

voidHorizontalSliderLayout()[private]

IndicationDrawCallbackL(TAny *)

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

Parameters

TAny * aThis

InitializeBitmapsL()

voidInitializeBitmapsL()[private]

Layout()

TInt Layout()const [private]

MIDPFormSliderLayout()

voidMIDPFormSliderLayout()[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()

voidModifyFeedback()[private]

NumberOfLines()

IMPORT_C TIntNumberOfLines()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,
TEventCodeaType
)[virtual]

From CCoeControl, Handles key event.

Parameters

const TKeyEvent & aKeyEventThe key event.
TEventCode aTypeThe type of the event.

Orientation()

IMPORT_C TAknOrientationOrientation()const

Queries the current orientation status.

Since
3.2

PositionIndicators()

IMPORT_C TUint32PositionIndicators()const

Queries the current status of position indicators.

Since
3.2

Range()

TInt Range()const [private]

ReportMarkerDragEvent(TBool)

voidReportMarkerDragEvent(TBoolaEnable)

Report event for thumb/marker dragging via HandleControlEventL

Since
5.0

Parameters

TBool aEnable

SetDecimalPlaces(TInt)

IMPORT_C voidSetDecimalPlaces(TIntaDecimalPlaces)

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

Parameters

TInt aDecimalPlacesThe value of the decimal place

SetGraphics(TInt, CFbsBitmap *, CFbsBitmap *)

IMPORT_C voidSetGraphics(TIntaElement,
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 aElementThe element ID to which the icons are assigned, one of TGfxElements.
CFbsBitmap * aBitmapThe icon used for the element, must be non-NULL, ownership is transferred to slider.
CFbsBitmap * aMaskOptional mask for the aBitmap, can be NULL, ownership is transferred to slider.

SetLabelColor()

voidSetLabelColor()[private]

SetMaximumTextL(const TDesC &)

IMPORT_C voidSetMaximumTextL(const TDesC &aText)

Sets the text to the maximum label.

Parameters

const TDesC & aTextThe text passed is set to the maximum label

SetMinimumTextL(const TDesC &)

IMPORT_C voidSetMinimumTextL(const TDesC &aText)

Sets the text to the minimum label.

Parameters

const TDesC & aTextThe text passed is set to the minimum label

SetPositionIndicators(TUint32)

IMPORT_C voidSetPositionIndicators(TUint32aFlags)

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 aFlagsBitmask containing flags from EPositionIndicator. At least one flag should be set.

SetRange(TInt, TInt)

IMPORT_C voidSetRange(TIntaMinimumValue,
TIntaMaximumValue
)

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

Parameters

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

SetStepSize(TInt)

IMPORT_C voidSetStepSize(TIntaStepSize)

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 aStepSizeThe value of the step size

SetTickInterval(TUint)

IMPORT_C voidSetTickInterval(TUintaInterval)

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 aIntervalThe value set as tick interval, always >= 0.

SetTicksEnabled(TBool)

IMPORT_C voidSetTicksEnabled(TBoolaStatus)

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 aStatusETrue to enable tick marks, EFalse to disable.

SetValueL(TInt)

IMPORT_C voidSetValueL(TIntaValue)

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 aValueSets the value of the slider.

SetValueTextL()

IMPORT_C voidSetValueTextL()[protected]

Sets the text to the value label

SettingsItemSliderLayout()

voidSettingsItemSliderLayout()[private]

SizeChanged()

voidSizeChanged()[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()

voidSmallDirectionIndicationL()[private]

StartFeedback(const TPointerEvent *, TTimeIntervalMicroSeconds32)

voidStartFeedback(const TPointerEvent *aPointerEvent,
TTimeIntervalMicroSeconds32aTimeout
)[private]

Parameters

const TPointerEvent * aPointerEvent
TTimeIntervalMicroSeconds32 aTimeout

StartTimerL()

voidStartTimerL()[private]

StepSize()

TInt StepSize()const

StopFeedback()

voidStopFeedback()[private]

SuppressDrawing(TBool)

voidSuppressDrawing(TBoolaSuppress)

Parameters

TBool aSuppress

TickInterval()

IMPORT_C TUintTickInterval()const

Queries the current tick interval value.

Since
3.2

TicksEnabled()

IMPORT_C TBoolTicksEnabled()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)

voidTranslateValueL(TIntaDelta,
TBoolaFeedback = EFalse
)[private]

Parameters

TInt aDelta
TBool aFeedback = EFalse

UseDefaultGraphics(TInt)

IMPORT_C voidUseDefaultGraphics(TIntaElement)

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 aElementThe element ID which should use default graphics, one of TGfxElements.

UsesDefaultGraphics(TInt)

IMPORT_C TBoolUsesDefaultGraphics(TIntaElement)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 aElementThe element ID which should use default graphics, one of TGfxElements.

Value()

IMPORT_C TIntValue()const

Returns the value of the slider control

VerticalSliderLayout()

voidVerticalSliderLayout()[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]