Lines Matching refs:Scr
127 for(tmp = Scr->FuncKeyRoot.next; tmp != NULL; tmp = tmp->next) {
137 tmp->next = Scr->FuncKeyRoot.next;
138 Scr->FuncKeyRoot.next = tmp;
177 for(tmp = Scr->FuncButtonRoot.next; tmp != NULL; tmp = tmp->next) {
195 tmp->next = Scr->FuncButtonRoot.next;
196 Scr->FuncButtonRoot.next = tmp;
244 if(Scr->use3Dmenus) {
262 XmbTextExtents(Scr->MenuFont.font_set, mi->item, mi->strlen,
265 y_offset = mi->item_num * Scr->EntryHeight + Scr->MenuShadowDepth;
266 text_y = y_offset + (Scr->EntryHeight - logical_rect.height) / 2
272 gc = Scr->NormalGC;
274 Draw3DBorder(mr->w, Scr->MenuShadowDepth, y_offset,
275 mr->width - 2 * Scr->MenuShadowDepth, Scr->EntryHeight, 1,
278 XmbDrawImageString(dpy, mr->w, Scr->MenuFont.font_set, gc,
279 mi->x + Scr->MenuShadowDepth, text_y, mi->item, mi->strlen);
285 Scr->MenuShadowDepth, y_offset,
286 mr->width - 2 * Scr->MenuShadowDepth, Scr->EntryHeight);
290 gc = Scr->MenuGC;
292 XmbDrawImageString(dpy, mr->w, Scr->MenuFont.font_set, gc,
293 mi->x + Scr->MenuShadowDepth, text_y,
296 FB(Scr->MenuC.shadd, Scr->MenuC.shadc);
297 XDrawLine(dpy, mr->w, Scr->NormalGC,
298 Scr->MenuShadowDepth,
299 y_offset + Scr->EntryHeight - 2,
300 mr->width - Scr->MenuShadowDepth,
301 y_offset + Scr->EntryHeight - 2);
302 FB(Scr->MenuC.shadc, Scr->MenuC.shadd);
303 XDrawLine(dpy, mr->w, Scr->NormalGC,
304 Scr->MenuShadowDepth,
305 y_offset + Scr->EntryHeight - 1,
306 mr->width - Scr->MenuShadowDepth,
307 y_offset + Scr->EntryHeight - 1);
313 if(Scr->pullPm == None) {
314 Scr->pullPm = Create3DMenuIcon(Scr->EntryHeight - ENTRY_SPACING, &Scr->pullW,
315 &Scr->pullH, Scr->MenuC);
317 x = mr->width - Scr->pullW - Scr->MenuShadowDepth - 2;
318 y = y_offset + ((Scr->EntryHeight - ENTRY_SPACING - Scr->pullH) / 2) + 2;
319 XCopyArea(dpy, Scr->pullPm, mr->w, gc, 0, 0, Scr->pullW, Scr->pullH, x, y);
323 Draw3DBorder(mr->w, Scr->MenuShadowDepth, y_offset,
324 mr->width - 2 * Scr->MenuShadowDepth, Scr->EntryHeight, 1,
327 XmbDrawImageString(dpy, mr->w, Scr->MenuFont.font_set, Scr->NormalGC,
340 XmbTextExtents(Scr->MenuFont.font_set, mi->item, mi->strlen,
343 y_offset = mi->item_num * Scr->EntryHeight;
344 text_y = y_offset + (Scr->EntryHeight - logical_rect.height) / 2
351 XSetForeground(dpy, Scr->NormalGC, mi->highlight.back);
353 XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
354 mr->width, Scr->EntryHeight);
356 XmbDrawString(dpy, mr->w, Scr->MenuFont.font_set, Scr->NormalGC,
359 gc = Scr->NormalGC;
363 XSetForeground(dpy, Scr->NormalGC, mi->normal.back);
365 XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
366 mr->width, Scr->EntryHeight);
369 gc = Scr->NormalGC;
372 gc = Scr->MenuGC;
374 XmbDrawString(dpy, mr->w, Scr->MenuFont.font_set, gc, mi->x,
377 XDrawLine(dpy, mr->w, gc, 0, y_offset + Scr->EntryHeight - 1,
378 mr->width, y_offset + Scr->EntryHeight - 1);
383 if(Scr->pullPm == None) {
384 Scr->pullPm = CreateMenuIcon(Scr->MenuFont.height,
385 &Scr->pullW, &Scr->pullH);
387 x = mr->width - Scr->pullW - 5;
388 y = y_offset + ((Scr->MenuFont.height - Scr->pullH) / 2);
389 XCopyPlane(dpy, Scr->pullPm, mr->w, gc, 0, 0,
390 Scr->pullW, Scr->pullH, x, y, 1);
396 XSetForeground(dpy, Scr->NormalGC, mi->normal.back);
399 XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
400 mr->width, Scr->EntryHeight);
403 XSetForeground(dpy, Scr->NormalGC, mi->normal.fore);
406 XDrawLine(dpy, mr->w, Scr->NormalGC, 0, y_offset,
408 y = ((mi->item_num + 1) * Scr->EntryHeight) - 1;
409 XDrawLine(dpy, mr->w, Scr->NormalGC, 0, y, mr->width, y);
414 XmbDrawString(dpy, mr->w, Scr->MenuFont.font_set, Scr->NormalGC, mi->x,
423 if(Scr->use3Dmenus) {
425 Scr->MenuShadowDepth, Scr->MenuC, off, false, false);
428 int y_offset = mi->item_num * Scr->EntryHeight;
433 if(e->xexpose.y <= (y_offset + Scr->EntryHeight) &&
448 if(! Scr->Workspaces) {
451 AddToMenu(Scr->Workspaces, "TWM Workspaces", NULL, NULL, F_TITLE, NULL,
456 for(wlist = Scr->workSpaceMgr.workSpaceList; wlist != NULL;
463 for(wlist = Scr->workSpaceMgr.workSpaceList; wlist != NULL;
471 for(wlist = Scr->workSpaceMgr.workSpaceList; wlist != NULL;
473 AddToMenu(Scr->Workspaces, wlist->name, *act, Scr->Windows, F_MENU, NULL, NULL);
476 Scr->Workspaces->pinned = false;
477 MakeMenu(Scr->Workspaces);
538 XFindContext(dpy, ActiveMenu->w, ScreenContext, (XPointer *)&Scr);
551 entry = y / Scr->EntryHeight;
593 if(ActiveMenu == Scr->Workspaces) {
598 (savey + ActiveItem->item_num * Scr->EntryHeight)
599 /*(savey + ActiveItem->item_num * Scr->EntryHeight +
600 (Scr->EntryHeight >> 1))*/, False);
659 if(Scr->MenuList == NULL) {
660 Scr->MenuList = tmp;
661 Scr->MenuList->next = NULL;
664 if(Scr->LastMenu == NULL) {
665 Scr->LastMenu = tmp;
666 Scr->LastMenu->next = NULL;
669 Scr->LastMenu->next = tmp;
670 Scr->LastMenu = tmp;
671 Scr->LastMenu->next = NULL;
675 Scr->Windows = tmp;
679 Scr->Icons = tmp;
683 Scr->Workspaces = tmp;
684 if(!Scr->Windows) {
689 Scr->AllWindows = tmp;
694 Scr->AllIcons = tmp;
699 Scr->Keys = tmp;
703 Scr->Visible = tmp;
759 if((menu == Scr->Workspaces) ||
760 (menu == Scr->Windows) ||
761 (menu == Scr->Icons) ||
762 (menu == Scr->AllWindows) ||
765 (menu == Scr->AllIcons) ||
768 (menu == Scr->Keys) ||
769 (menu == Scr->Visible)) {
790 if(!Scr->HaveFonts) {
791 CreateFonts(Scr);
795 XmbTextExtents(Scr->MenuFont.font_set,
813 if(Scr->Monochrome == COLOR && fore != NULL) {
816 save = Scr->FirstTime;
817 Scr->FirstTime = true;
820 if(Scr->use3Dmenus && !Scr->BeNiceToColormap) {
823 Scr->FirstTime = save;
840 for(mr = Scr->MenuList; mr != NULL; mr = mr->next) {
862 Colormap cmap = Scr->RootColormaps.cwins[0]->colormap->c;
866 Scr->EntryHeight = Scr->MenuFont.height + 4;
877 XmbTextExtents(Scr->MenuFont.font_set, cur->item, cur->strlen,
889 Scr->EntryHeight = max_entry_height + ENTRY_SPACING;
890 mr->height = mr->items * Scr->EntryHeight;
892 if(Scr->use3Dmenus) {
893 mr->width += 2 * Scr->MenuShadowDepth;
894 mr->height += 2 * Scr->MenuShadowDepth;
896 if(Scr->Shadow && ! mr->pinned) {
902 attributes.background_pixel = Scr->MenuShadowColor;
903 attributes.border_pixel = Scr->MenuShadowColor;
904 if(Scr->SaveUnder) {
908 mr->shadow = XCreateWindow(dpy, Scr->Root, 0, 0,
919 attributes.background_pixel = Scr->MenuC.back;
920 attributes.border_pixel = Scr->MenuC.fore;
927 attributes.cursor = Scr->MenuCursor;
934 if(Scr->SaveUnder && ! mr->pinned) {
938 if(Scr->BackingStore) {
942 borderwidth = Scr->use3Dmenus ? 0 : 1;
943 mr->w = XCreateWindow(dpy, Scr->Root, 0, 0, mr->width,
951 XSaveContext(dpy, mr->w, ScreenContext, (XPointer)Scr);
956 if(Scr->use3Dmenus && (Scr->Monochrome == COLOR)
962 xcol.pixel = Scr->MenuC.back;
968 save = Scr->FirstTime;
969 Scr->FirstTime = true;
970 GetColor(Scr->Monochrome, &mr->highlight.back, colname);
971 Scr->FirstTime = save;
974 if(Scr->use3Dmenus && (Scr->Monochrome == COLOR)
980 xcol.pixel = Scr->MenuC.fore;
986 save = Scr->FirstTime;
987 Scr->FirstTime = true;
988 GetColor(Scr->Monochrome, &mr->highlight.fore, colname);
989 Scr->FirstTime = save;
991 if(Scr->use3Dmenus && !Scr->BeNiceToColormap) {
999 tmp->normal.fore = Scr->MenuC.fore;
1000 tmp->normal.back = Scr->MenuC.back;
1003 tmp->normal.fore = Scr->MenuTitleC.fore;
1004 tmp->normal.back = Scr->MenuTitleC.back;
1016 if(Scr->use3Dmenus && !Scr->BeNiceToColormap) {
1027 if(Scr->Monochrome == MONOCHROME || !Scr->InterpolateMenuColors) {
1143 if((menu == Scr->Windows) ||
1144 (menu == Scr->Icons) ||
1145 (menu == Scr->AllWindows) ||
1147 (menu == Scr->AllIcons) ||
1149 (menu == Scr->Visible)) {
1158 all = (menu == Scr->AllWindows);
1159 icons = (menu == Scr->Icons);
1160 visible_ = (menu == Scr->Visible); /* Added by dl */
1161 allicons = (menu == Scr->AllIcons);
1171 if(menu == Scr->Windows) {
1174 else if(menu == Scr->Icons) {
1177 else if(menu == Scr->Visible) { /* Added by dl 2000 */
1180 else if(menu == Scr->AllIcons) { /* Added by dl 2004 */
1190 && CurrentSelectedWorkspace && Scr->workSpaceManagerActive) {
1191 for(ws = Scr->workSpaceMgr.workSpaceList; ws != NULL; ws = ws->next) {
1197 if(!Scr->currentvs) {
1201 ws = Scr->currentvs->wsw->currentwspc;
1204 for(tmp_win = Scr->FirstWindow, WindowNameCount = 0;
1207 if(tmp_win == Scr->workSpaceMgr.occupyWindow->twm_win) {
1210 if(Scr->ShortAllWindowsMenus && (tmp_win->iswspmgr || tmp_win->isiconmgr)) {
1238 for(tmp_win = Scr->FirstWindow;
1241 if(LookInList(Scr->IconMenuDontShow, tmp_win->name, &tmp_win->class)) {
1245 if(tmp_win == Scr->workSpaceMgr.occupyWindow->twm_win) {
1248 if(Scr->ShortAllWindowsMenus &&
1249 tmp_win == Scr->currentvs->wsw->twm_win) {
1252 if(Scr->ShortAllWindowsMenus && tmp_win->isiconmgr) {
1275 if(Scr->CaseSensitive) {
1306 if(menu == Scr->Keys) {
1322 for(const FuncKey *tmpKey = Scr->FuncKeyRoot.next; tmpKey != NULL;
1372 XGrabPointer(dpy, Scr->Root, True,
1376 Scr->Root,
1377 Scr->MenuCursor, CurrentTime);
1379 XGrabKeyboard(dpy, Scr->Root, True, GrabModeAsync, GrabModeAsync, CurrentTime);
1387 y -= (Scr->EntryHeight / 2); /* sticky menus would be nice here */
1393 clipped = ConstrainByLayout(Scr->Layout, -1, &x, menu->width, &y, menu->height);
1407 if(Scr->Shadow) {
1415 if(Scr->Shadow) {
1420 if(!Scr->NoWarpToMenuTitle && clipped && center) {
1422 const int yt = y + (Scr->EntryHeight / 2);
1423 XWarpPointer(dpy, Scr->Root, Scr->Root, x, y,
1482 if(Scr->Shadow) {
1507 for(tmp = Scr->MenuList; tmp != NULL; tmp = tmp->next) {
1524 if(Scr->Shadow) {
1558 None, Scr->MoveCursor, CurrentTime);
1567 ev.xbutton.x_root -= Scr->rootx;
1568 ev.xbutton.y_root -= Scr->rooty;
1585 ev.xbutton.x_root -= Scr->rootx;
1586 ev.xbutton.y_root -= Scr->rooty;
1591 if(Scr->DontMoveOff) {
1643 yt = y + (i + 0.5) * Scr->EntryHeight;
1645 XWarpPointer(dpy, Scr->Root, Scr->Root,