keyboardlineeditor
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.5, Creation date: 2019-03-07, Last change: 2025-09-14
implements a text editor for interactive programming
Description
This is a very powerful keyboard input editor. With it you can interactively write texts line by line over several lines. You can move the cursor within one line or over several lines.
The function returns its necessary input parameters as output parameters, making it possible to restart the editor over and over again.
The function is used within the SGofCPLcommandui to analyze and draw the drawing chain after each space character.
See Also: getkeyboardchar
, SGofCPLcommandui
Example Illustration
Syntax
[c,LR,CLINE,NLINE,RLINE]=keyboardlineeditor(h,[CLINE,NLINE,RLINE,CRNUM]);
Input Parameter
h: | | handle to figure the keyboard is attached to |
CLINE: | | Textbuffer, Text line or empty |
NLINE: | | Textbuffer behind current line; or empty |
RLINE: | | Textbuffer, same line but right hand of cursor |
CRNUM: | | uint8 character list of escape characters; default is 13 (CR) |
Output Parameter
c: | | last pressed key |
LR: | | Text row left of cursor |
CLINE: | | Complete text buffer including current line |
NLINE: | | Rest of text buffer after current line |
RLINE: | | Current text line rifht hand of cursor |
Examples
SGfigure; h=figure; keyboardlineeditor(h,'just edit this line','','',[13 65]) % 'A' will stop x = x=input('HELP>>',"s")
Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21