CAknIntegerEdwin Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib

Capability Information

Required Capabilities

None


#include <aknnumedwin.h>

Inherits CAknNumericEdwin.


Detailed Description

The CAknIntegerEdwin class implements an editor for an integer values.

The editor has an associated resource struct AVKON_INTEGER_EDWIN and control factory identifier EAknCtIntegerEdwin.


Public Member Functions

virtual IMPORT_C void  ConstructFromResourceL (TResourceReader &aReader)
  Constructs controls from a resource file.
IMPORT_C void  ConstructL (TInt aMin, TInt aMax, TInt aMaxChars)
  2nd phase constructor.
IMPORT_C void  SetValueL (TInt aValue)
  Sets the current value of the editor.
IMPORT_C void  SetUnsetValue (TInt aUnsetValue)
  Sets the value that is returned when the editor field is left empty or is not valid.
IMPORT_C TValidationStatus  GetTextAsInteger (TInt &aValue)
  Gets the current value of the editor.
IMPORT_C void  SetMinimumIntegerValue (TInt aMinimumValue)
  Sets the minimum allowable value of the editor.
IMPORT_C void  SetMaximumIntegerValue (TInt aMaximumValue)
  Sets the maximum allowable value of the editor.
IMPORT_C void  PrepareForFocusLossL ()
  From CCoeControl.
IMPORT_C void  HandleResourceChange (TInt aType)
  From CCoeControl.
IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  From CCoeControl.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
IMPORT_C TBool  CheckNumber ()
  Checks if the number of the editor is within the min and max boundaries.

Static Public Member Functions

static IMPORT_C CAknIntegerEdwin NewL (TInt aMin, TInt aMax, TInt aMaxChars)
  Two-phased constructor.

Member Function Documentation

IMPORT_C TBool CAknIntegerEdwin::CheckNumber  ) 
 

Checks if the number of the editor is within the min and max boundaries.

If not, the method set the number to closest legal value and highlights the number text in the editor.

virtual IMPORT_C void CAknIntegerEdwin::ConstructFromResourceL TResourceReader &  aReader  )  [virtual]
 

Constructs controls from a resource file.

Function reads needed values from a AVKON_INTEGER_EDWIN resource. Essential for Dialog/Form construction.

Parameters:
aReader  The resource reader with which to access the control's resource values.

Reimplemented from CEikEdwin.

IMPORT_C void CAknIntegerEdwin::ConstructL TInt  aMin,
TInt  aMax,
TInt  aMaxChars
 

2nd phase constructor.

Parameters:
aMin  The minimum allowable value.
aMax  The maximum allowable value.
aMaxChars  The maximum allowable number of the digits.
IMPORT_C TValidationStatus CAknIntegerEdwin::GetTextAsInteger TInt &  aValue  ) 
 

Gets the current value of the editor.

Validity of the value is checked, if the editor is empty, the unset value is used. The value is put into aValue parameter even if it is not valid.

Parameters:
aValue  Reference to the integer used to store the value got from the editor field.
Returns:
Indicates the validation status.
IMPORT_C void CAknIntegerEdwin::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent  Pointer event to respond to.

Reimplemented from CAknNumericEdwin.

IMPORT_C void CAknIntegerEdwin::HandleResourceChange TInt  aType  )  [virtual]
 

From CCoeControl.

Handles a change to the control's resources.

Parameters:
aType  a message UID value.

Reimplemented from CEikEdwin.

static IMPORT_C CAknIntegerEdwin* CAknIntegerEdwin::NewL TInt  aMin,
TInt  aMax,
TInt  aMaxChars
[static]
 

Two-phased constructor.

Parameters:
aMin  The minimum allowable value.
aMax  The maximum allowable value.
aMaxChars  The maximum allowable number of the digits.
Returns:
Pointer to a fully constructed editor object.
IMPORT_C TKeyResponse CAknIntegerEdwin::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

From CCoeControl.

Handles key events. Called by framework when a key event occurs.

Parameters:
aKeyEvent  The key event that occured.
aType  The type of key event that occured.
Returns:
EKeyWasConsumed if the event was processed, EKeyWasNotConsumed if the event was not processed.

Reimplemented from CEikEdwin.

IMPORT_C void CAknIntegerEdwin::PrepareForFocusLossL  ) 
 

From CCoeControl.

Prepares for focus loss. Called by the framework just before focus is removed from the control.

IMPORT_C void CAknIntegerEdwin::SetMaximumIntegerValue TInt  aMaximumValue  ) 
 

Sets the maximum allowable value of the editor.

Parameters:
aMaximumValue  The maximum value.
IMPORT_C void CAknIntegerEdwin::SetMinimumIntegerValue TInt  aMinimumValue  ) 
 

Sets the minimum allowable value of the editor.

Parameters:
aMinimumValue  The minimum value.
IMPORT_C void CAknIntegerEdwin::SetUnsetValue TInt  aUnsetValue  ) 
 

Sets the value that is returned when the editor field is left empty or is not valid.

Parameters:
aUnsetValue  The default value to be returned.
IMPORT_C void CAknIntegerEdwin::SetValueL TInt  aValue  ) 
 

Sets the current value of the editor.

The control is not redrawn.

Parameters:
aValue  Current value of the editor.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top