vexi - The Vexi Object

The global Vexi object. It is always accessible from vexiscript using the vexi keyword.

The root namespace is accessible using the [""] property. That is, a template located at ‘dir/subdir/tmpl.t’ would be accessible as:

vexi..dir.subdir.tmpl

Properties

Property Type Initial Value Description

js

log

math

stream

string

about.version

String

varies

The version of the current Vexi core

biscuits

Object

varies

Biscuits are similar to cookies - see Biscuits

box

N/A

N/A

Returns a new box when read

file.homedir

file.tempdir

global.trace

params

Object

varies

Paramaters passed into vexi when launched can read as properties on this object

 var host = params["host"];

ui.clipboard

String

varies

Provides access to the current contents of the clipboard; read to get and put to set

ui.textcolor

String

#000000

The current default textcolor

ui.fontsize.medium

Number

10

The current default fontsize, in points.

put to this property adjust all boxes whose fontsize is set to "medium" or a valid offset from medium (see the Box.fontsize property).

The minimum value is 6.

ui.fontsize.xxsmall

Number

-8

Extra extra small offset from the current default fontsize, used when a box's fontsize is set to "xxsmall"

ui.fontsize.xsmall

Number

-4

Extra small offset from the current default fontsize, used when a box's fontsize is set to "xsmall"

ui.fontsize.small

Number

-2

Small offset from the current default fontsize, used when a box's fontsize is set to "small"

ui.fontsize.large

Number

4

Large offset from the current default fontsize, used when a box's fontsize is set to "large"

ui.fontsize.xlarge

Number

8

Extra large offset from the current default fontsize, used when a box's fontsize is set to "xlarge"

ui.fontsize.xxlarge

Number

14

Extra extra large offset from the current default fontsize, used when a box's fontsize is set to "xxlarge"

ui.font.defaultstream

Stream

vexi.ui.font.sansserif

The current default font stream

ui.font.installed

ui.font.sansserif

ui.font.monospace

ui.font.serif

ui.mouse.button

Number

0

When read, returns a number representing the current mouse button pressed:

  • 0 - None
  • 1 - Left
  • 2 - Right
  • 3 - Middle

ui.key.name.alt

Boolean

varies

Reads the name of the Alt modifier which may vary between platforms

ui.key.alt

Boolean

false

Reads true if the Alt key is pressed, false otherwise

ui.key.control

Boolean

false

Reads true if the Ctrl key is pressed, false otherwise

ui.key.shift

Boolean

false

Reads true if the Shift key is pressed, false otherwise

ui.maxdim

Number

varies

Maximum dimension for a box

ui.screen.width

Number

varies

Current screen height in pixels

ui.screen.height

Number

varies

Current screen width in pixels

devl

Methods

Method Returns Description

bless()

null

Ensures a resource is properly loaded and accessible

cache()

clone(clonee)

Object

Clones an object - see Cloning

crypto.md5()

crypto.sha1()

crypto.rc4()

crypto.rsa()

date()

ECMADate

Deprecated

Returns an instance of vexi.js.ECMADate

exit()

file.load()

file.remove()

file.save()

net.rpc.soap()

null

Currently looking for a maintainer

net.rpc.xml(url)

xmlrpc

Create an XmlRpc object that can be used to invoke methods on the given url

regexp(regexp|pattern, pattern_flags)

regexp

Creates a new js regular expression object from either an existing regexp object or a pattern and optional flags

thread.sleep(ms)

null

Causes the current thread to sleep for ms milliseconds.

thread.yield()

null

Yields control back to the scheduler to allow other threads, including the foreground thread, a chance to execute further

system.gc()

null

Calls JVM's gc()

system.memoryusage()

Object

Returns an Object with a property for each of Java's current: maxMemory, totalMemory, freeMemory respectively in KB

trace(js1[, js2, ... jsn])

null

Logs its arguments by first passing them to stringify then formatting the resultant strings so they are human readable

ui.browser(url)

null

Open a URL using the client system's default browser

ui.font.install()

ui.font.wait()

ui.font.width(font, fontsize, text)

Number

Establishes the width of text when rendered with the given font at the given fontsize

ui.font.height(font, fontsize, text)

Number

Establishes the height of text when rendered with the given font at the given fontsize

unclone(clonee)

Object

Returns the original object that the clonee is a clone of

Constructors

Constructor Description

ui.Box()

Use to create a new box

 


Copyright © 2011 The Vexi Project (vexi.sourceforge.net)