You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide

Lua Scripting API
Reference Guide

Version 4.4

This reference guide applies to TI-Nspire™ software version 4.4. To obtain the latest version of the documentation go to TI-Nspire™ Lua Scripting API Reference Guide.

Select a section

Standard Libraries

Basic Library Functions

Coroutine Sub-Library

Module Library

String Library

Table Library

Math Library

Unimplemented Libraries and Functions

Touch Library

Overview

On-Screen Keyboard and Screen Resize Behavior

Event Handling

Library Functions

ppi

xppi

yppi

enabled

isKeyboardAvailable

isKeyboardVisible

showKeyboard

2D Editor Library

newRichText

createChemBox

createMathBox

getExpression

getExpressionSelection

getText

hasFocus

isVisible

move

registerFilter

resize

setBorder

setBorderColor

setColorable

setDisable2DinRT

setExpression

setFocus

setFontSize

setMainFont

setReadOnly

setSelectable

setSizeChangeListener

setText

setTextChangeListener

setTextColor

setWordWrapWidth

Class Library

class

Clipboard Library

addText

getText

Cursor Library

set

hide

show

Document Library

markChanged

Event Handling

activate

arrowDown

arrowKey

arrowLeft

arrowRight

arrowUp

charIn

backspaceKey

backTabKey

clearKey

construction

contextMenu

copy

create

createMathBox

cut

deactivate

deleteKey

destroy

enterKey

escapeKey

getFocus

getSymbolList

grabDown

grabUp

help

keyboardDown

keyboardUp

loseFocus

mouseDown

mouseMove

mouseUp

paint

paste

propertiesChanged

resize

restore

returnKey

rightMouseDown

rightMouseUp

save

tabKey

timer

varchange

Graphics Library

clipRect

drawArc

drawImage

drawLine

drawPolyLine

drawRect

drawString

fillArc

fillPolygon

fillRect

getStringHeight

getStringWidth

setColorRGB

setFont

setPen

Image Library

new

copy

height

rotate

width

Locale Library

name

Math Library Extension

eval

evalStr

getEvalSettings

setEvalSettings

Module Library

Platform Library

apiLevel

hw

isColorDisplay

isDeviceModeRendering

isTabletModeRendering

registerErrorHandler

window

height and width

invalidate

setBackgroundColor

setFocus

getScrollHeight

setScrollHeight

displayInvalidatedRectangles

withGC

getDeviceID

String Library Extension

split

uchar

usub

pack

unpack

Timer Library

getMilliSecCounter

start

stop

Tool Palette Library

register

enable

enableCut

enableCopy

enablePaste

Variable Library

list

makeNumericList

monitor

recall

recallAt

recallStr

store

storeAt

unmonitor

Physics Library

Miscellaneous routines

INFINITY

momentForBox

momentForCircle

momentForPoly

momentForSegment

Vectors

Vect

add

clamp

cross

dist

distsq

dot

eql

length

lengthsq

lerp

lerpconst

mult

near

neg

normalize

normalizeSafe

perp

project

rotate

rperp

setx

sety

slerp

slerpconst

sub

toangle

unrotate

x

y

BoundingBoxes

BB

b

clampVect

containsBB

containsVect

expand

intersects

l

merge

setb

r

setl

setr

sett

t

wrapVect

Bodies

Body

activate

angle

angVel

applyForce

applyImpulse

data

force

isRogue

isSleeping

local2World

kineticEnergy

mass

moment

pos

resetForces

rot

setAngle

setAngVel

setData

setForce

setMass

setMoment

setPos

setPositionFunc

setTorque

setVel

setVelocityFunc

setVLimit

setWLimit

sleep

sleepWithGroup

torque

updatePosition

updateVelocity

vel

vLimit

wLimit

world2Local

Shapes

BB

body

collisionType

data

friction

group

layers

rawBB

restitution

sensor

setCollisionType

setData

setFriction

setGroup

setLayers

setRestitution

setSensor

setSurfaceV

surfaceV

Circle Shapes

CircleShape

offset

radius

Polygon Shapes

PolyShape

numVerts

points

vert

Segment Shapes

SegmentShape

a

b

normal

radius

Spaces

Space

addBody

addConstraint

addCollisionHandler

addPostStepCallback

addShape

addStaticShape

damping

data

elasticIterations

gravity

idleSpeedThreshold

iterations

rehashShape

rehashStatic

removeBody

removeConstraint

removeShape

removeStaticShape

resizeActiveHash

resizeStaticHash

setDamping

setData

setElasticIterations

setGravity

setIdleSpeedThreshold

setIterations

setSleepTimeThreshold

sleepTimeThreshold

step

Constraints

Damped Rotary Spring

Damped Spring

Gear Joint

Groove Joint

Pin Joint

Pivot Joint

Ratchet Joint

Rotary Limit Joint

Simple Motor

Slide Joints

Arbiters and Collision Pairs

#

a

b

bodies

depth

elasticity

friction

impulse

isFirstContact

normal

point

setElasticity

setFriction

shapes

totalImpulse

totalImpulseWithFriction

Shape Queries

pointQuery

segmentQuery

Space Queries

pointQuery

pointQueryFirst

segmentQuery

segmentQueryFirst

SegmentQueryInfo

hitDist

hitPoint

Bluetooth® Smart Library

Bluetooth® LE

addStateListener

removeStateListener

pack

unpack

Format Specifier for pack and unpack

Bluetooth® LE Central

startScanning

stopScanning

isScanning

Peripheral Class

getName

getState

connect

disconnect

discoverServices

getServices

Service Class

getUUID

discoverCharacteristics

getCharacteristics

Characteristic Class

getUUID

setValueUpdateListener

setWriteCompleteListener

read

setNotify

getValue

write

ASI Library

require 'asi'

addStateListener

removeStateListener

isScanning

startScanning

stopScanning

Port Class

getName

getIdentifier

getState

setBaudRate

connect

disconnect

setWriteListener

write

setReadListener

setReadTimeout

read

getValue

Script Compatibility

Backward and Forward Compatibility

Document Compatibility

Scripting Compatibility

Creating Scripts for a Future Software Release

Platform Compatibility

Deprecated API Functions and API Behavior

Image Library

Platform Library

gc

Platform Library

drawString Vertical Alignment

Requested API Level