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:
Lua Code:
  1. -----------------------------
  2. -- STRING HELPERS
  3. -----------------------------
  4.  
  5. -- replace string(s) (with whole-word option)
  6. local function str_replace(source, find, replace, wholeword)
  7.   if wholeword then
  8.     find = '%f[%a]'..find..'%f[%A]'
  9.   end
  10.   return (source:gsub(find,replace))
  11. end
  12.  
  13. -- escape special/magic characters (regex) in a string
  14. local function str_escape(str)
  15.     return (str:gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1'):gsub('%z','%%z'))
  16. end
  17.  
  18. -- split string by pattern/delimiter
  19. -- eg: mytable = str_split("test1:test2:test3", "\:")
  20. local function str_split(str, del)
  21.     -- [url]http://stackoverflow.com/a/1579673[/url]
  22.  
  23.     local ret = {}
  24.     local fpat = "(.-)" .. del
  25.     local last_end = 1
  26.     local s, e, cap = str:find(fpat, 1)
  27.    
  28.     while s do
  29.         if s ~= 1 or cap ~= "" then
  30.             table.insert(ret,cap)
  31.         end
  32.    
  33.         last_end = e+1
  34.         s, e, cap = str:find(fpat, last_end)
  35.     end
  36.    
  37.     if last_end <= #str then
  38.         cap = str:sub(last_end)
  39.         table.insert(ret, cap)
  40.     end
  41.    
  42.     return ret
  43. end
  44.  
  45. -- cleanup string (duplicated whitespaces n' stuff)
  46. local function str_cleanup(str)
  47.  
  48.     -- Remove leading and trailing whitespace(s)
  49.     str = str:gsub("^%s*(.-)%s*$", "%1")
  50.  
  51.     -- Remove any duplicated whitespace(s)
  52.     str = str:gsub("%s%s+", " ")
  53.    
  54.     return str
  55. end


The Component itself:
Lua Code:
  1. -----------------------------
  2. -- CreateEditBuffer
  3. -----------------------------
  4.  
  5. local function CreateEditBuffer(name, parent, anchor1, anchor2, fontSize, numLines, lineHeight)
  6.     if(not name or not parent) then do return nil end end
  7.  
  8.     local anchor1_default = {TOPLEFT, parent, TOPLEFT, 0, 0}
  9.     local anchor2_default = {BOTTOMRIGHT, parent, BOTTOMRIGHT, 0, 0}
  10.    
  11.     -- Optional Parameters
  12.     local anchor1   = anchor1 or anchor1_default
  13.     local anchor2   = anchor2 or anchor2_default
  14.    
  15.     if(type(anchor1) ~= "table") then anchor1 = anchor1_default end
  16.     if(type(anchor2) ~= "table") then anchor2 = anchor2_default end
  17.    
  18.     --'LibDebug/fonts/AnkaCoder-C87-r.ttf' size:17 charwidth: 8.75 | 21 @ 11.5 | 20 @ 10.75
  19.     -- Font settings
  20.     local FONT_STYLE_THIN = 'soft-shadow-thin'
  21.     local FONT_STYLE_THICK = 'soft-shadow-thick'
  22.     local FONT_STYLE_SHADOW = 'shadow'
  23.     local FONT_STYLE_NONE = 'none' 
  24.     local FONT_SIZE = fontSize or 20
  25.     local FONT_FACE = 'LibDebug/fonts/AnkaCoder-C87-b.ttf'
  26.     local CHAR_WIDTH = 10.75
  27.     local LINE_HEIGHT = lineHeight or tonumber(FONT_SIZE*1.275)
  28.    
  29.     -- Control-Names
  30.     local BG = name..'_BG'
  31.  
  32.     -- BG
  33.     WINDOW_MANAGER:CreateControlFromVirtual(BG, parent, "ZO_InsetBackdrop")
  34.     _G[BG]:SetAnchor(anchor1[1], anchor1[2], anchor1[3], anchor1[4], anchor1[5])   
  35.     _G[BG]:SetAnchor(anchor2[1], anchor2[2], anchor2[3], anchor2[4], anchor2[5])   
  36.    
  37.     -- LINES (EDIT)
  38.     local numLines = numLines or math.floor((_G[BG]:GetHeight()-anchor1[5]-anchor2[5])/LINE_HEIGHT)
  39.    
  40.     for i=1, numLines, 1 do
  41.         local LINE = name..'_LINE'..tostring(i)
  42.        
  43.         WINDOW_MANAGER:CreateControlFromVirtual(LINE, parent, "ZO_DefaultEditMultiLineForBackdrop")
  44.         _G[LINE]:SetMaxInputChars(1000) -- Hello Windows 98 and FAT, I missed you NOT
  45.         _G[LINE]:SetMultiLine(false)
  46.         _G[LINE]:SetEditEnabled(false)
  47.         _G[LINE]:SetCopyEnabled(true)
  48.         _G[LINE]:SetAnchor(TOPLEFT, _G[BG], TOPLEFT, 7, (5+((i-1)*LINE_HEIGHT)))
  49.         _G[LINE]:SetDimensions((_G[BG]:GetWidth()-10), LINE_HEIGHT)
  50.         _G[LINE]:SetColor(207/255, 220/255, 189/255, 1)
  51.         _G[LINE]:SetHandler("OnMouseDoubleClick", function(self)
  52.             -- bah
  53.             zo_callLater(function() self:SelectAll() end, 0.5)
  54.         end)       
  55.        
  56.         -- Set monospace font with fixed width
  57.         _G[LINE]:SetFont(FONT_FACE..'|'..FONT_SIZE..'|'..FONT_STYLE_THIN)
  58.     end
  59.    
  60.     -- Create an empty table / pseudo-control that will hold our public stuff
  61.     local control = {}
  62.    
  63.     control.text    = ""    -- holds the unmodified text
  64.     control.offset  = 1     -- starts at line 1
  65.    
  66.     local function disable_links(text)
  67.         local links = {}
  68.  
  69.         for link in string.gfind(text, "(|H(.-):(.-)|h(.-)|h)") do
  70.             local name = link:match("|h%[(.-)%]|h")
  71.                
  72.             if(name) then
  73.                 links[#links+1] = {["name"] = name, ["link"] = link }
  74.                 text = str_replace(text, str_escape(link), '['..tostring(name)..']', false)
  75.             end
  76.         end
  77.        
  78.         return text, links
  79.     end
  80.    
  81.     local function enable_links(text, links)
  82.         if(not links or type(links) ~= "table") then do return text end end
  83.    
  84.         for i,o in ipairs(links) do
  85.             local disabled_link = '['..tostring(o["name"])..']'
  86.             text = str_replace(text, str_escape(disabled_link), o["link"], false)
  87.         end
  88.        
  89.         return text
  90.     end
  91.    
  92.     local function clear_links(links)
  93.         for i,o in ipairs(links) do
  94.             links[i] = nil
  95.         end
  96.        
  97.         links = nil
  98.        
  99.         return nil
  100.     end
  101.    
  102.     function control:SetText(text)
  103.         self.text = text
  104.        
  105.         self:Clear()
  106.    
  107.         local numLines = self:GetNumCurLines()
  108.         local maxLines = self:GetNumMaxLines()
  109.        
  110.         if(numLines > maxLines) then
  111.             local offset = numLines-maxLines
  112.                        
  113.             self:DisplayLinesAt(offset)
  114.         else
  115.             self:DisplayLinesAt()
  116.         end
  117.     end
  118.    
  119.     function control:GetNumCurLines()
  120.         local all_lines = self:GetAllLines()
  121.    
  122.         return #all_lines
  123.     end
  124.    
  125.     function control:GetNumMaxLines()
  126.         return numLines
  127.     end    
  128.    
  129.     function control:GetAllLines()
  130.         local ret = {}     
  131.                
  132.         for line in string.gmatch(self.text, "[^\n]+") do
  133.             local line, links = disable_links(line)
  134.             local real_lines = self:SplitLongLines(line)   
  135.                        
  136.             for _,r_line in ipairs(real_lines) do
  137.                 ret[#ret+1] = enable_links(r_line, links)
  138.             end
  139.            
  140.             links = clear_links(links)
  141.             --all_lines[#all_lines+1] = line
  142.         end
  143.    
  144.         enable_links()
  145.    
  146.         return ret
  147.     end
  148.    
  149.     function control:DisplayLinesAt(offset)
  150.         self:Clear()
  151.    
  152.         local offset = offset or 0
  153.        
  154.         if(offset < 0) then do return end end
  155.        
  156.         local all_lines = self:GetAllLines()
  157.        
  158.         -- output lines
  159.         for i=1, numLines, 1 do
  160.        
  161.             local LINE = name..'_LINE'..tostring(i)
  162.        
  163.             if(all_lines[i+offset] and _G[LINE]) then
  164.                 _G[LINE]:SetText(all_lines[i+offset])
  165.             end
  166.         end
  167.        
  168.         self.offset = offset
  169.        
  170.     end
  171.    
  172.     function control:ScrollUp()
  173.         local numLines = self:GetNumCurLines()
  174.         local maxLines = self:GetNumMaxLines() 
  175.        
  176.         -- only scroll if theres more text aviable then displayed
  177.         if(numLines > maxLines) then
  178.             local new_offset = math.floor(control.offset - 1)
  179.             if(new_offset >= 0) then self:DisplayLinesAt(new_offset) end
  180.         end
  181.     end
  182.    
  183.     function control:ScrollDown()
  184.         local numLines = self:GetNumCurLines()
  185.         local maxLines = self:GetNumMaxLines() 
  186.        
  187.         -- only scroll if theres more text aviable then displayed
  188.         if(numLines > maxLines) then
  189.             local new_offset = math.floor(control.offset + 1)
  190.             local displayed_lines = new_offset+maxLines
  191.             if(new_offset >= 0 and displayed_lines <= numLines) then control:DisplayLinesAt(new_offset) end    
  192.         end
  193.     end
  194.    
  195.     function control:SplitLongLines(text, maxLength)
  196.         local ret = {}
  197.        
  198.         local maxLineWidth  = _G[BG]:GetWidth()
  199.         local maxChars      = maxLength or math.floor(maxLineWidth/CHAR_WIDTH)
  200.         local text_len      = string.len(text);
  201.        
  202.         if(text_len <= maxChars) then
  203.             ret[#ret+1] = text
  204.         else
  205.             for from = 0, text_len, maxChars do
  206.                 local to = from+maxChars-1
  207.                
  208.                 if(from >= text_len) then from = text_len end
  209.                 if(to >= text_len) then to = text_len end
  210.            
  211.                 --ret = ret+1
  212.                 ret[#ret+1] = string.sub(text, from, to)
  213.             end
  214.         end
  215.        
  216.         return ret
  217.     end
  218.    
  219.     function control:Clear()
  220.         for i=1, numLines, 1 do
  221.             local LINE = name..'_LINE'..tostring(i)
  222.  
  223.             if(_G[LINE]) then _G[LINE]:Clear() end
  224.         end
  225.     end
  226.  
  227.     -- dirty but butt
  228.     function control:CopyAllTextToClipboard()
  229.         if(self.text) then 
  230.             if(not _G["EDITBUFFER_CLIPBOARD"]) then
  231.                 WINDOW_MANAGER:CreateTopLevelWindow("EDITBUFFER_CLIPBOARD")
  232.                 --_G["EDITBUFFER_CLIPBOARD"]:SetDimensions(1,1)
  233.                 --_G["EDITBUFFER_CLIPBOARD"]:SetAlpha(0)
  234.                
  235.                 if(not _G["EDITBUFFER_CLIPBOARD_CONTENT"]) then
  236.                     WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_CLIPBOARD_CONTENT", _G["EDITBUFFER_CLIPBOARD"], "ZO_DefaultEditMultiLineForBackdrop")
  237.                     _G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetAlpha(0)
  238.                     _G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetCopyEnabled(true)
  239.                     _G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetMaxInputChars(1000)
  240.                     _G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetMouseEnabled(false)
  241.                 end
  242.             end
  243.            
  244.             -- partial copy & paste
  245.             if(string.len(self.text) > 1000) then
  246.                 if(not _G["EDITBUFFER_ALERT"]) then
  247.                     local ALERT = WINDOW_MANAGER:CreateTopLevelWindow("EDITBUFFER_ALERT")
  248.                     ALERT:SetDimensions(400, 140)
  249.                     ALERT:SetAnchor(CENTER, GuiRoot, CENTER)
  250.                     ALERT:SetClampedToScreen(true)
  251.                     ALERT:SetMouseEnabled(true)
  252.                     ALERT:SetMovable(true)
  253.                     ALERT:SetTopmost(true)
  254.                     ALERT:SetHidden(false)
  255.                    
  256.                     -- BG
  257.                     WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_BG", ALERT, "ZO_DefaultBackdrop")
  258.                    
  259.                     -- CLOSE
  260.                     WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_CLOSE", ALERT, "ZO_CloseButton")
  261.                     _G["EDITBUFFER_ALERT_CLOSE"]:SetDimensions(16, 16)
  262.                     _G["EDITBUFFER_ALERT_CLOSE"]:SetAnchor(TOPRIGHT, ALERT, TOPRIGHT, 0, 0)
  263.                     _G["EDITBUFFER_ALERT_CLOSE"]:SetHandler("OnMouseDown", function(self)
  264.                         _G["EDITBUFFER_ALERT"]:SetHidden(true)
  265.                         _G["EDITBUFFER_ALERT"]:SetTopmost(false)
  266.                     end)
  267.  
  268.                     -- TITLE
  269.                     WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_TITLE", ALERT, "ZO_WindowTitle")
  270.                     _G["EDITBUFFER_ALERT_TITLE"]:SetHorizontalAlignment(CENTER)
  271.                     _G["EDITBUFFER_ALERT_TITLE"]:ClearAnchors()
  272.                     _G["EDITBUFFER_ALERT_TITLE"]:SetAnchor(TOPLEFT, ALERT, TOPLEFT, 0, -1)
  273.                     _G["EDITBUFFER_ALERT_TITLE"]:SetAnchor(TOPRIGHT, ALERT, TOPRIGHT, 0, -1)
  274.                     _G["EDITBUFFER_ALERT_TITLE"]:SetText("PARTIAL COPY AND PASTE!")
  275.                    
  276.                     -- DIVIDER
  277.                     WINDOW_MANAGER:CreateControl("EDITBUFFER_ALERT_DIVIDER", ALERT, CT_TEXTURE)
  278.                     _G["EDITBUFFER_ALERT_DIVIDER"]:SetTexture("EsoUI/Art/Miscellaneous/horizontalDivider.dds")
  279.                     _G["EDITBUFFER_ALERT_DIVIDER"]:SetDimensions(nil, 4)
  280.                     _G["EDITBUFFER_ALERT_DIVIDER"]:SetAnchor(TOPLEFT, ALERT, TOPLEFT, -80, 40)
  281.                     _G["EDITBUFFER_ALERT_DIVIDER"]:SetAnchor(TOPRIGHT, ALERT, TOPRIGHT, 80, 40)
  282.                    
  283.                     -- TEXT
  284.                     WINDOW_MANAGER:CreateControl("EDITBUFFER_ALERT_TEXT", ALERT, CT_LABEL)
  285.                     _G["EDITBUFFER_ALERT_TEXT"]:SetFont("ZoFontGame")
  286.                     _G["EDITBUFFER_ALERT_TEXT"]:SetAnchor(CENTER, ALERT, CENTER)
  287.                     _G["EDITBUFFER_ALERT_TEXT"]:SetColor(207/255, 220/255, 189/255, 1)
  288.                    
  289.                     -- NEXT
  290.                     WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_NEXT", ALERT, "ZO_DefaultButton")
  291.                     _G["EDITBUFFER_ALERT_NEXT"]:SetAnchor(BOTTOMLEFT, ALERT, BOTTOMLEFT, 0, -10)
  292.                     _G["EDITBUFFER_ALERT_NEXT"]:SetText("NEXT")
  293.                     _G["EDITBUFFER_ALERT_NEXT"]:SetHandler("OnMouseDown", function(self)
  294.                         CALLBACK_MANAGER:FireCallbacks("OnClipBoardCopyNext", self)
  295.                     end)
  296.                    
  297.                     -- CANCLE
  298.                     WINDOW_MANAGER:CreateControlFromVirtual("EDITBUFFER_ALERT_CANCEL", ALERT, "ZO_DefaultButton")
  299.                     _G["EDITBUFFER_ALERT_CANCEL"]:SetAnchor(BOTTOMRIGHT, ALERT, BOTTOMRIGHT, 0, -10)
  300.                     _G["EDITBUFFER_ALERT_CANCEL"]:SetText("CANCEL")
  301.                     _G["EDITBUFFER_ALERT_CANCEL"]:SetHandler("OnMouseDown", function(self)
  302.                         _G["EDITBUFFER_ALERT"]:SetHidden(true)
  303.                         _G["EDITBUFFER_ALERT"]:SetTopmost(false)
  304.                     end)
  305.                 end
  306.            
  307.                 local dumped_text = self.text
  308.                 local dumped_parts = self:SplitLongLines(dumped_text, 1000)
  309.                
  310.                 _G["EDITBUFFER_ALERT"]:SetHidden(false)
  311.                 _G["EDITBUFFER_ALERT"]:SetTopmost(true)
  312.                
  313.                 local i = 1
  314.                 local num_max = #dumped_parts
  315.                                
  316.                 local function OnClipBoardCopyNext()
  317.                     if(i > num_max) then
  318.                         i = 1
  319.                         _G["EDITBUFFER_ALERT"]:SetHidden(true)
  320.                         _G["EDITBUFFER_ALERT"]:SetTopmost(false)   
  321.                     end
  322.                
  323.                     if(dumped_parts[i]) then
  324.                         _G["EDITBUFFER_ALERT_TEXT"]:SetText('Text copied to clipboard ('..tostring(i)..' of '..tostring(num_max)..') ...')
  325.                    
  326.                         _G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
  327.                         _G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetText(dumped_parts[i])
  328.                         _G["EDITBUFFER_CLIPBOARD_CONTENT"]:CopyAllTextToClipboard()
  329.                         _G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()                             
  330.                     end
  331.                    
  332.                     i = i + 1                  
  333.                 end
  334.                
  335.                 CALLBACK_MANAGER:RegisterCallback("OnClipBoardCopyNext", OnClipBoardCopyNext)
  336.                 OnClipBoardCopyNext()
  337.            
  338.             -- less or equal to 1000 chars only a single copy is needed
  339.             else
  340.                 _G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
  341.                 _G["EDITBUFFER_CLIPBOARD_CONTENT"]:SetText(self.text)
  342.                 _G["EDITBUFFER_CLIPBOARD_CONTENT"]:CopyAllTextToClipboard()
  343.                 _G["EDITBUFFER_CLIPBOARD_CONTENT"]:Clear()
  344.             end
  345.         end
  346.     end    
  347.        
  348.     -- OnMouseWheel-Event
  349.     parent:SetHandler("OnMouseWheel", function(self, delta, ctrl, alt, shift, command)
  350.         -- up
  351.         if(delta > 0) then
  352.             control:ScrollUp()
  353.         -- down
  354.         elseif(delta < 0) then
  355.             control:ScrollDown()
  356.         end
  357.     end)
  358.  
  359.     _G[name] = control 
  360.    
  361.     return _G[name]
  362.  
  363. end

Usage Exampe:
Lua Code:
  1. CreateEditBuffer("MY_EDIT_BUFFER", YOUR_PARENT_WINDOW)
  2.  
  3. MY_EDIT_BUFFER:SetText([[
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. ]])
  24.  
  25. -- do some retarded stuff
  26. MY_EDIT_BUFFER:ScrollUp()
  27. MY_EDIT_BUFFER:ScrollDown()
  28. MY_EDIT_BUFFER:CopyAllTextToClipboard()
  29.  
  30. local my_lines_in_a_table_for_whatever_usage = MY_EDIT_BUFFER:GetAllLines()
  31.  
  32. MY_EDIT_BUFFER:Clear()

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 ...

Thread Tools
Display Modes

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