1 // * this is for making emacs happy: -*-Mode: C++;-*-
4 Copyright (C) 1993 by Anatoly Ivasyuk (anatoly@nick.csh.rit.edu)
6 Modified by Juergen Pfeifer, April 1997
11 MODULE_ID("$Id: cursesp.cc,v 1.6 1997/05/04 01:02:08 tom Exp $")
13 #pragma implementation
16 NCursesPanel::NCursesPanel(int lines,
20 : NCursesWindow(lines, cols, begin_y, begin_x) {
26 UserHook* hook = new UserHook;
30 ::set_panel_userptr(p, (const void *)hook);
34 NCursesPanel::~NCursesPanel() {
35 UserHook* hook = (UserHook*)::panel_userptr(p);
36 assert(hook && hook->m_back==this && hook->m_owner==p);
44 NCursesPanel::redraw() {
47 pan = ::panel_above(NULL);
49 ::touchwin(panel_window(pan));
50 pan = ::panel_above(pan);
57 NCursesPanel::refresh() {
63 NCursesPanel::boldframe(const char *title, const char* btitle) {
70 NCursesPanel::frame(const char *title,const char *btitle) {
72 if (!title && !btitle) {
84 NCursesPanel::label(const char *tLabel, const char *bLabel) {
88 centertext(maxy(),bLabel);
92 NCursesPanel::centertext(int row,const char *label) {
94 OnError(addstr(row,(maxx() - strlen(label)) / 2, label));