什么是“故事”?在文本对象模型中?

发布于 2024-09-09 07:51:24 字数 329 浏览 0 评论 0原文

本文档介绍了 RichEdit 和 ITextDocument,它们是 MFC 的一部分。 RichEdit 使用 TOM,即文本对象模型。该文档反复引用“故事”:

获取故事计数 property-get 方法检索 本文档中的故事数。

GetStoryRanges property-get 方法检索 故事集合对象用于 列举文档中的故事。

在文档的其他地方,它是文档的度量单位,顺序如下:

字符>字符。词>句子>段落>故事>但是

故事到底是什么?

This documentation describes RichEdit and ITextDocument, which are part of MFC. RichEdit uses TOM, or text object model. The documentation makes repeated reference to "stories":

The GetStoryCount
property-get method retrieves the
count of stories in this document.

The GetStoryRanges
property-get method retrieves the
story collection object used to
enumerate the stories in a document.

At other places in the documentation, it's a unit of measurement of the document, in a progression like:

character > word > sentence > paragraph > story > page

But what exactly is a story?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自此以后,行同陌路 2024-09-16 07:51:24

据我对 RichEdit 文档的理解,“故事”在某种程度上是“文档”下方的一个单元。然而,对于 RichEdit,这是无关紧要的,因为每个 RichEdit 文档只能有一个故事。

我的理解是,虽然 RichEdit 是唯一支持具有公开可用接口的 TOM 的 Microsoft 组件,但 Word 内部也支持 TOM,而且事实上 TOM 是从 Word 和 Office 发展而来的,因此 TOM 具有源自该历史的各种奇怪的怪癖。例如,这也可以在 TOM 支持的各种字符样式中看到,但 RichEdit 无法处理所有字符样式。

简而言之,您可以使用 RichEdit 忽略“故事”。

As far as I've understood the RichEdit documentation, a "story" is somehow a unit just below "document". With RichEdit, however, it's irrelevant, as each RichEdit document can only have the one story.

My understanding is that, while RichEdit is the only Microsoft component that supports TOM with a publicly available interface, internally Word also supports TOM, and in fact TOM grew out of Word and Office, so TOM has various odd quirks that arise from that history. This can also be seen in, for example, various character styles supported by TOM, not all of which RichEdit handles.

In short, you can ignore "story" with RichEdit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文