CEikNumberEditor 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 <eikmfne.h>

Inherits CEikMfne.


Detailed Description

Integer editor.

This control supports editing a single integer value. If a number is entered which is not within the range specified by the maximum and minimum control values it is automatically reset to the nearest allowable value.

The editor has an associated resource struct NUMBER_EDITOR and control factory identifier EEikCtNumberEditor.


Public Member Functions

IMPORT_C  CEikNumberEditor ()
  Constructor.
IMPORT_C void  ConstructL (TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue)
  Second-phase constructor.
IMPORT_C void  SetMinimumAndMaximum (TInt aMinimumValue, TInt aMaximumValue)
  Sets the minimum and maximum editor values.
IMPORT_C void  GetMinimumAndMaximum (TInt &aMinimumValue, TInt &aMaximumValue) const
  Gets the integer editor's minimum and maximum values.
IMPORT_C void  SetNumber (TInt aNumber)
  Sets the integer editor's value.
IMPORT_C TInt  Number () const
  Gets the integer editor's value.
virtual IMPORT_C void  ConstructFromResourceL (TResourceReader &aResourceReader)
  Second-phase construction from a resource file.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.

Constructor & Destructor Documentation

IMPORT_C CEikNumberEditor::CEikNumberEditor  ) 
 

Constructor.

This function should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() to initialise the editor's field values from a resource file, or ConstructL() if no resource file is used.


Member Function Documentation

virtual IMPORT_C void CEikNumberEditor::ConstructFromResourceL TResourceReader &  aResourceReader  )  [virtual]
 

Second-phase construction from a resource file.

The function reads the maximum and minimum editor values from a NUMBER_EDITOR resource, and sets the initial number to be the same as the maximum value.

Parameters:
aResourceReader  A resource file reader.
IMPORT_C void CEikNumberEditor::ConstructL TInt  aMinimumValue,
TInt  aMaximumValue,
TInt  aInitialValue
 

Second-phase constructor.

Completes the construction of an integer editor. It should be called by container only if the editor is not constructed from a resource.

Sets the minimum and maximum values that can be entered into the editor, and the initial value.

Parameters:
aMinimumValue  The minimum allowable value.
aMaximumValue  The maximum allowable value.
aInitialValue  The initial value.
IMPORT_C void CEikNumberEditor::GetMinimumAndMaximum TInt &  aMinimumValue,
TInt &  aMaximumValue
const
 

Gets the integer editor's minimum and maximum values.

Parameters:
aMinimumValue  On return, contains the integer editor's minimum allowable value.
aMaximumValue  On return, contains the integer editor's maximum allowable value.
IMPORT_C void CEikNumberEditor::HandlePointerEventL const TPointerEvent &  aPointerEvent  )  [virtual]
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent  The pointer event.

Reimplemented from CEikMfne.

IMPORT_C TInt CEikNumberEditor::Number  )  const
 

Gets the integer editor's value.

Returns:
The integer editor's value.
Panic:
12 In debug builds, if the editor has no content.
IMPORT_C void CEikNumberEditor::SetMinimumAndMaximum TInt  aMinimumValue,
TInt  aMaximumValue
 

Sets the minimum and maximum editor values.

Only values inside the initial minimum and maximum are permitted.

If the editor's value is outside the new bounds when the function is called, it is reset to the nearest allowable value.

Parameters:
aMinimumValue  The minimum allowable value.
aMaximumValue  The maximum allowable value.
Panic:
9 If the minimum is greater than the maximum allowable value.
IMPORT_C void CEikNumberEditor::SetNumber TInt  aNumber  ) 
 

Sets the integer editor's value.

The control is not redrawn.

Parameters:
aNumber  The editor's new value.
Panic:
11 In debug builds, if aNumber is outside the valid range.

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

Copyright © Nokia Corporation 2001-2008
Back to top