AknFind Class Reference

#include <mw/AknUtils.h>

class AknFind
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 &)

Detailed Description

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.

Member Function 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]

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

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

Helper function to handle find pane's visibility.

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

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

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

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]

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.

Since
2.6
ParameterDescription
aParentControlParent control.
aListBoxPointer to listbox control.
aSearchFieldPointer to search field control.
aFindWindowLAF specific table line for find window.
aListAreaLAF specific table for list box area.
aIsPopupETrue if popup find pane, EFalse if normal find pane.
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().

ParameterDescription
aParentControlParent control.
aListBoxColumn list, optional and available only with column lists.
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().

ParameterDescription
aParentControlParent control.
aListBoxPointer to listbox control.
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.

Since
5.0
ParameterDescription
aItemTextList box item text.
aSearchTextSearched text.
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.

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

IsFindMatch ( const TDesC &, const TDesC & )

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

Checks if aItemText matches aSearchText.

ParameterDescription
aItemTextList box item text.
aSearchTextSearched text.

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

IsFindWordSeparator ( TChar )

IMPORT_C TBoolIsFindWordSeparator(TCharaCh)[static]

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

ParameterDescription
aChComperative character.

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

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.

Since
5.0
ParameterDescription
aInputTextList box item text
aColumnFlagThe bit flag shows which columns take into account
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().

Since
5.0
ParameterDescription
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.
aItemStringList box item text.

UpdateNextCharsL ( HBufC *&, TChar )

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

Update next characters if find pane state was changed.

Since
5.0
ParameterDescription
aNextCharsNext characters for the adaptive search grid
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.

Since
5.0
ParameterDescription
aNextCharsreference to the next characters for the adaptive search grid
aItemStringstring we are searching.