查找特殊项API
文章信息
Note: :这个API不是公开SDK的一部分,但可以在这里SDK API Plug-in找到
API使用目的
插件主要用来进行自动标记(http, email, 电话号码)
头文件:
#include <aknitemfinder.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;


(no comments yet)