×
Namespaces

Variants
Actions

查找特殊项API

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

代码示例
文章
翻译:
翻译自: Item Finder API
hoolee
最后由 hamishwillee 在 30 May 2013 编辑

Note.pngNote: :这个API不是公开SDK的一部分,但可以在这里SDK API Plug-in找到

API使用目的

插件主要用来进行自动标记(http, email, 电话号码)

头文件:

#include <aknitemfinder.h>

Note.pngNote: :在S60第五版扩展plug-in中,这个API将变为CItemFinder,可以在epoc32\include\itemfinder.h定位

Use cases

CAKnItemFinder提供了文本编辑框中如电话号码,URL和http地址的高亮,选择,获取功能

示例代码

iAutoFinder = CAknItemFinder::NewL(); 
//Must be called before editor creation in order to have effect
iAutoFinder->SetFindModeL(CAknItemFinder::EPhoneNumber |
CAknItemFinder::EUrlAddress |
CAknItemFinder::EEmailAddress );
 
iAutoFinder->SetEditor((CEikRichTextEditor**)&iDialText); // iDial is any editor.

The following code is used to scroll down for the found items through the editor

TBool iReturn = iAutoFinder->NextItemOrScrollL( CAknItemFinder::ENextDown );

The following code is used to retrieve the selected item.

HBufC* iBuff = iAutoFinder->CurrentItem().iItemDescriptor;

示例程序

File:UseItemFinder.zip

This page was last modified on 30 May 2013, at 07:42.
73 page views in the last 30 days.