CAknSelectionListDialog Class Reference

class CAknSelectionListDialog : public CAknDialog

CAknSelectionListDialog is the actual interface to the applications.

Use this class to get a full screen list.

This class only works in whole main pane. Do not try to use this directly for other places.

Avkon.lib
Since
S60 v1.0
resource definition for this class:
        RESOURCE DIALOG r_res_id_for_a_dialog
   {
   flags = EAknDialogSelectionList;
   buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
   items =
        {
        DLG_LINE
            {
            type = EAknCtSingleGraphicListBox;
            id = ESelectionListControl;
            control = LISTBOX
                {
                flags = EAknListBoxSelectionList;
                };
            }
     // the next dlg line is optional.
        ,
        DLG_LINE
            {
             itemflags = EEikDlgItemNonFocusing;
            id = EFindControl;
            type = EAknCtSelectionListFixedFind;
            }
        };
   }
       
The listbox type can be one of the following (defined in avkon.hrh and aknlists.h):
        EAknCtSingleListBox                (See CAknSingleStyleListBox)
   EAknCtSingleNumberListBox          (See CAknSingleNumberStyleListBox)
   EAknCtSingleHeadingListBox         (See CAknSingleHeadingStyleListBox)
   EAknCtSingleGraphicListBox         (See CAknSingleGraphicStyleListBox)
   EAknCtSingleGraphicHeadingListBox  (See CAknSingleGraphicHeadingStyleListBox)
   EAknCtSingleNumberHeadingListBox   (See CAknSingleNumberHeadingStyleListBox)
   EAknCtSingleLargeListBox           (See CAknSingleLargeStyleListBox)
   EAknCtDoubleListBox                (See CAknDoubleStyleListBox)
   EAknCtDoubleNumberListBox          (See CAknDoubleNumberStyleListBox)
   EAknCtDoubleTimeListBox            (See CAknDoubleTimeStyleListBox)
   EAknCtDoubleLargeListBox           (See CAknDoubleLargeStyleListBox)
   EAknCtDoubleGraphicListBox         (See CAknDoubleGraphicStyleListBox)
       
The type field while defining find can be one of the following:
        EAknCtSelectionListFixedFind
EAknCtSelectionListPopupFind
EAknCtSelectionListAdaptiveFind
       
The menubar you give for selection list dialog should have one of the following as one of its menu panes (defined in avkon.hrh):
        R_AVKON_MENUPANE_SELECTION_LIST
R_AVKON_MENUPANE_SELECTION_LIST_WITH_FIND_POPUP
       
        RESOURCE MENU_BAR r_res_id_for_a_menubar
 {
 titles =
     {
     MENU_TITLE { menu_pane = R_AVKON_MENUPANE_SELECTION_LIST; } 
     };
 };
       
C++ Usage:
        TInt openedItem = 0;
    MDesCArray *array = ...;
    CAknSelectionListDialog *dialog = CAknSelectionListDialog::NewL(openedItem, array, R_RES_ID_FOR_A_MENUBAR);
    TInt result = dialog->ExecuteLD(R_RES_ID_FOR_A_DIALOG);
    if (result)
        {
        ...use openeditem here...
        }
    else
        {
        ...canceled...
        }
       
Alternatively, you can use:
        TInt openedItem = 0;
    MDesCArray *array = ...;
    CAknSelectionListDialog *dialog = CAknSelectionListDialog::NewL(openedItem, array, R_RES_ID_FOR_A_MENUBAR);
    dialog->PrepareLC(R_RES_ID_FOR_A_DIALOG);
    // do some operations here, for example fill icon array 
    TInt result = dialog->RunLD();
    if (result)
        {
        ...
        }
    else
        {
        ...
        }
       

Often it is also useful to derive from CAknSelectionListDialog and implement OkToExitL() , constructors and the NewL() methods. OkToExitL() implementation helps with providing navigation with other dialogs; OkToExitL() is ideal place to launch new dialogs when a list item is selected. This way when backstepping, the state of the first dialog is preserved...

Inherits from

