]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesw.h
ncurses 5.6 - patch 20070612
[ncurses.git] / c++ / cursesw.h
index e391fa22eca19941a29455adf99c00addbb7ed5a..7e24c835f0929035ef6d0aff76a285dfa1813f75 100644 (file)
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
-// $Id: cursesw.h,v 1.41 2007/01/27 22:29:36 tom Exp $
-
-#include <stdarg.h>
-#include <stdio.h>
+// $Id: cursesw.h,v 1.44 2007/04/07 18:42:04 tom Exp $
 
 #include <etip.h>
 
 
 #include <etip.h>
 
@@ -707,6 +704,7 @@ private:
   void           set_keyboard();
 
   short          getcolor(int getback) const;
   void           set_keyboard();
 
   short          getcolor(int getback) const;
+  short          getPair() const;
 
   static int     setpalette(short fore, short back, short pair);
   static int     colorInitialized;
 
   static int     setpalette(short fore, short back, short pair);
   static int     colorInitialized;
@@ -740,7 +738,7 @@ protected:
   NCursesWindow();
 
 public:
   NCursesWindow();
 
 public:
-  NCursesWindow(WINDOW* &window);  // useful only for stdscr
+  NCursesWindow(WINDOW* window);   // useful only for stdscr
 
   NCursesWindow(int nlines,        // number of lines
                int ncols,         // number of columns
 
   NCursesWindow(int nlines,        // number of lines
                int ncols,         // number of columns
@@ -820,16 +818,16 @@ public:
   int            width() const { return maxx() + 1; }
   // Number of columns in this window
 
   int            width() const { return maxx() + 1; }
   // Number of columns in this window
 
-  int            begx() const { return w->_begx; }
+  int            begx() const { return getbegx(w); }
   // Column of top left corner relative to stdscr
 
   // Column of top left corner relative to stdscr
 
-  int            begy() const { return w->_begy; }
+  int            begy() const { return getbegy(w); }
   // Line of top left corner relative to stdscr
 
   // Line of top left corner relative to stdscr
 
-  int            maxx() const { return w->_maxx; }
+  int            maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
   // Largest x coord in window
 
   // Largest x coord in window
 
-  int            maxy() const { return w->_maxy; }
+  int            maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
   // Largest y coord in window
 
   short          getcolor() const;
   // Largest y coord in window
 
   short          getcolor() const;