GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Eleven — SGML Functions (continued)
Overview
The HTMLAddText function adds text to the output stream as encoded, or unencoded depending on the text mode of the HTML Writer Object. The function also adds data in free text or styled mode.
Syntax/Parameters
Syntax
int = HTMLAddText ( handle hHWO, string data, [dword style | string style] );
Parameters
hHWO
A handle to an HTML Writer Object.
data
A string containing the text to be added. If the mode is encoded (i.e., the caller is creating PCDATA) any text and HTML can be added to the stream. If the object is writing in open mode, the text is immediately added to the stream and encoded as required. When writing in styled mode, the text is added to an open paragraph or table cell stream and is written on completion of the paragraph or cell.
style
An optional string or dword that applies style to the data being written in styled mode. The parameter can be a dword specifying a simple text attribute (TA_) value or a string containing more complex CSS information. The parameters must only be inline style properties such as ‘font-family’ or ‘color’.
Return Value
An int as a ERROR_NONE (0) for no error or a formatted error code.
Remarks
In open mode and when data is being added as raw PCDATA, the programmer is responsible for not introducing HTML errors. In open mode as PCDATA the code can contain essentially any tags. They are passed through to the output without processing. With open mode and non-PCDATA, all escaped characters are translated as character entities into PCDATA. Open mode stream is not code wrapped.
In styled mode, text is accumulated by a style manager into an open paragraph or cell. When the block is completed, all styles are normalized and applied to the containing block as required. For example, if all the content of the style of a paragraph is ‘10pt’, the block will be made ‘10pt’. In style mode, the code is wrapped.
It is important to note that word space in HTML count as any white space. Adding in extra spaces in the stream will be added to the result but will not display as extra space when the document is viewed in the browser.
When using the dword style, basic styles can be set via the used of style bits, these are as follows (note that more items are specified in the SDK but are not supported for this function):
Definition | Bitwise | Description | ||||
Text Color | ||||||
TA_CI_BLACK | 0x00000000 | Black #000000 (default) | ||||
TA_CI_AQUA | 0x00000001 | Aqua #00FFFF | ||||
TA_CI_BLUE | 0x00000002 | Blue #0000FF | ||||
TA_CI_FUCHSIA | 0x00000003 | Fuchsia #FF00FF | ||||
TA_CI_GRAY | 0x00000004 | Gray #808080 | ||||
TA_CI_GREEN | 0x00000005 | Green #008000 | ||||
TA_CI_LIME | 0x00000006 | Lime #00FF00 | ||||
TA_CI_MAROON | 0x00000007 | Maroon #800000 | ||||
TA_CI_NAVY | 0x00000008 | Navy #000080 | ||||
TA_CI_OLIVE | 0x00000009 | Olive #808000 | ||||
TA_CI_PURPLE | 0x0000000A | Purple #800080 | ||||
TA_CI_RED | 0x0000000B | Red #FF0000 | ||||
TA_CI_SILVER | 0x0000000C | Silver #C0C0C0 | ||||
TA_CI_TEAL | 0x0000000D | Teal #008080 | ||||
TA_CI_WHITE | 0x0000000E | White #FFFFFF | ||||
TA_CI_YELLOW | 0x0000000F | Yellow #FFFF00 | ||||
Font State Styles | ||||||
TA_BOLD | 0x00000020 | Bold | ||||
TA_ITALIC | 0x00000040 | Italic | ||||
TA_BOLD_ITALIC | 0x00000060 | Bold Italic | ||||
Underlines (3 bits) | ||||||
TA_UL_SINGLE | 0x00000100 | Single Underline | ||||
TA_UL_OVERLINE | 0x00000700 | Overline Line Type | ||||
Line Through (2 bits) | ||||||
TA_LT_SINGLE | 0x00000800 | Single Line Strikethrough | ||||
Text Case Adjustment | ||||||
TA_TC_CAPITALIZE | 0x00002000 | Capitalize | ||||
TA_TC_UPPER | 0x00004000 | All Caps | ||||
TA_TC_LOWER | 0x00006000 | All Lower Case | ||||
TA_TC_SMALL_CAPS | 0x00008000 | Small Caps | ||||
Vertical/Text Position | ||||||
TA_VP_SUPER | 0x00010000 | Superscript | ||||
TA_VP_SUB | 0x00020000 | Subscript |
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.