summaryrefslogtreecommitdiff
path: root/dalos-textbuffer.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-12-23 00:11:30 +0100
committerPixel <pixel@nobis-crew.org>2009-12-23 00:11:30 +0100
commitf6ac50837aabd69c6ea5892a858359f51f40ee03 (patch)
treefd6f7007d543de2cca7a813e8efbf156089aa0eb /dalos-textbuffer.lua
parent95b71cfc474f247e7e1081ea67c7a2166ddd3805 (diff)
Mbmbmlmlm \r is evil.
Diffstat (limited to 'dalos-textbuffer.lua')
-rw-r--r--dalos-textbuffer.lua70
1 files changed, 35 insertions, 35 deletions
diff --git a/dalos-textbuffer.lua b/dalos-textbuffer.lua
index cd91689..a5a4f40 100644
--- a/dalos-textbuffer.lua
+++ b/dalos-textbuffer.lua
@@ -1,35 +1,35 @@
-dalosp.textbuffer = {
- get_settings = function (self)
- return { text = self.extra.text }
- end,
-
- activate = function (self)
- local text = self.extra.text or ""
- text = iup.GetText(self.name, text)
- if text then
- self.extra.text = text
- local b = Buffer(true)
- b:write(text)
- self:set_houtput(b)
- end
- end,
-
- create = function (d, tab, settings)
- tab.ninputs = 0
- tab.noutputs = 1
- tab.otype = dalos.objtype.HANDLE
- tab.activate = dalosp.textbuffer.activate
- tab.default_name = "Text Buffer"
- tab.ntype = "Text Buffer"
- tab.get_settings = dalosp.textbuffer.get_settings
- local extra = { }
- if settings then extra.text = settings.text end
-
- local obj = dalos.object(d, tab, extra)
-
- return obj
- end,
-}
-
-dalos.textbuffer = dalosp.textbuffer.create
-dalos:register_obj("Text Buffer", dalos.textbuffer)
+dalosp.textbuffer = {
+ get_settings = function (self)
+ return { text = self.extra.text }
+ end,
+
+ activate = function (self)
+ local text = self.extra.text or ""
+ text = iup.GetText(self.name, text)
+ if text then
+ self.extra.text = text
+ local b = Buffer(true)
+ b:write(text)
+ self:set_houtput(b)
+ end
+ end,
+
+ create = function (d, tab, settings)
+ tab.ninputs = 0
+ tab.noutputs = 1
+ tab.otype = dalos.objtype.HANDLE
+ tab.activate = dalosp.textbuffer.activate
+ tab.default_name = "Text Buffer"
+ tab.ntype = "Text Buffer"
+ tab.get_settings = dalosp.textbuffer.get_settings
+ local extra = { }
+ if settings then extra.text = settings.text end
+
+ local obj = dalos.object(d, tab, extra)
+
+ return obj
+ end,
+}
+
+dalos.textbuffer = dalosp.textbuffer.create
+dalos:register_obj("Text Buffer", dalos.textbuffer)