Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

查找特殊项API

From 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 04:42.
138 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×