]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_ins_wstr.3x
ncurses 6.2 - patch 20210102
[ncurses.git] / man / curs_ins_wstr.3x
1 .\"***************************************************************************
2 .\" Copyright 2019,2020 Thomas E. Dickey                                     *
3 .\" Copyright 2002-2012,2017 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_ins_wstr.3x,v 1.11 2020/10/17 23:21:25 tom Exp $
31 .TH curs_ins_wstr 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .na
37 .hy 0
38 .SH NAME
39 \fBins_wstr\fR,
40 \fBins_nwstr\fR,
41 \fBwins_wstr\fR,
42 \fBwins_nwstr\fR,
43 \fBmvins_wstr\fR,
44 \fBmvins_nwstr\fR,
45 \fBmvwins_wstr\fR,
46 \fBmvwins_nwstr\fR \- insert a wide-character string into a curses window
47 .ad
48 .hy
49 .SH SYNOPSIS
50 .nf
51 \fB#include <curses.h>\fR
52 .sp
53 \fBint ins_wstr(const wchar_t *\fR\fIwstr);\fR
54 .br
55 \fBint ins_nwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
56 .br
57 \fBint wins_wstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
58 .br
59 \fBint wins_nwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
60 .sp
61 \fBint mvins_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
62 .br
63 \fBint mvins_nwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
64 .br
65 \fBint mvwins_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
66 .br
67 \fBint mvwins_nwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
68 .fi
69 .SH DESCRIPTION
70 These routines insert a \fBwchar_t\fR character string
71 (as many characters as will fit on the line)
72 before the character under the cursor.
73 All characters to the right of the cursor are shifted right,
74 with the possibility of the rightmost characters on the line being lost.
75 No wrapping is performed.
76 The cursor position does not change
77 (after moving to \fIy\fR, \fIx\fR, if specified).
78 The four routines with \fIn\fR as the last argument
79 insert a leading substring of at most \fIn\fR \fBwchar_t\fR characters.
80 If \fIn\fR is less than 1, the entire string is inserted.
81 .PP
82 If a character in \fIwstr\fR is a tab, newline, carriage return or
83 backspace, the cursor is moved appropriately within the window.
84 A newline also does a \fBclrtoeol\fR before moving.
85 Tabs are considered to be at every eighth column.
86 If a character in \fIwstr\fR is another control character,
87 it is drawn in the \fB^\fR\fIX\fR notation.
88 Calling \fBwin_wch\fR after adding a control character
89 (and moving to it, if necessary)
90 does not return the control character,
91 but instead returns a character in the ^-representation
92 of the control character.
93 .SH NOTES
94 Note that all but wins_nwstr may be macros.
95 .PP
96 If the first character in the string is a nonspacing character, these
97 functions will fail.
98 XSI does not define what will happen if a nonspacing character follows
99 a control character.
100 .SH RETURN VALUE
101 Upon successful completion, these functions return \fBOK\fP.
102 Otherwise, they return \fBERR\fP.
103 .PP
104 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
105 \fBwmove\fP, and return an error if the position is outside the window,
106 or if the window pointer is null.
107 .SH SEE ALSO
108 \fBcurses\fR(3X),
109 \fBcurs_insstr\fR(3X),
110 \fBcurs_in_wch\fR(3X),
111 \fBcurs_ins_wch\fR(3X).