!!! ROUGH COMPILATION !!!

/---------------------------------\ | This chapter is in progress | \_________________________________/ O o ,__, o (..)____ (__) )\ ||--|| *

The information in this file has not yet been verified for completeness or accuracy.


Class: BCard

Background card.

Methods: expose(), get(), initialize(), render(), set().

See also: FCard, stack.


Class: FCard

Foreground card.

Methods: expose(), get(), initialize(), render(), set().

See also: BCard, stack.


Class: GIF

Methods: expose(), get(), initialize(), render(), set().

See also:


Class: HTML OBSOLETE

This class is now obsolete. It has been replaced with a routine that composes a HTML document using the primitive objects (individual txtDisp objects, etc).

A HTML (HyperText Markup Language) capable text field. The HTML format is from the World Wide Web project.

See the viola-based World-Wide Web browser (www.v) for example usage...

HTMLAnchor
Specifies an anchor within the document.
HTMLIsIndex
Says whether document does(1) or does not(0) contain an isIndex tag.
HTMLStyle
Unimplemented.
HTMLTitle
The title of the HTML document.

Methods: back(), config(), get(), initialize(), purgeCache(), render(), search(), set().

See also: HTML format.


Class: TTY

A device for interprocess communication through pseudo terminal. Can start up a program, and establish a communication channel with the standard I/O of the sub process.

Common Slots

Private Slots

path
File path to the subprocess program to run.
args
Argument list for the subprocess.
pid
Client process ID.

Methods: input(), output().

See also: client class,


Class: XBM

MIT's X-Bitmap format. The XPM data is stored in self's "label" slot in ASCII form.

Methods: expose(), get(), initialize(), render(), set().

See also: XBMButton, XPM.


Class: XBMButton

Two color bitmap button. Derived from XBM class to differ only in the default message handlers to make objects of this class behave like click-able buttons.

At the moment, on event of buttonPress, visual feedback is done by drawing a finger-print smudge() on the pixmap. The smudge is clean()'ed on buttonRelease.

See also: XBM, XPMButton.


Class: XPM

X Color pixmap. The XPM data is stored in self's "label" slot in ASCII form.

Methods: get(), initialize(), render(), set().

See also: XPMButton, XBM.


Class: XPMButton

Color bitmap button. Derived from XPM to differ only in the default message handlers to make objects of this class behave like click-able buttons.

At the moment, on event of buttonPress, visual feedback is done by drawing a finger print smudge on the pixmap. The smudge is erased on buttonRelease.

See also: XPM, XBMButton.


Class: client

The client class exist for code sharing by the socket and TTY class, so the information present here applies to them (and all subclasses). Refer to socket or TTY for actual instantiation.

Common Slots

Private Slots

inDelimStr1
A string for matching with the input.
inDelimStr2
Alternative string for matching with the input.
outDelimStr
A string appened to string output()ed.

Methods: freeSelf(), get(), initialize(), input(), inputn(), output(), set(), startClient().

Examples

See also:


Class: cosmic

Root of the class hierarchy. Application programmers probably do not ever want to instantiate objects of this class.

Methods: create(), debug(), detach(), destroy(), exit(), exist(), freeSelf(), info(), interpret(), object(), pop(), push(), quit(), save(), saveAs(), send(), tweak(), usual().

See also:


Class: dial

Rotating dial valuator.

Methods: expose(), get(), initialize(), render(), set().

See also:


Class: field

Simple window field.

content
Default="".
label
Default="".
border
Default=2 (BORDER_FIELD).
x
Default=0.
y
Default=0.
width
Default=1.
height
Default=1.
minWidth
Default=1. Respected by geometry managers (such as vpane).
minHeight
Default=1. Respected by geometry managers.
maxWidth
Default=9999 (shurg). Respected by geometry managers.
maxHeight
Default=9999. Respected by geometry managers.
gapH
Default=0.
gapV
Default=0.
window
Default=0.
shownPositionH
Default=0.
shownPositionV
Default=0.
shownSizeH
Default=0.
shownSizeV
Default=0.
lock
Default=0. If locked (=1), the only tool action that applies to the object is "action".
visible
Default=1.
lock
Default=0.
BDColor
Default="55 55 55" (grey; white on B/W display).
BGColor
Default="25 25 25" (dark grey; black on B/W display).
FGColor
Default="99 99 99" (white).

Methods