Public Member Functions
IMPORT_C void ConstructL ( TInt )
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C CArrayPtr < CGulIcon > * IconArray ()
IMPORT_C CAknSelectionListDialog * NewL ( TInt &, MDesCArray *, TInt , MEikCommandObserver *)
IMPORT_C CAknSelectionListDialog * NewLC ( TInt &, MDesCArray *, TInt , MEikCommandObserver *)
IMPORT_C void SetIconArrayL ( CArrayPtr < CGulIcon > *)
IMPORT_C void SetupFind ( TFindType )
Protected Member Functions
CAknSelectionListDialog ( TInt &, MDesCArray *, MEikCommandObserver *)
~CAknSelectionListDialog ()
IMPORT_C CCoeControl * ComponentControl ( TInt )
IMPORT_C TInt CountComponentControls ()
IMPORT_C SEikControlInfo CreateCustomControlL ( TInt )
IMPORT_C void Draw (const TRect &)
TInt ExitViaIdle ( TAny *)
IMPORT_C CAknSearchField * FindBox ()
IMPORT_C void HandleListBoxEventL ( CEikListBox *, TListBoxEvent)
IMPORT_C TBool IsAcceptableListBoxType ( TInt , TBool &)
IMPORT_C TBool IsFormattedCellListBox ()
IMPORT_C CEikListBox * ListBox ()
IMPORT_C TKeyResponse OfferKeyEventL (const TKeyEvent &, TEventCode )
IMPORT_C TBool OkToExitL ( TInt )
IMPORT_C void PostLayoutDynInitL ()
IMPORT_C void PreLayoutDynInitL ()
IMPORT_C void ProcessCommandL ( TInt )
IMPORT_C void SelectionListProcessCommandL ( TInt )
IMPORT_C void SetSizeAndPosition (const TSize &)
Private Member Functions
IMPORT_C void CAknDialog_Reserved ()
IMPORT_C void CAknSelectionListDialog_Reserved ()
IMPORT_C void CEikDialog_Reserved_1 ()
IMPORT_C void CEikDialog_Reserved_2 ()
IMPORT_C void * ExtensionInterface ( TUid )
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CAknDialog::CAknDialog()
CAknDialog::CreateMenuBarL(TInt)
CAknDialog::DisplayMenuL()
CAknDialog::DynInitMenuPaneL(TInt,CEikMenuPane *)
CAknDialog::ExecuteLD(TInt)
CAknDialog::FocusChanged(TDrawNow)
CAknDialog::HideMenu()
CAknDialog::MenuShowing()const
CAknDialog::MopSupplyObject(TTypeUid)
CAknDialog::PrepareLC(TInt)
CAknDialog::RunLD()
CAknDialog::SetEmphasis(CCoeControl *,TBool)
CAknDialog::SizeChanged()
CAknDialog::~CAknDialog()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MaximumWidth()const
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikDialog::ActivateFirstPageL()const
CEikDialog::ActivePageId()const
CEikDialog::ActivePageIndex()const
CEikDialog::AddAutoDateEditorL(const TDesC &,TInt,const TTime &,const TTime &,TBool,TTime *)
CEikDialog::AddAutoDurationEditorL(const TDesC &,TInt,const TTimeIntervalSeconds &,const TTimeIntervalSeconds &,TBool,TTimeIntervalSeconds *)
CEikDialog::AddAutoFixedPointEditorL(const TDesC &,TInt,TInt,TInt,TInt *,TInt)
CEikDialog::AddAutoFloatEditorL(const TDesC &,TInt,const TReal &,const TReal &,TReal *)
CEikDialog::AddAutoGlobalTextEditorL(const TDesC &,TInt,TInt,TInt,TInt,TInt,CGlobalText *,TInt,TInt)
CEikDialog::AddAutoNumberEditorL(const TDesC &,TInt,TInt,TInt,TInt *)
CEikDialog::AddAutoRangeEditorL(const TDesC &,TInt,TInt,TInt,HBufC *,SEikRange *)
CEikDialog::AddAutoRichTextEditorL(const TDesC &,TInt,TInt,TInt,TInt,TInt,CGlobalText *,TInt,TInt)
CEikDialog::AddAutoSecretEditorL(const TDesC &,TInt,TDes *)
CEikDialog::AddAutoTextEditorL(const TDesC &,TInt,TInt,TInt,TInt,TDes *)
CEikDialog::AddAutoTimeAndDateEditorL(const TDesC &,TInt,const TTime &,const TTime &,TBool,TBool,HBufC *,TTime *)
CEikDialog::AddAutoTimeEditorL(const TDesC &,TInt,const TTime &,const TTime &,TBool,TTime *)
CEikDialog::AddAutoTimeOffsetEditorL(const TDesC &,TInt,const TTimeIntervalSeconds &,const TTimeIntervalSeconds &,TBool,TTimeIntervalSeconds *)
CEikDialog::AdjustAllIdsOnPage(TInt,TInt)
CEikDialog::BorderStyle()
CEikDialog::ButtonCommandObserver()const
CEikDialog::ButtonGroupContainer()const
CEikDialog::CEikDialog()
CEikDialog::ConstructAutoDialogLC(TInt,TInt)
CEikDialog::ConstructSleepingAlertDialogL(TInt)
CEikDialog::ConstructSleepingDialogL(TInt)
CEikDialog::Control(TInt)const
CEikDialog::ControlCaption(TInt)const
CEikDialog::ControlOrNull(TInt)const
CEikDialog::ControlsOnPage(RArray< CEikCaptionedControl * > &,TInt)const
CEikDialog::ConvertCustomControlTypeToBaseControlType(TInt)const
CEikDialog::CreateLineByTypeL(const TDesC &,TInt,TInt,TAny *)
CEikDialog::CreateLineByTypeL(const TDesC &,TInt,TInt,TInt,TAny *)
CEikDialog::CurrentLine()const
CEikDialog::DeclareAutoDateEditor(TInt,TTime *)
CEikDialog::DeclareAutoDurationEditor(TInt,TTimeIntervalSeconds *)
CEikDialog::DeclareAutoFixedPointEditor(TInt,TInt *)
CEikDialog::DeclareAutoNumberEditor(TInt,TInt *)
CEikDialog::DeclareAutoRangeEditor(TInt,SEikRange *)
CEikDialog::DeclareAutoSecretEditor(TInt,TDes *)
CEikDialog::DeclareAutoTextEditorL(TInt,TDes *)
CEikDialog::DeclareAutoTimeAndDateEditor(TInt,TTime *)
CEikDialog::DeclareAutoTimeEditor(TInt,TTime *)
CEikDialog::DeclareAutoTimeOffsetEditor(TInt,TTimeIntervalSeconds *)
CEikDialog::DeclareItemAuto(TInt,TInt,TAny *)
CEikDialog::DeleteLine(TInt,TBool)
CEikDialog::DialogFlags()
CEikDialog::DurationEditorValue(TInt)const
CEikDialog::ExitSleepingDialog()
CEikDialog::Extension()const
CEikDialog::FindLineIndex(const CCoeControl &)const
CEikDialog::FixedPointEditorDecimal(TInt)const
CEikDialog::FixedPointEditorValue(TInt)const
CEikDialog::FloatEditorValue(TInt)const
CEikDialog::FloatingPointEditorValue(TInt)const
CEikDialog::FormFlagsFromActivePage()
CEikDialog::GetAutoValuesFromPage(CEikCapCArray *)
CEikDialog::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikDialog::GetCustomAutoValue(TAny *,TInt,const CCoeControl *)
CEikDialog::GetEdwinText(TDes &,TInt)const
CEikDialog::GetFileName(TFileName *,TInt)const
CEikDialog::GetFirstLineOnFirstPageOrNull()
CEikDialog::GetLabelText(TDes &,TInt)const
CEikDialog::GetLineByLineAndPageIndex(TInt,TInt)const
CEikDialog::GetNumberOfLinesOnPage(TInt)const
CEikDialog::GetNumberOfPages()const
CEikDialog::GetSecretEditorText(TDes &,TInt)const
CEikDialog::GetTextEditorText(CGlobalText *&,TInt)
CEikDialog::HandleControlEventL(CCoeControl *,TCoeEvent)
CEikDialog::HandleControlStateChangeL(TInt)
CEikDialog::HandleDialogPageEventL(TInt)
CEikDialog::HandleInteractionRefused(TInt)
CEikDialog::HandleResourceChange(TInt)
CEikDialog::IdOfFocusControl()const
CEikDialog::InputCapabilities()const
CEikDialog::InsertLineL(TInt,TInt,TInt)
CEikDialog::IsEditable()const
CEikDialog::Layout()
CEikDialog::Line(TInt)const
CEikDialog::LineChangedL(TInt)
CEikDialog::ListBoxCurrentItem(TInt)const
CEikDialog::MakeLineVisible(TInt,TBool)
CEikDialog::MakePanelButtonVisible(TInt,TBool)
CEikDialog::MakeVisible(TBool)
CEikDialog::MakeWholeLineVisible(TInt,TBool)
CEikDialog::MappedCommandId(TInt)
CEikDialog::NumberEditorValue(TInt)const
CEikDialog::PageChangedL(TInt)
CEikDialog::PreferredSize(const TSize &)const
CEikDialog::PrepareContext(CWindowGc &)const
CEikDialog::PrepareForFocusTransitionL()
CEikDialog::PublishDialogL(TInt,TUid)
CEikDialog::RangeEditorValue(TInt)const
CEikDialog::ReadResourceLC(TInt)
CEikDialog::RegisterDialgWithPageSelector()
CEikDialog::ResetLineMinimumSizes()
CEikDialog::ResetSecretEditor(TInt)
CEikDialog::RotateFocusByL(TInt)
CEikDialog::RouseSleepingDialog()
CEikDialog::SetControlCaptionL(TInt,TInt)
CEikDialog::SetControlCaptionL(TInt,const TDesC &)
CEikDialog::SetDurationEditorMinAndMax(TInt,const TTimeIntervalSeconds &,const TTimeIntervalSeconds &)
CEikDialog::SetDurationEditorValue(TInt,const TTimeIntervalSeconds &)
CEikDialog::SetEditableL(TBool)
CEikDialog::SetEdwinTextL(TInt,const TDesC *)
CEikDialog::SetFileNameL(TInt,const TDesC *)
CEikDialog::SetFixedPointEditorDecimal(TInt,TInt)
CEikDialog::SetFixedPointEditorValueL(TInt,TInt)
CEikDialog::SetFloatEditorMinAndMax(TInt,TInt,TInt)
CEikDialog::SetFloatEditorValueL(TInt,TReal)
CEikDialog::SetFloatingPointEditorValueL(TInt,const TReal *)
CEikDialog::SetInitialCurrentLine()
CEikDialog::SetLabelL(TInt,TInt)
CEikDialog::SetLabelL(TInt,const TDesC &)
CEikDialog::SetLabelReserveLengthL(TInt,TInt)
CEikDialog::SetLineDimmedNow(TInt,TBool)
CEikDialog::SetLineNonFocusing(TInt)
CEikDialog::SetListBoxCurrentItem(TInt,TInt)
CEikDialog::SetMediatorObserver(MAknDialogMediatorObserver *)
CEikDialog::SetMultilineQuery(TBool)
CEikDialog::SetNumberEditorMinAndMax(TInt,TInt,TInt)
CEikDialog::SetNumberEditorValue(TInt,TInt)
CEikDialog::SetPageDensePacking(TInt,TBool)
CEikDialog::SetPageDimmedNow(TInt,TBool)
CEikDialog::SetRangeEditorMinAndMax(TInt,TInt,TInt)
CEikDialog::SetRangeEditorValue(TInt,const SEikRange &)
CEikDialog::SetTTimeEditorMinAndMax(TInt,const TTime &,const TTime &)
CEikDialog::SetTTimeEditorValue(TInt,const TTime &)
CEikDialog::SetTextEditorTextL(TInt,const CGlobalText *)
CEikDialog::SetTimeOffsetEditorMinAndMax(TInt,const TTimeIntervalSeconds &,const TTimeIntervalSeconds &)
CEikDialog::SetTimeOffsetEditorValue(TInt,const TTimeIntervalSeconds &)
CEikDialog::SetTitleL(TInt)
CEikDialog::SetTitleL(const TDesC &)
CEikDialog::SlideDialog()
CEikDialog::SwapButtonGroupContainer(CEikButtonGroupContainer *)
CEikDialog::SwitchLineLatency(TInt,TInt)
CEikDialog::TTimeEditorValue(TInt)const
CEikDialog::TimeOffsetEditorValue(TInt)const
CEikDialog::Title()const
CEikDialog::TryChangeFocusToL(TInt)
CEikDialog::TryExitL(TInt)
CEikDialog::UpdatePageL(TBool)
CEikDialog::WriteInternalStateL(RWriteStream &)const
CEikDialog::~CEikDialog()
Public Member Enumerations
enum TFindType { ENoFind , EFixedFind , EPopupFind , EAdaptiveFind }
Inherited Enumerations
CCoeControl:TZoomType
CEikDialog:@115
Protected Attributes
TBool iEnterKeyPressed
Private Attributes
MDesCArray * iArray
MEikCommandObserver * iCmdObserver
TInt iDialogResourceId
CAknSelectionListDialogExtension * iExtension
CAknSearchField * iFindBox
TFindType iFindType
TInt * iSelectedItem
TInt iSpare
Inherited Attributes
CAknDialog::iMenuBar
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CAknSelectionListDialog(TInt &, MDesCArray *, MEikCommandObserver *)

