Skip to content
Snippets Groups Projects
Commit 19583499 authored by rswindell's avatar rswindell
Browse files

Added new uifc.list() mode flag: WIN_PUTXTR - allow put/paste into extra

(blank) item. Replaces the previously unused WIN_EDITACT mode flag.
parent 22fc4747
No related branches found
No related tags found
No related merge requests found
/* uifc.h */
/* Rob Swindell's Text-mode User Interface Library */
/* Text-mode User Interface Library (inspired by Novell SYSCON look & feel) */
/* $Id$ */
......@@ -8,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......@@ -106,7 +104,7 @@
#define MSK_GET 0x30000000
#define MSK_PUT 0x40000000
#define MSK_EDIT 0x50000000
/* Dont forget, negative return values are used for extended keys (if WIN_EXTKEYS used)! */
/* Don't forget, negative return values are used for extended keys (if WIN_EXTKEYS used)! */
#define MAX_OPLN 75 /* Maximum length of each option per menu call */
#define MAX_BUFS 7 /* Maximum number of screen buffers to save */
#define MIN_LINES 14 /* Minimum number of screen lines supported */
......@@ -144,9 +142,9 @@
#define WIN_DELACT (1<<8) /* Remains active after delete key */
#define WIN_ESC (1<<9) /* Screen is active when escape is hit */
#define WIN_RHT (1<<10) /* Place window against right side of screen */
#define WIN_BOT (1<<11) /* Place window against botton of screen */
#define WIN_GET (1<<12) /* Allows F5 to Get a menu item */
#define WIN_PUT (1<<13) /* Allows F6 to Put a menu item */
#define WIN_BOT (1<<11) /* Place window against bottom of screen */
#define WIN_GET (1<<12) /* Allows F5 to Get (copy) a menu item */
#define WIN_PUT (1<<13) /* Allows F6 to Put (paste) a menu item */
#define WIN_CHE (1<<14) /* Stay active after escape if changes */
#define WIN_XTR (1<<15) /* Add extra line at end for inserting at end */
#define WIN_DYN (1<<16) /* Dynamic window - return at least every second */
......@@ -163,7 +161,7 @@
#define WIN_UNGETMOUSE (1<<26) /* If the mouse is clicked outside the window, */
/* Put the mouse event back into the event queue */
#define WIN_EDIT (1<<27) /* Allow F2 to edit a menu item */
#define WIN_EDITACT (1<<28) /* Remain active after edit key */
#define WIN_PUTXTR (1<<28) /* Allow paste into extra (blank) item */
#define WIN_INACT (1<<29) /* Draw window inactive... intended for use with WIN_IMM */
#define WIN_POP (1<<30) /* Exit the list. Act as though ESC was pressed. */
/* Intended for use after a WIN_EXTKEYS or WIN_DYN */
......
/* uifc32.c */
/* Curses implementation of UIFC (user interface) library based on uifc.c */
/* $Id$ */
......@@ -1583,7 +1581,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
return((*cur)|MSK_GET);
break;
case CIO_KEY_F(6): /* F6 - Paste */
if(mode&WIN_PUT && !(mode&WIN_XTR && (*cur)==opts-1))
if(mode&WIN_PUT && (mode&WIN_PUTXTR || !(mode&WIN_XTR && (*cur)==opts-1)))
return((*cur)|MSK_PUT);
break;
case CIO_KEY_IC: /* insert */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment