CAknNoteControl Class Reference

#include <mw/aknnotecontrol.h>

class CAknNoteControl : public CAknControl

Inherits from

Nested Classes and Structures

Public Member Functions
CAknNoteControl()
virtual ~CAknNoteControl()
CAknNoteAttributes *Attributes()
IMPORT_C TIntCancelAnimation()
virtual voidConstructFromResourceL(TResourceReader &)
voidCreateDefaultImageL()
IMPORT_C voidCreateProgressBarL()
IMPORT_C CEikProgressInfo *GetProgressInfo()
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TIntIncrementBarsAndDraw(TInt)
IMPORT_C voidLayout()
virtual TSize MinimumSize()
IMPORT_C TIntNoteHeight()
TInt NoteLayout()
IMPORT_C TIntNoteWidth()
IMPORT_C TIntNumberOfLines()
voidReset()
IMPORT_C voidResetText()
IMPORT_C voidSetAnimationL(TInt)
IMPORT_C voidSetBgRect(const TRect &, const TPoint &, TBool)
IMPORT_C voidSetDynamicTextL(const TDesC &)
IMPORT_C voidSetFinalProgressValue(TInt)
IMPORT_C voidSetIconL(CEikImage *)
IMPORT_C voidSetImageL(CEikImage *)
IMPORT_C voidSetLabelReserveLengthL(TInt, TInt, TInt)
IMPORT_C voidSetTextL(const TDesC &)
IMPORT_C voidSetTextL(const TDesC &, TInt)
IMPORT_C voidSetTextNumberL(const TInt)
IMPORT_C voidSetTextPluralityL(const TBool)
IMPORT_C voidStartAnimationL()
IMPORT_C voidUpdateAndFormatLabelsL(const TDesC &)
IMPORT_C voidUpdateLabels(const TDesC &, const TDesC &, const TDesC &)
IMPORT_C voidUpdateLabelsL(const TDesC &, const TDesC &, const TDesC &)
voidWindowLayout(TAknWindowLineLayout &)
Protected Member Functions
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
Inherited Enumerations
CCoeControl:TZoomType
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::CCoeControlArray
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::FocusChanged(TDrawNow)
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)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::HandleResourceChange(TInt)
CCoeControl::HasBorder()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::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
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::SetAdjacent(TInt)
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::WriteInternalStateL(RWriteStream &)const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()

Detailed Description

The control for a note dialog.

Manage layout of elements in a note dialog:- the text, the image and animation, the progress bar.

Since
Series 60 0.9

See also: CAknNoteDialog, CAknNoteAttributes, CAknText

Constructor & Destructor Documentation

CAknNoteControl ( )

IMPORT_CCAknNoteControl()

C++ default constructor.

~CAknNoteControl ( )

IMPORT_C~CAknNoteControl()[virtual]

Destructor.

Member Function Documentation

Attributes ( )

CAknNoteAttributes *Attributes()const

Accessor to note attributes stored in CAknNoteAttributes.

Returns: Pointer to CAknNoteAttributes.

CancelAnimation ( )

IMPORT_C TIntCancelAnimation()

Stop the note animation. Calls CAknBitmapAnimation::CancelAnimation() for animation object.

See also: CAknBitmapAnimation

Returns: KErrNone if cancellation successful, KErrGenreral if there was no animation object, otherwise another of the system-wide error codes.

ConstructFromResourceL ( TResourceReader & )

voidConstructFromResourceL(TResourceReader &aRes)[virtual]

Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)

Constructs controls from a resource file.

ParameterDescription
aResThe resource reader with which to access AVKON_NOTE resource.

CreateDefaultImageL ( )

voidCreateDefaultImageL()

Updates the image according to the current skin.

CreateProgressBarL ( )

IMPORT_C voidCreateProgressBarL()

Create the progress bar.

See also: CEikProgressInfo

GetProgressInfo ( )

IMPORT_C CEikProgressInfo *GetProgressInfo()

Return the progress bar.

See also: CEikProgressInfo

Returns: Pointer to the progress bar.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

Reimplemented from CCoeControl::HandlePointerEventL(const TPointerEvent &)

IncrementBarsAndDraw ( TInt )

IMPORT_C TIntIncrementBarsAndDraw(TIntaIncrement)

Increment the progress bar and draw.

See also: CEikProgressInfo

ParameterDescription
aIncrementThe increment to add to the current progress value.

Returns: 1 if operation hasn't been completed else 0.

Layout ( )

IMPORT_C voidLayout()

Do layout.

Before doing layout parse the text (This might be redundant except when the control attributs are trasfered but is left here to avoid breaking the functionality of this exported method).

Layout is done only if it is needed, i.e. if the attributes indicates that something has changed in such a way that layout needs to be performed again, e.g. a line of text has been added.

This method assumes that the rect of the control has not been changed. On the contrary, SizeChanged does not assume that the rect is the same and hence always performs layout.

MinimumSize ( )

TSize MinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

Gets the minimun size requided by the control.

Returns: The minimum size required by the control.

MopSupplyObject ( TTypeUid )

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]
From MObjectProvider. Gets an (MAknsControlContext) object whose type is encapsulated by the specified TTypeUid object. Calls SupplyMopObject(TTypeUid aId, CEikButtonGroupContainer* iCba, CEikMenuBar* iMenu).
Since
Series 60 2.0
ParameterDescription
aIdEncapsulates the UID that identifies the type of object required.

Returns: Pointer to the MAknsControlContext object provided. Note that the pointer may be NULL.

