Thread Tools Display Modes
05/17/14, 10:23 PM   #1
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
EditBuffer - Unlimited Textlength + Scroll + Partial Copy & Paste ...

Screenshot Example:



Well since the regular EditControl is limited by 1060 Characters (hard limited) and the TextBufferControl doesn't support Copy n' Paste and Textselection, I've written my own EditBuffer to combine the best of both worlds in the most "user-friendly" way as possible.

Let 's say it bascially creates an EditControl for each visible Line and provides own methods named similiar to those of the native controls to control that data to avoid any length restriction. In an abstract way ... whatever. To less sleep ... must sleep.

You'll probably understand if you read trought the code and the provided example (or not).

THE MONOSPACE FONT CAN BE DOWNLOADED HERE:

https://code.google.com/p/anka-coder...downloads/list

Advantages:
  • Unlimited Textsize
  • Stores Text as a String in a Variable and also all Lines in an Table
  • Calculates Visible Line-Width correctly and splits to long lines automatically (unlike the native TextBuffer)
  • Copy & Pasteable Lines
  • Doubeclick to select a Line
  • Copy & Paste for the complete Text -> Displays an Alert Windows for each 1000 Characters, copies those into Clipboard and waits till you click Next for the next part to be copied to the Clipboard

Disadvantages:
  • ABSOLUTELY REQUIRES AN MONOSPACE FONT FOR CALCULATING THE LINE WIDTH!
  • No CTRL+A, CTRL+C, CTRL+V. You need to add an "COPY ALL BUTTON" that simply points to self:CopyAllTextToClipboard() (that 's due to the native API limitation of 1060 chars max)
  • Code is still a bit dirty. I don't care.

String helpers used in my Component:
[highlight="Lua"]
-----------------------------
-- STRING HELPERS
-----------------------------

-- replace string(s) (with whole-word option)
local function str_replace(source, find, replace, wholeword)
if wholeword then
find = '%f[%a]'..find..'%f[%A]'
end
return (source:gsub(find,replace))
end

-- escape special/magic characters (regex) in a string
local function str_escape(str)
return (str:gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1'):gsub('%z','%%z'))
end

-- split string by pattern/delimiter
-- eg: mytable = str_split("test1:test2:test3", "\:")
local function str_split(str, del)
-- http://stackoverflow.com/a/1579673

local ret = {}
local fpat = "(.-)" .. del
local last_end = 1
local s, e, cap = str:find(fpat, 1)

while s do
if s ~= 1 or cap ~= "" then
table.insert(ret,cap)
end

last_end = e+1
s, e, cap = str:find(fpat, last_end)
end

if last_end <= #str then
cap = str:sub(last_end)
table.insert(ret, cap)
end

return ret
end

-- cleanup string (duplicated whitespaces n' stuff)
local function str_cleanup(str)

-- Remove leading and trailing whitespace(s)
str = str:gsub("^%s*(.-)%s*$", "%1")

-- Remove any duplicated whitespace(s)
str = str:gsub("%s%s+", " ")

return str
end
[/highlight]


The Component itself:
[highlight="Lua"]

-----------------------------
-- CreateEditBuffer
-----------------------------

local function CreateEditBuffer(name, parent, anchor1, anchor2, fontSize, numLines, lineHeight)
if(not name or not parent) then do return nil end end

local anchor1_default = {TOPLEFT, parent, TOPLEFT, 0, 0}
local anchor2_default = {BOTTOMRIGHT, parent, BOTTOMRIGHT, 0, 0}

-- Optional Parameters
local anchor1 = anchor1 or anchor1_default
local anchor2 = anchor2 or anchor2_default

if(type(anchor1) ~= "table") then anchor1 = anchor1_default end
if(type(anchor2) ~= "table") then anchor2 = anchor2_default end

--'LibDebug/fonts/AnkaCoder-C87-r.ttf' size:17 charwidth: 8.75 | 21 @ 11.5 | 20 @ 10.75
-- Font settings
local FONT_STYLE_THIN = 'soft-shadow-thin'
local FONT_STYLE_THICK = 'soft-shadow-thick'
local FONT_STYLE_SHADOW = 'shadow'
local FONT_STYLE_NONE = 'none'
local FONT_SIZE = fontSize or 20
local FONT_FACE = 'LibDebug/fonts/AnkaCoder-C87-b.ttf'
local CHAR_WIDTH = 10.75
local LINE_HEIGHT = lineHeight or tonumber(FONT_SIZE*1.275)

-- Control-Names
local BG = name..'_BG'

-- BG
WINDOW_MANAGER:CreateControlFromVirtual(BG, parent, "ZO_InsetBackdrop")
_G[BG]:SetAnchor(anchor1[1], anchor1[2], anchor1[3], anchor1[4], anchor1[5])
_G[BG]:SetAnchor(anchor2[1], anchor2[2], anchor2[3], anchor2[4], anchor2[5])

-- LINES (EDIT)
local numLines = numLines or math.floor((_G[BG]:GetHeight()-anchor1[5]-anchor2[5])/LINE_HEIGHT)

for i=1, numLines, 1 do
local LINE = name..'_LINE'..tostring(i)

WINDOW_MANAGER:CreateControlFromVirtual(LINE, parent, "ZO_DefaultEditMultiLineForBackdrop")
_G[LINE]:SetMaxInputChars(1000) -- Hello Windows 98 and FAT, I missed you NOT
_G[LINE]:SetMultiLine(false)
_G[LINE]:SetEditEnabled(false)
_G[LINE]:SetCopyEnabled(true)
_G[LINE]:SetAnchor(TOPLEFT, _G[BG], TOPLEFT, 7, (5+((i-1)*LINE_HEIGHT)))
_G[LINE]:SetDimensions((_G[BG]:GetWidth()-10), LINE_HEIGHT)
_G[LINE]:SetColor(207/255, 220/255, 189/255, 1)
_G[LINE]:SetHandler("OnMouseDoubleClick", function(self)
-- bah
zo_callLater(function() self:SelectAll() end, 0.5)
end)

-- Set monospace font with fixed width
_G[LINE]:SetFont(FONT_FACE..'|'..FONT_SIZE..'|'..FONT_STYLE_THIN)
end

-- Create an empty table / pseudo-control that will hold our public stuff
local control = {}

control.text = "" -- holds the unmodified text
control.offset = 1 -- starts at line 1

local function disable_links(text)
local links = {}

for link in string.gfind(text, "(|H(.-).-)|h(.-)|h)") do
local name = link:match("|h%[(.-)%]|h")

if(name) then
links[#links+1] = {["name"] = name, ["link"] = link }
text = str_replace(text, str_escape(link), '['..tostring(name)..']', false)
end
end

return text, links
end

local function enable_links(text, links)
if(not links or type(links) ~= "table") then do return text end end

for i,o in ipairs(links) do
local disabled_link = '['..tostring(o["name"])..']'
text = str_replace(text, str_escape(disabled_link), o["link"], false)
end

return text
end

local function clear_links(links)
for i,o in ipairs(links) do
links[i] = nil
end

links = nil

return nil
end

function control:SetText(text)
self.text = text

self:Clear()

local numLines = self:GetNumCurLines()
local maxLines = self:GetNumMaxLines()

if(numLines > maxLines) then
local offset = numLines-maxLines

selfisplayLinesAt(offset)
else
selfisplayLinesAt()
end
end

function control:GetNumCurLines()
local all_lines = self:GetAllLines()

return #all_lines
end

function control:GetNumMaxLines()
return numLines
end

function control:GetAllLines()
local ret = {}

for line in string.gmatch(self.text, "[^\n]+") do
local line, links = disable_links(line)
local real_lines = self:SplitLongLines(line)

for _,r_line in ipairs(real_lines) do
ret[#ret+1] = enable_links(r_line, links)
end

links = clear_links(links)
--all_lines[#all_lines+1] = line
end

enable_links()

return ret
end

function controlisplayLinesAt(offset)
self:Clear()

local offset = offset or 0

if(offset < 0) then do return end end

local all_lines = self:GetAllLines()

-- output lines
for i=1, numLines, 1 do

local LINE = name..'_LINE'..tostring(i)

if(all_lines[i+offset] and _G[LINE]) then
_G[LINE]:SetText(all_lines[i+offset])
end
end

self.offset = offset

end

function control:ScrollUp()
local numLines = self:GetNumCurLines()
local maxLines = self:GetNumMaxLines()

-- only scroll if theres more text aviable then displayed
if(numLines > maxLines) then
local new_offset = math.floor(control.offset - 1)
if(new_offset >= 0) then selfisplayLinesAt(new_offset) end
end
end

function control:ScrollDown()
local numLines = self:GetNumCurLines()
local maxLines = self:GetNumMaxLines()

-- only scroll if theres more text aviable then displayed
if(numLines > maxLines) then
local new_offset = math.floor(control.offset + 1)
local displayed_lines = new_offset+maxLines
if(new_offset >= 0 and displayed_lines <= numLines) then controlisplayLinesAt(new_offset) end
end
end

function control:SplitLongLines(text, maxLength)
local ret = {}

local maxLineWidth = _G[BG]:GetWidth()
local maxChars = maxLength or math.floor(maxLineWidth/CHAR_WIDTH)
local text_len = string.len(text);

if(text_len <= maxChars) then
ret[#ret+1] = text
else
for from = 0, text_len, maxChars do
local to = from+maxChars-1

if(from >= text_len) then from = text_len end
if(to >= text_len) then to = text_len end

--ret = ret+1
ret[#ret+1] = string.sub(text, from, to)
end
end

return ret
end

function control:Clear()
for i=1, numLines, 1 do
local LINE = name..'_LINE'..tostring(i)

if(_G[LINE]) then _G[LINE]:Clear() end
end
end

-- dirty but butt
function control:CopyAllTextToClipboard()
if(self.text) then
if(not _G["EDITBUFFER_CLIPBOARD"]) then
WINDOW_MANAGER:CreateTopLevelWindow("EDITBUFFER_CLIPBOARD")
--_G["EDITBUFFER_CLIPBOARD"]:SetDimensions(1,1)
--_G["EDITBUFFER_CLIPBOARD"]:SetAlpha(0)

if(not _G["EDITBUFFER_CLIPBOARD_CONTENT"]) then
WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_CLIPBOARD_CONTENT", _G["EDITBUFFER_CLIPBOARD"], "ZO_DefaultEditMultiLineForBackdrop")
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetAlpha(0)
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetCopyEnabled(true)
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetMaxInputChars(1000)
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetMouseEnabled(false)
end
end

-- partial copy & paste
if(string.len(self.text) > 1000) then
if(not _G["EDITBUFFER_ALERT"]) then
local ALERT = WINDOW_MANAGER:CreateTopLevelWindow("EDITBUFFER_ALERT")
ALERT:SetDimensions(400, 140)
ALERT:SetAnchor(CENTER, GuiRoot, CENTER)
ALERT:SetClampedToScreen(true)
ALERT:SetMouseEnabled(true)
ALERT:SetMovable(true)
ALERT:SetTopmost(true)
ALERT:SetHidden(false)

-- BG
WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_BG", ALERT, "ZO_DefaultBackdrop")

-- CLOSE
WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_CLOSE", ALERT, "ZO_CloseButton")
_G["EDITBUFFER_ALERT_CLOSE"]:SetDimensions(16, 16)
_G["EDITBUFFER_ALERT_CLOSE"]:SetAnchor(TOPRIGHT, ALERT, TOPRIGHT, 0, 0)
_G["EDITBUFFER_ALERT_CLOSE"]:SetHandler("OnMouseDown", function(self)
_G["EDITBUFFER_ALERT"]:SetHidden(true)
_G["EDITBUFFER_ALERT"]:SetTopmost(false)
end)

-- TITLE
WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_TITLE", ALERT, "ZO_WindowTitle")
_G["EDITBUFFER_ALERT_TITLE"]:SetHorizontalAlignment(CENTER)
_G["EDITBUFFER_ALERT_TITLE"]:ClearAnchors()
_G["EDITBUFFER_ALERT_TITLE"]:SetAnchor(TOPLEFT, ALERT, TOPLEFT, 0, -1)
_G["EDITBUFFER_ALERT_TITLE"]:SetAnchor(TOPRIGHT, ALERT, TOPRIGHT, 0, -1)
_G["EDITBUFFER_ALERT_TITLE"]:SetText("PARTIAL COPY AND PASTE!")

-- DIVIDER
WINDOW_MANAGER:CreateControl("EDITBUFFER_ALERT_DIVIDER", ALERT, CT_TEXTURE)
_G["EDITBUFFER_ALERT_DIVIDER"]:SetTexture("EsoUI/Art/Miscellaneous/horizontalDivider.dds")
_G["EDITBUFFER_ALERT_DIVIDER"]:SetDimensions(nil, 4)
_G["EDITBUFFER_ALERT_DIVIDER"]:SetAnchor(TOPLEFT, ALERT, TOPLEFT, -80, 40)
_G["EDITBUFFER_ALERT_DIVIDER"]:SetAnchor(TOPRIGHT, ALERT, TOPRIGHT, 80, 40)

-- TEXT
WINDOW_MANAGER:CreateControl("EDITBUFFER_ALERT_TEXT", ALERT, CT_LABEL)
_G["EDITBUFFER_ALERT_TEXT"]:SetFont("ZoFontGame")
_G["EDITBUFFER_ALERT_TEXT"]:SetAnchor(CENTER, ALERT, CENTER)
_G["EDITBUFFER_ALERT_TEXT"]:SetColor(207/255, 220/255, 189/255, 1)

-- NEXT
WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_NEXT", ALERT, "ZO_DefaultButton")
_G["EDITBUFFER_ALERT_NEXT"]:SetAnchor(BOTTOMLEFT, ALERT, BOTTOMLEFT, 0, -10)
_G["EDITBUFFER_ALERT_NEXT"]:SetText("NEXT")
_G["EDITBUFFER_ALERT_NEXT"]:SetHandler("OnMouseDown", function(self)
CALLBACK_MANAGER:FireCallbacks("OnClipBoardCopyNext", self)
end)

-- CANCLE
WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_CANCEL", ALERT, "ZO_DefaultButton")
_G["EDITBUFFER_ALERT_CANCEL"]:SetAnchor(BOTTOMRIGHT, ALERT, BOTTOMRIGHT, 0, -10)
_G["EDITBUFFER_ALERT_CANCEL"]:SetText("CANCEL")
_G["EDITBUFFER_ALERT_CANCEL"]:SetHandler("OnMouseDown", function(self)
_G["EDITBUFFER_ALERT"]:SetHidden(true)
_G["EDITBUFFER_ALERT"]:SetTopmost(false)
end)
end

local dumped_text = self.text
local dumped_parts = self:SplitLongLines(dumped_text, 1000)

_G["EDITBUFFER_ALERT"]:SetHidden(false)
_G["EDITBUFFER_ALERT"]:SetTopmost(true)

local i = 1
local num_max = #dumped_parts

local function OnClipBoardCopyNext()
if(i > num_max) then
i = 1
_G["EDITBUFFER_ALERT"]:SetHidden(true)
_G["EDITBUFFER_ALERT"]:SetTopmost(false)
end

if(dumped_parts[i]) then
_G["EDITBUFFER_ALERT_TEXT"]:SetText('Text copied to clipboard ('..tostring(i)..' of '..tostring(num_max)..') ...')

_G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetText(dumped_parts[i])
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:CopyAllTextToClipboard()
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
end

i = i + 1
end

CALLBACK_MANAGER:RegisterCallback("OnClipBoardCopyNext", OnClipBoardCopyNext)
OnClipBoardCopyNext()

-- less or equal to 1000 chars only a single copy is needed
else
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetText(self.text)
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:CopyAllTextToClipboard()
_G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
end
end
end

-- OnMouseWheel-Event
parent:SetHandler("OnMouseWheel", function(self, delta, ctrl, alt, shift, command)
-- up
if(delta > 0) then
control:ScrollUp()
-- down
elseif(delta < 0) then
control:ScrollDown()
end
end)

_G[name] = control

return _G[name]

end
[/highlight]

Usage Exampe:
[highlight="Lua"]

CreateEditBuffer("MY_EDIT_BUFFER", YOUR_PARENT_WINDOW)

MY_EDIT_BUFFER:SetText([[
Lorem ipsum dolor sit Hamlet, aliqua ball tip chicken turducken in, doner short loin irure ground round kielbasa. Prosciutto jowl biltong fatback, turkey dolore pork chop frankfurter laboris turducken in shoulder ea. Excepteur shank beef, sausage meatball duis laboris sirloin pancetta doner spare ribs fatback est andouille eu. Sausage short ribs nulla short loin minim shoulder. Irure bresaola fugiat ham hock frankfurter rump cow pariatur doner filet mignon short ribs eiusmod spare ribs. Pork loin deserunt in jowl veniam ham kielbasa pastrami reprehenderit meatloaf shank laboris. Do cow anim, bacon cillum deserunt pig veniam laboris ham hock quis.Spare ribs veniam eiusmod nostrud. Drumstick laborum sed, ut spare ribs quis consectetur nisi id enim. Sunt reprehenderit id, quis pork chop pork loin beef culpa short loin flank ex ut filet mignon nostrud labore. Hamburger aute prosciutto jowl ex tongue kielbasa venison swine laboris ribeye ground round adipisicing capicola. Nostrud consectetur sed bacon occaecat salami duis do officia enim.
Pork laboris pork chop in, pork loin cillum pastrami turducken biltong capicola excepteur ea. Mollit drumstick meatball pork, doner ball tip tongue irure. Leberkas sausage duis cupidatat ut eu pork loin elit qui incididunt deserunt consequat excepteur irure pork chop. Ball tip anim tail, pork pork loin ea boudin ham filet mignon tri-tip occaecat esse meatball veniam ham hock. Deserunt dolor culpa cow, filet mignon short ribs t-bone ut non nisi brisket nostrud. Aliqua nulla pig ea.
Eu t-bone ham hock pork chop ut spare ribs. Flank turkey dolore anim filet mignon leberkas culpa ham nulla chicken pork loin in. T-bone ham tenderloin aute short ribs, jerky frankfurter do. Strip steak jowl dolore tenderloin pork belly minim prosciutto cow meatloaf et tempor ut adipisicing elit culpa.
Aliquip exercitation aute, anim leberkas dolore aliqua. Cillum ut pork chop nostrud, commodo do deserunt ham cow kielbasa. Qui frankfurter meatloaf jowl adipisicing flank pork belly, ullamco officia capicola duis minim corned beef. Excepteur tenderloin sed shank rump. Salami enim doner, tri-tip ham rump id ea. Strip steak sirloin exercitation tongue cillum sint magna shoulder jowl beef ribs pork nostrud laborum cupidatat boudin. Cow kielbasa venison excepteur voluptate ball tip duis irure.
Ground round drumstick cow, strip steak ball tip shoulder deserunt andouille tri-tip voluptate venison. Capicola consequat ham flank, boudin ad pork belly duis non ground round laborum cow ullamco ex. Sunt ham hock mollit, kielbasa incididunt hamburger eu. Nisi pork short ribs laboris, pork belly eu proident tongue tempor doner. Sint hamburger velit in ribeye do pig drumstick officia ground round. Tenderloin andouille ut ball tip quis, shank brisket jowl.
Corned beef voluptate dolor, laboris nulla drumstick venison occaecat chicken minim. Proident in meatball pastrami minim ullamco aliqua. Laboris salami ham, enim ut nostrud dolor in veniam anim consectetur non bresaola. Corned beef et veniam tenderloin.
Mollit eu pig short ribs, spare ribs filet mignon ball tip turducken adipisicing ribeye shankle shank. Nisi nulla aliqua pork voluptate pig, culpa jowl qui short loin chuck turkey adipisicing tail. Est non consectetur, drumstick pork loin pork t-bone pancetta excepteur strip steak. Salami pork minim turkey dolore. Est frankfurter ullamco, velit short ribs turducken turkey ut et corned beef tongue occaecat adipisicing. Nisi hamburger dolor, aliquip swine sirloin commodo labore shoulder.
Drumstick hamburger pork belly pork loin, sed id excepteur short loin ut sint commodo dolore andouille laborum. Tri-tip cow dolore ham. Reprehenderit turkey pariatur consequat commodo short ribs, minim biltong ex deserunt non. Meatloaf brisket in eiusmod, ut bresaola dolore ham hock pork belly elit leberkas esse. Officia chicken cow, excepteur mollit pork chop biltong nulla. Eiusmod bresaola quis, tail ball tip enim proident beef ribs irure ea nostrud qui aliqua. Non ut in t-bone salami in laborum do ham hock turducken.
Ad sausage shankle salami aliquip turducken. Jerky occaecat aute beef mollit doner andouille nostrud t-bone pork belly. Salami drumstick ribeye proident beef in. Aliquip biltong pig anim pork loin. Chuck spare ribs sirloin pancetta labore biltong turducken laborum chicken deserunt. Spare ribs ham ullamco exercitation pancetta consequat tail dolore bresaola kielbasa pork belly biltong anim voluptate.
Aliquip in cow, ribeye venison flank chicken tenderloin incididunt. Anim do capicola pastrami sausage voluptate laboris cow duis, chicken deserunt shank. Et ball tip tongue, id irure labore elit. Pork belly turducken cupidatat dolor nulla ut strip steak biltong reprehenderit ut do drumstick nisi fatback laborum.
Sunt fugiat dolore jerky turkey nostrud short ribs pig duis ex nulla short loin. Ad strip steak dolore filet mignon hamburger jowl sunt deserunt in commodo prosciutto. Shank capicola ullamco, bacon labore ut in. Fugiat doner eiusmod ham.
Turducken proident duis deserunt labore jowl cow corned beef chicken leberkas. Mollit jowl rump pariatur. Commodo chuck spare ribs, laborum hamburger magna ex in corned beef. Velit in excepteur, voluptate magna tri-tip corned beef non shankle pork chop proident esse. Veniam culpa mollit chicken ground round prosciutto flank short ribs pork chop t-bone. Beef ribs jerky incididunt, chicken et spare ribs shoulder. Brisket boudin pork ham hock nulla, pork chop voluptate fatback ullamco officia tempor beef shoulder.
Chuck in ut spare ribs irure bresaola pork loin est. Incididunt ex voluptate turducken. Sunt bresaola aute swine pig mollit est. Ut culpa pork non meatball beef pastrami enim fugiat in ham.
Esse salami boudin pig frankfurter cillum quis, voluptate tempor consectetur chuck leberkas ground round. Ham hock pork chop ex proident hamburger cow aliquip biltong shoulder. Ball tip tail turkey ad ut beef, corned beef brisket ullamco capicola. Et ut drumstick elit pancetta ut tempor magna sirloin in. Ullamco drumstick spare ribs, velit laboris venison sirloin. In flank sirloin hamburger tail short loin. Cupidatat ham hock fugiat shoulder aute consequat.
Excepteur elit ex tempor kielbasa voluptate, laboris exercitation dolor anim. Occaecat jowl corned beef, chuck ut duis tail prosciutto tongue. Quis consectetur brisket hamburger doner spare ribs corned beef mollit short loin tail id salami pork loin. Chuck sirloin cow, ad doner aute officia excepteur quis pork chop. Frankfurter consectetur jerky pastrami. Tongue tenderloin mollit short ribs, cupidatat exercitation t-bone ea tail jerky enim spare ribs. Salami andouille rump pastrami, excepteur tempor eiusmod fugiat kielbasa incididunt nulla laboris jerky chuck.
Duis anim venison rump occaecat tail. Turducken dolore quis biltong spare ribs meatloaf ribeye bresaola beef ribs meatball pariatur pancetta shank. Adipisicing pancetta ribeye duis biltong mollit ham hock shankle swine laboris pork loin exercitation ex. Andouille brisket voluptate boudin labore id, et flank meatball commodo prosciutto capicola sausage. Flank cow spare ribs tri-tip. Ut pancetta elit quis deserunt sint turducken bacon, venison est nisi doner pork belly short ribs.
Nostrud consequat sed short ribs culpa fatback beef ribs adipisicing voluptate. Meatball consequat tenderloin proident, brisket tail enim chicken ham swine dolore pork ball tip id. Ea boudin culpa andouille short loin enim incididunt laboris dolor tri-tip shoulder in. Excepteur aute rump commodo boudin non short ribs ham. Irure laboris drumstick ut ball tip do consequat ex. Filet mignon sed pork belly, flank do sirloin adipisicing exercitation laborum bresaola. Et tenderloin tongue, velit bacon cillum aute proident veniam quis fatback laboris leberkas t-bone officia.
Pork belly tempor consectetur sausage. Short loin bresaola officia incididunt dolor fugiat. Tail venison leberkas capicola elit, biltong ham hock aute. Ea drumstick voluptate dolore ham leberkas et jowl exercitation ut meatloaf reprehenderit aute. Laboris short ribs aute dolore pancetta sunt exercitation.
In ad chuck fugiat cupidatat meatloaf. Laborum flank ball tip voluptate nulla turducken turkey esse. Pork chop aute dolor sausage id, kielbasa turducken pork belly in meatloaf. Cillum ad sed frankfurter laborum nulla tempor brisket ea esse drumstick. Pork chop veniam salami tri-tip. Spare ribs ground round deserunt sint, tri-tip ham hock bresaola sirloin. Id dolore pork loin tongue shankle chicken.
]])

-- do some retarded stuff
MY_EDIT_BUFFER:ScrollUp()
MY_EDIT_BUFFER:ScrollDown()
MY_EDIT_BUFFER:CopyAllTextToClipboard()

local my_lines_in_a_table_for_whatever_usage = MY_EDIT_BUFFER:GetAllLines()

MY_EDIT_BUFFER:Clear()

[/highlight]

Everything is still a bit rought around the edges. But I'll release a real world example in the next few days with my LibDebug update ...

Chuck in ut spare ribs!

And yes: If you want to add / modifiy anything - do it yourself

Edit:

Forgot to add my string functions - added now. Sorry!

Edit #2:

Add Screenshot

Edit #3:

Updated code to match the new look n' feel.

Last edited by thelegendaryof : 05/20/14 at 06:30 AM. Reason: Edit #4 - Fixed typo CANCLE -> CANCEL
  Reply With Quote
05/20/14, 12:41 PM   #2
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
Working example found here in BugEater (formerly LibDebug) Version 1.0 - R3:

http://www.esoui.com/downloads/info3...yLibDebug.html

Cheers!

Last edited by thelegendaryof : 05/20/14 at 06:23 PM.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » EditBuffer - Unlimited Textlength + Scroll + Partial Copy & Paste ...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off