AknFind Class Reference

class AknFind

This class implements find requirements from component specifications. This class works also as documentation of how to use different find components. (The implementation has been copied from the example application which implements find and replaced the code with calls to these static functions).

There is no reason for an application to use this class directly. Application should use CAknSelectionListDialog instead. This class is public only because sometimes it is necessary to access the low level behaviour of find to implement similar functionality in places independent of find; or if CAknSelectionListDialog is not used for some reason.

Public Member Functions
IMPORT_C TKeyResponseHandleFindOfferKeyEventL(const TKeyEvent &, TEventCode, CCoeControl *, CEikListBox *, CAknSearchField *, TBool, TBool &)
voidHandleFindPaneVisibility(CAknSearchField *, TBool, TBool, TBool &)
IMPORT_C voidHandleFindPopupProcessCommandL(TInt, CEikListBox *, CAknSearchField *, CCoeControl *)
IMPORT_C voidHandleFindSizeChanged(CCoeControl *, CEikListBox *, CAknSearchField *, TBool, TInt, TInt, TInt, TInt)
IMPORT_C voidHandleFindSizeChangedLayouts(CCoeControl *, CEikListBox *, CAknSearchField *, const TAknWindowLineLayout &, const TAknWindowLineLayout &, TBool, const TAknWindowLineLayout &)
IMPORT_C voidHandleFixedFindSizeChanged(CCoeControl *, CAknColumnListBox *, CAknSearchField *)
IMPORT_C voidHandlePopupFindSizeChanged(CCoeControl *, CEikListBox *, CAknSearchField *)
IMPORT_C TBoolIsAdaptiveFindMatch(const TDesC &, const TDesC &, HBufC *&)
IMPORT_C TBoolIsFindMatch(const TDesC &, const TDesC &)
IMPORT_C TBoolIsFindWordSeparator(TChar)
IMPORT_C voidUpdateItemTextAccordingToFlag(const TDesC &, TBitFlags32, TDes &)
IMPORT_C voidUpdateNextCharsFromString(HBufC *&, const TDesC &)
voidUpdateNextCharsL(HBufC *&, TChar)
voidUpdateNextCharsL(HBufC *&, const TDesC &)

Member Functions Documentation

HandleFindOfferKeyEventL(const TKeyEvent &, TEventCode, CCoeControl *, CEikListBox *, CAknSearchField *, TBool, TBool &)

IMPORT_C TKeyResponseHandleFindOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType,
CCoeControl *aListBoxParent,
CEikListBox *aListBox,
CAknSearchField *aSearchField,
TBoolisFindPopup,
TBool &aNeedRefresh
)[static]

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType
CCoeControl * aListBoxParent
CEikListBox * aListBox
CAknSearchField * aSearchField
TBool isFindPopup
TBool & aNeedRefresh

HandleFindPaneVisibility(CAknSearchField *, TBool, TBool, TBool &)

voidHandleFindPaneVisibility(CAknSearchField *aSearchField,
TBoolispopup,
TBooltextchanged,
TBool &aNeedRefresh
)[static]

Helper function to handle find pane's visibility.

Parameters

CAknSearchField * aSearchFieldPointer to search field control.
TBool ispopupETrue if popup find pane, EFalse if normal find pane.
TBool textchangedETrue when text in CAknSearchField has changed.
TBool & aNeedRefreshETrue when find pane is redrawn.

HandleFindPopupProcessCommandL(TInt, CEikListBox *, CAknSearchField *, CCoeControl *)

IMPORT_C voidHandleFindPopupProcessCommandL(TIntaCommand,
CEikListBox *aListBox,
CAknSearchField *aSearchField,
CCoeControl *aParentControl
)[static]

Parameters

TInt aCommand
CEikListBox * aListBox
CAknSearchField * aSearchField
CCoeControl * aParentControl

HandleFindSizeChanged(CCoeControl *, CEikListBox *, CAknSearchField *, TBool, TInt, TInt, TInt, TInt)

IMPORT_C voidHandleFindSizeChanged(CCoeControl *aParentControl,
CEikListBox *aListBox,
CAknSearchField *aSearchField,
TBoolispopup = ETrue,
TIntaFindWindowResourceId = R_AVKON_POPUP_FIND_WINDOW,
TIntaListAreaId = R_AVKON_LIST_GEN_PANE,
TIntaListResourceIdWithFindPopup = R_AVKON_LIST_GEN_PANE_WITH_FIND_POPUP,
TIntaFindWindowParentResourceId = R_AVKON_MAIN_PANE_WITH_STATUS_PANE
)[static]

Parameters

CCoeControl * aParentControl
CEikListBox * aListBox
CAknSearchField * aSearchField
TBool ispopup = ETrue
TInt aFindWindowResourceId = R_AVKON_POPUP_FIND_WINDOW
TInt aListAreaId = R_AVKON_LIST_GEN_PANE
TInt aListResourceIdWithFindPopup = R_AVKON_LIST_GEN_PANE_WITH_FIND_POPUP
TInt aFindWindowParentResourceId = R_AVKON_MAIN_PANE_WITH_STATUS_PANE

HandleFindSizeChangedLayouts(CCoeControl *, CEikListBox *, CAknSearchField *, const TAknWindowLineLayout &, const TAknWindowLineLayout &, TBool, const TAknWindowLineLayout &)

