LuaX Documentation revision 0.01 (March 15 2007)


Variables

varwindow_barsize
Sets the height of the bar at the top of the window
varLuaX_default_icon
Default 10x10 icon to be used if one isn't given by the window
varLuaX_default_thumb
Default thumbnail icon for a window if one isn't given by the window (used in Mac Dock and Alt-Tab)
varstatusbar_redraw
Boolean, whether to redraw the Mac dock/Windows bar

Functions

Shell Access

functionLuaX_process()
Processes all open windows
functionLuaX_statusbar_process()
Processes the Mac dock/Windows bar

Window

functionLuaX_regwindow(window)
Registers a new LuaX window.
functionLuaX_closewindow([window_num])
Closes the current window, or you can give the numerical ID of the window to be closed
functionLuaX_getWindowById(window_num)
Returns the numerical ID of the window when given the string version of the ID
functionLuaX_minimizewindow([window_num])
Minimizes the current window, or if given, the window with the numerical ID given
functionLuaX_maximizewindow([window_num])
Maximizes the current window, or if given, the window with the numerical ID given
functionLuaX_redrawwindow([window_num])
Redraws the current window, or if given, the window with the numerical ID given (NOTE: Redrawing is automatic for when an object changes, but if the window did not clean up properly you should use this)

Objects

functionLuaX_redrawobject(object_name,[window_num])
Redraws the object by the name given (example: MyButton={type="button"} would be "MyButton") (NOTE: Redrawing is automatic, and this should only be used for images, since there is no easy way to detect whether an image has changed)
functionLuaX_addwindowobject(object_name,window_object,[window_num])
Adds an object to the current window, EX: LuaX_addwindowobject("MyButton",{type="button"})
functionLuaX_removewindowobject(object_name,[window_num])
Removes an object from the current window

Mouse

functionLuaX_mouseOverWindow([window_num])
Returns true if the mouse is over the window
functionLuaX_mouseOverObject(object_name,[window_num])
Returns true if the mouse is over the object name in the window

Status bar

functionLuaX_statusbar_addObject(object_name,object_id,object_icon,object_thumbnail,object_onClick)
Adds a clickable object to the Windows bar/Mac dock.
functionLuaX_statusbar_removeObject(object_id)
Removes the object from the Windows bar/Mac dock with the string ID given



Example code

Simple example

temp = {title="Example",id="example",x=100,y=100,width=250,height=100,
		bgcolor=Color.new(200,200,200),barcolor=Color.new(100,100,100)}
LuaX_regwindow(temp)