diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-845F3021-E3ED-4676-916A-75740886DCBD.dita --- a/Symbian3/SDK/Source/GUID-845F3021-E3ED-4676-916A-75740886DCBD.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-845F3021-E3ED-4676-916A-75740886DCBD.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,80 +1,80 @@ - - - - - -Providing -a vertical list of selectable items -

To provide a vertical list of selectable items using the Choice List API, -follow the steps below:

-
    -
  1. Link the AVKON libraries -(avkon.lib and eikcoctl.lib) to the project -file of the application.

  2. -
  3. Provide an observer -class that realizes the McoeControlObserver interface.

  4. -
  5. Create an instance of -the class CAknChoiceList.

  6. -
  7. Add content to the created -choice list instance.

  8. -
  9. Show the choice list.

  10. -
  11. Receive information -from the choice list through the observer interface.

  12. -
  13. Delete the choice list.

  14. -
-
Indexing of -items in the choice list

The client application is responsible for -keeping track of item indexes in the choice list. The choice list component -does not do this: it only returns the index of a list item.

The choice -list items are indexed as follows:

    -
  • When the items are added to the choice list from e.g. an array, the -first item gets an index of 0.

  • -
  • The other items added from the array get indexes 1, 2, 3 and so forth -until the last item has received an index. Therefore, for example, in a list -of four items, the items have indexes 0 - 3.

  • -
  • If an item is added to the end of the list, it gets the next index -number based on the number of items already in the list. For example, adding -the fifth item in a four-item list results in that item having the index 4.

  • -
  • If items are added to the middle of the list, the indexes of the items -after the added items are shifted up accordingly. For example, if an item -is added as the fourth item in a six-item list, the old fourth, fifth, and -sixth items with indexes 3 - 5 get indexes 4 - 6.

  • -
  • If an items is removed from the list, the indexes of the subsequent -items in the list are shifted down accordingly. For example, if the second -item is removed, the old third item becomes the second item and therefore -gets an index of 1.

  • -
-
Use cases -Choice list API use cases - -

To use a choice list in your application, implementing the following -use cases is mandatory:

    -
  • Creating the -choice list

  • -
  • Adding items -to the choice list

  • -
  • Getting user -selection from the choice list

  • -
  • Deleting the -choice list

  • -

The following use cases are optional, allowing you to set additional -properties for your choice list:

    -
  • Showing the -choice list

  • -
  • Removing items -from the choice list

  • -
  • Setting the -item selected when the choice list is opened

  • -
-
Main implementation -files

The implementation file for the Choice list API is aknchoicelist.h.

-
-Choice list -API description + + + + + +Providing +a vertical list of selectable items +

To provide a vertical list of selectable items using the Choice List API, +follow the steps below:

+
    +
  1. Link the AVKON libraries +(avkon.lib and eikcoctl.lib) to the project +file of the application.

  2. +
  3. Provide an observer +class that realizes the McoeControlObserver interface.

  4. +
  5. Create an instance of +the class CAknChoiceList.

  6. +
  7. Add content to the created +choice list instance.

  8. +
  9. Show the choice list.

  10. +
  11. Receive information +from the choice list through the observer interface.

  12. +
  13. Delete the choice list.

  14. +
+
Indexing of +items in the choice list

The client application is responsible for +keeping track of item indexes in the choice list. The choice list component +does not do this: it only returns the index of a list item.

The choice +list items are indexed as follows:

    +
  • When the items are added to the choice list from e.g. an array, the +first item gets an index of 0.

  • +
  • The other items added from the array get indexes 1, 2, 3 and so forth +until the last item has received an index. Therefore, for example, in a list +of four items, the items have indexes 0 - 3.

  • +
  • If an item is added to the end of the list, it gets the next index +number based on the number of items already in the list. For example, adding +the fifth item in a four-item list results in that item having the index 4.

  • +
  • If items are added to the middle of the list, the indexes of the items +after the added items are shifted up accordingly. For example, if an item +is added as the fourth item in a six-item list, the old fourth, fifth, and +sixth items with indexes 3 - 5 get indexes 4 - 6.

  • +
  • If an items is removed from the list, the indexes of the subsequent +items in the list are shifted down accordingly. For example, if the second +item is removed, the old third item becomes the second item and therefore +gets an index of 1.

  • +
+
Use cases +Choice list API use cases + +

To use a choice list in your application, implementing the following +use cases is mandatory:

    +
  • Creating the +choice list

  • +
  • Adding items +to the choice list

  • +
  • Getting user +selection from the choice list

  • +
  • Deleting the +choice list

  • +

The following use cases are optional, allowing you to set additional +properties for your choice list:

    +
  • Showing the +choice list

  • +
  • Removing items +from the choice list

  • +
  • Setting the +item selected when the choice list is opened

  • +
+
Main implementation +files

The implementation file for the Choice list API is aknchoicelist.h.

+
+Choice list +API description
\ No newline at end of file