LuaX Documentation revision 0.01 (March 15 2007)
Variables
var | window_barsize |
| Sets the height of the bar at the top of the window |
var | LuaX_default_icon |
| Default 10x10 icon to be used if one isn't given by the window |
var | LuaX_default_thumb |
| Default thumbnail icon for a window if one isn't given by the window (used in Mac Dock and Alt-Tab) |
var | statusbar_redraw |
| Boolean, whether to redraw the Mac dock/Windows bar |
Functions
Shell Access
function | LuaX_process() |
| Processes all open windows |
function | LuaX_statusbar_process() |
| Processes the Mac dock/Windows bar |
Window
function | LuaX_regwindow(window) |
| Registers a new LuaX window. |
function | LuaX_closewindow([window_num]) |
| Closes the current window, or you can give the numerical ID of the window to be closed |
function | LuaX_getWindowById(window_num) |
| Returns the numerical ID of the window when given the string version of the ID |
function | LuaX_minimizewindow([window_num]) |
| Minimizes the current window, or if given, the window with the numerical ID given |
function | LuaX_maximizewindow([window_num]) |
| Maximizes the current window, or if given, the window with the numerical ID given |
function | LuaX_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
function | LuaX_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) |
function | LuaX_addwindowobject(object_name,window_object,[window_num]) |
| Adds an object to the current window, EX: LuaX_addwindowobject("MyButton",{type="button"}) |
function | LuaX_removewindowobject(object_name,[window_num]) |
| Removes an object from the current window |
Mouse
function | LuaX_mouseOverWindow([window_num]) |
| Returns true if the mouse is over the window |
function | LuaX_mouseOverObject(object_name,[window_num]) |
| Returns true if the mouse is over the object name in the window |
Status bar
function | LuaX_statusbar_addObject(object_name,object_id,object_icon,object_thumbnail,object_onClick) |
| Adds a clickable object to the Windows bar/Mac dock. |
function | LuaX_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)