|
Class: HTMLElement
Object
|
+--Collection
|
+--SequenceableCollection
|
+--ArrayedCollection
|
+--Array
|
+--HTMLElement
|
+--HTMLElement::B
|
+--HTMLElement::BR
|
+--HTMLElement::Bend
|
+--HTMLElement::CODE
|
+--HTMLElement::CODEend
|
+--HTMLElement::I
|
+--HTMLElement::Iend
|
+--HTMLElement::P
|
+--HTMLElement::VAR
|
+--HTMLElement::VARend
|
+--HTMLMarkup
|
+--HTMLText
- Package:
- stx:libhtml
- Category:
- System-Documentation
- Version:
- rev:
1.41
date: 2023/02/07 19:05:40
- user: cg
- file: HTMLElement.st directory: libhtml
- module: stx stc-classLibrary: libhtml
Notice & Warning:
this HTML markup framework and the corresponding parser
started as a quick hack (in the 90's) when replacing a buggy mosaic
X-widget with a Smalltalk written HTML viewer.
Its goals were to be fast enough for typical uses, to be not too memory hungry
and to provide the functionality required to display simple help documents.
It was NOT meant to become a full featured web-browser replacement.
The viewer and htmlElement framework are still in use as the document viewer inside ST/X,
and supported to the extent that simple online help documents and html-tooltips are to be displayed.
However, there are no plans to further enhance or spend other time on its maintenance.
If you need more sophisticated html/dom/doc functionality, you may want to use either
the HTMLTree framework or one of the free frameworks found in the goodies folder.
a generic element (both TAGS and text-fragments).
This is an abstract class, providing support to handle
a document as a linked list of elements..
copyrightCOPYRIGHT (c) 1996 by Claus Gittinger
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.
cleanup
-
lowSpaceCleanup
-
cleanup in low-memory situations
helpers
-
colorForSpec: aSpec
-
returns the color for a spec or nil
initialization
-
markTypes
-
MarkTypes := nil. self markTypes
-
noAttributeMarkTypes
-
these can be used, iff the element has no attribute
Usage example(s):
NoAttributeMarkTypes := nil. self noAttributeMarkTypes
|
instance creation
-
classForType: aTypeSymbol
-
internal interface - return a markup element's class, given a typeSymbol
(such as #b, #pre or #'/pre')
Usage example(s):
self classForType:#'ul'
self classForType:#'a'
self classForType:#'br'
|
-
for: aString
-
given a markup's string (such as 'b', 'pre' or '/pre'),
return a new markup instance
-
type: aTypeSymbol
-
internal interface - create a markup element, given a typeSymbol
(such as #b, #pre or #'/pre'), return a new markup instance
Usage example(s):
instance release
-
releaseColors
-
release cached colors
accessing
-
alignSymbol
-
return the align parameter - or nil, if there is none
-
bounds
-
-
bounds: ignored
-
self halt.
-
colorParameter: keyword
-
return the color of a color parameter - or nil, if there is none
-
hasParameterFor: keyword
-
Modified (format): / 19-11-2016 / 15:48:22 / cg
-
id
-
-
name
-
-
next
-
-
next: something
-
-
numericParameterFor: keyword
-
return the value of a number parameter - or nil, if there is none
-
numericParameterFor: keyword default: default
-
return the value of a number parameter - or the default, if there is none
-
parameterFor: keyword
-
-
parameterFor: keyword put: newValue
-
-
parameterSlotIndexFor: keyword
-
-
parent
-
-
parent: ignored
-
-
sourcePosition
-
-
sourcePosition: something
-
-
styleParameterFor: keyword
-
limited style= value extraction.
Does not handle all cases (currently); no escaped quotes, for example.
Just a quick hack to allow for <img style=''width:w; height:h''> to be parsed.
-
tag
-
return the markup's tag, a symbol or nil
-
tagName
-
-
text
-
return the markup's text, if any.
Notice: we removed the text storing capability of the general markup
and only allow for the HTMLText to store it.
-
text: aString
-
ignored here - for protocol completeness
-
type
-
return the markup's type, a symbol or nil
enumerating
-
do: aBlock
-
evaluate aBlock for myself and all remaining elements
-
printElementsDo: aBlock
-
redefined to show only the attributes contained within the array
printing
-
displayOn: aStream
-
(comment from inherited method)
print a representation of the receiver on aGCOrStream for display in inspectors etc.
-
inspectorValueStringInListFor: anInspector
-
returns a string to be shown in the inspector's selection list
-
printHTMLOn: aStream
-
-
printOn: aStream
-
(comment from inherited method)
append a printed representation of the receiver to aStream
queries
-
boundsTop
-
-
isPrintable
-
answer true, if element can be printed
testing
-
isAnchor
-
-
isEndTag
-
-
isFormElement
-
-
isFormEndElement
-
-
isHead
-
-
isHeading
-
-
isImageElement
-
-
isInputElement
-
-
isOptionElement
-
-
isScriptElement
-
-
isSelectElement
-
-
isSelectEndElement
-
-
isStyleElement
-
-
isTextElement
-
B
BR
Bend
CODE
CODEend
I
Iend
P
VAR
VARend
|