/* ** refreshAll(). ** Function to refresh all the windows currently displayed */ void refreshAll (TuiWinInfoPtr * list) { TuiWinType type; TuiGenWinInfoPtr locator = locatorWinInfoPtr (); for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++) { if (list[type] && list[type]->generic.isVisible) { if (type == SRC_WIN || type == DISASSEM_WIN) { touchwin (list[type]->detail.sourceInfo.executionInfo->handle); tuiRefreshWin (list[type]->detail.sourceInfo.executionInfo); } touchwin (list[type]->generic.handle); tuiRefreshWin (&list[type]->generic); } } if (locator->isVisible) { touchwin (locator->handle); tuiRefreshWin (locator); } return; } /* refreshAll */
/* ** makeWindow(). */ void makeWindow (TuiGenWinInfoPtr winInfo, int boxIt) { WINDOW *handle; handle = newwin (winInfo->height, winInfo->width, winInfo->origin.y, winInfo->origin.x); winInfo->handle = handle; if (handle != (WINDOW *) NULL) { if (boxIt == BOX_WINDOW) boxWin (winInfo, NO_HILITE); winInfo->isVisible = TRUE; scrollok (handle, TRUE); tuiRefreshWin (winInfo); #ifndef FOR_TEST if ( /*!m_WinIsAuxillary(winInfo->type) && */ (winInfo->type != CMD_WIN) && (winInfo->content == (OpaquePtr) NULL)) { mvwaddstr (handle, 1, 1, winName (winInfo)); tuiRefreshWin (winInfo); } #endif /*FOR_TEST */ } return; } /* makeWindow */
/* ** makeVisible(). ** We can't really make windows visible, or invisible. So we ** have to delete the entire window when making it visible, ** and create it again when making it visible. */ void makeVisible (TuiGenWinInfoPtr winInfo, int visible) { /* Don't tear down/recreate command window */ if (winInfo->type == CMD_WIN) return; if (visible) { if (!winInfo->isVisible) { makeWindow ( winInfo, (winInfo->type != CMD_WIN && !m_winIsAuxillary (winInfo->type))); winInfo->isVisible = TRUE; } tuiRefreshWin (winInfo); } else if (!visible && winInfo->isVisible && winInfo->handle != (WINDOW *) NULL) { winInfo->isVisible = FALSE; tuiClearWin (winInfo); tuiDelwin (winInfo->handle); winInfo->handle = (WINDOW *) NULL; } return; } /* makeVisible */
/* ** tuiShowLocatorContent() */ void tuiShowLocatorContent (void) { char *string; TuiGenWinInfoPtr locator; locator = locatorWinInfoPtr (); if (m_genWinPtrNotNull (locator) && locator->handle != (WINDOW *) NULL) { string = displayableWinContentAt (locator, 0); if (string != (char *) NULL) { wmove (locator->handle, 0, 0); wstandout (locator->handle); waddstr (locator->handle, string); wstandend (locator->handle); tuiRefreshWin (locator); wmove (locator->handle, 0, 0); if (string != nullStr ()) tuiFree (string); locator->contentInUse = TRUE; } } return; } /* tuiShowLocatorContent */
/* ** tuiClearWin(). ** Clear the window of all contents without calling wclear. */ void tuiClearWin (TuiGenWinInfoPtr winInfo) { if (m_genWinPtrNotNull (winInfo) && winInfo->handle != (WINDOW *) NULL) { int curRow, curCol; for (curRow = 0; (curRow < winInfo->height); curRow++) for (curCol = 0; (curCol < winInfo->width); curCol++) mvwaddch (winInfo->handle, curRow, curCol, ' '); tuiRefreshWin (winInfo); } return; } /* tuiClearWin */
/* ** tuiClearLocatorDisplay() */ void tuiClearLocatorDisplay (void) { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); int i; if (locator->handle != (WINDOW *) NULL) { /* No need to werase, since writing a line of * blanks which we do below, is equivalent. */ /* werase(locator->handle); */ wmove (locator->handle, 0, 0); wstandout (locator->handle); for (i = 0; i < locator->width; i++) waddch (locator->handle, ' '); wstandend (locator->handle); tuiRefreshWin (locator); wmove (locator->handle, 0, 0); locator->contentInUse = FALSE; } return; } /* tuiClearLocatorDisplay */