IMPORT_C CAknSelectionListDialog ( TInt & aIndex,
MDesCArray * aArray,
MEikCommandObserver * aCommand
) [protected]

CAknSelectionListDialog() Default constructor.

Parameters

TInt & aIndex
MDesCArray * aArray
MEikCommandObserver * aCommand

~CAknSelectionListDialog()

IMPORT_C ~CAknSelectionListDialog ( ) [protected]

Member Functions Documentation

CAknDialog_Reserved()

IMPORT_C void CAknDialog_Reserved ( ) [private, virtual]

CAknSelectionListDialog_Reserved()

IMPORT_C void CAknSelectionListDialog_Reserved ( ) [private, virtual]

CEikDialog_Reserved_1()

IMPORT_C void CEikDialog_Reserved_1 ( ) [private, virtual]

CEikDialog_Reserved_2()

IMPORT_C void CEikDialog_Reserved_2 ( ) [private, virtual]

ComponentControl(TInt)

IMPORT_C CCoeControl * ComponentControl ( TInt aIndex ) const [protected, virtual]

Parameters

TInt aIndex

ConstructL(TInt)

IMPORT_C void ConstructL ( TInt aMenuTitleResourceId )

ConstructL() Second phase constructor.

Parameters

TInt aMenuTitleResourceId Menu items to be shown in options menu. Same as aMenuBarResourceId of NewL(C).

