Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ref:uifc [2020/11/28 13:53] – Move the C implementation details under the C Interface section and remove mention of uifc.c. digital manref:uifc [2024/03/05 13:37] (current) – [Background] Update link to NetWare SYSCON page digital man
Line 3: Line 3:
 ===== Background ===== ===== Background =====
  
-UIFC (User InterFaCe) is the text mode full-screen user interface library used by [[util:SCFG]], [[util:echocfg]], and others.  It was originally inspired by the text mode user interface for NetWare 2.x server management utilities for DOS (e.g. [[http://technet.microsoft.com/en-us/library/Cc751416.w9p9774g_big(l=en-us).gif|SYSCON]]), and was written from scratch by [[person:Digital Man]].+UIFC (User InterFaCe) is the text mode full-screen user interface library used by [[util:SCFG]], [[util:echocfg]], and others.  It was originally inspired by the text mode user interface for NetWare 2.x server management utilities for DOS (e.g. [[https://www.zx.net.nz/netware/client/syscon-375/|SYSCON]]), and was written from scratch by [[person:Digital Man]].
  
 ===== Interfaces ===== ===== Interfaces =====
 +
 +==== Output ====
 +
 +The UIFC library uses the Synchronet Console I/O Library (CIOLIB).
 +
 +=== Windows Console Mode ===
 +
 +== Windows Terminal ==
 +
 +UIFC apps are often not pretty when run from within Windows Terminal (''wt.exe''). To use the legacy Windows Console Host instead, run ''conhost.exe'' and pass the path and arguments to the UIFC application on the command-line.
  
 ==== Input ==== ==== Input ====
Line 70: Line 80:
 ==== UIFC List Window Flags ==== ==== UIFC List Window Flags ====
  
-^ Flag ^ Description ^ C ^ JS +^ Flag ^ Description ^ 
-| WIN_ORG | Original menu, destroy valid screen area  | Y | Y +| WIN_ORG | Original menu, destroy valid screen area  |  
-| WIN_SAV | Save existing text and replace when finished (use with context object) | Y | Y | +| WIN_SAV | Save existing text and replace when finished (use with context object) |
-|||| +
-| WIN_ACT | Menu remains active after a selection | Y | Y | +
-| WIN_INSACT | Remains active after insert key | Y | Y | +
-| WIN_DELACT | Remains active after delete key | Y | Y | +
-| WIN_CHE | Stay active after escape if changes | Y | Y | +
-| WIN_EXTKEYS | Return on any keypress. Return value is -2 - keyvalue | Y | Y | +
-| WIN_POP | Exit the list as though ESC was pressed. For use after WIN_EXTKEYS or WIN_DYN | Y | - | +
-| WIN_SEL | Exit the list as though ENTER was pressed. For use after WIN_EXTKEYS or WIN_DYN | Y | - | +
-| WIN_ESC | Screen is active when escape is hit | Y | Y | +
-| WIN_EDITACT | Remain active after edit key | - | Y |+
 || ||
-| WIN_L2R | Center the window based on width | Y | Y +| WIN_ACT | Menu remains active after a selection | 
-| WIN_T2B | Center the window based on height | Y | Y +| WIN_INSACT | Remains active after insert key |  
-| WIN_RHT | Place window against right side of screen | Y | Y +| WIN_DELACT | Remains active after delete key | 
-| WIN_MID | Place window in middle of screen | Y | Y +| WIN_CHE | Stay active after escape if changes | 
-| WIN_BOT | Place window against bottom of screen | Y | Y +| WIN_EXTKEYS | Return on any keypress. Return value is -2 - keyvalue |  
-| WIN_FIXEDHEIGHT | Use light_height from uifc struct | Y | Y +| WIN_POP | Exit the list as though ESC was pressed. For use after WIN_EXTKEYS or WIN_DYN | 
-| WIN_NOBRDR | Do not draw a border around the window | Y | Y +| WIN_SEL | Exit the list as though ENTER was pressed. For use after WIN_EXTKEYS or WIN_DYN | 
-|||| +| WIN_ESC | Screen is active when escape is hit | 
-| WIN_IMM | Draw window and return immediately | Y | Y +| WIN_EDITACT | Remain active after edit key |  
-| WIN_INACT | Draw window inactive, intended for use with WIN_IMM | Y | - +|| 
-|||| +| WIN_L2R | Center the window based on width |  
-| WIN_DYN | Dynamic window, return at least every second | Y | Y +| WIN_T2B | Center the window based on height | 
-| WIN_REDRAW | Force redraw on dynamic window | Y | Y +| WIN_RHT | Place window against right side of screen |  
-| WIN_NODRAW | Force not to redraw on dynamic window | Y | Y +| WIN_MID | Place window in middle of screen |  
-|||| +| WIN_BOT | Place window against bottom of screen |  
-| WIN_INS | Allow user to use insert key | Y | Y +| WIN_FIXEDHEIGHT | Use light_height from uifc struct |  
-| WIN_DEL | Allows use to use delete key | Y | Y +| WIN_NOBRDR | Do not draw a border around the window |  
-| WIN_COPY | Allows F5 to Get/Copy a menu item | Y | Y +||| 
-| WIN_PASTE | Allows F6 to Put/Paste a menu item | Y | Y +| WIN_IMM | Draw window and return immediately |  
-| WIN_XTR | Add extra line at end for inserting at end | Y | Y +| WIN_INACT | Draw window inactive, intended for use with WIN_IMM | 
-| WIN_CUT | Allow Ctrl-X/Cut a Menu Item | Y | Y +||| 
-| WIN_EDIT | Allow F2 to edit a menu item | Y | Y +| WIN_DYN | Dynamic window, return at least every second |  
-| WIN_PASTEXTR | Allow paste into extra (blank) item | Y | - | +| WIN_REDRAW | Force redraw on dynamic window |  
-| WIN_GET | Alias for WIN_COPY | Y | - | +| WIN_NODRAW | Force not to redraw on dynamic window |  
-| WIN_PUT | Alias for WIN_PASTE | Y | - | +||| 
-|||| +| WIN_INS | Allow user to use insert key |  
-| WIN_HLP | Parse Help Codes | Y | - +| WIN_DEL | Allows use to use delete key |  
-| WIN_PACK | Pack text in window (no padding) | Y | Y +| WIN_COPY | Allows F5 to Get/Copy a menu item |  
-| WIN_FAT | Do not pad outside borders | Y | Y +| WIN_PASTE | Allows F6 to Put/Paste a menu item | 
-| WIN_UNGETMOUSE | If the mouse is clicked outside window, put mouse even back into even queue | Y | Y |+| WIN_XTR | Add extra line at end for inserting at end | 
 +| WIN_CUT | Allow Ctrl-X/Cut a Menu Item |  
 +| WIN_EDIT | Allow F2 to edit a menu item |  
 +| WIN_PASTEXTR | Allow paste into extra (blank) item |   
 +||| 
 +| WIN_HLP | Parse Help Codes | 
 +| WIN_PACK | Pack text in window (no padding) |  
 +| WIN_FAT | Do not pad outside borders |  
 +| WIN_UNGETMOUSE | If the mouse is clicked outside window, put mouse even back into even queue | 
  
  
 ==== UIFC Input Keyboard Modes ==== ==== UIFC Input Keyboard Modes ====
-^ Flag ^ Description ^ C ^ JS +^ Flag ^ Description ^ 
-| K_NONE | No special behavior | Y | Y +| K_NONE | No special behavior |  
-| K_UPPER | Converts all letters to upper case | Y | Y +| K_UPPER | Converts all letters to upper case |  
-| K_UPRLWR | Upper/lower case automatically | Y | Y +| K_UPRLWR | Upper/lower case automatically | 
-| K_NUMBER | Allow numbers only | Y | Y | +| K_NUMBER | Allow numbers only |  
-| K_WRAP | Allows word wrap | Y | Y +| K_MSG | Allows Ctrl-A codes |  
-| K_MSG | Allows ANSI, Ctrl-N, Ctrl-A, Ctrl-G | Y | Y | +| K_EDIT | Edit string passed |  
-| K_SPIN | Spinning cursor | Y | Y | +| K_ALPHA | Only allow alphabetic characters |  
-| K_LINE | Input line (inverse color) | Y | Y +| K_SCANNING | UPC Scanner is active, return on '%' |  
-| K_EDIT | Edit string passed | Y | Y | +| K_LEFTEXIT | Allow exit from getstr() with backspace |  
-| K_CHAT | In chat multi-chat | Y | Y | +| K_TABEXIT | Exit on TAB or BACKTAB |  
-| K_NOCRLF | Don't print CRLF after string input | Y | Y +| K_DECIMAL | Allow floating point numbers only | 
-| K_ALPHA | Only allow alphabetic characters | Y | Y +| K_DEUCEEXIT | Return on up/down/F2 |  
-| K_SCANNING | UPC Scanner is active, return on '%' | Y | Y | +| K_MOUSEEXIT | Returns when mouse is clicked outside of input area (not window) | 
-| K_LOWPRIO | Low-priority input | Y | Y | +| K_PASSWORD | Do not display text while editing |  
-| K_NOEXASC | No extended ASCII allowed | Y | Y | +| K_FIND | Don't set the "changes" flag | 
-| K_E71DETECT | Detect E-7-1 terminal type | Y | Y | +
-| K_AUTODEL | Auto-delete text (used with K_EDIT) | Y | Y | +
-| K_COLD | Possible cold key mode | Y | Y | +
-| K_NOECHO | Don't echo input | Y | Y | +
-| K_TAB | Treat TAB as CR | Y | Y +
-| K_LEFTEXIT | Allow exit from getstr() with backspace | Y | Y | +
-| K_USEOFFSET | Use console.getstr_offset with getstr() | Y | Y | +
-| K_NOSPIN | Do not honor user's spinning cursor | Y | Y | +
-| K_ANSI_CPR | ANSI Cursor Position Report expected | Y | Y | +
-| K_TRIM | Trim white-space from both ends of str | Y | Y | +
-| K_CTRLKEYS | No control-key handling in inkey() | Y | Y +
-| K_TABEXIT | Exit on TAB or BACKTAB | Y | Y +
-| K_DECIMAL | Allow floating point numbers only | Y | Y +
-| K_DEUCEEXIT | Return on up/down/F2 | Y | Y +
-| K_MOUSEEXIT | Returns when mouse is clicked outside of input area (not window) | Y | Y +
-| K_PASSWORD | Do not display text while editing | Y | - |  +
-| K_FIND | Don't set the "changes" flag | Y | - +
  
 ==== UIFC List Return Input Masks ==== ==== UIFC List Return Input Masks ====
Line 163: Line 154:
 | MSK_CUT | Item cut (Ctrl-X) |  | MSK_CUT | Item cut (Ctrl-X) | 
 | MSK_PASTE | Item pasted (Ctrl-V) |  | MSK_PASTE | Item pasted (Ctrl-V) | 
-| MSK_EDIT | |+| MSK_EDIT | Item was selected for edit (F2) |
  
-Example Javascript Usage:+Example JavaScript Usage:
  
 <code> <code>
Line 173: Line 164:
 } }
 </code> </code>
 +
 +{{tag>javascript uifc}}