From f6ac50837aabd69c6ea5892a858359f51f40ee03 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 23 Dec 2009 00:11:30 +0100 Subject: Mbmbmlmlm \r is evil. --- dalos-textbuffer.lua | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'dalos-textbuffer.lua') 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) -- cgit v1.2.3