CountComponentControls()

IMPORT_C TInt CountComponentControls ( ) const [protected, virtual]

CreateCustomControlL(TInt)

IMPORT_C SEikControlInfo CreateCustomControlL ( TInt aControlType ) [protected, virtual]

CreateCustomControlL() creates own list or grid layouts.

Normal implementation of this method is:

         SEikControlInfo CreateCustomControlL(TInt aControlType)
     {
     CCoeControl *control = NULL;
     if ( aControlType == EMyCtGridLayout )
         {
         // CMyOddStyleGrid should be derived from CAknFormattedCellListBox or CEikColumnListBox.
         control = new(ELeave)CMyOddStyleGrid;
         } 
     SEikControlInfo info = {control,0,0};
     return info;
     }
        
See also IsAcceptableListBoxType() . CreateCustomControlL() and IsAcceptableListBoxType() forms a pair that should be implemented together.

Parameters

TInt aControlType

Draw(const TRect &)

IMPORT_C void Draw ( const TRect & ) const [protected, virtual]

Parameters

const TRect &

ExitViaIdle(TAny *)

TInt ExitViaIdle ( TAny * aSelectionList ) [protected, static]

ExitViaIdle()

Callback function to exit dialog after selecting something with tapping it. This prevents dialog to be destroyed before dialog page's handlepointereventl is fully completed.

