]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesp.cc
ncurses 5.4
[ncurses.git] / c++ / cursesp.cc
index 50095d3d21444d1f8b5b53315537fecca4b84957..c236d516c7620e36e184856c36b6674cd161744a 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2002,2003 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            *
  ****************************************************************************/
 
 /****************************************************************************
- *   Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1993,1997            *
+ *   Author: Juergen Pfeifer, 1993, 1997                                    *
  ****************************************************************************/
 
-#include "cursesp.h"
 #include "internal.h"
+#include "cursesp.h"
 #include <string.h>
 
-MODULE_ID("$Id: cursesp.cc,v 1.16 2000/07/15 21:08:13 tom Exp $")
+MODULE_ID("$Id: cursesp.cc,v 1.21 2003/10/25 15:04:46 tom Exp $")
 
 NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0;
 
@@ -75,7 +75,7 @@ NCursesPanel::redraw() {
 int
 NCursesPanel::refresh() {
   ::update_panels();
-  return doupdate();
+  return ::doupdate();
 }
 
 int
@@ -116,9 +116,14 @@ NCursesPanel::label(const char *tLabel, const char *bLabel) {
 void
 NCursesPanel::centertext(int row,const char *label) {
   if (label) {
-    int x = (maxx() - strlen(label)) / 2;
+    int x = (maxx() - ::strlen(label)) / 2;
     if (x<0)
       x=0;
     OnError(addstr(row, x, label, width()));
   }
 }
+
+int
+NCursesPanel::getKey(void) {
+  return getch();
+}