MemoLib — Multi-Line Text Control Library

Complete functionality for creating and managing multi-line text edit controls in Plan9Basic. Ideal for text areas, notes, log viewers, code editors, and any multi-line text input. Features include line-by-line access, word wrap, scrollbars, selection, clipboard, and scroll control. 139 functions.

CategoryCountDescription
Error Handling4memo_error, memo_errormsg$, memo_strerror$, memo_clearerror
Creation & Destruction4memo# (3 overloads), memo_free
Text Content4text (get/set), textlength, clear#
Lines8linecount, line (get/set), addline#, insertline#, deleteline#, lines (get/set)
Word Wrap & Scrollbars4wordwrap, showscrollbars (get/set)
Read-Only2readonly (get/set)
Font Properties14fontfamily, fontsize, fontcolor, bold, italic, underline, strikeout (get/set)
Text Alignment2textalign (get/set)
Selection7selstart, sellength, seltext$, selectall#, clearselection#
Caret Control6caretpositionline, caretpositionpos (get/set), gotoend#, gotobegin#
Clipboard4copy#, cut#, paste#, deleteselection#
Scroll Control3scrolltop (get/set), scrolltoend#
Position & Size14x, y, width, height (get/set), bounds#, move#, size#
Alignment & Margins12align (get/set), margin#, margins#, marginleft/top/right/bottom (get/set)
Visibility & State6visible, enabled, opacity (get/set)
Focus5isfocused, setfocus#, resetfocus#, taborder (get/set)
Tag & Parent6tag (get/set), parent# (get/set), bringtofront#, sendtoback#
Events3817 event types × set/get + clearcallbacks#

Cross-Platform Support

PlatformStatusNotes
Windows✅ Full SupportWin32/Win64
Linux✅ Full SupportGTK-based
Android✅ Full SupportMobile-optimized

Error Handling

FunctionSignatureDescription
memo_error()memo_error@Last error code (0 = no error)
memo_errormsg$()memo_errormsg$@Last error message as string
memo_strerror$(code)memo_strerror$@nDescription for a given error code
memo_clearerror()memo_clearerror@Clear the error state

Numeric Values Reference

Plan9Basic does not have built-in constants. You can define your own named values for readability:

╯ plan9basic
' Control alignment
let ALIGN_NONE = 0
let ALIGN_TOP = 1
let ALIGN_CLIENT = 9

' Text alignment
let TEXT_CENTER = 0
let TEXT_LEFT = 1
let TEXT_RIGHT = 2

Control Alignment memo_align#

ValueDescription
0None (absolute positioning)
1Top
2Left
3Right
4Bottom
9Client (fill parent)

Text Alignment memo_textalign#

ValueDescription
0Center
1Leading (Left for LTR languages)
2Trailing (Right for LTR languages)

Creation & Destruction