Parameters

TAny * aSelectionList pointer to current CAknSelectionList

ExtensionInterface(TUid)

IMPORT_C void * ExtensionInterface ( TUid aInterface ) [private, virtual]

Parameters

TUid aInterface

FindBox()

IMPORT_C CAknSearchField * FindBox ( ) const [protected]

FindBox() accessor to findbox control

HandleListBoxEventL(CEikListBox *, TListBoxEvent)

IMPORT_C void HandleListBoxEventL ( CEikListBox * aListBox,
TListBoxEvent aEventType
) [protected]

Parameters

CEikListBox * aListBox currently ignored
TListBoxEvent aEventType type of the listbox event

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( const TPointerEvent & aPointerEvent ) [virtual]

From CCoeControl . Handles pointer events

Parameters

const TPointerEvent & aPointerEvent The pointer event.

IconArray()

IMPORT_C CArrayPtr < CGulIcon > * IconArray ( ) const

IconArray()

Icons, images and thumbnails are in this array.

The list items are tab separated strings with fixed format. Some of the numbers in the list item strings are indexes to this array.

This array can be modified by MDesCArray::MdcaPoint() method or at construction of dialog; after PrepareLC() call.

IsAcceptableListBoxType(TInt, TBool &)

IMPORT_C TBool IsAcceptableListBoxType ( TInt aControlType,
TBool & aIsFormattedCellList
) const [protected, virtual]

