|
|
|||
Location:
QikSlider.h
Link against: qikctl.lib
class CQikSlider : public CCoeControl, public MQikControlStreamInterface, public MQikTextRepresentationInterface;
This class provides a slider control that can be used to set the value of a parameter such as contrast, brightness, volume, etc. Associated resource is QIK_SLIDER.
MQikTextRepresentationInterface - MQikTextRepresentationInterface should be implemented by controls that are normally shown in a container pop-out e.gMQikControlStreamInterface - MQikControlStreamInterface is used by controls to be able to handle cancel behaviour from e.gMObjectProvider - An interface that allows an object to be part of a network of object providersCBase - Base class for all classes to be instantiated on the heapCCoeControl - Control base class from which all other controls are derivedCQikSlider - This class provides a slider control that can be used to set the value of a parameter such as contrast, brightness, volume, etcDefined in CQikSlider:
CQikSlider(), ConstructFromResourceL(), ConstructL(), CurrentValue(), Draw(), EMirroredLayout, ESliderTextPercentage, ESnapToMarkers, EVerticalLayout, GetColorUseListL(), HandlePointerEventL(), HandleResourceChange(), MinimumSize(), MopSupplyObject(), OfferKeyEventL(), PositionChanged(), RestoreUserDataL(), SetControlValueObserver(), SetMaxValueL(), SetMinValueL(), SetNumberOfMarkersL(), SetValue(), SizeChanged(), StoreUserDataL(), TFlags, TextRepresentationL(), ~CQikSlider()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from CCoeControl:
AccumulatedZoom(),
ActivateGc(),
ActivateL(),
BackedUpWindow(),
Background(),
CapturesPointer(),
ClaimPointerGrab(),
CloseWindow(),
ComponentControl(),
Components(),
ControlContext(),
ControlEnv(),
CopyControlContextFrom(),
CountComponentControls(),
CreateBackedUpWindowL(),
CreateWindowL(),
DeactivateGc(),
DrawBackground(),
DrawDeferred(),
DrawForeground(),
DrawNow(),
DrawableWindow(),
EAbsoluteZoom,
ERelativeZoom,
EnableDragEvents(),
FindBackground(),
FindFontProvider(),
FocusChanged(),
GetColor(),
GetGc(),
GetHelpContext(),
GrabbingComponent(),
HandleComponentControlsResourceChange(),
HandleControlArrayEventL(),
HandlePointerBufferReadyL(),
HandleRedrawEvent(),
HasBorder(),
HitTest(),
IgnoreEventsUntilNextPointerUp(),
Index(),
InitComponentArrayL(),
InputCapabilities(),
IsActivated(),
IsBackedUp(),
IsBeingDestroyed(),
IsBlank(),
IsDimmed(),
IsFocused(),
IsNonFocusing(),
IsReadyToDraw(),
IsVisible(),
LayoutManager(),
MakeVisible(),
MaximumWidth(),
Observer(),
OverrideColorL(),
OwnsWindow(),
Parent(),
Position(),
PositionRelativeToScreen(),
PrepareForFocusGainL(),
PrepareForFocusLossL(),
Rect(),
RecursivelyMergedInputCapabilities(),
ReportEventL(),
RequestRelayout(),
Reserved_CCoeControl_10(),
Reserved_CCoeControl_11(),
Reserved_CCoeControl_12(),
Reserved_CCoeControl_13(),
ResetGc(),
ScreenFont(),
SetAdjacent(),
SetAllowStrayPointers(),
SetBackground(),
SetBlank(),
SetCanDrawOutsideRect(),
SetComponentsToInheritVisibility(),
SetContainerWindowL(),
SetControlContext(),
SetCornerAndSize(),
SetDimmed(),
SetExtent(),
SetExtentToWholeScreen(),
SetFocus(),
SetFocusing(),
SetFontProviderL(),
SetGc(),
SetGloballyCapturing(),
SetHitTest(),
SetLayoutManagerL(),
SetMaximumWidth(),
SetMopParent(),
SetNeighbor(),
SetNonFocusing(),
SetObserver(),
SetParent(),
SetPointerCapture(),
SetPosition(),
SetRect(),
SetSize(),
SetSizeWithoutNotification(),
SetTextBaselineSpacing(),
SetUniqueHandle(),
SetZoomFactorL(),
Size(),
SystemGc(),
TZoomType,
TextBaselineOffset(),
TextDrawer(),
UniqueHandle(),
Window(),
WriteInternalStateL(),
ZoomWithType(),
iCoeEnv,
iContext,
iPosition,
iSize
Inherited from MObjectProvider:
MopGetObject(),
MopGetObjectNoChaining()
IMPORT_C CQikSlider();
Default constructor.
This function constructs an uninitialised CQikSlider . The function should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() (to initialise the slider's values from a resource file) or ConstructL() (if no resource file is used).
IMPORT_C ~CQikSlider();
Destructor. The destructor frees all memory owned by this object, prior to its destruction.
IMPORT_C void ConstructL(TInt aMinValue, TInt aMaxValue, TInt aFlags=0);
Second phase construction. This function completes the construction of a newly-allocated slider object. This function should be used instead of ConstructFromResourceL() when not initialising from a resource file.
The function creates the slider, and sets its maximum and minimum values. A flag may be set to force the slider to snap to the markers.
|
IMPORT_C TInt CurrentValue() const;
Gets the current value of the slider.
|
IMPORT_C void SetNumberOfMarkersL(TInt aNumberOfMarkers);
Method for setting number of visible markers in the slider. The slider could take a minimum of two markers and there has to be at least 5 pixels between the markers. The total number of markers can not exceed the difference between the maximum and minimum values of the slider. It is built into the control to adjust for out of range number of markers. Could be called again anytime at runtime. Default number of markers is set to two, one in the beginning and one in the end of the slider.
|
IMPORT_C void SetValue(TInt aValue);
Sets the value of the slider.
|
IMPORT_C void SetMinValueL(TInt aMinValue);
Sets the slider's minimum value.
Leaves if aMinValue is outside the minimum marker position.
|
IMPORT_C void SetMaxValueL(TInt aMaxValue);
Sets the slider's maximum value.
|
virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
Second phase construction from a resource.
This function completes the construction of a newly-allocated slider from a QIK_SLIDER resource. The maximum and minimum slider values, and slider flags are read from the resource.
|
virtual IMPORT_C void HandleResourceChange(TInt aType);
Handles a change to the control's resources. The types of resources handled (of type aType ) are those which are shared across the environment, e.g. colors or fonts.
|
virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;
Gets the list of logical colors used to draw the control. The list includes an explanation of how each color is used, and is appended to aColorUseList .
|
virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Handles key events offered to the control by the control environment.
This function provides an appropriate implementation of CCoeControl::OfferKeyEventL() .
|
|
virtual IMPORT_C HBufC *TextRepresentationL() const;
This method shall return a textual representation of the controls current value
|
virtual IMPORT_C void SetControlValueObserver(MQikControlValueObserver *aObserver);
This method is used to set the control value observer that shall later be notified of control value changes.
|
protected: virtual IMPORT_C void StoreUserDataL(RWriteStream &aWriteStream) const;
Write the current value of the control to aWriteStream
|
protected: virtual IMPORT_C void RestoreUserDataL(RReadStream &aReadStream);
Read the previously written value of the control from aReadStream
|
protected: virtual IMPORT_C void SizeChanged();
Handles a change in the size of this control. This function is called by the control framework.
protected: virtual IMPORT_C void Draw(const TRect &aRect) const;
Draws the slider to the screen. This function is called by the control framework.
|
CCoeControl::Draw()protected: virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);
Handles pointer events. This function is called by the control framework to handle when the pointer is used to move the slider. Note that this control can handle drag events.
|
protected: virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
Gets an object whose type is encapsulated by the specified TTypeUid object.
|
|
TFlags
Slider flags.
|