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

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

copyright

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

Class protocol:

cleanup
o  lowSpaceCleanup
cleanup in low-memory situations

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

initialization
o  markTypes
MarkTypes := nil. self markTypes

o  noAttributeMarkTypes
these can be used, iff the element has no attribute

Usage example(s):

NoAttributeMarkTypes := nil. self noAttributeMarkTypes

instance creation
o  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'

o  for: aString
given a markup's string (such as 'b', 'pre' or '/pre'),
return a new markup instance

o  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):

     self type:#'a'

instance release
o  releaseColors
release cached colors


Instance protocol:

accessing
o  alignSymbol
return the align parameter - or nil, if there is none

o  bounds

o  bounds: ignored
self halt.

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: ignored

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

o  text: aString
ignored here - for protocol completeness

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

o  isPrintable
answer true, if element can be printed

testing
o  isAnchor

o  isEndTag

o  isFormElement

o  isFormEndElement

o  isHead

o  isHeading

o  isImageElement

o  isInputElement

o  isOptionElement

o  isScriptElement

o  isSelectElement

o  isSelectEndElement

o  isStyleElement

o  isTextElement


Private classes:

    B
    BR
    Bend
    CODE
    CODEend
    I
    Iend
    P
    VAR
    VARend


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 02:56:24 GMT