Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <CLOCK.H>
Link against: clock.lib

Class RAnalogClock

class RAnalogClock : public RClock;

Description

An analogue clock.

Derivation

Members

Defined in RAnalogClock:

Inherited from RAnim:

Inherited from RAnimWithUtils:

Inherited from RClock:

Inherited from RTimeDevice:

See also:


Construction and destruction


RAnalogClock(RAnimDll &,const RWindowBase &)

IMPORT_C RAnalogClock(RAnimDll &aAnimDll, const RWindowBase &aWindow);

Description

Creates an analogue clock object.

To complete construction, you must call RAnalogClock::ConstructL(TTimeIntervalSeconds,const TPoint &,const TSize &,const TMargins &,const STimeDeviceShadow &,TInt,TInt,TInt,const SAnalogDisplayAmPm *).

Parameters

RAnimDll &aAnimDll

This RAnimDll must have been loaded with the server-side clock animation DLL, clocka.dll

const RWindowBase &aWindow

Window to which to add the clock


ConstructL(TTimeIntervalSeconds,const TPoint &,const TSize &,const TMargins &,const STimeDeviceShadow &,TInt,TInt,TInt,const SAnalogDisplayAmPm *)

IMPORT_C void ConstructL(TTimeIntervalSeconds aUniversalTimeOffset, const TPoint &aPosition, const TSize &aSize, const TMargins &aMargins, const STimeDeviceShadow &aShadow, TInt aFaceHandle, TInt aFaceMaskHandle, TInt aNumHands, const SAnalogDisplayAmPm *aAmPm=0);

Description

Completes construction of an analogue clock.

The bitmaps specified in aFaceHandle and aFaceMaskHandle cannot be destroyed until the clock has been completely constructed, including all necessary calls to RAnalogClock::AddHandL(const TAnalogDisplayHand &).

Parameters

TTimeIntervalSeconds aUniversalTimeOffset

Initial time for the clock, expressed as an offset from universal time

const TPoint &aPosition

Clock's on-screen position

const TSize &aSize

Clock's on-screen size

const TMargins &aMargins

Margin settings

const STimeDeviceShadow &aShadow

Shadow settings

TInt aFaceHandle

Handle to a bitmap of the clock face. You can obtain a bitmap handle through CFbsBitmap::Handle()const.

TInt aFaceMaskHandle

Handle to a bitmap mask for the clock face. This can be 0, if no mask is required.

TInt aNumHands

Number of hands on the clock. For each hand, you must call RAnalogClock::AddHandL(const TAnalogDisplayHand &).

const SAnalogDisplayAmPm *aAmPm

Options for displaying AM/PM

See also:

[Top]


Member functions


AddHandL(const TAnalogDisplayHand &)

IMPORT_C void AddHandL(const TAnalogDisplayHand &aHand);

Description

Adds a hand to the clock.

This function can only be called after full construction of the clock.

Parameters

const TAnalogDisplayHand &aHand

Settings for the hand.


SetBackgroundColor(TRgb,TRgb)

IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor, TRgb aShadowColor);

Description

Sets the background colour for the clock.

This function can only be called after full construction of the clock.

Parameters

TRgb aBackgroundColor

Background colour.

TRgb aShadowColor

Shadow colour.


SetTextColor(TRgb)

IMPORT_C void SetTextColor(TRgb aTextColor);

Description

Sets the text colour.

This function can only be called after full construction of the clock.

Parameters

TRgb aTextColor

Text colour.


SetPenColor(const TRgb)

IMPORT_C void SetPenColor(const TRgb aPenColor);

Description

Sets the pen colour for the hands.

This function can only be called after full construction of the clock.

Parameters

const TRgb aPenColor

Pen colour.


SetBrushColor(const TRgb)

IMPORT_C void SetBrushColor(const TRgb aBrushColor);

Description

Sets the brush colour for the hands.

This function can only be called after full construction of the clock.

Parameters

const TRgb aBrushColor

Brush colour.