clean(), clearArea(), clearWindow(), clone(), config(), copyArea(), cycleColors(), drawFillOval(), drawFillRect(), drawLine(), drawOval(), drawRect(), drawText(), eraseFillOval(), eraseFillRect(), eraseLine(), eraseOval(), eraseRect(), eraseText(), eventMask(), expose(), freeSelf(), get(), initialize(), invertFillOval(), invertFillRect(), invertLine(), invertOval(), invertRect(), invertText(), lower(), mouse(), mouseLocal(), mouseButton(), mouseX(), mouseY(), objectListAppend(), objectListCount(), objectListDelete(), objectListPrepend(), objectListSend(), raise(), randomizeArea(), render(), smudge(), set(), windowName(), windowPosition().

Examples

See also:


Class: generic

This class is typically not instantiated. This class exists mostly to carry commonly shared methods for its subclasses.

children
List of self's children objects.
name
Self's name. The usual naming convention is to use period to seperate parent and child, like "dialog.txtfld" and "dialog.dismiss".
parent
Name of parent object. If no parent (empty string ""), then self is known as a top level object. When a cluster of object is saved, the name of the file is taken from the top level object with ".v" suffix.
script
A tiny "program" associated with self.

Methods: after(), alarm()#, argument()#, ascii(), asciiVal(), bell(), bellVolume(), clear()#, cli(), clone(), concatenate(), cos(), countChars(), countChildren(), countItems(), countLines(), countWords(), cursorShape(), date(), delay(), depth()#, destroyVariable()#, environVar(), float(), format()#, freeSelf(), get(), getSelection(), getVariable(), gravity()#, initialize(), int(), item(), isBlank(), key(), listAllObjects(), loadFile(), makeTempFile(), not()#, nthChar(), nthChild(), nthItem(), nthLine(), nthObjectInList(), nthSibling(), nthWord(), objectListAppend(), objectListCount(), objectListDelete(), objectListPrepend(), objectListSend(), objectPosition(), print(), printf()#, random(), saveFile(), scanf()#, set(), setMouse(), setSelection(), setVariable(), sin(), sleep(), str(), strlen(), system(), target(), time(), tool(), version(), violaPath(), watch()#, write(), writeln().

See also:


Class: hpane

Horizontal pane. Just like the class pane, but with "westToEast" configuration default.

Methods: initialize(), set().

See also: pane, vpane.


Class: menu

Pull down menu.

Common Slots

Private Slots

menuConfig
Default=".{}". Where you define what the menu item and hierarchy looks like. Here's an example: . {File Operations} .. {Open} {send(get("name"), "openAFile");} .. {Save} {send(get("name"), "saveYourSelf");} . {Editing Operations} .. {Cut} {/* one line script... */} .. {Paste} {/* one line script... */} . {Quit} {quit();}
font
Default="any"; See font resource object.

Methods: get(), initialize(), processMouseInput(), render(), set().

See also:

Bug

Currently, color names (BGColor, FGColor, BDColor) must be named, and not by RGB percentage. Ie: "blue" works, but not "0 0 100".

Class: pane