FunctionSignatureDescription
memo#(parent#)memo#@#Create memo with default size
memo#(parent#, x, y, w, h)memo#@#nnnnCreate with position and size
memo#(parent#, x, y, w, h, text$)memo#@#nnnn$Create with position, size, and initial text
memo_free(mem#)memo_free@#Destroy memo and release resources
╯ plan9basic
' Simple creation
let mem# = memo#(frm#)

' With position and size
let mem# = memo#(frm#, 20, 20, 460, 300)

' With initial text
let mem# = memo#(frm#, 20, 20, 460, 300, "Initial text...")

' Cleanup
memo_free(mem#)

Text Content

FunctionSignatureDescription
memo_text$(mem#)memo_text$@#Get all text as a single string
memo_text#(mem#, text$)memo_text#@#$Set all text (replaces existing content)
memo_textlength(mem#)memo_textlength@#Get text length in characters
memo_clear#(mem#)memo_clear#@#Clear all text
╯ plan9basic
memo_text#(mem#, "Hello World")
println "Length: " + str$(memo_textlength(mem#))

let allText$ = memo_text$(mem#)
memo_clear#(mem#)

Lines

MemoLib provides line-by-line access to the text content. Line indices are 0-based.

FunctionSignatureDescription
memo_linecount(mem#)memo_linecount@#Get total number of lines
memo_line$(mem#, index)memo_line$@#nGet text of a specific line (0-based)
memo_line#(mem#, index, text$)memo_line#@#n$Set text of a specific line
memo_addline#(mem#, text$)memo_addline#@#$Append a new line at the end
memo_insertline#(mem#, index, text$)memo_insertline#@#n$Insert a new line at the given index
memo_deleteline#(mem#, index)memo_deleteline#@#nDelete the line at the given index
memo_lines$(mem#)memo_lines$@#Get all lines as a single string (preserving line structure)
memo_lines#(mem#, text$)memo_lines#@#$Set all lines from a single string
╯ plan9basic
' Build content line by line
memo_addline#(mem#, "First line")
memo_addline#(mem#, "Second line")
memo_addline#(mem#, "Third line")

' Read a specific line
println "Line 0: " + memo_line$(mem#, 0)

' Modify a line
memo_line#(mem#, 1, "Modified second line")

' Insert at position
memo_insertline#(mem#, 1, "Inserted between first and second")

' Delete a line
memo_deleteline#(mem#, 2)

println "Total lines: " + str$(memo_linecount(mem#))

Word Wrap & Scrollbars

FunctionSignatureDescription
memo_wordwrap(mem#)memo_wordwrap@#Get word wrap state (0/1)
memo_wordwrap#(mem#, n)memo_wordwrap#@#nEnable/disable word wrap
memo_showscrollbars(mem#)memo_showscrollbars@#Get scrollbar visibility (0/1)
memo_showscrollbars#(mem#, n)memo_showscrollbars#@#nShow/hide scrollbars
╯ plan9basic
' Text editor style: no wrap, with scrollbars
memo_wordwrap#(mem#, 0)
memo_showscrollbars#(mem#, 1)

' Notes style: wrap text, hide scrollbars
memo_wordwrap#(mem#, 1)
memo_showscrollbars#(mem#, 0)
ⓘ Note: When word wrap is enabled, lines wrap at the memo width and no horizontal scrollbar is shown. Disable word wrap for code editors where line width matters.

Read-Only

FunctionSignatureDescription
memo_readonly(mem#)memo_readonly@#Get read-only state (0/1)
memo_readonly#(mem#, n)memo_readonly#@#nEnable/disable read-only mode
╯ plan9basic
' Log viewer: read-only, programmatic content only
memo_readonly#(mem#, 1)
memo_addline#(mem#, "[INFO] Application started")
ⓘ Note: Read-only prevents user editing, but you can still modify the text programmatically via memo_text#, memo_addline#, etc.

Font Properties

FunctionSignatureDescription
memo_fontfamily$(mem#)memo_fontfamily$@#Get font family name
memo_fontfamily#(mem#, family$)memo_fontfamily#@#$Set font family
memo_fontsize(mem#)memo_fontsize@#Get font size
memo_fontsize#(mem#, size)memo_fontsize#@#nSet font size
memo_fontcolor$(mem#)memo_fontcolor$@#Get font color
memo_fontcolor#(mem#, color$)memo_fontcolor#@#$Set font color
memo_bold(mem#)memo_bold@#Get bold state (0/1)
memo_bold#(mem#, n)memo_bold#@#nSet bold (0/1)
memo_italic(mem#)memo_italic@#Get italic state (0/1)
memo_italic#(mem#, n)memo_italic#@#nSet italic (0/1)
memo_underline(mem#)memo_underline@#Get underline state (0/1)
memo_underline#(mem#, n)memo_underline#@#nSet underline (0/1)
memo_strikeout(mem#)memo_strikeout@#Get strikeout state (0/1)
memo_strikeout#(mem#, n)memo_strikeout#@#nSet strikeout (0/1)
╯ plan9basic
' Code editor font
memo_fontfamily#(mem#, "Consolas")
memo_fontsize#(mem#, 13)
memo_fontcolor#(mem#, "#333333")

' Notes font
memo_fontfamily#(mem#, "Arial")
memo_fontsize#(mem#, 14)

Text Alignment

FunctionSignatureDescription
memo_textalign(mem#)memo_textalign@#Get text alignment (0=center, 1=left, 2=right)
memo_textalign#(mem#, n)memo_textalign#@#nSet text alignment
╯ plan9basic
memo_textalign#(mem#, 1)  ' Left-aligned (default for most uses)

Selection

FunctionSignatureDescription
memo_selstart(mem#)memo_selstart@#Get selection start position (0-based)
memo_selstart#(mem#, pos)memo_selstart#@#nSet selection start position
memo_sellength(mem#)memo_sellength@#Get selection length
memo_sellength#(mem#, len)memo_sellength#@#nSet selection length
memo_seltext$(mem#)memo_seltext$@#Get the currently selected text
memo_selectall#(mem#)memo_selectall#@#Select all text
memo_clearselection#(mem#)memo_clearselection#@#Clear the current selection
╯ plan9basic
' Select all and read
memo_selectall#(mem#)
println "Selected: " + memo_seltext$(mem#)

' Programmatic selection
memo_selstart#(mem#, 0)
memo_sellength#(mem#, 10)  ' Select first 10 characters

Caret Control

The memo has a two-dimensional caret: a line number and a character position within the entire text.

FunctionSignatureDescription
memo_caretpositionline(mem#)memo_caretpositionline@#Get caret line number (0-based)
memo_caretpositionline#(mem#, line)memo_caretpositionline#@#nSet caret to a specific line
memo_caretpositionpos(mem#)memo_caretpositionpos@#Get caret character position in full text
memo_caretpositionpos#(mem#, pos)memo_caretpositionpos#@#nSet caret character position
memo_gotoend#(mem#)memo_gotoend#@#Move caret to the end of text
memo_gotobegin#(mem#)memo_gotobegin#@#Move caret to the beginning of text
╯ plan9basic
' Display current line in a status label
let line = memo_caretpositionline(mem#)
label_text#(lblStatus#, "Line: " + str$(line + 1))

' Jump to line 10
memo_caretpositionline#(mem#, 10)

' Jump to end
memo_gotoend#(mem#)

Clipboard

FunctionSignatureDescription
memo_copy#(mem#)memo_copy#@#Copy selected text to clipboard
memo_cut#(mem#)memo_cut#@#Cut selected text to clipboard
memo_paste#(mem#)memo_paste#@#Paste from clipboard at caret position
memo_deleteselection#(mem#)memo_deleteselection#@#Delete the selected text without copying
╯ plan9basic
' Edit menu operations
memo_selectall#(mem#)
memo_copy#(mem#)

' Or cut
memo_cut#(mem#)

' Paste
memo_paste#(mem#)

Scroll Control

FunctionSignatureDescription
memo_scrolltop(mem#)memo_scrolltop@#Get vertical scroll position (pixels from top)
memo_scrolltop#(mem#, n)memo_scrolltop#@#nSet vertical scroll position
memo_scrolltoend#(mem#)memo_scrolltoend#@#Scroll to the end of text (show last lines)
╯ plan9basic
' Auto-scroll log after adding entries
memo_addline#(mem#, "[INFO] New event logged")
memo_scrolltoend#(mem#)

' Read scroll position
println "Scroll: " + str$(memo_scrolltop(mem#)) + "px"
ⓘ Note: memo_scrolltoend# is essential for log viewers — call it after memo_addline# to keep the latest entry visible.

Position & Size

FunctionSignatureDescription
memo_x(mem#)memo_x@#Get X position
memo_x#(mem#, x)memo_x#@#nSet X position
memo_y(mem#)memo_y@#Get Y position
memo_y#(mem#, y)memo_y#@#nSet Y position
memo_width(mem#)memo_width@#Get width
memo_width#(mem#, w)memo_width#@#nSet width
memo_height(mem#)memo_height@#Get height
memo_height#(mem#, h)memo_height#@#nSet height
memo_bounds#(mem#, x, y, w, h)memo_bounds#@#nnnnSet position and size in one call
memo_move#(mem#, x, y)memo_move#@#nnSet position only
memo_size#(mem#, w, h)memo_size#@#nnSet size only
╯ plan9basic
memo_bounds#(mem#, 10, 50, 480, 300)

' Or separately
memo_move#(mem#, 10, 50)
memo_size#(mem#, 480, 300)

Alignment & Margins

FunctionSignatureDescription
memo_align(mem#)memo_align@#Get control alignment mode
memo_align#(mem#, n)memo_align#@#nSet control alignment (0=none, 1=top, 2=left, 3=right, 4=bottom, 9=client)
memo_margin#(mem#, n)memo_margin#@#nSet uniform margin on all four sides
memo_margins#(mem#, l, t, r, b)memo_margins#@#nnnnSet individual margins (left, top, right, bottom)
memo_marginleft(mem#)memo_marginleft@#Get left margin
memo_marginleft#(mem#, n)memo_marginleft#@#nSet left margin
memo_margintop(mem#)memo_margintop@#Get top margin
memo_margintop#(mem#, n)memo_margintop#@#nSet top margin
memo_marginright(mem#)memo_marginright@#Get right margin
memo_marginright#(mem#, n)memo_marginright#@#nSet right margin
memo_marginbottom(mem#)memo_marginbottom@#Get bottom margin
memo_marginbottom#(mem#, n)memo_marginbottom#@#nSet bottom margin
╯ plan9basic
' Fill the entire form below a toolbar
memo_align#(mem#, 9)       ' Client = fill remaining space
memo_margin#(mem#, 5)      ' 5px spacing

Visibility & State

FunctionSignatureDescription
memo_visible(mem#)memo_visible@#Get visibility (0/1)
memo_visible#(mem#, n)memo_visible#@#nSet visibility (0=hidden, 1=visible)
memo_enabled(mem#)memo_enabled@#Get enabled state (0/1)
memo_enabled#(mem#, n)memo_enabled#@#nSet enabled state (0=disabled/grayed, 1=enabled)
memo_opacity(mem#)memo_opacity@#Get opacity (0.0–1.0)
memo_opacity#(mem#, value)memo_opacity#@#nSet opacity (0.0=transparent, 1.0=opaque)

Focus

FunctionSignatureDescription
memo_isfocused(mem#)memo_isfocused@#Is this memo focused? (0/1)
memo_setfocus#(mem#)memo_setfocus#@#Give keyboard focus to this memo
memo_resetfocus#(mem#)memo_resetfocus#@#Release focus from this memo
memo_taborder(mem#)memo_taborder@#Get tab order index
memo_taborder#(mem#, n)memo_taborder#@#nSet tab order index

Tag & Parent

FunctionSignatureDescription
memo_tag(mem#)memo_tag@#Get user-defined integer tag
memo_tag#(mem#, n)memo_tag#@#nSet user-defined integer tag
memo_parent#(mem#)memo_parent#@#Get parent control pointer
memo_parent#(mem#, parent#)memo_parent#@##Move memo to a different parent
memo_bringtofront#(mem#)memo_bringtofront#@#Bring to front of Z-order
memo_sendtoback#(mem#)memo_sendtoback#@#Send to back of Z-order

Events

Each event has a setter (memo_onXXX#(mem#, func$)) and a getter (memo_onXXX$(mem#)). Use memo_clearcallbacks#(mem#) to disconnect all callbacks at once.

Text Events

Event SetterGetterCallback SignatureWhen It Fires
memo_onchange#(mem#, func$)memo_onchange$(mem#)function name(sender#)When editing is complete (focus lost)
memo_onchangetracking#(mem#, func$)memo_onchangetracking$(mem#)function name(sender#)On every keystroke (real-time)
ⓘ Note: OnChange vs OnChangeTracking: Use memo_onchange# for final validation. Use memo_onchangetracking# for live statistics (line count, character count) but keep the callback lightweight.

Focus & Click Events

Event SetterGetterCallback Signature
memo_onenter#(mem#, func$)memo_onenter$(mem#)function name(sender#)
memo_onexit#(mem#, func$)memo_onexit$(mem#)function name(sender#)
memo_onclick#(mem#, func$)memo_onclick$(mem#)function name(sender#)
memo_ondblclick#(mem#, func$)memo_ondblclick$(mem#)function name(sender#)

Keyboard Events

Event SetterGetterCallback Signature
memo_onkeydown#(mem#, func$)memo_onkeydown$(mem#)function name(sender#, key, keychar$, shift$)
memo_onkeyup#(mem#, func$)memo_onkeyup$(mem#)function name(sender#, key, keychar$, shift$)

Mouse Events

Event SetterGetterCallback Signature
memo_onmousedown#(mem#, func$)memo_onmousedown$(mem#)function name(sender#, button, x, y, shift$)
memo_onmouseup#(mem#, func$)memo_onmouseup$(mem#)function name(sender#, button, x, y, shift$)
memo_onmousemove#(mem#, func$)memo_onmousemove$(mem#)function name(sender#, x, y, shift$)
memo_onmouseenter#(mem#, func$)memo_onmouseenter$(mem#)function name(sender#)
memo_onmouseleave#(mem#, func$)memo_onmouseleave$(mem#)function name(sender#)

Other Events

Event SetterGetterCallback Signature
memo_onresize#(mem#, func$)memo_onresize$(mem#)function name(sender#)
memo_ondragenter#(mem#, func$)memo_ondragenter$(mem#)function name(sender#)
memo_ondragover#(mem#, func$)memo_ondragover$(mem#)function name(sender#)
memo_ondragdrop#(mem#, func$)memo_ondragdrop$(mem#)function name(sender#)
memo_ondragleave#(mem#, func$)memo_ondragleave$(mem#)function name(sender#)
memo_clearcallbacks#(mem#)Disconnect all event callbacks

Complete Examples

Simple Text Editor

╯ editor.bas
function OnNew(sender#)
    memo_clear#(mem#)
    label_text#(lblStatus#, "New document")
endfunction

function OnCopy(sender#)
    memo_copy#(mem#)
    label_text#(lblStatus#, "Copied to clipboard")
endfunction

function OnPaste(sender#)
    memo_paste#(mem#)
    label_text#(lblStatus#, "Pasted from clipboard")
endfunction

function OnSelectAll(sender#)
    memo_selectall#(mem#)
    label_text#(lblStatus#, "All text selected")
endfunction

function OnTextChange(sender#) local lines, chars
    lines = memo_linecount(sender#)
    chars = memo_textlength(sender#)
    label_text#(lblStatus#, "Lines: " + str$(lines) + " | Chars: " + str$(chars))
endfunction

let frm# = form#("Text Editor", 500, 420)
form_position#(frm#, 4)

let mem# = memo#(frm#, 10, 50, 480, 310)
memo_wordwrap#(mem#, 1)
memo_fontsize#(mem#, 13)

let lblStatus# = label#(frm#, "Ready")
label_bounds#(lblStatus#, 10, 375, 480, 20)

let btnNew# = button#(frm#, "New", 10, 10, 70, 30)
let btnCopy# = button#(frm#, "Copy", 90, 10, 70, 30)
let btnPaste# = button#(frm#, "Paste", 170, 10, 70, 30)
let btnSelectAll# = button#(frm#, "Select All", 250, 10, 90, 30)

button_onclick#(btnNew#, "OnNew")
button_onclick#(btnCopy#, "OnCopy")
button_onclick#(btnPaste#, "OnPaste")
button_onclick#(btnSelectAll#, "OnSelectAll")
memo_onchangetracking#(mem#, "OnTextChange")

form_show(frm#)

while form_visible(frm#) = 1
    processmessages()
end while

Log Viewer (Read-Only)

╯ log_viewer.bas
function OnAddLog(sender#) local ts$
    ts$ = formatdatetime$("yyyy-mm-dd hh:nn:ss", now())
    memo_addline#(mem#, "[" + ts$ + "] Log entry added")
    memo_scrolltoend#(mem#)
endfunction

function OnClear(sender#)
    memo_clear#(mem#)
endfunction

let frm# = form#("Log Viewer", 600, 400)
form_position#(frm#, 4)

let mem# = memo#(frm#, 10, 10, 580, 340)
memo_readonly#(mem#, 1)
memo_wordwrap#(mem#, 0)
memo_fontfamily#(mem#, "Courier New")
memo_fontsize#(mem#, 10)

let btnAdd# = button#(frm#, "Add Log Entry", 10, 360, 120, 30)
let btnClear# = button#(frm#, "Clear", 140, 360, 80, 30)
button_onclick#(btnAdd#, "OnAddLog")
button_onclick#(btnClear#, "OnClear")

form_show(frm#)

while form_visible(frm#) = 1
    processmessages()
end while

Code Editor with Line Tracking

╯ code_editor.bas
function OnMemoClick(sender#) local line
    line = memo_caretpositionline(sender#)
    label_text#(lblLine#, "Line: " + str$(line + 1))
endfunction

let frm# = form#("Code Editor", 700, 500)
form_position#(frm#, 4)

let mem# = memo#(frm#, 10, 50, 680, 400)
memo_wordwrap#(mem#, 0)
memo_fontfamily#(mem#, "Consolas")
memo_fontsize#(mem#, 13)
memo_showscrollbars#(mem#, 1)

' Sample code
memo_addline#(mem#, "' Plan9Basic Sample")
memo_addline#(mem#, "let x = 10")
memo_addline#(mem#, "let y = 20")
memo_addline#(mem#, "")
memo_addline#(mem#, "function Add(a, b)")
memo_addline#(mem#, "    return a + b")
memo_addline#(mem#, "endfunction")
memo_addline#(mem#, "")
memo_addline#(mem#, "println Add(x, y)")

let lblLine# = label#(frm#, "Line: 1")
label_move#(lblLine#, 10, 460)
memo_onclick#(mem#, "OnMemoClick")

form_show(frm#)

while form_visible(frm#) = 1
    processmessages()
end while

Line Operations

╯ lines.bas
function OnInsert(sender#)
    memo_insertline#(mem#, 1, "Inserted Line")
    label_text#(lblResult#, "Inserted new line at index 1")
endfunction

function OnDelete(sender#)
    if memo_linecount(mem#) > 0 then
        memo_deleteline#(mem#, 0)
        label_text#(lblResult#, "Deleted line at index 0")
    endif
endfunction

function OnGetLine(sender#) local txt$
    if memo_linecount(mem#) > 0 then
        txt$ = memo_line$(mem#, 0)
        label_text#(lblResult#, "Line 0: " + txt$)
    endif
endfunction

function OnSetLine(sender#)
    if memo_linecount(mem#) > 0 then
        memo_line#(mem#, 0, "Modified Line")
        label_text#(lblResult#, "Line 0 modified")
    endif
endfunction

let frm# = form#("Line Operations", 500, 400)
form_position#(frm#, 4)

let mem# = memo#(frm#, 10, 10, 350, 300)
memo_addline#(mem#, "Line 1")
memo_addline#(mem#, "Line 2")
memo_addline#(mem#, "Line 3")

let btnInsert# = button#(frm#, "Insert at 1", 370, 10, 120, 30)
let btnDelete# = button#(frm#, "Delete Line 0", 370, 50, 120, 30)
let btnGetLine# = button#(frm#, "Get Line 0", 370, 90, 120, 30)
let btnSetLine# = button#(frm#, "Set Line 0", 370, 130, 120, 30)

let lblResult# = label#(frm#, "")
label_bounds#(lblResult#, 10, 320, 480, 60)
label_wordwrap#(lblResult#, 1)

button_onclick#(btnInsert#, "OnInsert")
button_onclick#(btnDelete#, "OnDelete")
button_onclick#(btnGetLine#, "OnGetLine")
button_onclick#(btnSetLine#, "OnSetLine")

form_show(frm#)

while form_visible(frm#) = 1
    processmessages()
end while

Notes with Live Statistics

╯ notes.bas
function UpdateStats(sender#) local lines, chars
    lines = memo_linecount(sender#)
    chars = memo_textlength(sender#)
    label_text#(lblLines#, "Lines: " + str$(lines))
    label_text#(lblChars#, "Characters: " + str$(chars))
endfunction

let frm# = form#("Notes", 500, 380)
form_position#(frm#, 4)

let mem# = memo#(frm#, 10, 10, 480, 300)
memo_wordwrap#(mem#, 1)

let lblLines# = label#(frm#, "Lines: 1")
label_move#(lblLines#, 10, 320)
let lblChars# = label#(frm#, "Characters: 0")
label_move#(lblChars#, 10, 345)

memo_onchangetracking#(mem#, "UpdateStats")

form_show(frm#)

while form_visible(frm#) = 1
    processmessages()
end while

Best Practices

PracticeWhy
Enable memo_wordwrap# for prose, disable for codeWrapping suits notes and text; code needs horizontal scrolling
Use memo_readonly# for log viewersPrevents user editing while allowing programmatic updates
Use monospace fonts for code editorsConsolas, Courier New ensure consistent character width
Use memo_onchangetracking# sparinglyFires on every keystroke — keep callbacks lightweight
Call memo_scrolltoend# after memo_addline#Keeps the latest content visible in log-style memos
Use memo_line$ / memo_line# for structured dataAccess content by line number instead of parsing the full text
Use memo_lines$ / memo_lines# for bulk operationsGet or set all text while preserving line structure

Quick Reference

FunctionSignatureDescription
memo_error / errormsg$ / strerror$ / clearerrorvariousError handling (4)
memo#(parent#[, x, y, w, h][, text$])variousCreate memo (3 overloads)
memo_free(mem#)memo_free@#Destroy memo
memo_text$ / text# / textlength / clear#variousText content (4)
memo_linecount / line$ / line# / addline# / insertline# / deleteline# / lines$ / lines#variousLine operations (8)
memo_wordwrap / showscrollbarsvariousWrap & scrollbars (4)
memo_readonlyvariousRead-only (2)
memo_fontfamily / fontsize / fontcolor / bold / italic / underline / strikeoutvariousFont properties (14)
memo_textalignmemo_textalign@# / #@#nText alignment (2)
memo_selstart / sellength / seltext$ / selectall# / clearselection#variousSelection (7)
memo_caretpositionline / caretpositionpos / gotoend# / gotobegin#variousCaret control (6)
memo_copy# / cut# / paste# / deleteselection#variousClipboard (4)
memo_scrolltop / scrolltoend#variousScroll control (3)
memo_x/y/width/height (get/set) / bounds# / move# / size#variousPosition & size (14)
memo_align / margin# / margins# / margin[left/top/right/bottom]variousAlignment & margins (12)
memo_visible / enabled / opacityvariousVisibility & state (6)
memo_isfocused / setfocus# / resetfocus# / tabordervariousFocus (5)
memo_tag / parent# / bringtofront# / sendtoback#variousTag & parent (6)
memo_onchange/onchangetracking/onenter/onexit/onclick/ondblclick/onkeydown/onkeyup/onmousedown/onmouseup/onmousemove/onmouseenter/onmouseleave/onresize/ondragenter/ondragover/ondragdrop/ondragleavevariousEvents set+get (37)
memo_clearcallbacks#memo_clearcallbacks#@#Disconnect all events

139 functions. Part of the Plan9Basic GUI library system.