MCPcopy Create free account
hub / github.com/SimHacker/micropolis / EventuallyRedrawMenu

Function EventuallyRedrawMenu

micropolis-activity/src/tk/tkmenu.c:1934–1956  ·  view source on GitHub ↗
(menuPtr, index)

Source from the content-addressed store, hash-verified

1932 *
1933 * Arrange for an entry of a menu, or the whole menu, to be
1934 * redisplayed at some point in the future.
1935 *
1936 * Results:
1937 * None.
1938 *
1939 * Side effects:
1940 * A when-idle hander is scheduled to do the redisplay, if there
1941 * isn't one already scheduled.
1942 *
1943 *----------------------------------------------------------------------
1944 */
1945
1946static void
1947EventuallyRedrawMenu(menuPtr, index)
1948 register Menu *menuPtr; /* Information about menu to redraw. */
1949 int index; /* Which entry to redraw. If -1, then
1950 * all the entries in the menu are redrawn. */
1951{
1952 if (menuPtr->tkwin == NULL) {
1953 return;
1954 }
1955 if (index != -1) {
1956 menuPtr->entries[index]->flags |= ENTRY_NEEDS_REDISPLAY;
1957 } else {
1958 for (index = 0; index < menuPtr->numEntries; index++) {
1959 menuPtr->entries[index]->flags |= ENTRY_NEEDS_REDISPLAY;

Callers 5

MenuWidgetCmdFunction · 0.85
ComputeMenuGeometryFunction · 0.85
MenuEventProcFunction · 0.85
tkmenu.cFile · 0.85
ActivateMenuEntryFunction · 0.85

Calls 1

Tk_DoWhenIdleFunction · 0.70

Tested by

no test coverage detected