IsAcceptableListBoxType() : Detection of list and grid layouts

The CAknSelectionList only works with certain list and grid layouts.

You will get Panic() if you use your own list/grid layouts and you do not have this method implemented!

If you add new list layouts, you should implement this method to publish the type of the layout using this method. This is especially the case where you use CAknSelectionGrid with your own grid layout. (as there are no predefined grid layouts, you need to do this every time you use a selection grid)

The following aControlTypes are already implemented and requires no action:
         EAknCtSingleListBox
     EAknCtSingleNumberListBox
     EAknCtSingleHeadingListBox
     EAknCtSingleGraphicListBox
     EAknCtSingleGraphicHeadingListBox
     EAknCtSingleNumberHeadingListBox
     EAknCtSingleLargeListBox
     EAknCtDoubleListBox
     EAknCtDoubleNumberListBox
     EAknCtDoubleTimeListBox
     EAknCtDoubleLargeListBox
     EAknCtDoubleGraphicListBox
     EAknCtSettingListBox
     EAknCtSettingNumberListBox
        
Any other layout requires you to inherit from CAknSelectionList and implement the following methods:
         TBool IsAcceptableListBoxType(TInt aControlType, TBool &aIsFormattedCellList)
     {
     if (aControlType == EMyCtGridLayout)
         {
         // CAknGrid is-a formattedcelllistbox.
         aIsFormattedCellList = ETrue;
         return ETrue;
         }
     else
        {
        return EFalse;
        }
     }
        
See also CreateCustomControlL() . IsAcceptableListBoxType() and CreateCustomControlL() forms a pair that should be implemented together.

Parameters

TInt aControlType type of the control. Ignored in current default implementation.
TBool & aIsFormattedCellList returns whetehr list is a formatted cell listbox or a column listbox. Ignored in current default implementation. In derived implementations this must be set according to dialog's listbox type.

IsFormattedCellListBox()

IMPORT_C TBool IsFormattedCellListBox ( ) const [protected]

IsFormattedCellListBox() used to check whether listbox control is a CEikFormattedCellListBox or a CEikColumnListBox . If you derive from IsAcceptableListBoxType() you must take care of the aIsFormattedCellListParameter to make this method to work correctly.

ListBox()

IMPORT_C CEikListBox * ListBox ( ) const [protected, virtual]

ListBox() accessor to listbox control

NewL(TInt &, MDesCArray *, TInt, MEikCommandObserver *)

IMPORT_C CAknSelectionListDialog * NewL ( TInt & aOpenedItem,
MDesCArray * aArray,
TInt aMenuBarResourceId,
MEikCommandObserver * aCommand = 0
) [static]

CAknSelectionListDialog::NewL()

Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack .

Parameters

TInt & aOpenedItem Variable to be modified when user selects a list item.
MDesCArray * aArray Content of list items; A tab-separated string with texts and indexes to icon array
TInt aMenuBarResourceId Menu items to be shown in options menu
MEikCommandObserver * aCommand = 0 Callback for state changes. EAknCmdOpen command is send by listbox. Options menu commands come here too.

NewLC(TInt &, MDesCArray *, TInt, MEikCommandObserver *)

IMPORT_C CAknSelectionListDialog * NewLC ( TInt & aOpenedItem,
MDesCArray * aArray,
TInt aMenuBarResourceId,
MEikCommandObserver * aCommand = 0
) [static]

CAknSelectionListDialog::NewLC()

Static factory constructor. Uses two phase construction and leaves created object in CleanupStack .

Parameters

