Footnoteclassfootnote.t[44]

Footnote - this allows footnote references to be generated in displayed text, and the user to retrieve the contents of the footnote on demand.

Create an instance of Footnote for each footnote. For each footnote object, define the "desc" property as a double-quoted string (or method) displaying the footnote's contents.

To display a footnote reference in a passage of text, call <<x.noteRef>>, where x is the footnote object in question. That's all you have to do - we'll automatically assign the footnote a sequential number (so that footnote references are always seen by the player in ascending order, regardless of the order in which the player encounters the sources of the footnotes), and the NOTE command will automatically figure out which footnote object is involved for a given footnote number.

This class also serves as a daemon notification object to receive per-command daemon calls. The first time we show a footnote reference, we'll show an explanation of how footnotes work.

[ONLY IN FOOTNOTE EXTENSION]

class Footnote :   object

Superclass Tree   (in declaration order)

Footnote
        object

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

desc  everShownFootnote  footnoteNum  footnoteRead  footnoteSettings  lastFootnote  numberedFootnotes 

Summary of Methods  

checkNotification  footnoteRef  showFootnote 

Properties  

descfootnote.t[50]

Display the contents of the footnote - this will be called when the user asks to show the footnote with the "NOTE n" command. Each instance must provide suitable text here.

everShownFootnotefootnote.t[193]
static property: we've never shown a footnote reference before

footnoteNumfootnote.t[168]
my footnote number - this is assigned the first time I'm referenced; initially we have no number, since we don't want to assign a number until the note is first referenced

footnoteReadfootnote.t[176]
Flag: this footnote's full text has been displayed. This refers to the text of the footnote itself, not the reference, so this is only set when the "FOOTNOTE n" command is used to read this footnote.

footnoteSettingsfootnote.t[161]
SettingsItem tracking our current status

lastFootnotefootnote.t[183]
Static property: the highest footnote number currently in use. We start this at zero, because zero is never a valid footnote number.

numberedFootnotesfootnote.t[190]
Static property: a vector of all footnotes which have had numbers assigned. We use this to find a footnote object given its note number.

Methods  

checkNotification ( )footnote.t[196]

static property: per-command-prompt daemon entrypoint

footnoteRef (num)footnote.t[114]
get the string to display for a footnote reference

showFootnote (num)footnote.t[128]
Display a footnote given its number. If there is no such footnote, we'll display an error message saying so. (This is a class method, so it should be called directly on Footnote, not on instances of Footnote.)

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1