[w3m-dev 03458] Re: mouse menu

* display.c (displayBuffer): nTab2 -> nTab, mouse_menu
* fm.h (nTab2): deleted
	(MouseMenuMap): added
	(MouseMenu): added
	(LIMIT_MOUSE_MENU): added
* func.c (initMouseMenu): delete mouse_menu_map initialization
		conv_from_system
		mouse_menu->width
* main.c (main): mouse_menu->in_action = FALSE
	(posTab): check mouse_menu
	(mouse_menu_action): add y arg
		mouse_menu_width check
	(process_mouse): nTab2 -> nTab, mouse_menu
	(nTabLine): deleted
	(calcTabPos): check mouse_menu
* menu.c (mainMn): x, y
	(selMn): mouse_menu check
	(tabMn): mosue_menu check
* proto.h (nTabLine): deleted
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-11-22 15:43:13 +00:00
parent 4da0ac0fb9
commit 82901953d3
7 changed files with 136 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: display.c,v 1.37 2002/11/21 17:05:01 ukai Exp $ */
/* $Id: display.c,v 1.38 2002/11/22 15:43:13 ukai Exp $ */
#include <signal.h>
#include "fm.h"
@@ -254,7 +254,7 @@ displayBuffer(Buffer *buf, int mode)
else
buf->rootX = 0;
buf->COLS = COLS - buf->rootX;
if (nTab2 > 1) {
if (nTab > 1 || mouse_menu) {
ny = LastTab->y + 2;
if (ny > LASTLINE)
ny = LASTLINE;
@@ -445,17 +445,15 @@ redrawNLine(Buffer *buf, int n)
#endif /* USE_BG_COLOR */
}
#endif /* USE_COLOR */
if (nTab2 > 1) {
if (nTab > 1 || mouse_menu) {
TabBuffer *t;
int l;
i = 0;
move(0, 0);
if (mouse_menu) {
addstr(mouse_menu);
clrtoeolx();
i++;
}
#ifdef USE_MOUSE
if (mouse_menu && mouse_menu->str)
addstr(mouse_menu->str);
#endif
clrtoeolx();
for (t = FirstTab; t; t = t->nextTab) {
move(t->y, t->x1);
@@ -477,8 +475,10 @@ redrawNLine(Buffer *buf, int n)
boldend();
clrtoeolx();
}
#if 0
move(0, COLS - 2);
addstr(" x");
#endif
move(LastTab->y + 1, 0);
for (i = 0; i < COLS; i++)
addch('~');