TInt & aOpenedItem Variable to be modified when user selects a list item.
MDesCArray * aArray Content of list items; A tab-separated string with texts and indexes to icon array
TInt aMenuBarResourceId Menu items to be shown in options menu
MEikCommandObserver * aCommand = 0 Callback for state changes. EAknCmdOpen command is send by listbox. Options menu commands come here too.

OfferKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponse OfferKeyEventL ( const TKeyEvent & aKeyEvent,
TEventCode aType
) [protected, virtual]

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType

OkToExitL(TInt)

IMPORT_C TBool OkToExitL ( TInt aButtonId ) [protected, virtual]

OkToExitL() From CAknDialog . This is not called if the Cancel button is activated unless the EEikDialogFlagNotifyEsc flag has been set.

Parameters

TInt aButtonId The ID of the button that was activated.

PostLayoutDynInitL()

IMPORT_C void PostLayoutDynInitL ( ) [protected, virtual]

PreLayoutDynInitL() From CAknDialog .

PreLayoutDynInitL()

IMPORT_C void PreLayoutDynInitL ( ) [protected, virtual]

PreLayoutDynInitL() From CAknDialog .

ProcessCommandL(TInt)

IMPORT_C void ProcessCommandL ( TInt aCommandId ) [protected, virtual]

ProcessCommandL() From CAknDialog . Processes commands and passes commands to FindBox and ListBox as needed.

Parameters

TInt aCommandId id of the command.

SelectionListProcessCommandL(TInt)

IMPORT_C void SelectionListProcessCommandL ( TInt aCommand ) [protected, virtual]

SelectionListProcessCommandL() handles selection list and markable list default commands.

For markable lists, this method handles EAknCmdMark, EAknCmdUnmark, EAknMarkAll, EAknUnmarkAll defined in options menu pane R_AVKON_MENUPANE_MARKABLE_LIST.

Parameters

TInt aCommand

SetIconArrayL(CArrayPtr< CGulIcon > *)

IMPORT_C void SetIconArrayL ( CArrayPtr < CGulIcon > * aIcons )

SetIconArrayL()

Icons, images and thumbnails are in this array.

The list items are tab separated strings with fixed format. Some of the numbers in the list item strings are indexes to this array.

This array can be modified by MDesCArray::MdcaPoint() method or at construction of dialog; after PrepareLC() call.

Parameters

CArrayPtr < CGulIcon > * aIcons a array containing icons.

SetSizeAndPosition(const TSize &)

IMPORT_C void SetSizeAndPosition ( const TSize & aSize ) [protected, virtual]

SetSizeAndPosition() From CAknDialog . Sets dialog's size to whole main pane.

Parameters

const TSize & aSize ignored

SetupFind(TFindType)

IMPORT_C void SetupFind ( TFindType aType )

SetupFind()

Provides a way to enable and disable find and find popup on runtime. You still need entry with id EFindControl to resource file for the find, this is only for disabling existing find element.

Parameters

TFindType aType type of findbox to be used.

Member Enumerations Documentation

Enum TFindType

CAknSelectionListDialog::TFindType Determines what kind of findbox should be used. Note, that a fixed findbox is not available with all list types.

Enumerators

ENoFind

no findbox should be used

EFixedFind

fixed findbox should be used

EPopupFind

popup findbox should be used

EAdaptiveFind

fixed findbox with adaptive search should be used

Member Data Documentation

MDesCArray * iArray

MDesCArray * iArray [private]

MEikCommandObserver * iCmdObserver

MEikCommandObserver * iCmdObserver [private]

TInt iDialogResourceId

TInt iDialogResourceId [private]

TBool iEnterKeyPressed

TBool iEnterKeyPressed [protected]

iEnterKeyPressed Set as ETrue if EAknCmdOpen is handled in ProcessCommandL() . This will eventually cause OkToExitL() to be called with EAknSoftkeyOk as aButtonId.

CAknSelectionListDialogExtension * iExtension

CAknSelectionListDialogExtension * iExtension [private]

CAknSearchField * iFindBox

CAknSearchField * iFindBox [private]

TFindType iFindType

TFindType iFindType [private]

TInt * iSelectedItem

TInt * iSelectedItem [private]

TInt iSpare

TInt iSpare [private]