Text Object Model

Text Object Model

The Text Object Model (TOM) is a Microsoft Windows API that provides developers with object-based rich text manipulation interfaces. It is implemented through COM, and can be accessed through Microsoft Word or additionally through the RichEdit controls that normally ship with Windows.

History

When TOM was developed, it was influenced heavily by WordBasic, a macro language used within Word before VBA (Word 95 and previous releases). TOM has developed alongside the RichEdit technology, and has been present at least since version 2.0 of the RichEdit components. The API has been available as an option for Windows CE since the 2.5 release of RichEdit (Western Languages Only), which was at least used by Pocket Word at that time.

Technical details

To retrieve an implemented instance of ITextDocument interface (the top-level document interface), the EM_GETOLEINTERFACE message may be sent via the SendMessage API to obtain a pointer to an IRichEditOle object [ [http://msdn2.microsoft.com/en-us/library/ms644950.aspx SendMessage] ] , which also implements the ITextDocument interface. TOM may operate differently depending on the version of the RichEdit control the interface is retrieved for (RICHEDIT50W windows provide more functionality than the standard RICHEDIT20W or RICHEDIT20A controls, like proper table support).

COM Interfaces

;ITextDocument:A top-level interface. Documents may be opened and saved through this interface. Some screen update control is achieved here as well. Undo/redo grouping is implemented here. Arbitrary text ranges (ITextRange) and a text range for currently selected text (ITextSelection) are provided, which are used to modify or review the document.;ITextRange:Provides editing and data-binding tools to select text within a document, that can be examined, modified, or removed. Ranges exist within paragraphs, and the paragraph a range is within is accessible through a property of this object.:;ITextSelection::Provides selection information, in addition to functionality provided by the ITextRange.;ITextFont:Dual Interface with ITextPara:A mechanism for inspection and modification of rich edit font attributes, that is considerably more extensive that the standard OLE interface used to describe a font (IFontDisp, StdFont).;ITextPara:Dual Interface with ITextFont:Provides extensive information about the position, formatting outside of fonts (e.g. first line indent), behavior (e.g. widow control), and purpose of a paragraph (it could be a normal paragraph, a list, a table, etc).

ee also

*Rich Text Format
*Component Object Model (COM)
*Object Linking and Embedding (OLE)

References

External links

* [http://msdn2.microsoft.com/en-us/library/bb787607(VS.85).aspx Text Object Model Overview]
* [http://msdn2.microsoft.com/en-us/library/bb788041.aspx Obtaining the TOM Object for a RichEdit Control]
* [http://blogs.msdn.com/murrays/default.aspx?p=2 Includes Historical RichEdit/TOM information]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Text Object Model — Значимость предмета статьи поставлена под сомнение. Пожалуйста, покажите в статье значимость её предмета, добавив в неё доказательства значимости по частным критериям значимости или, в случае если частные критерии значимости для… …   Википедия

  • Component Object Model — В данной статье или разделе имеется список источников или внешних ссылок, но источники отдельных утверждений остаются неясными из за отсутствия сносок …   Википедия

  • Component Object Model — Not to be confused with COM file. Component Object Model (COM) is a binary interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range… …   Wikipedia

  • Distributed Component Object Model — (DCOM) is a proprietary Microsoft technology for communication among software components distributed across networked computers. DCOM, which originally was called Network OLE , extends Microsoft s COM, and provides the communication substrate… …   Wikipedia

  • Document Object Model — Not to be confused with Domain Object Model. HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Fr …   Wikipedia

  • AppleEvent Object Model — The AppleEvent Object Model (AEOM) was a set of protocols built on top of AppleEvents by which applications running under Mac OS could control each other s functions. Applications that implemented some part of the AEOM were called scriptable ,… …   Wikipedia

  • Document Object Model —     HTML HTML и HTML5 Динамический HTML …   Википедия

  • Project Object Model — Maven ist ein Build Management Tool der Apache Software Foundation und basiert auf Java. Mit ihm kann man insbesondere Java Programme standardisiert erstellen und verwalten. Inhaltsverzeichnis 1 Konzeptionelles 1.1 Der Standard Lebenszyklus 1.2… …   Deutsch Wikipedia

  • Document object model — DOM Knotenbaum einer Webseite Das Document Object Model (DOM) ist eine Spezifikation einer Schnittstelle für den Zugriff auf HTML oder XML Dokumente. Sie wird vom World Wide Web Consortium definiert. Eine Implementierung, die dieser Spezifikation …   Deutsch Wikipedia

  • Object Linking and Embedding — (OLE) is a technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control eXtension (OCX), a way to develop and use custom user interface elements. On a technical level,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”