]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesw.h
ncurses 5.6 - patch 20071117
[ncurses.git] / c++ / cursesw.h
index 13f87a6800d455791764fbcea0ea5d76357ca176..170027b85d111505ab37d42e446c60069d4944f7 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
-// $Id: cursesw.h,v 1.38 2005/07/23 20:51:39 tom Exp $
-
-#include <stdarg.h>
-#include <stdio.h>
+// $Id: cursesw.h,v 1.45 2007/11/17 21:42:06 tom Exp $
 
 #include <etip.h>
 
-#if HAVE_STRSTREAM_H && (USE_STRSTREAM_VSCAN||USE_STRSTREAM_VSCAN_CAST)
-#include <strstream.h>
-#endif
-
 extern "C" {
 #  include   <curses.h>
 }
@@ -705,11 +698,13 @@ class NCURSES_IMPEXP NCursesWindow
 private:
   static bool    b_initialized;
   static void    initialize();
+  void           constructing();
   friend int     _nc_xx_ripoff_init(WINDOW *, int);
 
-  void           init();
+  void           set_keyboard();
 
   short          getcolor(int getback) const;
+  short          getPair() const;
 
   static int     setpalette(short fore, short back, short pair);
   static int     colorInitialized;
@@ -743,7 +738,7 @@ protected:
   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
@@ -823,16 +818,16 @@ public:
   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
 
-  int            begy() const { return w->_begy; }
+  int            begy() const { return getbegy(w); }
   // 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
 
-  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;
@@ -1219,6 +1214,14 @@ public:
   // dmaxrow,dmaxcol with the rectangle in this window beginning at
   // sminrow,smincol.
 
+  // -------------------------------------------------------------------------
+  // Extended functions
+  // -------------------------------------------------------------------------
+#ifdef NCURSES_EXT_FUNCS
+  int            wresize(NCursesWindow& win, int newLines, int newColumns) {
+    return ::wresize(win.w, newLines, newColumns); }
+#endif
+
   // -------------------------------------------------------------------------
   // Mouse related
   // -------------------------------------------------------------------------