eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTMLElement':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: HTMLElement


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--ArrayedCollection
            |
            +--Array
               |
               +--HTMLElement
                  |
                  +--HTMLMarkup
                  |
                  +--HTMLText

Package:
stx:libhtml
Category:
System-Documentation
Version:
rev: 1.34 date: 2019/05/29 13:22:39
user: cg
file: HTMLElement.st directory: libhtml
module: stx stc-classLibrary: libhtml
Author:
Claus Gittinger

Description:


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..


Related information:

    HTMLParser
    HTMLDocumentPainter

Class protocol:

cleanup
o  lowSpaceCleanup
cleanup in low-memory situations

helpers
o  colorForSpec: aSpec
returns the color for a spec or nil

instance release
o  releaseColors
release cached colors


Instance protocol:

accessing
o  bounds
return bounds; a rectangle or rectangle collection

o  bounds: aRectangleOrRectangleCollection
set bounds; a rectangle or rectangle collection

o  colorParameter: keyword
return the color of a color parameter - or nil, if there is none

o  hasParameterFor: keyword
Modified (format): / 19-11-2016 / 15:48:22 / cg

o  id

o  name

o  next

o  next: something

o  numericParameterFor: keyword
return the value of a number parameter - or nil, if there is none

o  numericParameterFor: keyword default: default
return the value of a number parameter - or the default, if there is none

o  parameterFor: keyword

o  parameterFor: keyword put: newValue

o  parameterSlotIndexFor: keyword

o  parent

o  parent: something

o  sourcePosition

o  sourcePosition: something

o  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.

o  tag
return the markup's tag, a symbol or nil

o  tagName

o  type
return the markup's type, a symbol or nil

enumerating
o  do: aBlock
evaluate aBlock for myself and all remaining elements

o  printElementsDo: aBlock
redefined to show only the attributes contained within the array

printing
o  displayOn: aStream
(comment from inherited method)
print a representation of the receiver on aGCOrStream for display in inspectors etc.

o  inspectorValueStringInListFor: anInspector
returns a string to be shown in the inspector's selection list

o  printHTMLOn: aStream

o  printOn: aStream
(comment from inherited method)
append a printed representation of the receiver to aStream

queries
o  boundsTop

testing
o  isAnchor

o  isEndTag

o  isFormElement

o  isFormEndElement

o  isHead

o  isHeading

o  isImageElement

o  isInputElement

o  isOptionElement

o  isSelectElement

o  isSelectEndElement

o  isTextElement



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 19 Mar 2024 07:37:36 GMT