libyui-ncurses
Loading...
Searching...
No Matches
ncursesw.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: ncursesw.h
20
21 Author: Michael Andres <ma@suse.de>
22
23/-*/
24
25#ifndef _CURSESW_H
26#define _CURSESW_H
27
28#include <iosfwd>
29
30#include <ncursesw/curses.h>
31#ifndef NCURSES_CXX_IMPEXP
32#define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
33#endif
34#include <ncursesw/etip.h>
35#include <cstdio>
36#include <cstdarg>
37#include <climits>
38#include "position.h"
39
40/* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
41 Undefine it here, because NCursesWindow uses lines as a method. */
42#undef lines
43
44/* "Convert" macros to inlines. We'll define it as another symbol to avoid
45 * conflict with library symbols.
46 */
47#undef UNDEF
48#define UNDEF(name) CUR_ ##name
49
50#ifdef addch
51inline int UNDEF( addch )( chtype ch ) { return addch( ch ); }
52
53#undef addch
54#define addch UNDEF(addch)
55#endif
56
57#ifdef add_wch
58inline int UNDEF( add_wch )( cchar_t * cch ) { return add_wch( cch ); }
59
60#undef add_wch
61#define add_wch UNDEF(add_wch)
62#endif
63
64#ifdef echochar
65inline int UNDEF( echochar )( chtype ch ) { return echochar( ch ); }
66
67#undef echochar
68#define echochar UNDEF(echochar)
69#endif
70
71#ifdef insdelln
72inline int UNDEF( insdelln )( int n ) { return insdelln( n ); }
73
74#undef insdelln
75#define insdelln UNDEF(insdelln)
76#endif
77
78#ifdef addstr
79/* The (char*) cast is to hack around missing const's */
80inline int UNDEF( addstr )( const char * str ) { return addstr( (char *) str ); }
81
82#undef addstr
83#define addstr UNDEF(addstr)
84#endif
85
86#ifdef addwstr
87/* The (wchar*_t) cast is to hack around missing const's */
88inline int UNDEF( addwstr )( const wchar_t * str ) { return addwstr( (wchar_t *) str ); }
89
90#undef addwstr
91#define addwstr UNDEF(addwstr)
92#endif
93
94#ifdef attron
95inline int UNDEF( attron )( chtype at ) { return attron( at ); }
96
97#undef attron
98#define attron UNDEF(attron)
99#endif
100
101#ifdef attroff
102inline int UNDEF( attroff )( chtype at ) { return attroff( at ); }
103
104#undef attroff
105#define attroff UNDEF(attroff)
106#endif
107
108#ifdef attrset
109inline chtype UNDEF( attrset )( chtype at ) { return attrset( at ); }
110
111#undef attrset
112#define attrset UNDEF(attrset)
113#endif
114
115#ifdef border
116inline int UNDEF( border )( chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br )
117{ return border( ls, rs, ts, bs, tl, tr, bl, br ); }
118
119#undef border
120#define border UNDEF(border)
121#endif
122
123#ifdef box
124inline int UNDEF( box )( WINDOW *win, int v, int h ) { return box( win, v, h ); }
125
126#undef box
127#define box UNDEF(box)
128#endif
129
130#ifdef mvwhline
131inline int UNDEF( mvwhline )( WINDOW *win, int y, int x, chtype c, int n )
132{
133 return mvwhline( win, y, x, c, n );
134}
135
136#undef mvwhline
137#define mvwhline UNDEF(mvwhline)
138#endif
139
140#ifdef mvwvline
141inline int UNDEF( mvwvline )( WINDOW *win, int y, int x, chtype c, int n )
142{
143 return mvwvline( win, y, x, c, n );
144}
145
146#undef mvwvline
147#define mvwvline UNDEF(mvwvline)
148#endif
149
150#ifdef clear
151inline int UNDEF( clear )() { return clear(); }
152
153#undef clear
154#define clear UNDEF(clear)
155#endif
156
157#ifdef clearok
158inline int UNDEF( clearok )( WINDOW* win, bool bf ) { return clearok( win, bf ); }
159
160#undef clearok
161#define clearok UNDEF(clearok)
162#else
163extern "C" int clearok( WINDOW*, bool );
164#endif
165
166#ifdef clrtobot
167inline int UNDEF( clrtobot )() { return clrtobot(); }
168
169#undef clrtobot
170#define clrtobot UNDEF(clrtobot)
171#endif
172
173#ifdef clrtoeol
174inline int UNDEF( clrtoeol )() { return clrtoeol(); }
175
176#undef clrtoeol
177#define clrtoeol UNDEF(clrtoeol)
178#endif
179
180#ifdef delch
181inline int UNDEF( delch )() { return delch(); }
182
183#undef delch
184#define delch UNDEF(delch)
185#endif
186
187#ifdef deleteln
188inline int UNDEF( deleteln )() { return deleteln(); }
189
190#undef deleteln
191#define deleteln UNDEF(deleteln)
192#endif
193
194#ifdef erase
195inline int UNDEF( erase )() { return erase(); }
196
197#undef erase
198#define erase UNDEF(erase)
199#endif
200
201#ifdef flushok
202inline int UNDEF( flushok )( WINDOW* _win, bool _bf )
203{
204 return flushok( _win, _bf );
205}
206
207#undef flushok
208#define flushok UNDEF(flushok)
209#else
210#define _no_flushok
211#endif
212
213#ifdef getch
214inline int UNDEF( getch )() { return getch(); }
215
216#undef getch
217#define getch UNDEF(getch)
218#endif
219
220#ifdef getstr
221inline int UNDEF( getstr )( char *_str ) { return getstr( _str ); }
222
223#undef getstr
224#define getstr UNDEF(getstr)
225#endif
226
227#ifdef instr
228inline int UNDEF( instr )( char *_str ) { return instr( _str ); }
229
230#undef instr
231#define instr UNDEF(instr)
232#endif
233
234#ifdef innstr
235inline int UNDEF( innstr )( char *_str, int n ) { return innstr( _str, n ); }
236
237#undef innstr
238#define innstr UNDEF(innstr)
239#endif
240
241#ifdef mvwinnstr
242inline int UNDEF( mvwinnstr )( WINDOW *win, int y, int x, char *_str, int n )
243{
244 return mvwinnstr( win, y, x, _str, n );
245}
246
247#undef mvwinnstr
248#define mvwinnstr UNDEF(mvwinnstr)
249#endif
250
251#ifdef mvinnstr
252inline int UNDEF( mvinnstr )( int y, int x, char *_str, int n )
253{
254 return mvinnstr( y, x, _str, n );
255}
256
257#undef mvinnstr
258#define mvinnstr UNDEF(mvinnstr)
259#endif
260
261#ifdef winsstr
262inline int UNDEF( winsstr )( WINDOW *w, const char *_str )
263{
264 return winsstr( w, _str );
265}
266
267#undef winsstr
268#define winsstr UNDEF(winsstr)
269#endif
270
271#ifdef mvwinsstr
272inline int UNDEF( mvwinsstr )( WINDOW *w, int y, int x, const char *_str )
273{
274 return mvwinsstr( w, y, x, _str );
275}
276
277#undef mvwinsstr
278#define mvwinsstr UNDEF(mvwinsstr)
279#endif
280
281#ifdef insstr
282inline int UNDEF( insstr )( const char *_str )
283{
284 return insstr( _str );
285}
286
287#undef insstr
288#define insstr UNDEF(insstr)
289#endif
290
291#ifdef mvinsstr
292inline int UNDEF( mvinsstr )( int y, int x, const char *_str )
293{
294 return mvinsstr( y, x, _str );
295}
296
297#undef mvinsstr
298#define mvinsstr UNDEF(mvinsstr)
299#endif
300
301#ifdef insnstr
302inline int UNDEF( insnstr )( const char *_str, int n )
303{
304 return insnstr( _str, n );
305}
306
307#undef insnstr
308#define insnstr UNDEF(insnstr)
309#endif
310
311#ifdef mvwinsnstr
312inline int UNDEF( mvwinsnstr )( WINDOW *w, int y, int x, const char *_str, int n )
313{
314 return mvwinsnstr( w, y, x, _str, n );
315}
316
317#undef mvwinsnstr
318#define mvwinsnstr UNDEF(mvwinsnstr)
319#endif
320
321#ifdef mvinsnstr
322inline int UNDEF( mvinsnstr )( int y, int x, const char *_str, int n )
323{
324 return mvinsnstr( y, x, _str, n );
325}
326
327#undef mvinsnstr
328#define mvinsnstr UNDEF(mvinsnstr)
329#endif
330
331#ifdef getnstr
332inline int UNDEF( getnstr )( char *_str, int n ) { return getnstr( _str, n ); }
333
334#undef getnstr
335#define getnstr UNDEF(getnstr)
336#endif
337
338#ifdef getyx
339inline void UNDEF( getyx )( const WINDOW* win, int& y, int& x )
340{
341 getyx( win, y, x );
342}
343
344#undef getyx
345#define getyx UNDEF(getyx)
346#endif
347
348#ifdef getbegyx
349inline void UNDEF( getbegyx )( WINDOW* win, int& y, int& x ) { getbegyx( win, y, x ); }
350
351#undef getbegyx
352#define getbegyx UNDEF(getbegyx)
353#endif
354
355#ifdef getmaxyx
356inline void UNDEF( getmaxyx )( WINDOW* win, int& y, int& x ) { getmaxyx( win, y, x ); }
357
358#undef getmaxyx
359#define getmaxyx UNDEF(getmaxyx)
360#endif
361
362#ifdef hline
363inline int UNDEF( hline )( chtype ch, int n ) { return hline( ch, n ); }
364
365#undef hline
366#define hline UNDEF(hline)
367#endif
368
369#ifdef inch
370inline chtype UNDEF( inch )() { return inch(); }
371
372#undef inch
373#define inch UNDEF(inch)
374#endif
375
376#ifdef in_wch
377inline int UNDEF( in_wch )( cchar_t * cch ) { return in_wch( cch ); }
378
379#undef in_wch
380#define in_wch UNDEF(in_wch)
381#endif
382
383#ifdef insch
384inline int UNDEF( insch )( char c ) { return insch( c ); }
385
386#undef insch
387#define insch UNDEF(insch)
388#endif
389
390#ifdef ins_wch
391inline int UNDEF( ins_wch )( const cchar_t *c ) { return ins_wch( c ); }
392
393#undef ins_wch
394#define ins_wch UNDEF(ins_wch)
395#endif
396
397#ifdef mvwins_wch
398inline int UNDEF( mvwins_wch )( WINDOW *w, int y, int x, const cchar_t *cchar ) { return mvwins_wch( w, y, x, cchar ); }
399
400#undef mvwins_wch
401#define mvwins_wch UNDEF(mvwins_wch)
402#endif
403
404#ifdef insertln
405inline int UNDEF( insertln )() { return insertln(); }
406
407#undef insertln
408#define insertln UNDEF(insertln)
409#endif
410
411#ifdef leaveok
412inline int UNDEF( leaveok )( WINDOW* win, bool bf ) { return leaveok( win, bf ); }
413
414#undef leaveok
415#define leaveok UNDEF(leaveok)
416#else
417extern "C" int leaveok( WINDOW* win, bool bf );
418#endif
419
420#ifdef move
421inline int UNDEF( move )( int x, int y ) { return move( x, y ); }
422
423#undef move
424#define move UNDEF(move)
425#endif
426
427#ifdef refresh
428inline int UNDEF( refresh )() { return refresh(); }
429
430#undef refresh
431#define refresh UNDEF(refresh)
432#endif
433
434#ifdef redrawwin
435inline int UNDEF( redrawwin )( WINDOW *win ) { return redrawwin( win ); }
436
437#undef redrawwin
438#define redrawwin UNDEF(redrawwin)
439#endif
440
441#ifdef scrl
442inline int UNDEF( scrl )( int l ) { return scrl( l ); }
443
444#undef scrl
445#define scrl UNDEF(scrl)
446#endif
447
448#ifdef scroll
449inline int UNDEF( scroll )( WINDOW *win ) { return scroll( win ); }
450
451#undef scroll
452#define scroll UNDEF(scroll)
453#endif
454
455#ifdef scrollok
456inline int UNDEF( scrollok )( WINDOW* win, bool bf ) { return scrollok( win, bf ); }
457
458#undef scrollok
459#define scrollok UNDEF(scrollok)
460#else
461#if defined(__NCURSES_H)
462extern "C" int scrollok( WINDOW*, bool );
463#else
464extern "C" int scrollok( WINDOW*, char );
465#endif
466#endif
467
468#ifdef setscrreg
469inline int UNDEF( setscrreg )( int t, int b ) { return setscrreg( t, b ); }
470
471#undef setscrreg
472#define setscrreg UNDEF(setscrreg)
473#endif
474
475#ifdef standend
476inline int UNDEF( standend )() { return standend(); }
477
478#undef standend
479#define standend UNDEF(standend)
480#endif
481
482#ifdef standout
483inline int UNDEF( standout )() { return standout(); }
484
485#undef standout
486#define standout UNDEF(standout)
487#endif
488
489#ifdef subpad
490inline WINDOW *UNDEF( subpad )( WINDOW *p, int l, int c, int y, int x )
491{ return derwin( p, l, c, y, x ); }
492
493#undef subpad
494#define subpad UNDEF(subpad)
495#endif
496
497#ifdef timeout
498#if NCURSES_VERSION_MAJOR < 5
499inline int UNDEF( timeout )( int delay ) { return timeout( delay ); }
500
501#else
502inline void UNDEF( timeout )( int delay ) { timeout( delay ); }
503
504#endif
505#undef timeout
506#define timeout UNDEF(timeout)
507#endif
508
509#ifdef touchline
510inline int UNDEF( touchline )( WINDOW *win, int s, int c )
511{ return touchline( win, s, c ); }
512
513#undef touchline
514#define touchline UNDEF(touchline)
515#endif
516
517#ifdef touchwin
518inline int UNDEF( touchwin )( WINDOW *win ) { return touchwin( win ); }
519
520#undef touchwin
521#define touchwin UNDEF(touchwin)
522#endif
523
524#ifdef untouchwin
525inline int UNDEF( untouchwin )( WINDOW *win ) { return untouchwin( win ); }
526
527#undef untouchwin
528#define untouchwin UNDEF(untouchwin)
529#endif
530
531#ifdef vline
532inline int UNDEF( vline )( chtype ch, int n ) { return vline( ch, n ); }
533
534#undef vline
535#define vline UNDEF(vline)
536#endif
537
538#ifdef waddstr
539inline int UNDEF( waddstr )( WINDOW *win, char *str ) { return waddstr( win, str ); }
540
541#undef waddstr
542#define waddstr UNDEF(waddstr)
543#endif
544
545#ifdef waddwstr
546inline int UNDEF( waddwstr )( WINDOW *win, wchar_t *str ) { return waddwstr( win, str ); }
547
548#undef waddwstr
549#define waddwstr UNDEF(waddwstr)
550#endif
551
552#ifdef mvwaddwstr
553inline int UNDEF( mvwaddwstr )( WINDOW *win, int y, int x, wchar_t *str )
554{ return mvwaddwstr( win, y, x, str ); }
555
556#undef mvwaddwstr
557#define mvwaddwstr UNDEF(mvwaddwstr)
558#endif
559
560#ifdef waddchstr
561inline int UNDEF( waddchstr )( WINDOW *win, chtype *at ) { return waddchstr( win, at ); }
562
563#undef waddchstr
564#define waddchstr UNDEF(waddchstr)
565#endif
566
567#ifdef wstandend
568inline int UNDEF( wstandend )( WINDOW *win ) { return wstandend( win ); }
569
570#undef wstandend
571#define wstandend UNDEF(wstandend)
572#endif
573
574#ifdef wstandout
575inline int UNDEF( wstandout )( WINDOW *win ) { return wstandout( win ); }
576
577#undef wstandout
578#define wstandout UNDEF(wstandout)
579#endif
580
581
582#ifdef wattroff
583inline int UNDEF( wattroff )( WINDOW *win, int att ) { return wattroff( win, att ); }
584
585#undef wattroff
586#define wattroff UNDEF(wattroff)
587#endif
588
589#ifdef chgat
590inline int UNDEF( chgat )( int n, attr_t attr, short color, const void *opts )
591{
592 return chgat( n, attr, color, opts );
593}
594
595#undef chgat
596#define chgat UNDEF(chgat)
597#endif
598
599#ifdef mvchgat
600inline int UNDEF( mvchgat )( int y, int x, int n,
601 attr_t attr, short color, const void *opts )
602{
603 return mvchgat( y, x, n, attr, color, opts );
604}
605
606#undef mvchgat
607#define mvchgat UNDEF(mvchgat)
608#endif
609
610#ifdef mvwchgat
611inline int UNDEF( mvwchgat )( WINDOW *win, int y, int x, int n,
612 attr_t attr, short color, const void *opts )
613{
614 return mvwchgat( win, y, x, n, attr, color, opts );
615}
616
617#undef mvwchgat
618#define mvwchgat UNDEF(mvwchgat)
619#endif
620
621#ifdef wattrset
622inline int UNDEF( wattrset )( WINDOW *win, int att ) { return wattrset( win, att ); }
623
624#undef wattrset
625#define wattrset UNDEF(wattrset)
626#endif
627
628#ifdef winch
629inline chtype UNDEF( winch )( const WINDOW* win ) { return winch( win ); }
630
631#undef winch
632#define winch UNDEF(winch)
633#endif
634
635#ifdef mvwaddch
636inline int UNDEF( mvwaddch )( WINDOW *win, int y, int x, const chtype ch )
637{ return mvwaddch( win, y, x, ch ); }
638
639#undef mvwaddch
640#define mvwaddch UNDEF(mvwaddch)
641#endif
642
643#ifdef mvwaddchnstr
644inline int UNDEF( mvwaddchnstr )( WINDOW *win, int y, int x, chtype *str, int n )
645{ return mvwaddchnstr( win, y, x, str, n ); }
646
647#undef mvwaddchnstr
648#define mvwaddchnstr UNDEF(mvwaddchnstr)
649#endif
650
651#ifdef mvwaddchstr
652inline int UNDEF( mvwaddchstr )( WINDOW *win, int y, int x, chtype *str )
653{ return mvwaddchstr( win, y, x, str ); }
654
655#undef mvwaddchstr
656#define mvwaddchstr UNDEF(mvwaddchstr)
657#endif
658
659#ifdef addnstr
660inline int UNDEF( addnstr )( const char *str, int n )
661{ return addnstr( (char *) str, n ); }
662
663#undef addnstr
664#define addnstr UNDEF(addnstr)
665#endif
666
667#ifdef addnwstr
668inline int UNDEF( addnwstr )( const wchar_t *str, int n )
669{ return addnwstr( (wchar_t *) str, n ); }
670
671#undef addnwstr
672#define addnwstr UNDEF(addnwstr)
673#endif
674
675#ifdef mvwaddnstr
676inline int UNDEF( mvwaddnstr )( WINDOW *win, int y, int x, const char *str, int n )
677{ return mvwaddnstr( win, y, x, (char *) str, n ); }
678
679#undef mvwaddnstr
680#define mvwaddnstr UNDEF(mvwaddnstr)
681#endif
682
683#ifdef mvwaddnwstr
684inline int UNDEF( mvwaddnwstr )( WINDOW *win, int y, int x, const wchar_t *str, int n )
685{ return mvwaddnwstr( win, y, x, (wchar_t *) str, n ); }
686
687#undef mvwaddnwstr
688#define mvwaddnwstr UNDEF(mvwaddnwstr)
689#endif
690
691#ifdef mvwaddstr
692inline int UNDEF( mvwaddstr )( WINDOW *win, int y, int x, const char * str )
693{ return mvwaddstr( win, y, x, (char *) str ); }
694
695#undef mvwaddstr
696#define mvwaddstr UNDEF(mvwaddstr)
697#endif
698
699#ifdef mvwdelch
700inline int UNDEF( mvwdelch )( WINDOW *win, int y, int x )
701{ return mvwdelch( win, y, x ); }
702
703#undef mvwdelch
704#define mvwdelch UNDEF(mvwdelch)
705#endif
706
707#ifdef mvwgetch
708inline int UNDEF( mvwgetch )( WINDOW *win, int y, int x ) { return mvwgetch( win, y, x );}
709
710#undef mvwgetch
711#define mvwgetch UNDEF(mvwgetch)
712#endif
713
714#ifdef mvwgetstr
715inline int UNDEF( mvwgetstr )( WINDOW *win, int y, int x, char *str )
716{return mvwgetstr( win, y, x, str );}
717
718#undef mvwgetstr
719#define mvwgetstr UNDEF(mvwgetstr)
720#endif
721
722#ifdef mvwgetnstr
723inline int UNDEF( mvwgetnstr )( WINDOW *win, int y, int x, char *str, int n )
724{return mvwgetnstr( win, y, x, str, n );}
725
726#undef mvwgetnstr
727#define mvwgetnstr UNDEF(mvwgetnstr)
728#endif
729
730#ifdef mvwinch
731inline chtype UNDEF( mvwinch )( WINDOW *win, int y, int x )
732{
733 return mvwinch( win, y, x );
734}
735
736#undef mvwinch
737#define mvwinch UNDEF(mvwinch)
738#endif
739
740#ifdef mvwin_wch
741inline int UNDEF( mvwin_wch )( WINDOW *win, int y, int x, cchar_t * cch )
742{
743 return mvwin_wch( win, y, x, cch );
744}
745
746#undef mvwin_wch
747#define mvwin_wch UNDEF(mvwin_wch)
748#endif
749
750#ifdef mvwinsch
751inline int UNDEF( mvwinsch )( WINDOW *win, int y, int x, char c )
752{ return mvwinsch( win, y, x, c ); }
753
754#undef mvwinsch
755#define mvwinsch UNDEF(mvwinsch)
756#endif
757
758#ifdef mvaddch
759inline int UNDEF( mvaddch )( int y, int x, chtype ch )
760{ return mvaddch( y, x, ch ); }
761
762#undef mvaddch
763#define mvaddch UNDEF(mvaddch)
764#endif
765
766#ifdef mvaddnstr
767inline int UNDEF( mvaddnstr )( int y, int x, const char *str, int n )
768{ return mvaddnstr( y, x, (char *) str, n ); }
769
770#undef mvaddnstr
771#define mvaddnstr UNDEF(mvaddnstr)
772#endif
773
774#ifdef mvaddstr
775inline int UNDEF( mvaddstr )( int y, int x, const char * str )
776{ return mvaddstr( y, x, (char *) str ); }
777
778#undef mvaddstr
779#define mvaddstr UNDEF(mvaddstr)
780#endif
781
782#ifdef mvwadd_wch
783inline int UNDEF( mvwadd_wch )( WINDOW *win, int y, int x, const cchar_t * cch )
784{ return mvwadd_wch( win, y, x, ( cchar_t* )cch ); }
785
786#undef mvwadd_wch
787#define mvwadd_wch UNDEF(mvwadd_wch)
788#endif
789
790#ifdef mvdelch
791inline int UNDEF( mvdelch )( int y, int x ) { return mvdelch( y, x );}
792
793#undef mvdelch
794#define mvdelch UNDEF(mvdelch)
795#endif
796
797#ifdef mvgetch
798inline int UNDEF( mvgetch )( int y, int x ) { return mvgetch( y, x );}
799
800#undef mvgetch
801#define mvgetch UNDEF(mvgetch)
802#endif
803
804#ifdef mvgetstr
805inline int UNDEF( mvgetstr )( int y, int x, char *str ) {return mvgetstr( y, x, str );}
806
807#undef mvgetstr
808#define mvgetstr UNDEF(mvgetstr)
809#endif
810
811#ifdef mvgetnstr
812inline int UNDEF( mvgetnstr )( int y, int x, char *str, int n )
813{
814 return mvgetnstr( y, x, str, n );
815}
816
817#undef mvgetnstr
818#define mvgetnstr UNDEF(mvgetnstr)
819#endif
820
821#ifdef mvinch
822inline chtype UNDEF( mvinch )( int y, int x ) { return mvinch( y, x );}
823
824#undef mvinch
825#define mvinch UNDEF(mvinch)
826#endif
827
828#ifdef mvinsch
829inline int UNDEF( mvinsch )( int y, int x, char c )
830{ return mvinsch( y, x, c ); }
831
832#undef mvinsch
833#define mvinsch UNDEF(mvinsch)
834#endif
835
836#ifdef napms
837inline void UNDEF( napms )( unsigned long x ) { napms( x ); }
838
839#undef napms
840#define napms UNDEF(napms)
841#endif
842
843#ifdef fixterm
844inline int UNDEF( fixterm )( void ) { return fixterm(); }
845
846#undef fixterm
847#define fixterm UNDEF(fixterm)
848#endif
849
850#ifdef resetterm
851inline int UNDEF( resetterm )( void ) { return resetterm(); }
852
853#undef resetterm
854#define resetterm UNDEF(resetterm)
855#endif
856
857#ifdef saveterm
858inline int UNDEF( saveterm )( void ) { return saveterm(); }
859
860#undef saveterm
861#define saveterm UNDEF(saveterm)
862#endif
863
864#ifdef crmode
865inline int UNDEF( crmode )( void ) { return crmode(); }
866
867#undef crmode
868#define crmode UNDEF(crmode)
869#endif
870
871#ifdef nocrmode
872inline int UNDEF( nocrmode )( void ) { return nocrmode(); }
873
874#undef nocrmode
875#define nocrmode UNDEF(nocrmode)
876#endif
877
878#ifdef getbkgd
879inline chtype UNDEF( getbkgd )( const WINDOW *win ) { return getbkgd( win ); }
880
881#undef getbkgd
882#define getbkgd UNDEF(getbkgd)
883#endif
884
885#ifdef bkgd
886inline int UNDEF( bkgd )( chtype ch ) { return bkgd( ch ); }
887
888#undef bkgd
889#define bkgd UNDEF(bkgd)
890#endif
891
892#ifdef bkgdset
893inline void UNDEF( bkgdset )( chtype ch ) { bkgdset( ch ); }
894
895#undef bkgdset
896#define bkgdset UNDEF(bkgdset)
897#endif
898
899template <class _Tp> inline int ncursesMaxCoord() { return INT_MAX; }
900template <> inline int ncursesMaxCoord<short>() { return SHRT_MAX; }
901
907{
908 friend std::ostream & operator<<( std::ostream & Stream, const NCursesWindow & Obj_Cv );
909 friend std::ostream & operator<<( std::ostream & Stream, const NCursesWindow * Obj_Cv );
910
911 friend class NCursesMenu;
912 friend class NCursesForm;
913
914private:
915 static bool b_initialized;
916 static void initialize();
917 static int ripoff_init( WINDOW *, int );
918
919 void init();
920
921 short getcolor( int getback ) const;
922
923 static int setpalette( short fore, short back, short pair );
924 static int colorInitialized;
925
930 NCursesWindow( WINDOW* win, int cols );
931
932protected:
936 void err_handler( const char * ) const THROWS( NCursesException );
937
941 static long count;
942 // We rely on the c++ promise that
943 // all otherwise uninitialized
944 // static class vars are set to 0
945
949 WINDOW* w;
950
955
968
972 void kill_subwindows();
973
979
980public:
984 NCursesWindow( WINDOW* window );
985
989 NCursesWindow( int lines,
990 int cols,
991 int begin_y,
992 int begin_x );
993
1001 int lines,
1002 int cols,
1003 int begin_y,
1004 int begin_x,
1005 char absrel = 'a' );
1006
1010 virtual ~NCursesWindow();
1011
1016
1017 // -------------------------------------------------------------------------
1018 // Initialization.
1019 // -------------------------------------------------------------------------
1023 static void useColors( void );
1024
1035 static int ripoffline( int ripoff_lines,
1036 int ( *init )( NCursesWindow& win ) );
1037
1038 // -------------------------------------------------------------------------
1039 // terminal status
1040 // -------------------------------------------------------------------------
1044 static int lines() { initialize(); return LINES; }
1045
1049 static int cols() { initialize(); return COLS; }
1050
1054 static int tabsize() { initialize(); return TABSIZE; }
1055
1059 static int NumberOfColors();
1060
1064 int colors() const { return NumberOfColors(); }
1065
1066 // -------------------------------------------------------------------------
1067 // window status
1068 // -------------------------------------------------------------------------
1072 int height() const { return maxy() + 1; }
1073
1077 int width() const { return maxx() + 1; }
1078
1082 int begx() const { return getbegx(w); }
1083
1087 int begy() const { return getbegy(w); }
1088
1092 int maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
1093
1097 int maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
1098
1100 static int maxcoord() { return ncursesMaxCoord<NCURSES_SIZE_T>(); }
1101
1102 wsze size() const { return wsze( height(), width() ); }
1103
1104 wpos begpos() const { return wpos( begy(), begx() ); }
1105
1106 wpos maxpos() const { return wpos( maxy(), maxx() ); }
1107
1108 wrect area() const { return wrect( begpos(), size() ); }
1109
1113 short getcolor() const;
1114
1118 short foreground() const { return getcolor( 0 ); }
1119
1123 short background() const { return getcolor( 1 ); }
1124
1128 int setpalette( short fore, short back );
1129
1133 int setcolor( short pair );
1134
1135 // -------------------------------------------------------------------------
1136 // window positioning
1137 // -------------------------------------------------------------------------
1142 virtual int mvwin( int begin_y, int begin_x )
1143 {
1144 return ::mvwin( w, begin_y, begin_x );
1145 }
1146
1147 int mvsubwin( NCursesWindow* sub, int begin_y, int begin_x );
1148
1149 virtual int resize( int lines, int columns );
1150
1151 // -------------------------------------------------------------------------
1152 // coordinate positioning
1153 // -------------------------------------------------------------------------
1157 int move( int y, int x ) { return ::wmove( w, y, x ); }
1158
1162 void getyx( int& y, int& x ) const { ::getyx( w, y, x ); }
1163
1167 int mvcur( int oldrow, int oldcol, int newrow, int newcol ) const
1168 {
1169 return ::mvcur( oldrow, oldcol, newrow, newcol );
1170 }
1171
1172 // -------------------------------------------------------------------------
1173 // input
1174 // -------------------------------------------------------------------------
1175
1176 int nodelay( bool bf ) { return ::nodelay( w, bf ); }
1177
1181 int getch() { return ::wgetch( w ); }
1182
1186 int getch( int y, int x ) { return ::mvwgetch( w, y, x ); }
1187
1193 int getstr( char* str, int n = -1 )
1194 {
1195 return ::wgetnstr( w, str, n );
1196 }
1197
1202 int getstr( int y, int x, char* str, int n = -1 )
1203 {
1204 return ::mvwgetnstr( w, y, x, str, n );
1205 }
1206
1212 int instr( char *s, int n = -1 ) { return ::winnstr( w, s, n ); }
1213
1218 int instr( int y, int x, char *s, int n = -1 )
1219 {
1220 return ::mvwinnstr( w, y, x, s, n );
1221 }
1222
1223
1224 // -------------------------------------------------------------------------
1225 // output
1226 // -------------------------------------------------------------------------
1230 int addch( const char ch )
1231 {
1232 return addch(( const chtype )( ch&A_CHARTEXT ) );
1233 }
1234
1235 int addch( const chtype ch ) { return ::waddch( w, ch ); }
1236
1240 int add_attr_char( int y, int x );
1241 int add_attr_char();
1242
1246 int add_wch( const cchar_t * cch ) { return ::wadd_wch( w, cch ); }
1247
1248 int add_wch( int y, int x, const cchar_t * cch ) { return mvwadd_wch( w, y, x, cch ); }
1249
1254 int addch( int y, int x, const char ch )
1255 {
1256 return addch( y, x, ( const chtype )( ch&A_CHARTEXT ) );
1257 }
1258
1259 int addch( int y, int x, const chtype ch )
1260 {
1261 return ::mvwaddch( w, y, x, ch );
1262 }
1263
1267 int echochar( const char ch )
1268 {
1269 return echochar(( const chtype )( ch&A_CHARTEXT ) );
1270 }
1271
1272 int echochar( const chtype ch ) { return ::wechochar( w, ch ); }
1273
1278 int addstr( const char* str, int n = -1 )
1279 {
1280 return ::waddnstr( w, (char *) str, n );
1281 }
1282
1287 int addstr( int y, int x, const char * str, int n = -1 )
1288 {
1289 return ::mvwaddnstr( w, y, x, (char *) str, n );
1290 }
1291
1296 int addwstr( const wchar_t* str, int n = -1 );
1297
1302 int addwstr( int y, int x, const wchar_t * str, int n = -1 );
1303
1307 int printw( const char* fmt, ... )
1308#if __GNUG__ >= 2
1309 __attribute__(( format( printf, 2, 3 ) ) );
1310#else
1311 ;
1312#endif
1313
1317 int printw( int y, int x, const char * fmt, ... )
1318#if __GNUG__ >= 2
1319 __attribute__(( format( printf, 4, 5 ) ) );
1320#else
1321 ;
1322#endif
1323
1327 chtype inch() const { return ::winch( w ); }
1328
1329 chtype inchar() const { return inch()&( A_CHARTEXT | A_ALTCHARSET ); }
1330
1335 chtype inch( int y, int x ) { return ::mvwinch( w, y, x ); }
1336
1337 chtype inchar( int y, int x ) { return inch( y, x )&( A_CHARTEXT | A_ALTCHARSET ); }
1338
1342 int in_wchar( cchar_t * cchar );
1343 int in_wchar( int y, int x, cchar_t * cchar );
1344
1349 int insch( chtype ch ) { return ::winsch( w, ch ); }
1350
1355 int insch( int y, int x, chtype ch )
1356 {
1357 return ::mvwinsch( w, y, x, ch );
1358 }
1359
1364 int ins_wch( int y, int x, const cchar_t * cchar )
1365 {
1366 return mvwins_wch( w, y, x, cchar );
1367 }
1368
1372 int insertln() { return ::winsdelln( w, 1 ); }
1373
1378 int insdelln( int n = 1 ) { return ::winsdelln( w, n ); }
1379
1385 int insstr( const char *s, int n = -1 )
1386 {
1387 return ::winsnstr( w, s, n );
1388 }
1389
1394 int insstr( int y, int x, const char *s, int n = -1 )
1395 {
1396 return ::mvwinsnstr( w, y, x, s, n );
1397 }
1398
1402 int attron( chtype at ) { return ::wattron( w, at ); }
1403
1407 int attroff( chtype at ) { return ::wattroff( w, at ); }
1408
1412 int attrset( chtype at ) { return ::wattrset( w, at ); }
1413
1419 int chgat( int n, attr_t attr, short color, const void *opts = NULL )
1420 {
1421 return ::wchgat( w, n, attr, color, opts );
1422 }
1423
1428 int chgat( int y, int x,
1429 int n, attr_t attr, short color, const void *opts = NULL )
1430 {
1431 return ::mvwchgat( w, y, x, n, attr, color, opts );
1432 }
1433
1434 // -------------------------------------------------------------------------
1435 // background
1436 // -------------------------------------------------------------------------
1440 chtype getbkgd() const { return ::getbkgd( w ); }
1441
1445 int bkgd( const chtype ch ) { return ::wbkgd( w, ch ); }
1446
1450 void bkgdset( chtype ch ) { ::wbkgdset( w, ch ); }
1451
1452 // -------------------------------------------------------------------------
1453 // borders
1454 // -------------------------------------------------------------------------
1460 // int box(chtype vert=0, chtype hor=0) {
1461 // return ::wborder(w, vert, vert, hor, hor, 0, 0 ,0, 0); }
1462
1463 // workaround for 8.1: don't use wborder to draw the box
1464 int box() { return box( wrect( wpos( 0, 0 ), size() ) ); }
1465
1471 int border( chtype left = 0, chtype right = 0,
1472 chtype top = 0, chtype bottom = 0,
1473 chtype top_left = 0, chtype top_right = 0,
1474 chtype bottom_left = 0, chtype bottom_right = 0 )
1475 {
1476 return ::wborder( w, left, right, top, bottom, top_left, top_right,
1477 bottom_left, bottom_right );
1478 }
1479
1480 // -------------------------------------------------------------------------
1481 // lines and boxes
1482 // -------------------------------------------------------------------------
1487 int hline( int len, chtype ch = 0 ) { return ::whline( w, ch, len ); }
1488
1492 int hline( int y, int x, int len, chtype ch = 0 )
1493 {
1494 return ::mvwhline( w, y, x, ch, len );
1495 }
1496
1501 int vline( int len, chtype ch = 0 ) { return ::wvline( w, ch, len ); }
1502
1506 int vline( int y, int x, int len, chtype ch = 0 )
1507 {
1508 return ::mvwvline( w, y, x, ch, len );
1509 }
1510
1511 int box( const wrect & dim );
1512
1513 // -------------------------------------------------------------------------
1514 // erasure
1515 // -------------------------------------------------------------------------
1519 int erase() { return ::werase( w ); }
1520
1524 int clear() { return ::wclear( w ); }
1525
1530 int clearok( bool bf ) { return ::clearok( w, bf ); }
1531
1535 int clrtobot() { return ::wclrtobot( w ); }
1536
1540 int clrtoeol() { return ::wclrtoeol( w ); }
1541
1545 int delch() { return ::wdelch( w ); }
1546
1551 int delch( int y, int x ) { return ::mvwdelch( w, y, x ); }
1552
1556 int deleteln() { return ::winsdelln( w, -1 ); }
1557
1558 // -------------------------------------------------------------------------
1559 // screen control
1560 // -------------------------------------------------------------------------
1565 int scroll( int amount = 1 ) { return ::wscrl( w, amount ); }
1566
1572 int scrollok( bool bf ) { return ::scrollok( w, bf ); }
1573
1577 int setscrreg( int from, int to )
1578 {
1579 return ::wsetscrreg( w, from, to );
1580 }
1581
1586 int idlok( bool bf ) { return ::idlok( w, bf ); }
1587
1592 void idcok( bool bf ) { ::idcok( w, bf ); }
1593
1597 int touchwin() { return ::wtouchln( w, 0, height(), 1 ); }
1598
1602 int untouchwin() { return ::wtouchln( w, 0, height(), 0 ); }
1603
1608 int touchln( int s, int cnt, bool changed = TRUE )
1609 {
1610 return ::wtouchln( w, s, cnt, (int) ( changed ? 1 : 0 ) );
1611 }
1612
1616 bool is_wintouched() const
1617 {
1618 return ( ::is_wintouched( w ) ? TRUE : FALSE );
1619 }
1620
1625 int leaveok( bool bf ) { return ::leaveok( w, bf ); }
1626
1630 int redrawln( int from, int n ) { return ::wredrawln( w, from, n ); }
1631
1635 int redrawwin() { return ::wredrawln( w, 0, height() ); }
1636
1640 int doupdate() { return ::doupdate(); }
1641
1645 void syncdown() { ::wsyncdown( w ); }
1646
1650 void syncup() { ::wsyncup( w ); }
1651
1655 void cursyncup() { ::wcursyncup( w ); }
1656
1660 int syncok( bool bf ) { return ::syncok( w, bf ); }
1661
1662#ifndef _no_flushok
1663 int flushok( bool bf ) { return ::flushok( w, bf ); }
1664
1665#endif
1666
1671 void immedok( bool bf ) { ::immedok( w, bf ); }
1672
1676 int keypad( bool bf ) { return ::keypad( w, bf ); }
1677
1682 int meta( bool bf ) { return ::meta( w, bf ); }
1683
1687 int standout() { return ::wstandout( w ); }
1688
1692 int standend() { return ::wstandend( w ); }
1693
1694 // -------------------------------------------------------------------------
1695 // The next two are virtual, because we redefine them in the
1696 // NCursesPanel class.
1697 // -------------------------------------------------------------------------
1702 virtual int refresh() { return ::wrefresh( w ); }
1703
1708 virtual int noutrefresh() { return ::wnoutrefresh( w ); }
1709
1710 // -------------------------------------------------------------------------
1711 // multiple window control
1712 // -------------------------------------------------------------------------
1717 {
1718 return ::overlay( w, win.w );
1719 }
1720
1725 {
1726 return ::overwrite( w, win.w );
1727 }
1728
1735 int sminrow, int smincol,
1736 int dminrow, int dmincol,
1737 int dmaxrow, int dmaxcol, bool overlay = TRUE )
1738 {
1739 return ::copywin( w, win.w, sminrow, smincol, dminrow, dmincol,
1740 dmaxrow, dmaxcol, (int) ( overlay ? 1 : 0 ) );
1741 }
1742
1743 // -------------------------------------------------------------------------
1744 // Mouse related
1745 // -------------------------------------------------------------------------
1749 bool has_mouse() const;
1750
1751 // -------------------------------------------------------------------------
1752 // traversal support
1753 // -------------------------------------------------------------------------
1758
1759 const NCursesWindow* child() const { return subwins; }
1760
1765
1766 const NCursesWindow* sibling() const { return sib; }
1767
1771 NCursesWindow* parent() { return par; }
1772
1773 const NCursesWindow* parent() const { return par; }
1774
1778 bool isDescendant( NCursesWindow& win );
1779};
1780
1786{
1787
1788public:
1792 NCursesColorWindow( WINDOW* &window )
1793 : NCursesWindow( window )
1794 {
1795 useColors();
1796 }
1797
1802 int cols,
1803 int begin_y,
1804 int begin_x )
1805 : NCursesWindow( lines, cols, begin_y, begin_x )
1806 {
1807 useColors();
1808 }
1809
1817 int lines,
1818 int cols,
1819 int begin_y,
1820 int begin_x,
1821 char absrel = 'a' )
1823 begin_y, begin_x,
1824 absrel )
1825 {
1826 useColors();
1827 }
1828};
1829
1830
1832{
1833
1834public:
1835 NCursesPad( int lines, int cols );
1836
1841 int echochar( const chtype ch ) { return ::pechochar( w, ch ); }
1842
1848 int refresh() { return OK; };
1849
1850 int noutrefresh() { return OK; };
1851
1857 int refresh( int pminrow, int pmincol,
1858 int sminrow, int smincol,
1859 int smaxrow, int smaxcol )
1860 {
1861 return ::prefresh( w, pminrow, pmincol,
1862 sminrow, smincol, smaxrow, smaxcol );
1863 }
1864
1868 int noutrefresh( int pminrow, int pmincol,
1869 int sminrow, int smincol,
1870 int smaxrow, int smaxcol )
1871 {
1872 return ::pnoutrefresh( w, pminrow, pmincol,
1873 sminrow, smincol, smaxrow, smaxcol );
1874 }
1875};
1876
1877#endif // _CURSESW_H
We leave this here for compatibility reasons.
Definition ncursesw.h:1786
NCursesColorWindow(NCursesWindow &par, int lines, int cols, int begin_y, int begin_x, char absrel='a')
Definition ncursesw.h:1816
NCursesColorWindow(int lines, int cols, int begin_y, int begin_x)
Definition ncursesw.h:1801
NCursesColorWindow(WINDOW *&window)
Definition ncursesw.h:1792
Definition ncursesw.h:1832
int refresh()
Definition ncursesw.h:1848
int refresh(int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
Definition ncursesw.h:1857
int noutrefresh(int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
Definition ncursesw.h:1868
int echochar(const chtype ch)
Definition ncursesw.h:1841
int noutrefresh()
Definition ncursesw.h:1850
C++ class for windows.
Definition ncursesw.h:907
int delch(int y, int x)
Definition ncursesw.h:1551
static int maxcoord()
Definition ncursesw.h:1100
int border(chtype left=0, chtype right=0, chtype top=0, chtype bottom=0, chtype top_left=0, chtype top_right=0, chtype bottom_left=0, chtype bottom_right=0)
Definition ncursesw.h:1471
bool is_wintouched() const
Definition ncursesw.h:1616
short foreground() const
Definition ncursesw.h:1118
int add_attr_char(int y, int x)
Definition ncursesw.cc:179
virtual int mvwin(int begin_y, int begin_x)
Definition ncursesw.h:1142
int getstr(int y, int x, char *str, int n=-1)
Definition ncursesw.h:1202
int bkgd(const chtype ch)
Definition ncursesw.h:1445
int keypad(bool bf)
Definition ncursesw.h:1676
int touchln(int s, int cnt, bool changed=TRUE)
Definition ncursesw.h:1608
int untouchwin()
Definition ncursesw.h:1602
chtype inch(int y, int x)
Definition ncursesw.h:1335
int copywin(NCursesWindow &win, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, bool overlay=TRUE)
Definition ncursesw.h:1734
int insdelln(int n=1)
Definition ncursesw.h:1378
int clearok(bool bf)
Definition ncursesw.h:1530
int addstr(int y, int x, const char *str, int n=-1)
Definition ncursesw.h:1287
int mvcur(int oldrow, int oldcol, int newrow, int newcol) const
Definition ncursesw.h:1167
void immedok(bool bf)
Definition ncursesw.h:1671
virtual ~NCursesWindow()
Definition ncursesw.cc:464
int begy() const
Definition ncursesw.h:1087
int insertln()
Definition ncursesw.h:1372
int deleteln()
Definition ncursesw.h:1556
int maxx() const
Definition ncursesw.h:1092
int chgat(int y, int x, int n, attr_t attr, short color, const void *opts=NULL)
Definition ncursesw.h:1428
int move(int y, int x)
Definition ncursesw.h:1157
int scrollok(bool bf)
Definition ncursesw.h:1572
void getyx(int &y, int &x) const
Definition ncursesw.h:1162
int getstr(char *str, int n=-1)
Definition ncursesw.h:1193
int echochar(const char ch)
Definition ncursesw.h:1267
NCursesWindow * par
Definition ncursesw.h:959
chtype inch() const
Definition ncursesw.h:1327
int addstr(const char *str, int n=-1)
Definition ncursesw.h:1278
void idcok(bool bf)
Definition ncursesw.h:1592
NCursesWindow * child()
Definition ncursesw.h:1757
NCursesWindow()
Definition ncursesw.cc:268
NCursesWindow * sib
Definition ncursesw.h:967
int insstr(int y, int x, const char *s, int n=-1)
Definition ncursesw.h:1394
int add_wch(const cchar_t *cch)
Definition ncursesw.h:1246
int printw(const char *fmt,...)
Definition ncursesw.cc:78
int touchwin()
Definition ncursesw.h:1597
int getch(int y, int x)
Definition ncursesw.h:1186
int addch(const char ch)
Definition ncursesw.h:1230
int addwstr(const wchar_t *str, int n=-1)
Definition ncursesw.cc:136
void syncdown()
Definition ncursesw.h:1645
int vline(int y, int x, int len, chtype ch=0)
Definition ncursesw.h:1506
int redrawln(int from, int n)
Definition ncursesw.h:1630
void bkgdset(chtype ch)
Definition ncursesw.h:1450
bool alloced
Definition ncursesw.h:954
int instr(char *s, int n=-1)
Definition ncursesw.h:1212
int redrawwin()
Definition ncursesw.h:1635
void kill_subwindows()
Definition ncursesw.cc:445
WINDOW * w
Definition ncursesw.h:949
static long count
Definition ncursesw.h:941
int clrtoeol()
Definition ncursesw.h:1540
int setcolor(short pair)
Definition ncursesw.cc:592
bool isDescendant(NCursesWindow &win)
Definition ncursesw.cc:428
virtual int noutrefresh()
Definition ncursesw.h:1708
static int NumberOfColors()
Definition ncursesw.cc:556
int addch(int y, int x, const char ch)
Definition ncursesw.h:1254
int meta(bool bf)
Definition ncursesw.h:1682
int overwrite(NCursesWindow &win)
Definition ncursesw.h:1724
int attroff(chtype at)
Definition ncursesw.h:1407
int overlay(NCursesWindow &win)
Definition ncursesw.h:1716
NCursesWindow Clone()
Definition ncursesw.cc:374
int clear()
Definition ncursesw.h:1524
virtual int refresh()
Definition ncursesw.h:1702
NCursesWindow * parent()
Definition ncursesw.h:1771
static int tabsize()
Definition ncursesw.h:1054
int getch()
Definition ncursesw.h:1181
static int lines()
Definition ncursesw.h:1044
int box()
Definition ncursesw.h:1464
int attrset(chtype at)
Definition ncursesw.h:1412
int scroll(int amount=1)
Definition ncursesw.h:1565
int clrtobot()
Definition ncursesw.h:1535
int erase()
Definition ncursesw.h:1519
void syncup()
Definition ncursesw.h:1650
int chgat(int n, attr_t attr, short color, const void *opts=NULL)
Definition ncursesw.h:1419
int insch(int y, int x, chtype ch)
Definition ncursesw.h:1355
int setscrreg(int from, int to)
Definition ncursesw.h:1577
int ins_wch(int y, int x, const cchar_t *cchar)
Definition ncursesw.h:1364
int leaveok(bool bf)
Definition ncursesw.h:1625
int standout()
Definition ncursesw.h:1687
static int ripoffline(int ripoff_lines, int(*init)(NCursesWindow &win))
Definition ncursesw.cc:414
int vline(int len, chtype ch=0)
Definition ncursesw.h:1501
bool has_mouse() const
Definition ncursesw.cc:607
int insch(chtype ch)
Definition ncursesw.h:1349
chtype getbkgd() const
Definition ncursesw.h:1440
int idlok(bool bf)
Definition ncursesw.h:1586
void err_handler(const char *) const THROWS(NCursesException)
Definition ncursesw.cc:243
int instr(int y, int x, char *s, int n=-1)
Definition ncursesw.h:1218
void cursyncup()
Definition ncursesw.h:1655
int maxy() const
Definition ncursesw.h:1097
int standend()
Definition ncursesw.h:1692
int attron(chtype at)
Definition ncursesw.h:1402
int colors() const
Definition ncursesw.h:1064
short getcolor() const
Definition ncursesw.cc:565
int begx() const
Definition ncursesw.h:1082
int hline(int len, chtype ch=0)
Definition ncursesw.h:1487
short background() const
Definition ncursesw.h:1123
NCursesWindow * sibling()
Definition ncursesw.h:1764
int doupdate()
Definition ncursesw.h:1640
static int cols()
Definition ncursesw.h:1049
int in_wchar(cchar_t *cchar)
Definition ncursesw.cc:166
int delch()
Definition ncursesw.h:1545
static void useColors(void)
Definition ncursesw.cc:517
int syncok(bool bf)
Definition ncursesw.h:1660
NCursesWindow * subwins
Definition ncursesw.h:963
int width() const
Definition ncursesw.h:1077
int height() const
Definition ncursesw.h:1072
int insstr(const char *s, int n=-1)
Definition ncursesw.h:1385
int hline(int y, int x, int len, chtype ch=0)
Definition ncursesw.h:1492
Screen position pair in the order line, column: (L, C)
Definition position.h:110
A rectangle is defined by its position and size: wpos Pos, wsze Sze.
Definition position.h:194
Screen dimension (screen size) in the order height, width: (H, W)
Definition position.h:154