summaryrefslogtreecommitdiff
path: root/iup/srclua5/matrix.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/srclua5/matrix.lua
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/srclua5/matrix.lua')
-rwxr-xr-xiup/srclua5/matrix.lua46
1 files changed, 46 insertions, 0 deletions
diff --git a/iup/srclua5/matrix.lua b/iup/srclua5/matrix.lua
new file mode 100755
index 0000000..81aa732
--- /dev/null
+++ b/iup/srclua5/matrix.lua
@@ -0,0 +1,46 @@
+------------------------------------------------------------------------------
+-- Matrix class
+------------------------------------------------------------------------------
+local ctrl = {
+ nick = "matrix",
+ parent = WIDGET,
+ creation = "-",
+ callback = {
+ action_cb = "nnnns",
+ click_cb = "nns",
+ release_cb = "nns",
+ drop_cb = "inn",
+ dropcheck_cb = "nn",
+ draw_cb = "nnnnnnn", -- fake definitions to be replaced by matrixfuncs module
+ dropselect_cb = "nnisnn",
+ edition_cb = "nnnn",
+ enteritem_cb = "nn",
+ leaveitem_cb = "nn",
+ mousemove_cb = "nn",
+ scrolltop_cb = "nn",
+ fgcolor_cb = "nn", -- fake definitions to be replaced by matrixfuncs module
+ bgcolor_cb = "nn",
+ font_cb = {"nn", ret = "s"}, -- ret is return type
+ value_cb = {"nn", ret = "s"}, -- ret is return type
+ value_edit_cb = "nns",
+ mark_cb = "nn",
+ markedit_cb = "nnn",
+ },
+ include = "iupcontrols.h",
+ extrafuncs = 1,
+}
+
+function ctrl.createElement(class, arg)
+ return Matrix(arg.action)
+end
+
+function ctrl.setcell(handle, l, c, val)
+ SetAttribute(handle,l..":"..c,val)
+end
+
+function ctrl.getcell(handle, l, c)
+ return GetAttribute(handle,l..":"..c)
+end
+
+iupRegisterWidget(ctrl)
+iupSetClass(ctrl, "iup widget")