static void _override(PANEL *pan, int show) { int y; PANEL *pan2; PANELOBS *tobs = pan->obscure; /* "this" one */ if (show == 1) Touchpan(pan); else if (!show) { Touchpan(pan); Touchpan(&_stdscr_pseudo_panel); } else if (show == -1) while (tobs && (tobs->pan != pan)) tobs = tobs->above; while (tobs) { if ((pan2 = tobs->pan) != pan) for (y = pan->wstarty; y < pan->wendy; y++) if ((y >= pan2->wstarty) && (y < pan2->wendy) && ((is_linetouched(pan->win, y - pan->wstarty)) || (is_linetouched(stdscr, y)))) Touchline(pan2, y - pan2->wstarty, 1); tobs = tobs->above; } }
//------------------------------------------------------------------------------ static void _override( PANEL* pan, int show ) { __QCS_FCONTEXT( "_override" ); int y; PANEL* pan2; PANELOBS* tobs = pan->obscure; // "this" one if( show == 1 ) { Touchpan( pan ); } else if( !show ) { Touchpan( pan ); Touchpan( &_stdscr_pseudo_panel ); } else if ( show == -1 ) { while( tobs && ( tobs->pan != pan ) ) { tobs = tobs->above; } } while( tobs ) { if( ( pan2 = tobs->pan ) != pan ) { for( y = pan->wstarty; y < pan->wendy; y++ ) { if( ( y >= pan2->wstarty ) && ( y < pan2->wendy ) && ( ( is_linetouched( pan->win, y - pan->wstarty ) ) || ( is_linetouched( stdscr, y ) ) ) ) { Touchline( pan2, y - pan2->wstarty, 1 ); } } } tobs = tobs->above; } }
replace_panel (PANEL *pan, WINDOW *win) { if(!pan) return(ERR); if (IS_LINKED(pan)) { Touchpan(pan); PANEL_UPDATE(pan,(PANEL*)0); } pan->win = win; return(OK); }
move_panel(PANEL * pan, int starty, int startx) { T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx)); if (!pan) returnCode(ERR); if (IS_LINKED(pan)) { Touchpan(pan); PANEL_UPDATE(pan, (PANEL *) 0); } returnCode(mvwin(pan->win, starty, startx)); }
/*+------------------------------------------------------------------------- __override(pan,show) --------------------------------------------------------------------------*/ void _nc_override(const PANEL *pan, int show) { int y; PANEL *pan2; PANELCONS *tobs = pan->obscure; /* "this" one */ dBug(("_nc_override %s,%d", USER_PTR(pan->user),show)); switch (show) { case P_TOUCH: Touchpan(pan); /* The following while loop will now mark all panel window lines * obscured by use or obscuring us as touched, so they will be * updated. */ break; case P_UPDATE: while(tobs && (tobs->pan != pan)) tobs = tobs->above; /* The next loop will now only go through the panels obscuring pan; * it updates all the lines in the obscuring panels in sync. with * the lines touched in pan itself. This is called in update_panels() * in a loop from the bottom_panel to the top_panel, resulting in * the desired update effect. */ break; default: return; } while(tobs) { if((pan2 = tobs->pan) != pan) { dBug(("test obs pan=%s pan2=%s", USER_PTR(pan->user), USER_PTR(pan2->user))); for(y = pan->wstarty; y < pan->wendy; y++) { if( (y >= pan2->wstarty) && (y < pan2->wendy) && ((is_linetouched(pan->win,y - pan->wstarty) == TRUE)) ) Touchline(pan2,y - pan2->wstarty,1); } } tobs = tobs->above; } }
move_panel(PANEL * pan, int starty, int startx) { int rc = ERR; T((T_CALLED("move_panel(%p,%d,%d)"), (void *)pan, starty, startx)); if (pan) { GetHook(pan); if (IS_LINKED(pan)) { Touchpan(pan); PANEL_UPDATE(pan, (PANEL *) 0); } rc = mvwin(pan->win, starty, startx); } returnCode(rc); }