UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

[Index] [Spacer] [Previous] [Next]



Location: EIKCLOCK.H
Link against: eikctl.lib

Class CEikClock

class CEikClock : public CEikBorderedControl, public MEikClockContainer;

Description

Clock control.

An on-screen clock that can be initialised from a CLOCK resource struct, and can be switched between analog and digital display with a pointer tap. CEikClock is implemented as a container control wrapped around a more primitive CEikLocaleConformantClock .

The clock control has an associated resource struct CLOCK and control factory identifier EEikCtClock .

This class is not intended for user derivation.

Derivation

  • MObjectProvider - An interface that allows an object to be part of a network of object providers
  • CBase - Base class for all classes to be instantiated on the heap
  • Members

    Defined in CEikClock:
    ActivateL(), CEikClock(), ClockIsVisible(), ConstructClockL(), ConstructFromResourceL(), Draw(), GetClockPositionAndSize(), GetColorUseListL(), HandlePointerEventL(), HandleResourceChange(), HasBorder(), MakeVisible(), MinimumSize(), PositionChanged(), SetClock(), SizeChanged(), ~CEikClock()

    Inherited from CBase:
    Delete(), Extension_(), operator new()

    Inherited from CCoeControl:
    AccumulatedZoom(), ActivateGc(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), ComponentArrayExists(), Components(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawBackground(), DrawDeferred(), DrawForeground(), DrawNow(), DrawableWindow(), EAbsoluteZoom, ERelativeZoom, EnableDragEvents(), FindBackground(), FindFontProvider(), GetColor(), GetGc(), GetTextDrawer(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandleRedrawEvent(), HitTest(), IgnoreEventsUntilNextPointerUp(), Index(), InitComponentArrayL(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), LayoutManager(), MaximumWidth(), MopNext(), Observer(), OverrideColorL(), OwnsWindow(), Parent(), Position(), PositionRelativeToScreen(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), Reserved_2(), ResetGc(), ScreenFont(), SetAllowStrayPointers(), SetBackground(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetControlContext(), SetCornerAndSize(), SetExtent(), SetExtentToWholeScreen(), SetFocus(), SetFocusing(), SetFontProviderL(), SetGc(), SetGloballyCapturing(), SetHitTest(), SetMaximumWidth(), SetMopParent(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetSize(), SetSizeWithoutNotification(), SetUniqueHandle(), SetZoomFactorL(), Size(), SystemGc(), TZoomType, TextDrawer(), UniqueHandle(), Window(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

    Inherited from CEikBorderedControl:
    Border(), ComponentControl(), CountComponentControls(), FocusChanged(), GetHelpContext(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), InputCapabilities(), MopSupplyObject(), OfferKeyEventL(), PrepareForFocusGainL(), PrepareForFocusLossL(), RequestRelayout(), SetAdjacent(), SetBorder(), SetContainerWindowL(), SetDimmed(), SetLayoutManagerL(), SetNeighbor(), SetParent(), SetTextBaselineSpacing(), TextBaselineOffset(), WriteInternalStateL(), iBorder

    Inherited from MEikBorderedControl:
    ETypeId, anonymous

    Inherited from MObjectProvider:
    MObjectProvider_Reserved1(), MObjectProvider_Reserved2(), MopGetObject(), MopGetObjectNoChaining()


    Construction and destruction


    CEikClock()

    IMPORT_C CEikClock();

    Description

    First phase constructor.

    Complete construction with either ConstructFromResourceL() or SetClock() .


    ~CEikClock()

    virtual IMPORT_C ~CEikClock();

    Description

    Destructor. This function frees all resources owned by this object.

    [Top]


    Member functions


    SetClock()

    IMPORT_C void SetClock(CEikLocaleConformantClock *aClock);

    Description

    Completes construction, setting the primitive clock control owned by this CEikClock . Application developers need only call this function if the clock is not constructed from a resource.

    CEikClock takes full ownership of aClock , and will delete it upon destruction.

    Parameters

    CEikLocaleConformantClock *aClock

    The clock to display.

    Panic codes

    EEikPanicClockClockAlreadyExists

    If the clock has already been set.


    HandlePointerEventL()

    virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);

    Description

    Handles pointer events.

    CEikClock 's response to a pointer tap is to switch between digital and analog clocks if both are available.

    Parameters

    const TPointerEvent &aPointerEvent

    The pointer event.

    See also:


    MakeVisible()

    virtual IMPORT_C void MakeVisible(TBool aVisible);

    Description

    Makes the control visible or invisible. See CCoeControl::MakeVisible() .

    Parameters

    TBool aVisible

    ETrue to make the control visible, EFalse to make it invisible.

    See also:


    ConstructFromResourceL()

    virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aResourceReader);

    Description

    Completes construction from resource.

    The clock's fields are initialised to the values read by aResourceReader from a CLOCK resource. See CCoeControl::ConstructFromResourceL() .

    This function creates a CEikResourceConstructedClock , which is a type of CEikLocaleConformantClock .

    Parameters

    TResourceReader &aResourceReader

    A resource file reader.

    See also:


    ActivateL()

    virtual IMPORT_C void ActivateL();

    Description

    Sets the control as ready to be drawn.

    Sets the background colour to the standard control colour.

    See also:


    MinimumSize()

    virtual IMPORT_C TSize MinimumSize();

    Description

    Gets the minimum size of the control.

    Return value

    TSize

    The clock's minimum size.

    See also:


    HasBorder()

    virtual IMPORT_C TBool HasBorder() const;

    Description

    Tests whether the control has a border.

    Return value

    TBool

    ETrue if this clock has a border, EFalse otherwise.

    See also:


    GetColorUseListL()

    virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;

    Description

    Gets the list of logical colours used to draw the control. The list includes an explanation of how each colour is used, and is appended to aColorUseList .

    Parameters

    CArrayFix< TCoeColorUse > &aColorUseList

    The colour list.


    HandleResourceChange()

    virtual IMPORT_C void HandleResourceChange(TInt aType);

    Description

    Handles a change to the control's resources.

    The types of resources handled are those that are shared across the environment, e.g. colours or fonts.

    Parameters

    TInt aType

    A message UID value.

    See also:


    SizeChanged()

    private: virtual IMPORT_C void SizeChanged();

    Description

    Responds to size changes to sets the size and position of the contents of this control.

    See also:


    PositionChanged()

    private: virtual IMPORT_C void PositionChanged();

    Description

    Sets the position of the clock.

    See also:


    Draw()

    private: virtual IMPORT_C void Draw(const TRect &aRect) const;

    Description

    Sets the color of the clock and calls CEikConformatClock::Draw() method.

    Parameters

    const TRect &aRect

    Not used.


    ClockIsVisible()

    private: virtual IMPORT_C TBool ClockIsVisible(const CEikLocaleConformantClock &aClock) const;

    Description

    Used to see if the clock is visible on the screen.

    Parameters

    const CEikLocaleConformantClock &aClock

    The clock to check.

    Return value

    TBool

    Etrue if the clock is visible. Otherwise EFalse .


    GetClockPositionAndSize()

    private: virtual IMPORT_C void GetClockPositionAndSize(TPoint &aPosition, TSize &aSize, const CEikLocaleConformantClock &aClock, const TSize &aMinimumSize);

    Description

    Gets the position and size of the clock.

    Parameters

    TPoint &aPosition

    The position.

    TSize &aSize

    The size.

    const CEikLocaleConformantClock &aClock

    The clock to get info from.

    const TSize &aMinimumSize

    The minimum size.


    ConstructClockL()

    private: virtual IMPORT_C void ConstructClockL(CEikLocaleConformantClock &aClock);

    Description

    Override this if you want to call the CEikLocaleConformantClock::ConstructL with parameters.

    Parameters

    CEikLocaleConformantClock &aClock

    The clock.