IMarkupPointer :: Right and IMarkupPointer :: Left 'notes document describes

本文介绍了Markup Pointer接口中使用的MARKUP_CONTEXT_TYPE枚举类型,该类型定义了指针左右移动时遇到的不同内容类型,包括无内容、文本、元素开始标签和结束标签等。文章通过具体示例解释了如何使用IMarkupPointer::Left和IMarkupPointer::Right方法来确定指针周围的上下文。
MARKUP_CONTEXT_TYPE Enumerated Type
0 out of 1 rated this helpful - Rate this topic
An enumerated type that contains the different options for the IMarkupPointer :: Right and IMarkupPointer :: Left methods.

Syntax

Copy
typedef enum {
CONTEXT_TYPE_None = 0,
CONTEXT_TYPE_Text = 1,
CONTEXT_TYPE_EnterScope = 2
CONTEXT_TYPE_ExitScope = 3,
CONTEXT_TYPE_NoScope = 4
} MARKUP_CONTEXT_TYPE;


Constants

CONTEXT_TYPE_None
There is no markup content next to the markup pointer in the specified direction.

CONTEXT_TYPE_Text
The markup content next to the markup pointer in the specified direction is text.

CONTEXT_TYPE_EnterScope

An element's opening tag is next to the markup pointer in the specified direction.


/ / Here CONTEXT_TYPE_EnterScope is markup pointer neighbor elements in the specified direction of opening tag, that <xx> (</ xx>) element, but that is not the case, CONTEXT_TYPE_EnterScope represented in a given direction, into <xx> ... </ xx> element or leave this element.


Example: <xx> | ... </ xx> (red vertical line represents markup pointer) to test if the left (Left function that is called):


HRESULT Left (BOOL fMove, MARKUP_CONTEXT_TYPE * pContext, IHTMLElement ** ppElement, long * pcch, OLECHAR * pchText);


Get to parameter pContext is CONTEXT_TYPE_ExitScope a Left is to promote markup the Pointer to leave <xx> ... </ xx> element. But


Markup pointer <xx> ... </ xx> | this position, then the Left function parameters pContext is CONTEXT_TYPE_EnterScope.


Conclusion: IMarkupPointer :: Right / Left function returns the pContext determined by their leave or enter the element node, rather than the current direction of movement of the neighbor is opening or closing tag.
Alpha
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

北京橙溪 www.enwing.com

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值