NoteHeight ( )

IMPORT_C TIntNoteHeight()const

Return the note height.

The note height is taken from the layout compiler and depends on number of lines and the note layout type.

Returns: The note height in pixels.

NoteLayout ( )

TInt NoteLayout()const

Returns: note layout type see Avkon.hrh for Note dialog constants

NoteWidth ( )

IMPORT_C TIntNoteWidth()const

Return the note width.

The note width is taken from the layout compiler. Contrary to the note height, the note width does not depend on the note layout type or on number of lines.

Returns: The note width in pixels.

NumberOfLines ( )

IMPORT_C TIntNumberOfLines()const

Return the number of lines.

Returns: The number of lines.

Reset ( )

voidReset()

Used by sleeping notes when going to background, in order to stop and delete animations. Calls CancelAnimation().

ResetText ( )

IMPORT_C voidResetText()

Reset the note text.

Perform layout only for the control. The dialog will not be resized.

See also: CAknTextControl

SetAnimationL ( TInt )

IMPORT_C voidSetAnimationL(TIntaResource)

Set the note animation.

Set the animation in the note attributes. Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aResourceID of BMPANIM_DATA resource.

SetBgRect ( const TRect &, const TPoint &, TBool )

IMPORT_C voidSetBgRect(const TRect &aRect,
const TPoint &aPos,
TBoolaOwnerNotDialog = EFalse
)
Sets up background rectangle context.
Since
Series 60 2.1
ParameterDescription
aRectRectangle position to layout the outer and the inner rectangles of the frame.
aPosRelative coordinates of parent position in screen.
aOwnerNotDialogETrue if the owner is non-dialog control.

SetDynamicTextL ( const TDesC & )

IMPORT_C voidSetDynamicTextL(const TDesC &aText)
Deprecated
ParameterDescription
aTextaText string to set.

SetFinalProgressValue ( TInt )

IMPORT_C voidSetFinalProgressValue(TIntaValue)

Set the progress bar final value in the note attributes.

See also: CEikProgressInfo

ParameterDescription
aValueThe final value for the progress information control. If it is zero, the value is set to one.

SetIconL ( CEikImage * )

IMPORT_C voidSetIconL(CEikImage *aIcon)

Set the note icon.

Set the icon in the note attributes. Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aIconPointer to icon to set.

SetImageL ( CEikImage * )

IMPORT_C voidSetImageL(CEikImage *aImage)

Set the note image.

Set the image in the note attributes. This reduces the size of the image if necessary (only fixed set of image sizes if supported). Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aImagePointer to image to set.

SetLabelReserveLengthL ( TInt, TInt, TInt )

IMPORT_C voidSetLabelReserveLengthL(TIntaLength1 = 0,
TIntaLength2 = 0,
TIntaLength3 = 0
)
Deprecated
  • label length is taken care of already.

Don't use this method anymore. Empty implementation.

SetTextL ( const TDesC & )

IMPORT_C voidSetTextL(const TDesC &aText)

Set whole text for the note control.

Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aTextString to set.

SetTextL ( const TDesC &, TInt )

IMPORT_C voidSetTextL(const TDesC &aText,
TIntaLineNum
)

Set text for a specific line. Any previous text will be overwritten, except for the text that was set for other lines via this method.

This method prevents ParseTextL from having any effect, hence text control needs to know font and line width to allocate space.

This method is kept for backwards compatibility as the same results could be achieved by the other SetTextL with no wrapping enabled (flag in note attributes) and newline characters in the text to indicate a new line.

Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aTextString to set.
aLineNumSpecifies the line of the text to be set.

SetTextNumberL ( const TInt )

IMPORT_C voidSetTextNumberL(const TIntaNumber)

Set the number inside the note text. The text must have been previously set via resource or via SetTextL and must have a %d or %N in it.

Note:- This method could be replaced by a SetTextL method with a variable number of arguments.

Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aNumberInteger to be set inside the text.

SetTextPluralityL ( const TBool )

IMPORT_C voidSetTextPluralityL(const TBoolaIsPlural)

Determine which text is to be used, either the text for singular notes, e.g. "You have 1 new message" or the text for plural notes, e.g. "You have %N new messages". These texts must have been set via resource.

Note:- This method could be replaced by a SetTextL method with a variable number of arguments.

Perform layout only for the control. The dialog will not be resized.

ParameterDescription
aIsPluralETrue if plural form of the text is needed, otherwise EFalse.

StartAnimationL ( )

IMPORT_C voidStartAnimationL()

Start the note animation.

See also: CAknBitmapAnimation

UpdateAndFormatLabelsL ( const TDesC & )

IMPORT_C voidUpdateAndFormatLabelsL(const TDesC &aLabels)

UpdateLabels ( const TDesC &, const TDesC &, const TDesC & )

IMPORT_C voidUpdateLabels(const TDesC &aLabel1,
const TDesC &aLabel2 =  KNullDesC ,
const TDesC &aLabel3 =  KNullDesC
)

UpdateLabelsL ( const TDesC &, const TDesC &, const TDesC & )

IMPORT_C voidUpdateLabelsL(const TDesC &aLabel1,
const TDesC &aLabel2 =  KNullDesC ,
const TDesC &aLabel3 =  KNullDesC
)

WindowLayout ( TAknWindowLineLayout & )

voidWindowLayout(TAknWindowLineLayout &aLayout)const

This is used by a dialog to layout the control correctly.

Returns: type of layout to be used.