#include <mw/aknnotecontrol.h>
class CAknNoteControl : public CAknControl |
Protected Member Functions | |
---|---|
IMPORT_C TTypeUid::Ptr | MopSupplyObject(TTypeUid) |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
The control for a note dialog.
Manage layout of elements in a note dialog:- the text, the image and animation, the progress bar.
See also: CAknNoteDialog, CAknNoteAttributes, CAknText
CAknNoteAttributes * | Attributes | ( | ) | const |
Accessor to note attributes stored in CAknNoteAttributes.
Returns: Pointer to CAknNoteAttributes.
IMPORT_C TInt | CancelAnimation | ( | ) |
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.
void | ConstructFromResourceL | ( | TResourceReader & | aRes | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
Constructs controls from a resource file.
Parameter | Description |
---|---|
aRes | The resource reader with which to access AVKON_NOTE resource. |
IMPORT_C void | CreateProgressBarL | ( | ) |
Create the progress bar.
See also: CEikProgressInfo
IMPORT_C CEikProgressInfo * | GetProgressInfo | ( | ) |
Return the progress bar.
See also: CEikProgressInfo
Returns: Pointer to the progress bar.
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CCoeControl::HandlePointerEventL(const TPointerEvent &)
Increment the progress bar and draw.
See also: CEikProgressInfo
Parameter | Description |
---|---|
aIncrement | The increment to add to the current progress value. |
Returns: 1 if operation hasn't been completed else 0.
IMPORT_C void | Layout | ( | ) |
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.
TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
Gets the minimun size requided by the control.
Returns: The minimum size required by the control.
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected] |
Reimplemented from CCoeControl::MopSupplyObject(TTypeUid)
Parameter | Description |
---|---|
aId | Encapsulates the UID that identifies the type of object required. |
Returns: Pointer to the MAknsControlContext object provided. Note that the pointer may be NULL.
IMPORT_C TInt | NoteHeight | ( | ) | 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.
IMPORT_C TInt | NoteWidth | ( | ) | 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.
void | Reset | ( | ) |
Used by sleeping notes when going to background, in order to stop and delete animations. Calls CancelAnimation().
IMPORT_C void | ResetText | ( | ) |
Reset the note text.
Perform layout only for the control. The dialog will not be resized.
See also: CAknTextControl
IMPORT_C void | SetAnimationL | ( | TInt | aResource | ) |
Set the note animation.
Set the animation in the note attributes. Perform layout only for the control. The dialog will not be resized.
Parameter | Description |
---|---|
aResource | ID of BMPANIM_DATA resource. |
Parameter | Description |
---|---|
aRect | Rectangle position to layout the outer and the inner rectangles of the frame. |
aPos | Relative coordinates of parent position in screen. |
aOwnerNotDialog | ETrue if the owner is non-dialog control. |
IMPORT_C void | SetDynamicTextL | ( | const TDesC & | aText | ) |
use SetTextL() method.
Parameter | Description |
---|---|
aText | aText string to set. |
IMPORT_C void | SetFinalProgressValue | ( | TInt | aValue | ) |
Set the progress bar final value in the note attributes.
See also: CEikProgressInfo
Parameter | Description |
---|---|
aValue | The final value for the progress information control. If it is zero, the value is set to one. |
IMPORT_C void | SetIconL | ( | 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.
Parameter | Description |
---|---|
aIcon | Pointer to icon to set. |
IMPORT_C void | SetImageL | ( | 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.
Parameter | Description |
---|---|
aImage | Pointer to image to set. |
label length is taken care of already.
Don't use this method anymore. Empty implementation.
IMPORT_C void | SetTextL | ( | const TDesC & | aText | ) |
Set whole text for the note control.
Perform layout only for the control. The dialog will not be resized.
Parameter | Description |
---|---|
aText | String to set. |
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.
Parameter | Description |
---|---|
aText | String to set. |
aLineNum | Specifies the line of the text to be set. |
IMPORT_C void | SetTextNumberL | ( | const TInt | aNumber | ) |
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.
Parameter | Description |
---|---|
aNumber | Integer to be set inside the text. |
IMPORT_C void | SetTextPluralityL | ( | const TBool | aIsPlural | ) |
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.
Parameter | Description |
---|---|
aIsPlural | ETrue if plural form of the text is needed, otherwise EFalse. |
IMPORT_C void | StartAnimationL | ( | ) |
Start the note animation.
See also: CAknBitmapAnimation
IMPORT_C void | UpdateAndFormatLabelsL | ( | const TDesC & | aLabels | ) |
use SetTextL().
IMPORT_C void | UpdateLabels | ( | const TDesC & | aLabel1, |
const TDesC & | aLabel2 = KNullDesC , | |||
const TDesC & | aLabel3 = KNullDesC | |||
) |
use SetTextL().
IMPORT_C void | UpdateLabelsL | ( | const TDesC & | aLabel1, |
const TDesC & | aLabel2 = KNullDesC , | |||
const TDesC & | aLabel3 = KNullDesC | |||
) |
use SetTextL().
void | WindowLayout | ( | TAknWindowLineLayout & | aLayout | ) | const |
This is used by a dialog to layout the control correctly.
Returns: type of layout to be used.