|
Class: AbstractTreeBuilder (in HTML)
Object
|
+--HTML::AbstractTreeBuilder
|
+--HTML::SVGTreeBuilder
|
+--HTML::TreeBuilder
- Package:
- stx:goodies/webServer/htmlTree
- Category:
- Net-Documents-HTML-TreeBuilder
- Version:
- rev:
1.32
date: 2024/02/29 16:58:12
- user: cg
- file: HTML__AbstractTreeBuilder.st directory: goodies/webServer/htmlTree
- module: stx stc-classLibrary: htmlTree
HTML tree builder - makes it easier to construct valid HTML-trees.
This class is abstract; it is intended as the common superclass of different sgml-like
trees (such as HTML, VML etc.).
See concrete subclass(es), especially HTML::TreeBuilder
copyrightCOPYRIGHT (c) 2005 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
operations
-
escapeText: aString
-
a common method to escape the text,
because the escape is not only usefull for #text:
maybe the developer likes to escape some text before
assigning the text as 'raw' text to #title: for e.g.
ATTENTION: do not change the behvior of #title to escape the text inside.
I want to be able to assign raw text to #title,
which is already done to be able to add special breaks within the title
Also usefull for other attribute text. Use this (the same) escape behavior
for all text escape (in text and in all attributes, if required)
accessing
-
currentElement
-
-
rootElement
-
attributes
-
automationId: idString
-
-
id: idString
-
-
name: name
-
-
onBlur: action
-
add an 'onBlur=' attribute to the current element.
-
onChange: action
-
add an 'onChange=' attribute to the current element.
-
onClick: action
-
add an 'onClick=' attribute to the current element.
-
onDoubleClick: action
-
add an 'onDoubleClick=' attribute to the current element.
-
onFocus: action
-
add an 'onFocus=' attribute to the current element.
-
onKeyDown: action
-
add an 'onKeyDown=' attribute to the current element.
-
onKeyPress: action
-
add an 'onKeyPress=' attribute to the current element.
-
onKeyUp: action
-
add an 'onKeyUp=' attribute to the current element.
-
onMouseDown: action
-
add an 'onMouseDown=' attribute to the current element.
-
onMouseMove: action
-
add an 'onMouseMove=' attribute to the current element.
-
onMouseOut: action
-
add an 'onMouseOut=' attribute to the current element.
-
onMouseOver: action
-
add an 'onMouseOver=' attribute to the current element.
-
onMouseUp: action
-
add an 'onMouseUp=' attribute to the current element.
-
onSelect: action
-
add an 'onSelect=' attribute to the current element.
attributes-basic
-
addAttribute: attrName
-
-
attribute: attrName is: attrValue
-
these should not be nil
building
-
comment: aComment
-
-
nlsText: nlsText
-
text which is a national-language-translated-string, as text element
-
nlsText: nlsText with: aParameter
-
text which is a national-language-translated-string, as text element
-
nlsText: nlsText with: parameter1 with: parameter2
-
text which is a national-language-translated-string, as text element
-
nlsText: nlsText with: parameter1 with: parameter2 with: parameter3
-
text which is a national-language-translated-string
-
nlsText: nlsText withArgs: parameters
-
text which is a national-language-translated-string
-
nlsText: nlsText withArguments: parameters
-
text which is a national-language-translated-string
-
nlsTitle: nlsTitle
-
fly-by-title which is a national-language-translated-string
-
nlsTitle: nlsText with: aParameter
-
fly-by-title which is a national-language-translated-string
-
nlsTitle: nlsText with: aParameter with: arg2
-
fly-by-title which is a national-language-translated-string
-
nlsTitle: nlsText with: aParameter with: arg2 with: arg3
-
fly-by-title which is a national-language-translated-string
-
nlsTranslated: nlsText
-
national-language-translated-string
-
nlsTranslated: nlsText with: aParameter
-
national-language-translated-string
-
nlsTranslated: nlsText with: parameter1 with: parameter2
-
national-language-translated-string
-
nlsTranslated: nlsText with: parameter1 with: parameter2 with: parameter3
-
national-language-translated-string
-
nlsTranslated: nlsText with: parameter1 with: parameter2 with: parameter3 with: parameter4
-
national-language-translated-string
-
nlsTranslated: nlsText with: parameter1 with: parameter2 with: parameter3 with: parameter4 with: parameter5
-
national-language-translated-string
-
nlsTranslated: nlsText withArgs: parameters
-
national-language-translated-string
-
nlsTranslated: nlsText withArguments: parameters
-
national-language-translated-string
-
rawText: someText
-
-
text: someText
-
instance release
-
release
-
private
-
makeScriptActionText: scriptActionText
-
called for onClick: etc. arguments.
redefinable to allow wrapping of block arguments in more intelligent treeBuilders
-
textOrBlock: textOrBlock
-
helper for div:, a:, etc (i.e. all element-adders which allow the added element's contents to be also
specified as text or as computation.
If the argument is a string, it is added as text to the current element.
If it is a block, it is evaluated and responsible for adding things as required.
The block gets the treeBuilder and the currentElement as optional arguments
(i.e. it can be a 0, 1 or 2 argument block)
setup
-
addElement: element
-
-
beginWith: anElement
-
|b|
b := self new beginWith:(Table new).
b table.
b tr.
b td.
b tdEnd.
b td.
b tdEnd.
b trEnd.
b tableEnd.
b
-
endElement
-
-
endElementButKeepForAttribute
-
-
ignoreComments
-
-
ignoreComments: aBoolean
-
-
resources: anNLSResourceCollection
-
for nlsText and nlsInfo
-
setCurrentElement: element
-
-
startElement: element
-
|