File indexing completed on 2025-10-31 09:06:37
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027 
0028 
0029 
0030 
0031 
0032 #ifndef NCURSES_CURSESW_H_incl
0033 #define NCURSES_CURSESW_H_incl 1
0034 
0035 
0036 
0037 extern "C" {
0038 #  include   <ncursesw/curses.h>
0039 }
0040 
0041 #if defined(BUILDING_NCURSES_CXX)
0042 # define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
0043 #else
0044 # define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
0045 #endif
0046 
0047 #define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
0048 
0049 #define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API
0050 #define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type
0051 
0052 #include <ncursesw/etip.h>
0053 
0054 
0055 
0056 #undef lines
0057 
0058 
0059 
0060 
0061 #undef UNDEF
0062 #define UNDEF(name) CUR_ ##name
0063 
0064 #ifdef addch
0065 inline int UNDEF(addch)(chtype ch)  { return addch(ch); }
0066 #undef addch
0067 #define addch UNDEF(addch)
0068 #endif
0069 
0070 #ifdef addchstr
0071 inline int UNDEF(addchstr)(chtype *at) { return addchstr(at); }
0072 #undef addchstr
0073 #define addchstr UNDEF(addchstr)
0074 #endif
0075 
0076 #ifdef addnstr
0077 inline int UNDEF(addnstr)(const char *str, int n)
0078 { return addnstr(str, n); }
0079 #undef addnstr
0080 #define addnstr UNDEF(addnstr)
0081 #endif
0082 
0083 #ifdef addstr
0084 inline int UNDEF(addstr)(const char * str)  { return addstr(str); }
0085 #undef addstr
0086 #define addstr UNDEF(addstr)
0087 #endif
0088 
0089 #ifdef attroff
0090 inline int UNDEF(attroff)(chtype at) { return attroff(at); }
0091 #undef attroff
0092 #define attroff UNDEF(attroff)
0093 #endif
0094 
0095 #ifdef attron
0096 inline int UNDEF(attron)(chtype at) { return attron(at); }
0097 #undef attron
0098 #define attron UNDEF(attron)
0099 #endif
0100 
0101 #ifdef attrset
0102 inline chtype UNDEF(attrset)(chtype at) { return attrset(at); }
0103 #undef attrset
0104 #define attrset UNDEF(attrset)
0105 #endif
0106 
0107 #ifdef bkgd
0108 inline int UNDEF(bkgd)(chtype ch) { return bkgd(ch); }
0109 #undef bkgd
0110 #define bkgd UNDEF(bkgd)
0111 #endif
0112 
0113 #ifdef bkgdset
0114 inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); }
0115 #undef bkgdset
0116 #define bkgdset UNDEF(bkgdset)
0117 #endif
0118 
0119 #ifdef border
0120 inline int UNDEF(border)(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
0121 { return border(ls, rs, ts, bs, tl, tr, bl, br); }
0122 #undef border
0123 #define border UNDEF(border)
0124 #endif
0125 
0126 #ifdef box
0127 inline int UNDEF(box)(WINDOW *win, int v, int h) { return box(win, v, h); }
0128 #undef box
0129 #define box UNDEF(box)
0130 #endif
0131 
0132 #ifdef chgat
0133 inline int UNDEF(chgat)(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
0134   return chgat(n, attr, color, opts); }
0135 #undef chgat
0136 #define chgat UNDEF(chgat)
0137 #endif
0138 
0139 #ifdef clear
0140 inline int UNDEF(clear)()  { return clear(); }
0141 #undef clear
0142 #define clear UNDEF(clear)
0143 #endif
0144 
0145 #ifdef clearok
0146 inline int UNDEF(clearok)(WINDOW* win, bool bf)  { return clearok(win, bf); }
0147 #undef clearok
0148 #define clearok UNDEF(clearok)
0149 #else
0150 extern "C" NCURSES_IMPEXP int NCURSES_API clearok(WINDOW*, bool);
0151 #endif
0152 
0153 #ifdef clrtobot
0154 inline int UNDEF(clrtobot)()  { return clrtobot(); }
0155 #undef clrtobot
0156 #define clrtobot UNDEF(clrtobot)
0157 #endif
0158 
0159 #ifdef clrtoeol
0160 inline int UNDEF(clrtoeol)()  { return clrtoeol(); }
0161 #undef clrtoeol
0162 #define clrtoeol UNDEF(clrtoeol)
0163 #endif
0164 
0165 #ifdef color_set
0166 inline chtype UNDEF(color_set)(NCURSES_PAIRS_T p, void* opts) { return color_set(p, opts); }
0167 #undef color_set
0168 #define color_set UNDEF(color_set)
0169 #endif
0170 
0171 #ifdef crmode
0172 inline int UNDEF(crmode)(void) { return crmode(); }
0173 #undef crmode
0174 #define crmode UNDEF(crmode)
0175 #endif
0176 
0177 #ifdef delch
0178 inline int UNDEF(delch)()  { return delch(); }
0179 #undef delch
0180 #define delch UNDEF(delch)
0181 #endif
0182 
0183 #ifdef deleteln
0184 inline int UNDEF(deleteln)()  { return deleteln(); }
0185 #undef deleteln
0186 #define deleteln UNDEF(deleteln)
0187 #endif
0188 
0189 #ifdef echochar
0190 inline int UNDEF(echochar)(chtype ch)  { return echochar(ch); }
0191 #undef echochar
0192 #define echochar UNDEF(echochar)
0193 #endif
0194 
0195 #ifdef erase
0196 inline int UNDEF(erase)()  { return erase(); }
0197 #undef erase
0198 #define erase UNDEF(erase)
0199 #endif
0200 
0201 #ifdef fixterm
0202 inline int UNDEF(fixterm)(void) { return fixterm(); }
0203 #undef fixterm
0204 #define fixterm UNDEF(fixterm)
0205 #endif
0206 
0207 #ifdef flushok
0208 inline int UNDEF(flushok)(WINDOW* _win, bool _bf)  {
0209   return flushok(_win, _bf); }
0210 #undef flushok
0211 #define flushok UNDEF(flushok)
0212 #else
0213 #define _no_flushok
0214 #endif
0215 
0216 #ifdef getattrs
0217 inline int UNDEF(getattrs)(WINDOW *win) { return getattrs(win); }
0218 #undef getattrs
0219 #define getattrs UNDEF(getattrs)
0220 #endif
0221 
0222 #ifdef getbegyx
0223 inline void UNDEF(getbegyx)(WINDOW* win, int& y, int& x) { getbegyx(win, y, x); }
0224 #undef getbegyx
0225 #define getbegyx UNDEF(getbegyx)
0226 #endif
0227 
0228 #ifdef getbkgd
0229 inline chtype UNDEF(getbkgd)(const WINDOW *win) { return getbkgd(win); }
0230 #undef getbkgd
0231 #define getbkgd UNDEF(getbkgd)
0232 #endif
0233 
0234 #ifdef getch
0235 inline int UNDEF(getch)()  { return getch(); }
0236 #undef getch
0237 #define getch UNDEF(getch)
0238 #endif
0239 
0240 #ifdef getmaxyx
0241 inline void UNDEF(getmaxyx)(WINDOW* win, int& y, int& x) { getmaxyx(win, y, x); }
0242 #undef getmaxyx
0243 #define getmaxyx UNDEF(getmaxyx)
0244 #endif
0245 
0246 #ifdef getnstr
0247 inline int UNDEF(getnstr)(char *_str, int n)  { return getnstr(_str, n); }
0248 #undef getnstr
0249 #define getnstr UNDEF(getnstr)
0250 #endif
0251 
0252 #ifdef getparyx
0253 inline void UNDEF(getparyx)(WINDOW* win, int& y, int& x) { getparyx(win, y, x); }
0254 #undef getparyx
0255 #define getparyx UNDEF(getparyx)
0256 #endif
0257 
0258 #ifdef getstr
0259 inline int UNDEF(getstr)(char *_str)  { return getstr(_str); }
0260 #undef getstr
0261 #define getstr UNDEF(getstr)
0262 #endif
0263 
0264 #ifdef getyx
0265 inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) {
0266   getyx(win, y, x); }
0267 #undef getyx
0268 #define getyx UNDEF(getyx)
0269 #endif
0270 
0271 #ifdef hline
0272 inline int UNDEF(hline)(chtype ch, int n) { return hline(ch, n); }
0273 #undef hline
0274 #define hline UNDEF(hline)
0275 #endif
0276 
0277 #ifdef inch
0278 inline chtype UNDEF(inch)()  { return inch(); }
0279 #undef inch
0280 #define inch UNDEF(inch)
0281 #endif
0282 
0283 #ifdef inchstr
0284 inline int UNDEF(inchstr)(chtype *str)  { return inchstr(str); }
0285 #undef inchstr
0286 #define inchstr UNDEF(inchstr)
0287 #endif
0288 
0289 #ifdef innstr
0290 inline int UNDEF(innstr)(char *_str, int n)  { return innstr(_str, n); }
0291 #undef innstr
0292 #define innstr UNDEF(innstr)
0293 #endif
0294 
0295 #ifdef insch
0296 inline int UNDEF(insch)(chtype c)  { return insch(c); }
0297 #undef insch
0298 #define insch UNDEF(insch)
0299 #endif
0300 
0301 #ifdef insdelln
0302 inline int UNDEF(insdelln)(int n)  { return insdelln(n); }
0303 #undef insdelln
0304 #define insdelln UNDEF(insdelln)
0305 #endif
0306 
0307 #ifdef insertln
0308 inline int UNDEF(insertln)()  { return insertln(); }
0309 #undef insertln
0310 #define insertln UNDEF(insertln)
0311 #endif
0312 
0313 #ifdef insnstr
0314 inline int UNDEF(insnstr)(const char *_str, int n)  {
0315   return insnstr(_str, n); }
0316 #undef insnstr
0317 #define insnstr UNDEF(insnstr)
0318 #endif
0319 
0320 #ifdef insstr
0321 inline int UNDEF(insstr)(const char *_str)  {
0322   return insstr(_str); }
0323 #undef insstr
0324 #define insstr UNDEF(insstr)
0325 #endif
0326 
0327 #ifdef instr
0328 inline int UNDEF(instr)(char *_str)  { return instr(_str); }
0329 #undef instr
0330 #define instr UNDEF(instr)
0331 #endif
0332 
0333 #ifdef intrflush
0334 inline void UNDEF(intrflush)(WINDOW *win, bool bf) { intrflush(); }
0335 #undef intrflush
0336 #define intrflush UNDEF(intrflush)
0337 #endif
0338 
0339 #ifdef is_linetouched
0340 inline int UNDEF(is_linetouched)(WINDOW *w, int l)  { return is_linetouched(w,l); }
0341 #undef is_linetouched
0342 #define is_linetouched UNDEF(is_linetouched)
0343 #endif
0344 
0345 #ifdef leaveok
0346 inline int UNDEF(leaveok)(WINDOW* win, bool bf)  { return leaveok(win, bf); }
0347 #undef leaveok
0348 #define leaveok UNDEF(leaveok)
0349 #else
0350 extern "C" NCURSES_IMPEXP int NCURSES_API leaveok(WINDOW* win, bool bf);
0351 #endif
0352 
0353 #ifdef move
0354 inline int UNDEF(move)(int x, int y)  { return move(x, y); }
0355 #undef move
0356 #define move UNDEF(move)
0357 #endif
0358 
0359 #ifdef mvaddch
0360 inline int UNDEF(mvaddch)(int y, int x, chtype ch)
0361 { return mvaddch(y, x, ch); }
0362 #undef mvaddch
0363 #define mvaddch UNDEF(mvaddch)
0364 #endif
0365 
0366 #ifdef mvaddnstr
0367 inline int UNDEF(mvaddnstr)(int y, int x, const char *str, int n)
0368 { return mvaddnstr(y, x, str, n); }
0369 #undef mvaddnstr
0370 #define mvaddnstr UNDEF(mvaddnstr)
0371 #endif
0372 
0373 #ifdef mvaddstr
0374 inline int UNDEF(mvaddstr)(int y, int x, const char * str)
0375 { return mvaddstr(y, x, str); }
0376 #undef mvaddstr
0377 #define mvaddstr UNDEF(mvaddstr)
0378 #endif
0379 
0380 #ifdef mvchgat
0381 inline int UNDEF(mvchgat)(int y, int x, int n,
0382               attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
0383   return mvchgat(y, x, n, attr, color, opts); }
0384 #undef mvchgat
0385 #define mvchgat UNDEF(mvchgat)
0386 #endif
0387 
0388 #ifdef mvdelch
0389 inline int UNDEF(mvdelch)(int y, int x) { return mvdelch(y, x);}
0390 #undef mvdelch
0391 #define mvdelch UNDEF(mvdelch)
0392 #endif
0393 
0394 #ifdef mvgetch
0395 inline int UNDEF(mvgetch)(int y, int x) { return mvgetch(y, x);}
0396 #undef mvgetch
0397 #define mvgetch UNDEF(mvgetch)
0398 #endif
0399 
0400 #ifdef mvgetnstr
0401 inline int UNDEF(mvgetnstr)(int y, int x, char *str, int n) {
0402   return mvgetnstr(y, x, str, n);}
0403 #undef mvgetnstr
0404 #define mvgetnstr UNDEF(mvgetnstr)
0405 #endif
0406 
0407 #ifdef mvgetstr
0408 inline int UNDEF(mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);}
0409 #undef mvgetstr
0410 #define mvgetstr UNDEF(mvgetstr)
0411 #endif
0412 
0413 #ifdef mvinch
0414 inline chtype UNDEF(mvinch)(int y, int x) { return mvinch(y, x);}
0415 #undef mvinch
0416 #define mvinch UNDEF(mvinch)
0417 #endif
0418 
0419 #ifdef mvinnstr
0420 inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) {
0421   return mvinnstr(y, x, _str, n); }
0422 #undef mvinnstr
0423 #define mvinnstr UNDEF(mvinnstr)
0424 #endif
0425 
0426 #ifdef mvinsch
0427 inline int UNDEF(mvinsch)(int y, int x, chtype c)
0428 { return mvinsch(y, x, c); }
0429 #undef mvinsch
0430 #define mvinsch UNDEF(mvinsch)
0431 #endif
0432 
0433 #ifdef mvinsnstr
0434 inline int UNDEF(mvinsnstr)(int y, int x, const char *_str, int n) {
0435   return mvinsnstr(y, x, _str, n); }
0436 #undef mvinsnstr
0437 #define mvinsnstr UNDEF(mvinsnstr)
0438 #endif
0439 
0440 #ifdef mvinsstr
0441 inline int UNDEF(mvinsstr)(int y, int x, const char *_str)  {
0442   return mvinsstr(y, x, _str); }
0443 #undef mvinsstr
0444 #define mvinsstr UNDEF(mvinsstr)
0445 #endif
0446 
0447 #ifdef mvwaddch
0448 inline int UNDEF(mvwaddch)(WINDOW *win, int y, int x, const chtype ch)
0449 { return mvwaddch(win, y, x, ch); }
0450 #undef mvwaddch
0451 #define mvwaddch UNDEF(mvwaddch)
0452 #endif
0453 
0454 #ifdef mvwaddchnstr
0455 inline int UNDEF(mvwaddchnstr)(WINDOW *win, int y, int x, const chtype *str, int n)
0456 { return mvwaddchnstr(win, y, x, str, n); }
0457 #undef mvwaddchnstr
0458 #define mvwaddchnstr UNDEF(mvwaddchnstr)
0459 #endif
0460 
0461 #ifdef mvwaddchstr
0462 inline int UNDEF(mvwaddchstr)(WINDOW *win, int y, int x, const chtype *str)
0463 { return mvwaddchstr(win, y, x, str); }
0464 #undef mvwaddchstr
0465 #define mvwaddchstr UNDEF(mvwaddchstr)
0466 #endif
0467 
0468 #ifdef mvwaddnstr
0469 inline int UNDEF(mvwaddnstr)(WINDOW *win, int y, int x, const char *str, int n)
0470 { return mvwaddnstr(win, y, x, str, n); }
0471 #undef mvwaddnstr
0472 #define mvwaddnstr UNDEF(mvwaddnstr)
0473 #endif
0474 
0475 #ifdef mvwaddstr
0476 inline int UNDEF(mvwaddstr)(WINDOW *win, int y, int x, const char * str)
0477 { return mvwaddstr(win, y, x, str); }
0478 #undef mvwaddstr
0479 #define mvwaddstr UNDEF(mvwaddstr)
0480 #endif
0481 
0482 #ifdef mvwchgat
0483 inline int UNDEF(mvwchgat)(WINDOW *win, int y, int x, int n,
0484                attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
0485   return mvwchgat(win, y, x, n, attr, color, opts); }
0486 #undef mvwchgat
0487 #define mvwchgat UNDEF(mvwchgat)
0488 #endif
0489 
0490 #ifdef mvwdelch
0491 inline int UNDEF(mvwdelch)(WINDOW *win, int y, int x)
0492 { return mvwdelch(win, y, x); }
0493 #undef mvwdelch
0494 #define mvwdelch UNDEF(mvwdelch)
0495 #endif
0496 
0497 #ifdef mvwgetch
0498 inline int UNDEF(mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);}
0499 #undef mvwgetch
0500 #define mvwgetch UNDEF(mvwgetch)
0501 #endif
0502 
0503 #ifdef mvwgetnstr
0504 inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n)
0505 {return mvwgetnstr(win, y, x, str, n);}
0506 #undef mvwgetnstr
0507 #define mvwgetnstr UNDEF(mvwgetnstr)
0508 #endif
0509 
0510 #ifdef mvwgetstr
0511 inline int UNDEF(mvwgetstr)(WINDOW *win, int y, int x, char *str)
0512 {return mvwgetstr(win, y, x, str);}
0513 #undef mvwgetstr
0514 #define mvwgetstr UNDEF(mvwgetstr)
0515 #endif
0516 
0517 #ifdef mvwhline
0518 inline int UNDEF(mvwhline)(WINDOW *win, int y, int x, chtype c, int n) {
0519   return mvwhline(win, y, x, c, n); }
0520 #undef mvwhline
0521 #define mvwhline UNDEF(mvwhline)
0522 #endif
0523 
0524 #ifdef mvwinch
0525 inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) {
0526   return mvwinch(win, y, x);}
0527 #undef mvwinch
0528 #define mvwinch UNDEF(mvwinch)
0529 #endif
0530 
0531 #ifdef mvwinchnstr
0532 inline int UNDEF(mvwinchnstr)(WINDOW *win, int y, int x, chtype *str, int n)  { return mvwinchnstr(win, y, x, str, n); }
0533 #undef mvwinchnstr
0534 #define mvwinchnstr UNDEF(mvwinchnstr)
0535 #endif
0536 
0537 #ifdef mvwinchstr
0538 inline int UNDEF(mvwinchstr)(WINDOW *win, int y, int x, chtype *str)  { return mvwinchstr(win, y, x, str); }
0539 #undef mvwinchstr
0540 #define mvwinchstr UNDEF(mvwinchstr)
0541 #endif
0542 
0543 #ifdef mvwinnstr
0544 inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) {
0545   return mvwinnstr(win, y, x, _str, n); }
0546 #undef mvwinnstr
0547 #define mvwinnstr UNDEF(mvwinnstr)
0548 #endif
0549 
0550 #ifdef mvwinsch
0551 inline int UNDEF(mvwinsch)(WINDOW *win, int y, int x, chtype c)
0552 { return mvwinsch(win, y, x, c); }
0553 #undef mvwinsch
0554 #define mvwinsch UNDEF(mvwinsch)
0555 #endif
0556 
0557 #ifdef mvwinsnstr
0558 inline int UNDEF(mvwinsnstr)(WINDOW *w, int y, int x, const char *_str, int n) {
0559   return mvwinsnstr(w, y, x, _str, n); }
0560 #undef mvwinsnstr
0561 #define mvwinsnstr UNDEF(mvwinsnstr)
0562 #endif
0563 
0564 #ifdef mvwinsstr
0565 inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x,  const char *_str)  {
0566   return mvwinsstr(w, y, x, _str); }
0567 #undef mvwinsstr
0568 #define mvwinsstr UNDEF(mvwinsstr)
0569 #endif
0570 
0571 #ifdef mvwvline
0572 inline int UNDEF(mvwvline)(WINDOW *win, int y, int x, chtype c, int n) {
0573   return mvwvline(win, y, x, c, n); }
0574 #undef mvwvline
0575 #define mvwvline UNDEF(mvwvline)
0576 #endif
0577 
0578 #ifdef napms
0579 inline void UNDEF(napms)(unsigned long x) { napms(x); }
0580 #undef napms
0581 #define napms UNDEF(napms)
0582 #endif
0583 
0584 #ifdef nocrmode
0585 inline int UNDEF(nocrmode)(void) { return nocrmode(); }
0586 #undef nocrmode
0587 #define nocrmode UNDEF(nocrmode)
0588 #endif
0589 
0590 #ifdef nodelay
0591 inline void UNDEF(nodelay)() { nodelay(); }
0592 #undef nodelay
0593 #define nodelay UNDEF(nodelay)
0594 #endif
0595 
0596 #ifdef redrawwin
0597 inline int UNDEF(redrawwin)(WINDOW *win)  { return redrawwin(win); }
0598 #undef redrawwin
0599 #define redrawwin UNDEF(redrawwin)
0600 #endif
0601 
0602 #ifdef refresh
0603 inline int UNDEF(refresh)()  { return refresh(); }
0604 #undef refresh
0605 #define refresh UNDEF(refresh)
0606 #endif
0607 
0608 #ifdef resetterm
0609 inline int UNDEF(resetterm)(void) { return resetterm(); }
0610 #undef resetterm
0611 #define resetterm UNDEF(resetterm)
0612 #endif
0613 
0614 #ifdef saveterm
0615 inline int UNDEF(saveterm)(void) { return saveterm(); }
0616 #undef saveterm
0617 #define saveterm UNDEF(saveterm)
0618 #endif
0619 
0620 #ifdef scrl
0621 inline int UNDEF(scrl)(int l) { return scrl(l); }
0622 #undef scrl
0623 #define scrl UNDEF(scrl)
0624 #endif
0625 
0626 #ifdef scroll
0627 inline int UNDEF(scroll)(WINDOW *win) { return scroll(win); }
0628 #undef scroll
0629 #define scroll UNDEF(scroll)
0630 #endif
0631 
0632 #ifdef scrollok
0633 inline int UNDEF(scrollok)(WINDOW* win, bool bf)  { return scrollok(win, bf); }
0634 #undef scrollok
0635 #define scrollok UNDEF(scrollok)
0636 #else
0637 #if defined(__NCURSES_H)
0638 extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool);
0639 #else
0640 extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char);
0641 #endif
0642 #endif
0643 
0644 #ifdef setscrreg
0645 inline int UNDEF(setscrreg)(int t, int b) { return setscrreg(t, b); }
0646 #undef setscrreg
0647 #define setscrreg UNDEF(setscrreg)
0648 #endif
0649 
0650 #ifdef standend
0651 inline int UNDEF(standend)()  { return standend(); }
0652 #undef standend
0653 #define standend UNDEF(standend)
0654 #endif
0655 
0656 #ifdef standout
0657 inline int UNDEF(standout)()  { return standout(); }
0658 #undef standout
0659 #define standout UNDEF(standout)
0660 #endif
0661 
0662 #ifdef subpad
0663 inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x)
0664 { return derwin(p, l, c, y, x); }
0665 #undef subpad
0666 #define subpad UNDEF(subpad)
0667 #endif
0668 
0669 #ifdef timeout
0670 inline void UNDEF(timeout)(int delay) { timeout(delay); }
0671 #undef timeout
0672 #define timeout UNDEF(timeout)
0673 #endif
0674 
0675 #ifdef touchline
0676 inline int UNDEF(touchline)(WINDOW *win, int s, int c)
0677 { return touchline(win, s, c); }
0678 #undef touchline
0679 #define touchline UNDEF(touchline)
0680 #endif
0681 
0682 #ifdef touchwin
0683 inline int UNDEF(touchwin)(WINDOW *win) { return touchwin(win); }
0684 #undef touchwin
0685 #define touchwin UNDEF(touchwin)
0686 #endif
0687 
0688 #ifdef untouchwin
0689 inline int UNDEF(untouchwin)(WINDOW *win) { return untouchwin(win); }
0690 #undef untouchwin
0691 #define untouchwin UNDEF(untouchwin)
0692 #endif
0693 
0694 #ifdef vline
0695 inline int UNDEF(vline)(chtype ch, int n) { return vline(ch, n); }
0696 #undef vline
0697 #define vline UNDEF(vline)
0698 #endif
0699 
0700 #ifdef waddchstr
0701 inline int UNDEF(waddchstr)(WINDOW *win, chtype *at) { return waddchstr(win, at); }
0702 #undef waddchstr
0703 #define waddchstr UNDEF(waddchstr)
0704 #endif
0705 
0706 #ifdef waddstr
0707 inline int UNDEF(waddstr)(WINDOW *win, char *str) { return waddstr(win, str); }
0708 #undef waddstr
0709 #define waddstr UNDEF(waddstr)
0710 #endif
0711 
0712 #ifdef wattroff
0713 inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); }
0714 #undef wattroff
0715 #define wattroff UNDEF(wattroff)
0716 #endif
0717 
0718 #ifdef wattrset
0719 inline int UNDEF(wattrset)(WINDOW *win, int att) { return wattrset(win, att); }
0720 #undef wattrset
0721 #define wattrset UNDEF(wattrset)
0722 #endif
0723 
0724 #ifdef winch
0725 inline chtype UNDEF(winch)(const WINDOW* win) { return winch(win); }
0726 #undef winch
0727 #define winch UNDEF(winch)
0728 #endif
0729 
0730 #ifdef winchnstr
0731 inline int UNDEF(winchnstr)(WINDOW *win, chtype *str, int n)  { return winchnstr(win, str, n); }
0732 #undef winchnstr
0733 #define winchnstr UNDEF(winchnstr)
0734 #endif
0735 
0736 #ifdef winchstr
0737 inline int UNDEF(winchstr)(WINDOW *win, chtype *str)  { return winchstr(win, str); }
0738 #undef winchstr
0739 #define winchstr UNDEF(winchstr)
0740 #endif
0741 
0742 #ifdef winsstr
0743 inline int UNDEF(winsstr)(WINDOW *w, const char *_str)  {
0744   return winsstr(w, _str); }
0745 #undef winsstr
0746 #define winsstr UNDEF(winsstr)
0747 #endif
0748 
0749 #ifdef wstandend
0750 inline int UNDEF(wstandend)(WINDOW *win)  { return wstandend(win); }
0751 #undef wstandend
0752 #define wstandend UNDEF(wstandend)
0753 #endif
0754 
0755 #ifdef wstandout
0756 inline int UNDEF(wstandout)(WINDOW *win)  { return wstandout(win); }
0757 #undef wstandout
0758 #define wstandout UNDEF(wstandout)
0759 #endif
0760 
0761 
0762 
0763 
0764 
0765 
0766 
0767 extern "C" int     _nc_ripoffline(int, int (*init)(WINDOW*, int));
0768 extern "C" int     _nc_xx_ripoff_init(WINDOW *, int);
0769 extern "C" int     _nc_has_mouse(void);
0770 
0771 class NCURSES_CXX_IMPEXP NCursesWindow
0772 {
0773   friend class NCursesMenu;
0774   friend class NCursesForm;
0775 
0776 private:
0777   static bool    b_initialized;
0778   static void    initialize();
0779   void           constructing();
0780   friend int     _nc_xx_ripoff_init(WINDOW *, int);
0781 
0782   void           set_keyboard();
0783 
0784   NCURSES_COLOR_T getcolor(int getback) const;
0785   NCURSES_PAIRS_T getPair() const;
0786 
0787   static int     setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back, NCURSES_PAIRS_T pair);
0788   static int     colorInitialized;
0789 
0790   
0791   
0792   NCursesWindow(WINDOW* win, int ncols);
0793 
0794 protected:
0795   virtual void   err_handler(const char *) const THROWS(NCursesException);
0796   
0797 
0798   static long count;        
0799   
0800   
0801   
0802 
0803   WINDOW*        w;                
0804 
0805   bool           alloced;          
0806 
0807   NCursesWindow* par;              
0808   NCursesWindow* subwins;          
0809   NCursesWindow* sib;              
0810 
0811   void           kill_subwindows(); 
0812   
0813 
0814   
0815 
0816   NCursesWindow();
0817 
0818 public:
0819   explicit NCursesWindow(WINDOW* window);   
0820 
0821   NCursesWindow(int nlines,        
0822         int ncols,         
0823         int begin_y,       
0824         int begin_x);      
0825 
0826   NCursesWindow(NCursesWindow& par,
0827         int nlines,        
0828         int ncols,         
0829         int begin_y,       
0830         int begin_x,       
0831         char absrel = 'a');
0832   
0833 
0834   NCursesWindow(NCursesWindow& par,
0835         bool do_box = TRUE);
0836   
0837   
0838   
0839 
0840   NCursesWindow& operator=(const NCursesWindow& rhs)
0841   {
0842     if (this != &rhs)
0843       *this = rhs;
0844     return *this;
0845   }
0846 
0847   NCursesWindow(const NCursesWindow& rhs)
0848     : w(rhs.w), alloced(rhs.alloced), par(rhs.par), subwins(rhs.subwins), sib(rhs.sib)
0849   {
0850   }
0851 
0852   virtual ~NCursesWindow() THROWS(NCursesException);
0853 
0854   NCursesWindow Clone();
0855   
0856 
0857   
0858   static void    useColors(void);
0859   
0860 
0861   static int ripoffline(int ripoff_lines,
0862             int (*init)(NCursesWindow& win));
0863   
0864   
0865   
0866   
0867   
0868   
0869   
0870   
0871 
0872   
0873   
0874   
0875   int            lines() const { initialize(); return LINES; }
0876   
0877 
0878   int            cols() const { initialize(); return COLS; }
0879   
0880 
0881   int            tabsize() const { initialize(); return TABSIZE; }
0882   
0883 
0884   static int     NumberOfColors();
0885   
0886 
0887   int            colors() const { return NumberOfColors(); }
0888   
0889 
0890   
0891   
0892   
0893   int            height() const { return maxy() + 1; }
0894   
0895 
0896   int            width() const { return maxx() + 1; }
0897   
0898 
0899   int            begx() const { return getbegx(w); }
0900   
0901 
0902   int            begy() const { return getbegy(w); }
0903   
0904 
0905   int            curx() const { return getcurx(w); }
0906   
0907 
0908   int            cury() const { return getcury(w); }
0909   
0910 
0911   int            maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
0912   
0913 
0914   int            maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
0915   
0916 
0917   NCURSES_PAIRS_T getcolor() const;
0918   
0919 
0920   NCURSES_COLOR_T foreground() const { return getcolor(0); }
0921   
0922 
0923   NCURSES_COLOR_T background() const { return getcolor(1); }
0924   
0925 
0926   int            setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back);
0927   
0928 
0929   int            setcolor(NCURSES_PAIRS_T pair);
0930   
0931 
0932   
0933   
0934   
0935   virtual int    mvwin(int begin_y, int begin_x) {
0936     return ::mvwin(w, begin_y, begin_x); }
0937   
0938   
0939 
0940   
0941   
0942   
0943   int            move(int y, int x) { return ::wmove(w, y, x); }
0944   
0945 
0946   void           getyx(int& y, int& x) const { ::getyx(w, y, x); }
0947   
0948 
0949   void           getbegyx(int& y, int& x) const { ::getbegyx(w, y, x); }
0950   
0951 
0952   void           getmaxyx(int& y, int& x) const { ::getmaxyx(w, y, x); }
0953   
0954 
0955   void           getparyx(int& y, int& x) const { ::getparyx(w, y, x); }
0956   
0957 
0958   int            mvcur(int oldrow, int oldcol, int newrow, int newcol) const {
0959     return ::mvcur(oldrow, oldcol, newrow, newcol); }
0960   
0961 
0962   
0963   
0964   
0965   int            getch() { return ::wgetch(w); }
0966   
0967 
0968   int            getch(int y, int x) { return ::mvwgetch(w, y, x); }
0969   
0970 
0971   int            getstr(char* str, int n=-1) {
0972     return ::wgetnstr(w, str, n); }
0973   
0974   
0975   
0976 
0977   int            getstr(int y, int x, char* str, int n=-1) {
0978     return ::mvwgetnstr(w, y, x, str, n); }
0979   
0980   
0981 
0982   int            instr(char *s, int n=-1) { return ::winnstr(w, s, n); }
0983   
0984   
0985   
0986 
0987   int            instr(int y, int x, char *s, int n=-1) {
0988     return ::mvwinnstr(w, y, x, s, n); }
0989   
0990   
0991 
0992   int            scanw(const char* fmt, ...)
0993     
0994 #if __GNUG__ >= 2
0995     __attribute__ ((format (scanf, 2, 3)));
0996 #else
0997   ;
0998 #endif
0999 
1000   int            scanw(const char*, va_list);
1001     
1002 
1003   int            scanw(int y, int x, const char* fmt, ...)
1004     
1005     
1006 #if __GNUG__ >= 2
1007     __attribute__ ((format (scanf, 4, 5)));
1008 #else
1009   ;
1010 #endif
1011 
1012   int            scanw(int y, int x, const char* fmt, va_list);
1013     
1014     
1015 
1016   
1017   
1018   
1019   int            addch(const chtype ch) { return ::waddch(w, ch); }
1020   
1021 
1022   int            addch(int y, int x, const chtype ch) {
1023     return ::mvwaddch(w, y, x, ch); }
1024   
1025   
1026 
1027   int            echochar(const chtype ch) { return ::wechochar(w, ch); }
1028   
1029 
1030   int            addstr(const char* str, int n=-1) {
1031     return ::waddnstr(w, str, n); }
1032   
1033   
1034 
1035   int            addstr(int y, int x, const char * str, int n=-1) {
1036     return ::mvwaddnstr(w, y, x, str, n); }
1037   
1038   
1039 
1040   int            addchstr(const chtype* str, int n=-1) {
1041     return ::waddchnstr(w, str, n); }
1042   
1043   
1044 
1045   int            addchstr(int y, int x, const chtype * str, int n=-1) {
1046     return ::mvwaddchnstr(w, y, x, str, n); }
1047   
1048   
1049 
1050   int            printw(const char* fmt, ...)
1051     
1052 #if (__GNUG__ >= 2) && !defined(printf)
1053     __attribute__ ((format (printf, 2, 3)));
1054 #else
1055   ;
1056 #endif
1057 
1058   int            printw(int y, int x, const char * fmt, ...)
1059     
1060 #if (__GNUG__ >= 2) && !defined(printf)
1061     __attribute__ ((format (printf, 4, 5)));
1062 #else
1063   ;
1064 #endif
1065 
1066   int            printw(const char* fmt, va_list args);
1067     
1068 
1069   int            printw(int y, int x, const char * fmt, va_list args);
1070     
1071 
1072   chtype         inch() const { return ::winch(w); }
1073   
1074 
1075   chtype         inch(int y, int x) { return ::mvwinch(w, y, x); }
1076   
1077   
1078 
1079   int            inchstr(chtype* str, int n=-1) {
1080     return ::winchnstr(w, str, n); }
1081   
1082   
1083 
1084   int            inchstr(int y, int x, chtype * str, int n=-1) {
1085     return ::mvwinchnstr(w, y, x, str, n); }
1086   
1087   
1088 
1089   int            insch(chtype ch) { return ::winsch(w, ch); }
1090   
1091   
1092 
1093   int            insch(int y, int x, chtype ch) {
1094     return ::mvwinsch(w, y, x, ch); }
1095   
1096   
1097 
1098   int            insertln() { return ::winsdelln(w, 1); }
1099   
1100 
1101   int            insdelln(int n=1) { return ::winsdelln(w, n); }
1102   
1103   
1104 
1105   int            insstr(const char *s, int n=-1) {
1106     return ::winsnstr(w, s, n); }
1107   
1108   
1109   
1110 
1111   int            insstr(int y, int x, const char *s, int n=-1) {
1112     return ::mvwinsnstr(w, y, x, s, n); }
1113   
1114   
1115 
1116   int            attron (chtype at) { return ::wattron (w, at); }
1117   
1118 
1119   int            attroff(chtype at) { return ::wattroff(w, static_cast<int>(at)); }
1120   
1121 
1122   int            attrset(chtype at) { return ::wattrset(w, static_cast<int>(at)); }
1123   
1124 
1125   chtype         attrget() { return ::getattrs(w); }
1126   
1127 
1128   int            color_set(NCURSES_PAIRS_T color_pair_number, void* opts=NULL) {
1129     return ::wcolor_set(w, color_pair_number, opts); }
1130   
1131 
1132   int            chgat(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
1133     return ::wchgat(w, n, attr, color, opts); }
1134   
1135   
1136   
1137 
1138   int            chgat(int y, int x,
1139                int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
1140     return ::mvwchgat(w, y, x, n, attr, color, opts); }
1141   
1142   
1143 
1144   
1145   
1146   
1147   chtype         getbkgd() const { return ::getbkgd(w); }
1148   
1149 
1150   int            bkgd(const chtype ch) { return ::wbkgd(w, ch); }
1151   
1152 
1153   void           bkgdset(chtype ch) { ::wbkgdset(w, ch); }
1154   
1155 
1156   
1157   
1158   
1159   int            box(chtype vert=0, chtype  hor=0) {
1160     return ::wborder(w, vert, vert, hor, hor, 0, 0, 0, 0); }
1161   
1162   
1163   
1164 
1165   int            border(chtype left=0, chtype right=0,
1166             chtype top =0, chtype bottom=0,
1167             chtype top_left =0, chtype top_right=0,
1168             chtype bottom_left =0, chtype bottom_right=0) {
1169     return ::wborder(w, left, right, top, bottom, top_left, top_right,
1170              bottom_left, bottom_right); }
1171   
1172   
1173   
1174 
1175   
1176   
1177   
1178   int            hline(int len, chtype ch=0) { return ::whline(w, ch, len); }
1179   
1180   
1181 
1182   int            hline(int y, int x, int len, chtype ch=0) {
1183     return ::mvwhline(w, y, x, ch, len); }
1184   
1185 
1186   int            vline(int len, chtype ch=0) { return ::wvline(w, ch, len); }
1187   
1188   
1189 
1190   int            vline(int y, int x, int len, chtype ch=0) {
1191     return ::mvwvline(w, y, x, ch, len); }
1192   
1193 
1194   
1195   
1196   
1197   int            erase() { return ::werase(w); }
1198   
1199 
1200   int            clear() { return ::wclear(w); }
1201   
1202 
1203   int            clearok(bool bf) { return ::clearok(w, bf); }
1204   
1205   
1206 
1207   int            clrtobot() { return ::wclrtobot(w); }
1208   
1209 
1210   int            clrtoeol() { return ::wclrtoeol(w); }
1211   
1212 
1213   int            delch() { return ::wdelch(w); }
1214   
1215 
1216   int            delch(int y, int x) { return ::mvwdelch(w, y, x); }
1217   
1218   
1219 
1220   int            deleteln() { return ::winsdelln(w, -1); }
1221   
1222 
1223   
1224   
1225   
1226   int            scroll(int amount=1) { return ::wscrl(w, amount); }
1227   
1228   
1229 
1230   int            scrollok(bool bf) { return ::scrollok(w, bf); }
1231   
1232   
1233   
1234 
1235   int            setscrreg(int from, int to) {
1236     return ::wsetscrreg(w, from, to); }
1237   
1238 
1239   int            idlok(bool bf) { return ::idlok(w, bf); }
1240   
1241   
1242 
1243   void           idcok(bool bf) { ::idcok(w, bf); }
1244   
1245   
1246 
1247   int            touchline(int s, int c) { return ::touchline(w, s, c); }
1248   
1249 
1250   int            touchwin()   { return ::wtouchln(w, 0, height(), 1); }
1251   
1252 
1253   int            untouchwin() { return ::wtouchln(w, 0, height(), 0); }
1254   
1255 
1256   int            touchln(int s, int cnt, bool changed=TRUE) {
1257     return ::wtouchln(w, s, cnt, static_cast<int>(changed ? 1 : 0)); }
1258   
1259   
1260 
1261   bool           is_linetouched(int line) const {
1262     return (::is_linetouched(w, line) == TRUE ? TRUE:FALSE); }
1263   
1264 
1265   bool           is_wintouched() const {
1266     return (::is_wintouched(w) ? TRUE:FALSE); }
1267   
1268 
1269   int            leaveok(bool bf) { return ::leaveok(w, bf); }
1270   
1271   
1272 
1273   int            redrawln(int from, int n) { return ::wredrawln(w, from, n); }
1274   
1275 
1276   int            redrawwin() { return ::wredrawln(w, 0, height()); }
1277   
1278 
1279   int            doupdate()  { return ::doupdate(); }
1280   
1281 
1282   void           syncdown()  { ::wsyncdown(w); }
1283   
1284 
1285   void           syncup()    { ::wsyncup(w); }
1286   
1287 
1288   void           cursyncup() { ::wcursyncup(w); }
1289   
1290 
1291   int            syncok(bool bf) { return ::syncok(w, bf); }
1292   
1293 
1294 #ifndef _no_flushok
1295   int            flushok(bool bf) { return ::flushok(w, bf); }
1296 #endif
1297 
1298   void           immedok(bool bf) { ::immedok(w, bf); }
1299   
1300   
1301 
1302   int            intrflush(bool bf) { return ::intrflush(w, bf); }
1303 
1304   int            keypad(bool bf) { return ::keypad(w, bf); }
1305   
1306 
1307   int            nodelay(bool bf) { return ::nodelay(w, bf); }
1308 
1309   int            meta(bool bf) { return ::meta(w, bf); }
1310   
1311   
1312 
1313   int            standout() { return ::wstandout(w); }
1314   
1315 
1316   int            standend() { return ::wstandend(w); }
1317   
1318 
1319   
1320   
1321   
1322   
1323   virtual int    refresh() { return ::wrefresh(w); }
1324   
1325   
1326 
1327   virtual int    noutrefresh() { return ::wnoutrefresh(w); }
1328   
1329   
1330 
1331   
1332   
1333   
1334   int            overlay(NCursesWindow& win) {
1335     return ::overlay(w, win.w); }
1336   
1337 
1338   int            overwrite(NCursesWindow& win) {
1339     return ::overwrite(w, win.w); }
1340   
1341 
1342   int            copywin(NCursesWindow& win,
1343              int sminrow, int smincol,
1344              int dminrow, int dmincol,
1345              int dmaxrow, int dmaxcol, bool overlaywin=TRUE) {
1346     return ::copywin(w, win.w, sminrow, smincol, dminrow, dmincol,
1347              dmaxrow, dmaxcol, static_cast<int>(overlaywin ? 1 : 0)); }
1348   
1349   
1350   
1351 
1352   
1353   
1354   
1355 #if defined(NCURSES_EXT_FUNCS) && (NCURSES_EXT_FUNCS != 0)
1356   int            wresize(int newLines, int newColumns) {
1357     return ::wresize(w, newLines, newColumns); }
1358 #endif
1359 
1360   
1361   
1362   
1363   bool has_mouse() const;
1364   
1365 
1366   
1367   
1368   
1369   NCursesWindow*  child() { return subwins; }
1370   
1371 
1372   NCursesWindow*  sibling() { return sib; }
1373   
1374 
1375   NCursesWindow*  parent() { return par; }
1376   
1377 
1378   bool isDescendant(NCursesWindow& win);
1379   
1380 };
1381 
1382 
1383 
1384 
1385 class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow
1386 {
1387 public:
1388   explicit NCursesColorWindow(WINDOW* &window)   
1389     : NCursesWindow(window) {
1390       useColors(); }
1391 
1392   NCursesColorWindow(int nlines,        
1393              int ncols,         
1394              int begin_y,       
1395              int begin_x)       
1396     : NCursesWindow(nlines, ncols, begin_y, begin_x) {
1397       useColors(); }
1398 
1399   NCursesColorWindow(NCursesWindow& parentWin,
1400              int nlines,        
1401              int ncols,         
1402              int begin_y,       
1403              int begin_x,       
1404              char absrel = 'a') 
1405     : NCursesWindow(parentWin,
1406             nlines, ncols,  
1407             begin_y, begin_x,   
1408             absrel ) {          
1409       useColors(); }
1410 };
1411 
1412 
1413 
1414 
1415   typedef enum {
1416     REQ_PAD_REFRESH = KEY_MAX + 1,
1417     REQ_PAD_UP,
1418     REQ_PAD_DOWN,
1419     REQ_PAD_LEFT,
1420     REQ_PAD_RIGHT,
1421     REQ_PAD_EXIT
1422   } Pad_Request;
1423 
1424   const Pad_Request PAD_LOW  = REQ_PAD_REFRESH;   
1425   const Pad_Request PAD_HIGH = REQ_PAD_EXIT;      
1426 
1427 
1428 
1429 
1430 
1431 class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow
1432 {
1433 private:
1434   NCursesWindow* viewWin;       
1435   NCursesWindow* viewSub;       
1436 
1437   int h_gridsize, v_gridsize;
1438 
1439 protected:
1440   int min_row, min_col;         
1441 
1442   NCursesWindow* Win(void) const {
1443     
1444     return (viewSub?viewSub:(viewWin?viewWin:0));
1445   }
1446 
1447   NCursesWindow* getWindow(void) const {
1448     return viewWin;
1449   }
1450 
1451   NCursesWindow* getSubWindow(void) const {
1452     return viewSub;
1453   }
1454 
1455   virtual int driver (int key);      
1456   
1457 
1458   virtual void OnUnknownOperation(int pad_req) {
1459     (void) pad_req;
1460     ::beep();
1461   }
1462   
1463 
1464   virtual void OnNavigationError(int pad_req) {
1465     (void) pad_req;
1466     ::beep();
1467   }
1468   
1469 
1470   virtual void OnOperation(int pad_req) {
1471     (void) pad_req;
1472   };
1473   
1474   
1475 
1476 public:
1477   NCursesPad(int nlines, int ncols);
1478   
1479 
1480   NCursesPad& operator=(const NCursesPad& rhs)
1481   {
1482     if (this != &rhs) {
1483       *this = rhs;
1484       NCursesWindow::operator=(rhs);
1485     }
1486     return *this;
1487   }
1488 
1489   NCursesPad(const NCursesPad& rhs)
1490     : NCursesWindow(rhs),
1491       viewWin(rhs.viewWin),
1492       viewSub(rhs.viewSub),
1493       h_gridsize(rhs.h_gridsize),
1494       v_gridsize(rhs.v_gridsize),
1495       min_row(rhs.min_row),
1496       min_col(rhs.min_col)
1497   {
1498   }
1499 
1500   virtual ~NCursesPad() THROWS(NCursesException) {}
1501 
1502   int echochar(const chtype ch) { return ::pechochar(w, ch); }
1503   
1504   
1505 
1506   int refresh() NCURSES_OVERRIDE;
1507   
1508   
1509 
1510   int refresh(int pminrow, int pmincol,
1511           int sminrow, int smincol,
1512           int smaxrow, int smaxcol) {
1513     return ::prefresh(w, pminrow, pmincol,
1514               sminrow, smincol, smaxrow, smaxcol);
1515   }
1516   
1517   
1518   
1519 
1520   int noutrefresh() NCURSES_OVERRIDE;
1521   
1522   
1523 
1524   int noutrefresh(int pminrow, int pmincol,
1525           int sminrow, int smincol,
1526           int smaxrow, int smaxcol) {
1527     return ::pnoutrefresh(w, pminrow, pmincol,
1528               sminrow, smincol, smaxrow, smaxcol);
1529   }
1530   
1531 
1532   virtual void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1);
1533   
1534 
1535   virtual void setSubWindow(NCursesWindow& sub);
1536   
1537   
1538   
1539 
1540   virtual void operator() (void);
1541   
1542 };
1543 
1544 
1545 
1546 
1547 class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad
1548 {
1549 protected:
1550   virtual void OnOperation(int pad_req) NCURSES_OVERRIDE;
1551 
1552 public:
1553   NCursesFramedPad(NCursesWindow& win, int nlines, int ncols,
1554            int v_grid = 1, int h_grid = 1)
1555     : NCursesPad(nlines, ncols) {
1556     NCursesPad::setWindow(win, v_grid, h_grid);
1557     NCursesPad::setSubWindow(*(new NCursesWindow(win)));
1558   }
1559   
1560 
1561   virtual ~NCursesFramedPad() THROWS(NCursesException) {
1562     delete getSubWindow();
1563   }
1564 
1565   void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1) NCURSES_OVERRIDE {
1566     (void) view;
1567     (void) v_grid;
1568     (void) h_grid;
1569     err_handler("Operation not allowed");
1570   }
1571   
1572 
1573   void setSubWindow(NCursesWindow& sub) NCURSES_OVERRIDE {
1574     (void) sub;
1575     err_handler("Operation not allowed");
1576   }
1577   
1578 
1579 };
1580 
1581 #endif