[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
panel question
From: |
Peter Jay Salzman |
Subject: |
panel question |
Date: |
Thu, 27 Dec 2001 16:02:57 -0800 |
User-agent: |
Mutt/1.3.24i |
hi there,
i have a program that divides the main window up like this:
--------------------------------------
| | |
| | |
| WINDOW *w1 | WINDOW |
| | *w2 |
| | |
| | |
--------------------------------------
| WINDOW *w3 |
| |
--------------------------------------
i think i'd like for w1 to flip between two sets of data. i know this
is done with the panels library, but i'm a bit unsure how to procede.
here's mock code:
void ncurses_main(void)
{
WINDOW *w1, *w2, *w3;
InitCurses(&w1, &w2, &w3);
}
void InitCurses(WINDOW **w1, WINDOW **w2, WINDOW **w3)
{
*w1 = newwin(LINES-W3LEN, COLS-17, 0, 0);
*w2 = newwin(LINES-W3LEN, 17, 0, COLS-17);
*w3 = newwin(W3LEN, COLS, LINES-W3LEN, 0);
}
can someone tell me if this is correct:
void ncurses_main(void)
{
WINDOW *w1, *w2, *w3;
PANEL *p1, *p2;
InitCurses(&w1, &p1, &p2, &w2, &w3);
}
void InitCurses(WINDOW **w1, PANEL **P1, PANEL **P2 WINDOW **w2, WINDOW **w3)
{
*w1 = newwin(LINES-W3LEN, COLS-17, 0, 0);
*w2 = newwin(LINES-W3LEN, 17, 0, COLS-17);
*w3 = newwin(W3LEN, COLS, LINES-W3LEN, 0);
*p1 = new_panel(*w1);
*p2 = new_panel(*w1);
}
that is, create two PANEL's, and call new_panel for each one with the
argument of the WINDOW on which they're to be stacked.
is that correct?
if so, how does one go about creating, say, a popup window which may be
stacked on top of multiple WINDOWS simultaneously? not that i want to
do this - i'm just curious about the answer.
thanks!
pete
ps- has anyone heard of an ncurses book in the works? the o'reilly book
is almost older than my girlfriend, and is in *bad* need of updating.
--
PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
PGP Public Key: finger address@hidden
- panel question,
Peter Jay Salzman <=