CAknListBoxSettingPage Class Reference

API published in: S60 1st Ed

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

Capability Information

Required Capabilities

None


#include <aknlistboxsettingpage.h>

Inherits CAknSettingPage, and MEikListBoxObserver.

Inherited by CAknCheckBoxSettingPage, CAknPopupSettingPage, and CAknRadioButtonSettingPage.


Detailed Description

Intermediate setting page class to soak up common listbox setting page code.

This class has the responsibility of performing the listbox layout and setting out some of the API for listbox setting pages.


Public Member Functions

virtual CAknSetStyleListBox ListBoxControl () const =0
  Type-specific control access method with a null implementation.
virtual IMPORT_C void  HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType)
  Default empty implementation of the listbox observer handling routine.

Static Public Member Functions

static void  CreateIconAndAddToArrayL (CArrayPtr< CGulIcon > *&aIconArray, const TAknsItemID &aId, const TInt aColorIndex, const TDesC &aBmpFile, const TInt32 aBmp, const TInt32 aBmpM)
  Create colorskinned icon and add it to icon array.

Protected Member Functions

  CAknListBoxSettingPage (TInt aSettingPageResourceId)
  Pass-through constructor.
  CAknListBoxSettingPage (const TDesC *aSettingTitleText, TInt aSettingNumber, TInt aControlType, TInt aEditorResourceId, TInt aSettingPageResourceId=0)
  Pass-through constructor.
IMPORT_C void  CheckAndSetDataValidity ()
  This standard implementation uses ListBoxControl to access the listbox and check the number of items.
IMPORT_C void  UpdateCbaL ()
  Implementation to remove go to "invalid" cba when data is invalid.
IMPORT_C void  SizeChanged ()
  From CCoeControl: Routine called by Cone framework whenever there has been a size change on this control.
IMPORT_C void  Draw (const TRect &aRect) const
  From CCoeControl: Common draw routine for the listboxes.

Static Protected Member Functions

static TBool  FocusToSelectedItem ()
  Obtain initial selection policy for popup setting item editing.
static TBool  FocusToFirstItem ()
  Obtain initial selection policy for popup setting item editing.

Protected Attributes

TAknLayoutRect  iAreaExtension
  Layout for the extra piece of white (sometimes) at the bottom of the listbox.

Constructor & Destructor Documentation

CAknListBoxSettingPage::CAknListBoxSettingPage TInt  aSettingPageResourceId  )  [protected]
 

Pass-through constructor.

Parameters:
aSettingPageResourceId  resource id for CAknSettingPage::BaseConstructL()
CAknListBoxSettingPage::CAknListBoxSettingPage const TDesC *  aSettingTitleText,
TInt  aSettingNumber,
TInt  aControlType,
TInt  aEditorResourceId,
TInt  aSettingPageResourceId = 0
[protected]
 

Pass-through constructor.

Generic constructor allowing either editor-resource constuction or setting page resource based constuction In all cases the number (if supplied i.e. <> 0 ) is used.

Editor Resource Setting Page Resource present present Both are used (but text & number overridden) = 0 present Editor resource is used via SP resource present = 0 Default Avkon SP resource if used = 0 = 0 Not permitted

Note: THe first argument is a TDesC* (rather than TDesC&) because the other constructor cannot initialize such a member without allocation or having an internal dummy buffer. Note that the setting title provided here must be owned by the client.

Rules for text and numbers: The rules are the same for both: (non-zero length) text or number other than EAknSettingPageNoOrdinalDisplayed if given in this constructor will not override resource (unless that is zero length or EAknSettingPageNoOrdinalDisplayed). Note, however, that text or number given via the specific API for setting them, WILL override resource. It is assumed that number from resource is very rare. Special text is somewhat more likely.

Parameters:
aSettingTitleText  externally-owned title text
aSettingNumber  the setting number to be displayed
aControlType  control type enumeration for the control to be constructed by type
aEditorResourceId  resource Id at which to read the control's resource
aSettingPageResourceId  optional setting page resource Id; See notes above about resource combinations

Member Function Documentation

IMPORT_C void CAknListBoxSettingPage::CheckAndSetDataValidity  )  [protected, virtual]
 

This standard implementation uses ListBoxControl to access the listbox and check the number of items.

If 0, validity is set to EFalse

Reimplemented from CAknSettingPage.

static void CAknListBoxSettingPage::CreateIconAndAddToArrayL CArrayPtr< CGulIcon > *&  aIconArray,
const TAknsItemID aId,
const TInt  aColorIndex,
const TDesC &  aBmpFile,
const TInt32  aBmp,
const TInt32  aBmpM
[static]
 

Create colorskinned icon and add it to icon array.

Utility for radiobutton, popup & checkbox setting page lists

IMPORT_C void CAknListBoxSettingPage::Draw const TRect &  aRect  )  const [protected]
 

From CCoeControl: Common draw routine for the listboxes.

Parameters:
aRect  rectangle within which to draw

Reimplemented from CAknSettingPage.

static TBool CAknListBoxSettingPage::FocusToFirstItem  )  [static, protected]
 

Obtain initial selection policy for popup setting item editing.

Returns:
TBool EFalse iff focus is initially to be set to the selected item
static TBool CAknListBoxSettingPage::FocusToSelectedItem  )  [static, protected]
 

Obtain initial selection policy for popup setting item editing.

Returns:
TBool EFalse iff focus is not initially to be set to the selected item
virtual IMPORT_C void CAknListBoxSettingPage::HandleListBoxEventL CEikListBox aListBox,
TListBoxEvent  aEventType
[virtual]
 

Default empty implementation of the listbox observer handling routine.

virtual CAknSetStyleListBox* CAknListBoxSettingPage::ListBoxControl  )  const [pure virtual]
 

Type-specific control access method with a null implementation.

Implemented in CAknCheckBoxSettingPage, CAknPopupSettingPage, and CAknRadioButtonSettingPage.

IMPORT_C void CAknListBoxSettingPage::SizeChanged  )  [protected, virtual]
 

From CCoeControl: Routine called by Cone framework whenever there has been a size change on this control.

Reimplemented from CAknSettingPage.

IMPORT_C void CAknListBoxSettingPage::UpdateCbaL  )  [protected, virtual]
 

Implementation to remove go to "invalid" cba when data is invalid.

Reimplemented from CAknSettingPage.


Field Documentation

TAknLayoutRect CAknListBoxSettingPage::iAreaExtension [protected]
 

Layout for the extra piece of white (sometimes) at the bottom of the listbox.


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

Copyright © Nokia Corporation 2001-2008
Back to top