Go to the source code of this file.
◆ ncplane_puttext()
int ncplane_puttext |
( |
ncplane * |
n, |
|
|
int |
y, |
|
|
ncalign_e |
align, |
|
|
const char * |
text, |
|
|
size_t * |
bytes |
|
) |
| |
Definition at line 149 of file layout.c.
149 {
150 if(bytes){
151 *bytes = 0;
152 }
153 int totalcols = 0;
154
155
156
157
158
159
160
161
162
163 do{
166 return -1;
167 }
168 }
169 size_t linebytes = 0;
170 int cols = puttext_line(
n, align, text, &linebytes);
171 if(cols < 0){
172 return -1;
173 }
174 totalcols += cols;
175 if(bytes){
176 *bytes += linebytes;
177 }
178 text += linebytes;
179
181 }while(*text);
182 return totalcols;
183}
int ncplane_cursor_move_yx(ncplane *n, int y, int x)