IMPORT_C voidHandleFindSizeChangedLayouts(CCoeControl *aParentControl,
CEikListBox *aListBox,
CAknSearchField *aSearchField,
const TAknWindowLineLayout &aFindWindow,
const TAknWindowLineLayout &aListArea,
TBoolaIsPopup,
const TAknWindowLineLayout &aFindWindowParent
)[static]

Creates layout for a find pane and for a list. This method must be called in SizeChanged() method of an container.

2.6

Parameters

CCoeControl * aParentControlParent control.
CEikListBox * aListBoxPointer to listbox control.
CAknSearchField * aSearchFieldPointer to search field control.
const TAknWindowLineLayout & aFindWindowLAF specific table line for find window.
const TAknWindowLineLayout & aListAreaLAF specific table for list box area.
TBool aIsPopupETrue if popup find pane, EFalse if normal find pane.
const TAknWindowLineLayout & aFindWindowParentLAF specific table line for find parent.

HandleFixedFindSizeChanged(CCoeControl *, CAknColumnListBox *, CAknSearchField *)

IMPORT_C voidHandleFixedFindSizeChanged(CCoeControl *aParentControl,
CAknColumnListBox *aListBox,
CAknSearchField *aSearchField
)[static]

This is the new typesafe (and easier to use) version of HandleFindSizeChanged(). Use this instead of (deprecated) HandleFindSizeChanged().

Parameters

CCoeControl * aParentControlParent control.
CAknColumnListBox * aListBoxColumn list, optional and available only with column lists.
CAknSearchField * aSearchFieldPointer to search field control.

HandlePopupFindSizeChanged(CCoeControl *, CEikListBox *, CAknSearchField *)

IMPORT_C voidHandlePopupFindSizeChanged(CCoeControl *aParentControl,
CEikListBox *aListBox,
CAknSearchField *aSearchField
)[static]

This is the new typesafe(and easier to use) version of HandleFindSizeChanged(). Use this instead of (deprecated) HandleFindSizeChanged().

Parameters

CCoeControl * aParentControlParent control.
CEikListBox * aListBoxPointer to listbox control.
CAknSearchField * aSearchFieldPointer to search field control.

IsAdaptiveFindMatch(const TDesC &, const TDesC &, HBufC *&)

IMPORT_C TBoolIsAdaptiveFindMatch(const TDesC &aItemText,
const TDesC &aSearchText,
HBufC *&aNextChars
)[static]

Checks if aItemText matches aSearchText. Calls UpdateNextCharsL() if findutil is not supported.

5.0

ETrue if list box item text aItemText matches aSearchText otherwise EFalse.

Parameters

const TDesC & aItemTextList box item text.
const TDesC & aSearchTextSearched text.
HBufC *& aNextCharsReference to the next characters for the adaptive search grid The HBufC buffer may be re-allocated by this method. In that case the pointer reference is modified to point to the re-allocated object.

IsFindMatch(const TDesC &, const TDesC &)

IMPORT_C TBoolIsFindMatch(const TDesC &aItemText,
const TDesC &aSearchText
)[static]

Checks if aItemText matches aSearchText.

ETrue if list box item text aItemText matches aSearchText otherwise EFalse.

Parameters

const TDesC & aItemTextList box item text.
const TDesC & aSearchTextSearched text.

IsFindWordSeparator(TChar)

IMPORT_C TBoolIsFindWordSeparator(TCharaCh)[static]

Tests if aCh is a word separator character as described in S60.

ETrue if aCh is a word separator character as described in S60 otherwise EFalse.

Parameters

TChar aChComperative character.

UpdateItemTextAccordingToFlag(const TDesC &, TBitFlags32, TDes &)

IMPORT_C voidUpdateItemTextAccordingToFlag(const TDesC &aInputText,
TBitFlags32aColumnFlag,
TDes &aOutText
)[static]

Update next chars from the list box item text according to the bitflag. Use to exclude columns from the listbox string. For example icon index columns.

5.0

Parameters

const TDesC & aInputTextList box item text
TBitFlags32 aColumnFlagThe bit flag shows which columns take into account
TDes & aOutTextUpdated list box item text accoding to bit flag

UpdateNextCharsFromString(HBufC *&, const TDesC &)

IMPORT_C voidUpdateNextCharsFromString(HBufC *&aNextChars,
const TDesC &aItemString
)[static]

Update next chars from the list box item text, when search field if empty. This need to be done for update next characters for adaptive grid works faster then calling IsAdaptiveFindMatch().

5.0

Parameters

HBufC *& aNextCharsReference to the next characters for the adaptive search grid The HBufC buffer may be re-allocated by this method. In that case the pointer reference is modified to point to the re-allocated object.
const TDesC & aItemStringList box item text.

UpdateNextCharsL(HBufC *&, TChar)

voidUpdateNextCharsL(HBufC *&aNextChars,
TCharaCh
)[static]

Update next characters if find pane state was changed.

5.0

Parameters

HBufC *& aNextCharsNext characters for the adaptive search grid
TChar aChCriteria from the search field.

UpdateNextCharsL(HBufC *&, const TDesC &)

voidUpdateNextCharsL(HBufC *&aNextChars,
const TDesC &aItemString
)[static]

For Devanagari adaptive search Update next characters if find pane state was changed.

5.0

Parameters

HBufC *& aNextCharsreference to the next characters for the adaptive search grid
const TDesC & aItemStringstring we are searching.