AknFind Class Reference
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
TKeyResponse
|
HandleFindOfferKeyEventL
(const
TKeyEvent
&,
TEventCode
,
CCoeControl
*,
CEikListBox
*, CAknSearchField *,
TBool
,
TBool
&)
|
void
|
HandleFindPaneVisibility
(CAknSearchField *,
TBool
,
TBool
,
TBool
&)
|
IMPORT_C void
|
HandleFindPopupProcessCommandL
(
TInt
,
CEikListBox
*, CAknSearchField *,
CCoeControl
*)
|
IMPORT_C void
|
HandleFindSizeChanged
(
CCoeControl
*,
CEikListBox
*, CAknSearchField *,
TBool
,
TInt
,
TInt
,
TInt
,
TInt
)
|
IMPORT_C void
|
HandleFindSizeChangedLayouts
(
CCoeControl
*,
CEikListBox
*, CAknSearchField *, const
TAknWindowLineLayout
&, const
TAknWindowLineLayout
&,
TBool
, const
TAknWindowLineLayout
&)
|
IMPORT_C void
|
HandleFixedFindSizeChanged
(
CCoeControl
*,
CAknColumnListBox
*, CAknSearchField *)
|
IMPORT_C void
|
HandlePopupFindSizeChanged
(
CCoeControl
*,
CEikListBox
*, CAknSearchField *)
|
IMPORT_C
TBool
|
IsAdaptiveFindMatch
(const
TDesC
&, const
TDesC
&,
HBufC
*&)
|
IMPORT_C
TBool
|
IsFindMatch
(const
TDesC
&, const
TDesC
&)
|
IMPORT_C
TBool
|
IsFindWordSeparator
(
TChar
)
|
IMPORT_C void
|
UpdateItemTextAccordingToFlag
(const
TDesC
&,
TBitFlags32
,
TDes
&)
|
IMPORT_C void
|
UpdateNextCharsFromString
(
HBufC
*&, const
TDesC
&)
|
void
|
UpdateNextCharsL
(
HBufC
*&,
TChar
)
|
void
|
UpdateNextCharsL
(
HBufC
*&, const
TDesC
&)
|
Member Functions Documentation
HandleFindOfferKeyEventL(const TKeyEvent &, TEventCode, CCoeControl *, CEikListBox *, CAknSearchField *, TBool, TBool &)
HandleFindPaneVisibility(CAknSearchField *, TBool, TBool, TBool &)
void
|
HandleFindPaneVisibility
|
(
|
CAknSearchField *
|
aSearchField,
|
|
TBool
|
ispopup,
|
|
TBool
|
textchanged,
|
|
TBool
&
|
aNeedRefresh
|
|
)
|
[static]
|
Helper function to handle find pane's visibility.
Parameters
CAknSearchField * aSearchField
|
Pointer to search field control.
|
TBool
ispopup
|
ETrue if popup find pane, EFalse if normal find pane.
|
TBool
textchanged
|
ETrue when text in CAknSearchField has changed.
|
TBool
& aNeedRefresh
|
ETrue when find pane is redrawn.
|
HandleFindPopupProcessCommandL(TInt, CEikListBox *, CAknSearchField *, CCoeControl *)
IMPORT_C void
|
HandleFindPopupProcessCommandL
|
(
|
TInt
|
aCommand,
|
|
CEikListBox
*
|
aListBox,
|
|
CAknSearchField *
|
aSearchField,
|
|
CCoeControl
*
|
aParentControl
|
|
)
|
[static]
|
HandleFindSizeChanged(CCoeControl *, CEikListBox *, CAknSearchField *, TBool, TInt, TInt, TInt, TInt)
IMPORT_C void
|
HandleFindSizeChanged
|
(
|
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
|
|
)
|
[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 &)
Creates layout for a find pane and for a list. This method must be called in
SizeChanged()
method of an container.
Parameters
CCoeControl
* aParentControl
|
Parent control.
|
CEikListBox
* aListBox
|
Pointer to listbox control.
|
CAknSearchField * aSearchField
|
Pointer to search field control.
|
const
TAknWindowLineLayout
& aFindWindow
|
LAF specific table line for find window.
|
const
TAknWindowLineLayout
& aListArea
|
LAF specific table for list box area.
|
TBool
aIsPopup
|
ETrue if popup find pane, EFalse if normal find pane.
|
const
TAknWindowLineLayout
& aFindWindowParent
|
LAF specific table line for find parent.
|
HandleFixedFindSizeChanged(CCoeControl *, CAknColumnListBox *, CAknSearchField *)
IMPORT_C void
|
HandleFixedFindSizeChanged
|
(
|
CCoeControl
*
|
aParentControl,
|
|
CAknColumnListBox
*
|
aListBox,
|
|
CAknSearchField *
|
aSearchField
|
|
)
|
[static]
|
Parameters
CCoeControl
* aParentControl
|
Parent control.
|
CAknColumnListBox
* aListBox
|
Column list, optional and available only with column lists.
|
CAknSearchField * aSearchField
|
Pointer to search field control.
|
HandlePopupFindSizeChanged(CCoeControl *, CEikListBox *, CAknSearchField *)
IMPORT_C void
|
HandlePopupFindSizeChanged
|
(
|
CCoeControl
*
|
aParentControl,
|
|
CEikListBox
*
|
aListBox,
|
|
CAknSearchField *
|
aSearchField
|
|
)
|
[static]
|
Parameters
CCoeControl
* aParentControl
|
Parent control.
|
CEikListBox
* aListBox
|
Pointer to listbox control.
|
CAknSearchField * aSearchField
|
Pointer to search field control.
|
IsAdaptiveFindMatch(const TDesC &, const TDesC &, HBufC *&)
IMPORT_C
TBool
|
IsAdaptiveFindMatch
|
(
|
const
TDesC
&
|
aItemText,
|
|
const
TDesC
&
|
aSearchText,
|
|
HBufC
*&
|
aNextChars
|
|
)
|
[static]
|
Checks if
aItemText
matches
aSearchText
. Calls
UpdateNextCharsL()
if findutil is not supported.
Parameters
const
TDesC
& aItemText
|
List box item text.
|
const
TDesC
& aSearchText
|
Searched text.
|
HBufC
*& aNextChars
|
Reference 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
TBool
|
IsFindMatch
|
(
|
const
TDesC
&
|
aItemText,
|
|
const
TDesC
&
|
aSearchText
|
|
)
|
[static]
|
Checks if
aItemText
matches
aSearchText
.
Parameters
const
TDesC
& aItemText
|
List box item text.
|
const
TDesC
& aSearchText
|
Searched text.
|
IsFindWordSeparator(TChar)
IMPORT_C
TBool
|
IsFindWordSeparator
|
(
|
TChar
|
aCh
|
)
|
[static]
|
Tests if aCh is a word separator character as described in S60.
Parameters
TChar
aCh
|
Comperative character.
|
UpdateItemTextAccordingToFlag(const TDesC &, TBitFlags32, TDes &)
IMPORT_C void
|
UpdateItemTextAccordingToFlag
|
(
|
const
TDesC
&
|
aInputText,
|
|
TBitFlags32
|
aColumnFlag,
|
|
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.
Parameters
const
TDesC
& aInputText
|
List box item text
|
TBitFlags32
aColumnFlag
|
The bit flag shows which columns take into account
|
TDes
& aOutText
|
Updated list box item text accoding to bit flag
|
UpdateNextCharsFromString(HBufC *&, const TDesC &)
IMPORT_C void
|
UpdateNextCharsFromString
|
(
|
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()
.
Parameters
HBufC
*& aNextChars
|
Reference 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
& aItemString
|
List box item text.
|
UpdateNextCharsL(HBufC *&, TChar)
void
|
UpdateNextCharsL
|
(
|
HBufC
*&
|
aNextChars,
|
|
TChar
|
aCh
|
|
)
|
[static]
|
Update next characters if find pane state was changed.
Parameters
HBufC
*& aNextChars
|
Next characters for the adaptive search grid
|
TChar
aCh
|
Criteria from the search field.
|
UpdateNextCharsL(HBufC *&, const TDesC &)
void
|
UpdateNextCharsL
|
(
|
HBufC
*&
|
aNextChars,
|
|
const
TDesC
&
|
aItemString
|
|
)
|
[static]
|
For Devanagari adaptive search Update next characters if find pane state was changed.
Parameters
HBufC
*& aNextChars
|
reference to the next characters for the adaptive search grid
|
const
TDesC
& aItemString
|
string we are searching.
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.