Geometry manager. Possible configurations:

  • freeForm (untested)
  • northToSouth
  • southToNorth
  • westToEast
  • eastToWest
  • northToSouth_edge (untested)
  • southToNorth_edge (untested)
  • westToEast_edge (untested)
  • eastToWest_edge (untested)
  • center (untested)

    Common Slots

    Private Slots

    paneConfig
    Default="freeForm".

    Methods: clone2(), config(), expose(), get(), initialize(), render(), set().

    See also: hpane, vpane.


    Class: project

    Shell level. Has icon. (not yet supported)

    Common Slots

    Private Slots

    projectIcon

    Methods: expose(), get(), initialize(), render(), set(). (null)


    Class: radio

    Radio button. This is really just class toggle with different default classScript.

    Messages

    For complete behavior, see the classScript. Here are some more relevant default message handlers.
    "buttonRelease"
    Send to parent "justMe" message and self's name. It's expected that the parent object would use this information to toggle all its children to 0, then toggle the calling object (self) to 1. Thus implementing exclusive toggling.
    "toggleTo"
    Effect of set("toggleState", arg[1]).
    "toggle"
    Invokes toggle().

    See also: toggle.


    Class: rubber

    Rubber sheet like geometry manager. Untested.

    Common Slots

    Private Slots

    Methods: get(), initialize(), render(), set().

    See also:


    Class: slider

    Scrolling valuator.

    direction
    Direction of the slider: topToBottom, buttonToTop, leftToRight, rightToLeft. See bug section below.

    Messages

    For complete behavior, see the classScript. Here are some more relevant default message handlers.
    "shownInfoH", < position >, < size >
    "shownInfoV", < position >, < size >
    "shownPositionH", < position >
    "shownPositionV", < position >
    "shownSizeH", < size >
    "shownSizeV", < size >
    "scroll", "up" | "down"

    Methods: config(), get(), initialize(), processMouseInput(), render(), set(), shownDepend().

    See also: txtDisp.

    Bugs

    Horizontal mode doesn't yet work.

    Class: socket

    Socket interprocess communication facility.

    Common Slots

    Private Slots

    port
    Socket port number/name.

    Methods: freeSelf(), get(), set().

    See also: client.


    Class: stack

    Manager of FCard and BCard objects.

    Common Slots

    Private Slots

    FCardList

    Methods: card(), create(), config(), expose(), firstCard(), get(), getCurrentCard(), initialize(), lastCard(), nextCard(), countBCards(), countFCards(), previousCard(), render(), set(), setCurrentCard().

    See also: BCard, FCard.


    Class: toggle

    Toggling button.

    Messages

    For complete behavior, see the classScript. Here are some more relevant default message handlers.
    "buttonRelease"
    Invokes toggle().
    "toggleTo"
    Effect of set("toggleState", arg[1]).
    "toggle"
    Invokes toggle().
    toggleState
    Default=0. Toggles between 0 and 1.
    toggleStyle
    Default="check". Other possibilities are: "disc", "button".

    Methods: render(), set(), toggle().

    See also: radio.


    Class: tray

    Tray. (undefine)

    Common Slots

    Private Slots

    Methods: get(), initialize(), render(), set().

    See also:


    Class: txt

    Internal use: base clas for text related classes.

    font
    Default="any"; See font resource object for font definitions.

    Methods: clone2(), config(), expose(), get(), initialize(), render(), set().

    See also: txtButton, txtDisp, txtLabel.


    Class: txtButton

    Text button.

    Methods: initialize(), render(), set().

    See also: txt, txtLabel, HTML.


    Class: cosmic->generic->field->pane->txt->txtDisp

    This class implements a multi-line, multi-font, hidden data embedable, text field. But does not edit very well (yet).

    See the HTML class for an easier way to do formated (deals with window resizing) and hyper text.

    Show how to (to be links to tutorial sections):

    Keyboard binding

    is presently hard coded.

    Key:
    Binding:
    CARRIAGE
    newline
    C-?
    redraw (presently useful b/c editing is still buggy)
    C-a
    beginning_of_line
    C-b
    backward_char
    C-d
    delete_char
    C-e
    end_of_line
    C-f
    forward_char
    C-h
    delete_backward_char
    C-t
    join_line
    C-k
    kill_line
    C-l
    open_line_below
    C-n
    next_line
    C-o
    open_line
    C-p
    previous_line
    C-q
    scroll_up_line
    C-u
    delete_line
    C-v
    scroll_up
    C-w
    scroll_down
    C-x
    scroll_up
    C-y
    insert_yank
    C-z
    scroll_down_line
    DELETE
    delete_backward_char
    ESC v
    scroll_down
    RETURN
    newline
    Tab
    ident

    Tags directives

    \b{< string > }
    Button makeup
    \e{< string > }
    Embed string
    \f{< fontID > }
    Change font
    \h{< string > }
    Highlight string
    \s{< script > }
    Script execute and insert
    \u{< string > }
    Underline string
    \x{}
    Horizontal rule

    Private Slots

    wrap
    not useful now.
    verbatim
    if set to 1, tags directives will be ignored.

    Methods: append(), building_maxFontDescent(), building_maxFontHeight(), building_vspan(), charMask(), charButtonMask(), charHighLiteMask(), charUnderlineMask(), clearSelection(), clone(), config(), currentChar(), currentLine(), currentTag(), currentWord(), cursorColumn(), cursorRow(), drawCursor(), deHighLight(), eraseCursor(), expose(), get(), highLight(), initialize(), insert(), lineRowOffset(), nextTag(), numberOfLinesDisplayed(), previousTag(), processMouseInput(), render(), shownDepend(), set(), setSelection(), totalLineCount().

    See also: txt, txtButton, txtLabel.


    Class: txtEdit

    Editing text field. It's quite lame at the moment... :-(.

    Methods: initialize(), render(), set().

    See also: txt, txtButton, txtLabel, txtDisp.


    Class: txtLabel

    Single line text display widget. The text 'label' string is displayed centered on the widget window.

    Methods: get(), initialize(), render(), set().

    See also: txt, txtButton, txtDisp.


    Class: vpane

    Vertical pane. Just like the class pane, but with "northToSouth" configuration default.

    Methods: initialize(), set().

    See also: pane, hpane.