Lines Matching defs:fsb
120 #define Offset(field) XtOffsetOf(FontSelectionBoxRec, fsb.field)
250 static Boolean Verify(FontSelectionBoxWidget fsb, FSBValidateCallbackRec *cb, String afm, Boolean doIt);
258 static void DisplayFontFamilies(FontSelectionBoxWidget fsb);
270 static void ReadBlends(FontSelectionBoxWidget fsb);
277 static void SetUpCurrentSelections(FontSelectionBoxWidget fsb);
279 static void WriteBlends(FontSelectionBoxWidget fsb);
954 FontSelectionBoxWidget fsb,
967 entries = ListPSResourceFiles(fsb->fsb.resource_path_override,
968 fsb->fsb.default_resource_path,
979 entries = ListPSResourceFiles(fsb->fsb.resource_path_override,
980 fsb->fsb.default_resource_path,
993 entries = ListPSResourceFiles(fsb->fsb.resource_path_override,
994 fsb->fsb.default_resource_path,
1008 FontSelectionBoxWidget fsb,
1029 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
1043 _DPSFGetFontInfo(fsb->fsb.context, serverNum, fsb->fsb.old_server,
1061 _DPSFGetBlendedFontInfo(fsb->fsb.context, serverNum,
1062 undefineIt, fsb->fsb.old_server,
1073 GetPSFontInfo(fsb, name, &axes, &designs, axisNameBuf, blendPos,
1079 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
1085 ff->next = fsb->fsb.known_families;
1090 if (fsb->fsb.typographic_sort) {
1094 fsb->fsb.known_families = ff;
1095 fsb->fsb.family_count++;
1107 f->CS_face_name = CS(f->face_name, (Widget) fsb);
1180 static void SortFontFamilies(FontSelectionBoxWidget fsb)
1185 while (fsb->fsb.known_families != NULL) {
1186 prev = highestPrev = &fsb->fsb.known_families;
1187 highest = fsb->fsb.known_families;
1189 for (ff = fsb->fsb.known_families->next; ff != NULL; ff = ff->next) {
1201 if (fsb->fsb.typographic_sort) XtFree(highest->sort_key);
1204 fsb->fsb.known_families = newFamilyList;
1208 FontSelectionBoxWidget fsb,
1241 AddFontRecord(fsb, 0, name, family, fullname, weight, False);
1247 static void GetFontNames(FontSelectionBoxWidget fsb)
1255 fsb->fsb.family_count = 0;
1257 fontCount = ListPSResourceFiles(fsb->fsb.resource_path_override,
1258 fsb->fsb.default_resource_path,
1262 AddFamily(fsb, loadableFamilies[i], loadableFamilyFonts[i],
1270 if (fsb->fsb.get_server_fonts) {
1271 _DPSFEnumFonts(fsb->fsb.context, &fontCount, &totalLength);
1274 _DPSFGetAllFontNames(fsb->fsb.context, fontCount, totalLength, buffer);
1279 AddFontRecord(fsb, i, start, family, fullname, weight, True);
1285 _DPSFFreeFontInfo(fsb->fsb.context);
1286 SortFontFamilies(fsb);
1287 ReadBlends(fsb);
1290 static void SensitizeReset(FontSelectionBoxWidget fsb)
1292 XtSetSensitive(fsb->fsb.reset_button_child, True);
1295 static void DesensitizeReset(FontSelectionBoxWidget fsb)
1297 XtSetSensitive(fsb->fsb.reset_button_child, False);
1300 static void ManageFamilyMultiple(FontSelectionBoxWidget fsb)
1302 XtManageChild(fsb->fsb.family_multiple_label_child);
1304 XtVaSetValues(XtParent(fsb->fsb.family_scrolled_list_child),
1305 XmNtopWidget, fsb->fsb.family_multiple_label_child, NULL);
1308 static void ManageFaceMultiple(FontSelectionBoxWidget fsb)
1310 XtManageChild(fsb->fsb.face_multiple_label_child);
1312 XtVaSetValues(XtParent(fsb->fsb.face_scrolled_list_child),
1313 XmNtopWidget, fsb->fsb.face_multiple_label_child, NULL);
1316 static void ManageMultipleMaster(FontSelectionBoxWidget fsb)
1318 XtManageChild(fsb->fsb.multiple_master_button_child);
1320 XtVaSetValues(XtParent(fsb->fsb.face_scrolled_list_child),
1321 XmNbottomWidget, fsb->fsb.multiple_master_button_child,
1325 static void ManageSizeMultiple(FontSelectionBoxWidget fsb)
1327 XtManageChild(fsb->fsb.size_multiple_label_child);
1330 static void UnmanageFamilyMultiple(FontSelectionBoxWidget fsb)
1332 XtVaSetValues(XtParent(fsb->fsb.family_scrolled_list_child),
1333 XmNtopWidget, fsb->fsb.family_label_child, NULL);
1335 XtUnmanageChild(fsb->fsb.family_multiple_label_child);
1338 static void UnmanageFaceMultiple(FontSelectionBoxWidget fsb)
1340 XtVaSetValues(XtParent(fsb->fsb.face_scrolled_list_child),
1341 XmNtopWidget, fsb->fsb.face_label_child, NULL);
1343 XtUnmanageChild(fsb->fsb.face_multiple_label_child);
1346 static void UnmanageMultipleMaster(FontSelectionBoxWidget fsb)
1348 XtUnmanageChild(fsb->fsb.multiple_master_button_child);
1350 XtVaSetValues(XtParent(fsb->fsb.face_scrolled_list_child),
1351 XmNbottomWidget, fsb->fsb.size_text_field_child, NULL);
1354 static void UnmanageSizeMultiple(FontSelectionBoxWidget fsb)
1356 XtUnmanageChild(fsb->fsb.size_multiple_label_child);
1362 FontSelectionBoxWidget fsb,
1379 count = ListPSResourceFiles(fsb->fsb.resource_path_override,
1380 fsb->fsb.default_resource_path,
1391 if (fsb->fsb.old_server) {
1424 FontSelectionBoxWidget fsb,
1431 && (Cardinal)fsb->fsb.pending_delete_count < fsb->fsb.max_pending_deletes) {
1435 if (all) start = &fsb->fsb.pending_delete_font;
1438 f = fsb->fsb.pending_delete_font;
1439 for (i = 1; f != NULL && (Cardinal)i < fsb->fsb.max_pending_deletes; i++) {
1448 if (f == fsb->fsb.currently_previewed) {
1454 _DPSFUndefineFont(fsb->fsb.context, f->font_name,
1455 fsb->fsb.old_server);
1458 fsb->fsb.pending_delete_count--;
1465 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
1467 UndefSomeUnusedFonts(fsb, True);
1472 FontSelectionBoxWidget fsb)
1478 shared = fsb->fsb.make_fonts_shared && !fsb->fsb.undef_unused_fonts;
1479 if (!fsb->fsb.get_server_fonts) {
1482 _DPSFIsFontResident(fsb->fsb.context, f->font_name, &resident);
1488 if (!DownloadFont(fsb, f->font_name, fsb->fsb.context, shared)) {
1489 _FSBFlushFont(fsb, f);
1495 if (f->pending_delete_next == NULL && fsb->fsb.undef_unused_fonts) {
1496 f->pending_delete_next = fsb->fsb.pending_delete_font;
1497 fsb->fsb.pending_delete_font = f;
1498 fsb->fsb.pending_delete_count++;
1499 UndefSomeUnusedFonts(fsb, False);
1506 FontSelectionBoxWidget fsb,
1512 FontFamilyRec *ff = fsb->fsb.known_families;
1520 if (!XtIsRealized(fsb)) return;
1522 XtVaGetValues(fsb->fsb.preview_child, XmNheight, &height,
1525 if (fsb->fsb.gstate == 0) {
1526 XDPSSetContextParameters(fsb->fsb.context, XtScreen(fsb), depth,
1527 XtWindow(fsb->fsb.preview_child), height,
1532 XDPSCaptureContextGState(fsb->fsb.context, &fsb->fsb.gstate);
1533 } else XDPSSetContextGState(fsb->fsb.context, fsb->fsb.gstate);
1535 _DPSFClearWindow(fsb->fsb.context);
1538 if (fsb->fsb.current_family_multiple ||
1539 fsb->fsb.current_face_multiple ||
1540 fsb->fsb.current_size_multiple) return;
1541 f = fsb->fsb.currently_previewed;
1542 size = fsb->fsb.currently_previewed_size;
1543 b = fsb->fsb.currently_previewed_blend;
1547 if (!XmListGetSelectedPos(fsb->fsb.family_scrolled_list_child,
1550 *selectList < 1 || *selectList > fsb->fsb.family_count) return;
1556 if (!XmListGetSelectedPos(fsb->fsb.face_scrolled_list_child,
1578 XtVaGetValues(fsb->fsb.size_text_field_child,
1587 fsb->fsb.currently_previewed = f;
1588 fsb->fsb.currently_previewed_blend = b;
1589 fsb->fsb.currently_previewed_size = size;
1591 if (!_FSBDownloadFontIfNecessary(f, fsb)) return;
1596 if (fsb->fsb.preview_string == NULL) {
1597 _DPSFPreviewString(fsb->fsb.context, fontName, size,
1599 } else _DPSFPreviewString(fsb->fsb.context, fontName, size,
1600 fsb->fsb.preview_string, height, &bogusFont);
1602 _FSBBogusFont(fsb, f);
1606 static void DoValueChangedCallback(FontSelectionBoxWidget fsb)
1611 if (fsb->fsb.get_afm) {
1612 if (fsb->fsb.currently_selected_face == NULL) afm = NULL;
1613 else afm = FindAFM((Widget) fsb,
1614 fsb->fsb.currently_selected_face->font_name);
1617 (void) Verify(fsb, &cb, afm, False);
1620 XtCallCallbackList((Widget) fsb, fsb->fsb.value_changed_callback, &cb);
1623 static void ValueChanged(FontSelectionBoxWidget fsb)
1625 if (fsb->fsb.auto_preview) DoPreview(fsb, False);
1626 DoValueChangedCallback(fsb);
1635 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1638 if (!fsb->fsb.preview_fixed) {
1641 XChangeWindowAttributes(XtDisplay(fsb),
1642 XtWindow(fsb->fsb.preview_child),
1644 fsb->fsb.preview_fixed = True;
1650 DoPreview(fsb, True);
1659 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1661 DoPreview(fsb, False);
1670 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1672 fsb->fsb.show_sampler = False;
1675 static void ShowSampler(FontSelectionBoxWidget fsb)
1681 if (fsb->fsb.sampler == NULL) {
1686 XtCallCallbackList((Widget) fsb, fsb->fsb.create_sampler_callback,
1690 fsb->fsb.sampler =
1693 (Widget) fsb, (ArgList) NULL, 0);
1695 XtSetArg(args[i], XtNfontSelectionBox, fsb); i++;
1697 fsb->fsb.sampler, args, i);
1699 DismissSamplerCallback, (XtPointer) fsb);
1701 fsb->fsb.sampler = cs.sampler_shell;
1703 DismissSamplerCallback, (XtPointer) fsb);
1706 XtPopup(fsb->fsb.sampler, XtGrabNone);
1707 XRaiseWindow(XtDisplay(fsb->fsb.sampler), XtWindow(fsb->fsb.sampler));
1708 fsb->fsb.show_sampler = True;
1711 static void ShowCreator(FontSelectionBoxWidget fsb)
1717 if (fsb->fsb.creator == NULL) {
1721 XtCallCallbackList((Widget) fsb, fsb->fsb.create_creator_callback,
1728 (Widget) fsb, (ArgList) NULL, 0);
1730 XtSetArg(args[i], XtNfontSelectionBox, fsb); i++;
1735 fsb->fsb.creator_shell = cc.creator_shell;
1736 fsb->fsb.creator = cc.creator;
1739 XtPopup(fsb->fsb.creator_shell, XtGrabNone);
1740 XRaiseWindow(XtDisplay(fsb->fsb.creator_shell),
1741 XtWindow(fsb->fsb.creator_shell));
1743 _FSBSetCreatorFamily(fsb->fsb.creator, fsb->fsb.currently_selected_family);
1752 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1754 ShowCreator(fsb);
1763 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1765 ShowSampler(fsb);
1774 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1776 DoPreview(fsb, False);
1787 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
1789 if (!XtIsRealized(widget) || fsb->fsb.gstate == 0) return;
1793 XDPSSetContextGState(fsb->fsb.context, fsb->fsb.gstate);
1795 XDPSSetContextParameters(fsb->fsb.context, XtScreen(widget), depth,
1801 _DPSFReclip(fsb->fsb.context);
1803 XDPSUpdateContextGState(fsb->fsb.context, fsb->fsb.gstate);
1811 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
1818 count = ListPSResourceFiles(fsb->fsb.resource_path_override,
1819 fsb->fsb.default_resource_path,
1850 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
1857 count = ListPSResourceFiles(fsb->fsb.resource_path_override,
1858 fsb->fsb.default_resource_path,
1885 FontSelectionBoxWidget fsb,
1893 if (fsb->fsb.current_family_multiple) {
1896 } else if (fsb->fsb.currently_selected_family == NULL) {
1900 cb->family = fsb->fsb.currently_selected_family->family_name;
1904 if (fsb->fsb.current_face_multiple) {
1907 } else if (fsb->fsb.currently_selected_face == NULL) {
1911 cb->face = fsb->fsb.currently_selected_face->face_name;
1919 } else if (fsb->fsb.currently_selected_face == NULL) {
1923 if (fsb->fsb.currently_selected_blend != NULL) {
1924 cb->name = fsb->fsb.currently_selected_blend->font_name;
1925 } else cb->name = fsb->fsb.currently_selected_face->font_name;
1929 if (fsb->fsb.current_size_multiple) {
1933 XtVaGetValues(fsb->fsb.size_text_field_child, XmNvalue, &chSize, NULL);
1948 if (fsb->fsb.currently_selected_blend == NULL) {
1952 cb->blend = fsb->fsb.currently_selected_blend->blend_name;
1953 cb->base_name = fsb->fsb.currently_selected_face->font_name;
1955 cb->axis_percent[i] = fsb->fsb.currently_selected_blend->data[i];
1959 if (doIt) XtCallCallbackList((Widget) fsb, fsb->fsb.validate_callback, cb);
1964 FontSelectionBoxWidget fsb,
1972 if (fsb->fsb.get_afm) {
1973 if (fsb->fsb.currently_selected_face == NULL) afm = NULL;
1974 else afm = FindAFM((Widget) fsb,
1975 fsb->fsb.currently_selected_face->font_name);
1978 DoPreview(fsb, False);
1981 if (!Verify(fsb, &cb, afm, True)) return False;
1983 fsb->fsb.font_family_multiple = fsb->fsb.current_family_multiple;
1984 if (!fsb->fsb.font_family_multiple &&
1985 fsb->fsb.currently_selected_family != NULL) {
1986 fsb->fsb.font_family =
1987 fsb->fsb.currently_selected_family->family_name;
1988 } else fsb->fsb.font_family = NULL;
1990 fsb->fsb.font_face_multiple = fsb->fsb.current_face_multiple;
1991 if (!fsb->fsb.font_face_multiple &&
1992 fsb->fsb.currently_selected_face != NULL) {
1993 fsb->fsb.font_face = fsb->fsb.currently_selected_face->face_name;
1994 } else fsb->fsb.font_face = NULL;
1996 fsb->fsb.font_name_multiple =
1997 fsb->fsb.font_family_multiple || fsb->fsb.font_face_multiple;
1998 if (!fsb->fsb.font_name_multiple &&
1999 fsb->fsb.currently_selected_face != NULL) {
2000 fsb->fsb.font_name = fsb->fsb.currently_selected_face->font_name;
2001 } else fsb->fsb.font_name = NULL;
2003 fsb->fsb.font_size_multiple = fsb->fsb.current_size_multiple;
2004 if (!fsb->fsb.font_size_multiple) {
2005 fsb->fsb.font_size = cb.size;
2008 if (fsb->fsb.currently_selected_blend != NULL) {
2009 fsb->fsb.font_blend = fsb->fsb.currently_selected_blend->blend_name;
2010 } else fsb->fsb.font_blend = NULL;
2012 if (fsb->fsb.undef_unused_fonts) {
2013 fsave = fsb->fsb.currently_previewed;
2014 if (fsb->fsb.make_fonts_shared) {
2015 fsb->fsb.currently_previewed = NULL;
2017 UndefUnusedFonts((Widget)fsb);
2018 fsb->fsb.currently_previewed = fsave;
2019 face = fsb->fsb.currently_selected_face;
2022 if (fsb->fsb.make_fonts_shared) {
2023 (void) DownloadFont(fsb, face->font_name,
2024 fsb->fsb.context, True);
2027 DPSWaitContext(fsb->fsb.context);
2032 XtCallCallbackList((Widget) fsb, callback, &cb);
2042 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2044 if (!VerifyAndCallback(fsb, FSBOK, fsb->fsb.ok_callback)) return;
2045 if (XtIsShell(XtParent(fsb))) XtPopdown(XtParent(fsb));
2046 WriteBlends(fsb);
2047 DesensitizeReset(fsb);
2048 if (fsb->fsb.show_sampler) XtPopdown(fsb->fsb.sampler);
2057 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2059 (void) VerifyAndCallback(fsb, FSBApply, fsb->fsb.apply_callback);
2060 WriteBlends(fsb);
2061 DesensitizeReset(fsb);
2065 FontSelectionBoxWidget fsb,
2071 fsb->fsb.currently_previewed = NULL;
2072 fsb->fsb.currently_previewed_size = fsb->fsb.currently_selected_size = 0.0;
2073 SetUpCurrentSelections(fsb);
2074 if (fsb->fsb.undef_unused_fonts) UndefUnusedFonts((Widget)fsb);
2077 if (fsb->fsb.font_family_multiple) {
2080 } else if (fsb->fsb.font_family == NULL) {
2084 cb.family = fsb->fsb.font_family;
2088 if (fsb->fsb.font_face_multiple) {
2091 } else if (fsb->fsb.font_face == NULL) {
2095 cb.face = fsb->fsb.font_face;
2103 } else if (fsb->fsb.font_face == NULL) {
2107 cb.name = fsb->fsb.font_name;
2111 if (fsb->fsb.font_size_multiple) {
2115 cb.size = fsb->fsb.font_size;
2122 cb.blend = fsb->fsb.font_blend;
2123 if (cb.blend == NULL || fsb->fsb.currently_selected_blend == NULL) {
2127 cb.base_name = fsb->fsb.currently_selected_face->font_name;
2129 cb.axis_percent[i] = fsb->fsb.currently_selected_blend->data[i];
2134 XtCallCallbackList((Widget) fsb, fsb->fsb.reset_callback, &cb);
2135 } else XtCallCallbackList((Widget) fsb, fsb->fsb.cancel_callback, &cb);
2144 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2146 ResetFSB(fsb, FSBReset);
2147 DesensitizeReset(fsb);
2156 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2158 ResetFSB(fsb, FSBCancel);
2159 if (XtIsShell(XtParent(fsb))) XtPopdown(XtParent(fsb));
2160 DesensitizeReset(fsb);
2161 if (fsb->fsb.show_sampler) XtPopdown(fsb->fsb.sampler);
2181 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2186 if (value == NULL) option = fsb->fsb.other_size;
2188 if (value[0] != '\0' && fsb->fsb.current_size_multiple) {
2189 fsb->fsb.current_size_multiple = False;
2190 UnmanageSizeMultiple(fsb);
2194 option = XtNameToWidget(fsb->fsb.size_menu, value);
2195 if (option == NULL) option = fsb->fsb.other_size;
2198 XtVaSetValues(fsb->fsb.size_option_menu_child,
2202 fsb->fsb.currently_selected_size = atof(value);
2203 } else fsb->fsb.currently_selected_size = 0.0;
2205 if (!changingSize) SensitizeReset(fsb);
2206 fsb->fsb.current_size_multiple = False;
2219 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2230 XtCallCallbacks(fsb->fsb.preview_button_child,
2268 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2270 if (fsb->fsb.current_size_multiple) {
2271 fsb->fsb.current_size_multiple = False;
2272 UnmanageSizeMultiple(fsb);
2279 XtVaSetValues(fsb->fsb.size_text_field_child, XmNvalue, buf, NULL);
2282 SensitizeReset(fsb);
2283 ValueChanged(fsb);
2387 static void WriteBlends(FontSelectionBoxWidget fsb)
2397 if (!fsb->fsb.blends_changed) return;
2411 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
2424 fsb->fsb.blends_changed = False;
2482 static void ReadBlends(FontSelectionBoxWidget fsb)
2519 for (ff = fsb->fsb.known_families;
2541 newb->CS_blend_name = CS(newb->blend_name, (Widget) fsb);
2546 newb->CS_space_blend_name = CS(spaceBlend, (Widget) fsb);
2564 FontSelectionBoxWidget fsb,
2579 if (multiple) ManageMultipleMaster(fsb);
2580 else UnmanageMultipleMaster(fsb);
2595 XtVaSetValues(fsb->fsb.face_scrolled_list_child,
2611 FontSelectionBoxWidget fsb,
2618 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
2627 if (f1 == fsb->fsb.currently_previewed) {
2643 if (f == fsb->fsb.currently_selected_face) {
2644 fsb->fsb.currently_selected_face = NULL;
2645 fsb->fsb.currently_selected_blend = NULL;
2648 if (previewedFamily) SetUpFaceList(fsb, ff);
2650 if (f == fsb->fsb.currently_previewed) {
2651 fsb->fsb.currently_previewed = NULL;
2652 fsb->fsb.currently_previewed_blend = NULL;
2653 ValueChanged(fsb);
2663 if (fsb->fsb.known_families == ff) {
2664 fsb->fsb.known_families = ff->next;
2666 for (ff1 = fsb->fsb.known_families;
2671 fsb->fsb.family_count--;
2673 if (ff == fsb->fsb.currently_selected_family) {
2674 fsb->fsb.currently_selected_family = NULL;
2677 DisplayFontFamilies(fsb);
2683 FontSelectionBoxWidget fsb,
2686 if (font == fsb->fsb.currently_previewed) _FSBBogusFont(fsb, font);
2687 else FlushFont(fsb, font);
2691 FontSelectionBoxWidget fsb,
2696 message = XmCreateInformationDialog((Widget) fsb, "invalidFontMessage",
2707 FlushFont(fsb, font);
2711 FontSelectionBoxWidget fsb,
2718 SetUpFaceList(fsb, fsb->fsb.currently_selected_family);
2720 f = fsb->fsb.currently_selected_family->fonts;
2723 if (f == fsb->fsb.currently_selected_face) {
2726 if (fsb->fsb.currently_selected_blend != NULL) {
2729 b != fsb->fsb.currently_selected_blend) {
2742 ListSelectPos(fsb->fsb.face_scrolled_list_child, i, False);
2743 if (redisplay) ValueChanged(fsb);
2744 fsb->fsb.blends_changed = True;
2945 FontSelectionBoxWidget fsb,
2961 if (fsb->fsb.currently_selected_face != NULL) {
2962 rec.current_face = fsb->fsb.currently_selected_face->face_name;
2963 } else rec.current_face = fsb->fsb.font_face;
2967 XtCallCallbackList((Widget) fsb, fsb->fsb.face_select_callback, &rec);
2984 ListSelectPos(fsb->fsb.face_scrolled_list_child, j+1, False);
2985 fsb->fsb.currently_selected_face = f;
2986 fsb->fsb.currently_selected_blend = NULL;
2996 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
2997 FontFamilyRec *ff = fsb->fsb.known_families;
3000 if (fsb->fsb.current_family_multiple) {
3001 fsb->fsb.current_family_multiple = False;
3002 UnmanageFamilyMultiple(fsb);
3008 fsb->fsb.currently_selected_family = ff;
3010 SensitizeReset(fsb);
3011 SetUpFaceList(fsb, ff);
3012 if (!fsb->fsb.current_face_multiple) GetInitialFace(fsb, ff);
3013 ValueChanged(fsb);
3023 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) clientData;
3028 if (fsb->fsb.currently_selected_family == NULL) return;
3029 f = fsb->fsb.currently_selected_family->fonts;
3031 if (fsb->fsb.current_face_multiple) {
3032 fsb->fsb.current_face_multiple = False;
3033 UnmanageFaceMultiple(fsb);
3050 fsb->fsb.currently_selected_face = f;
3051 fsb->fsb.currently_selected_blend = b;
3053 SensitizeReset(fsb);
3054 ValueChanged(fsb);
3058 FontSelectionBoxWidget fsb,
3071 XtVaGetValues(fsb->fsb.size_menu, XtNchildren, &children,
3077 sizes = (Widget *) XtMalloc((fsb->fsb.size_count+1) * sizeof(Widget));
3081 sizes = (Widget *) XtMalloc((fsb->fsb.size_count+1) * sizeof(Widget));
3082 fsb->fsb.other_size = sizes[0] =
3084 fsb->fsb.size_menu, args, i);
3087 for (j = 0; j < fsb->fsb.size_count; j++) {
3088 (void) sprintf(buf, "%g", fsb->fsb.sizes[j]);
3094 XmCreatePushButtonGadget(fsb->fsb.size_menu, buf, args, i);
3097 SetSize, (XtPointer) fsb);
3103 static void CreateChildren(FontSelectionBoxWidget fsb)
3110 fsb->fsb.pane_child =
3112 (Widget) fsb, args, i);
3115 fsb->fsb.preview_child =
3117 fsb->fsb.pane_child, args, i);
3118 XtAddCallback(fsb->fsb.preview_child, XmNexposeCallback,
3119 PreviewText, (XtPointer) fsb);
3120 XtAddCallback(fsb->fsb.preview_child, XmNresizeCallback,
3121 ResizePreview, (XtPointer) fsb);
3125 fsb->fsb.pane_child, args, i);
3126 fsb->fsb.panel_child = form;
3131 fsb->fsb.ok_button_child =
3134 XtAddCallback(fsb->fsb.ok_button_child, XmNactivateCallback,
3135 OKCallback, (XtPointer) fsb);
3139 XtSetArg(args[i], XmNleftWidget,fsb->fsb.ok_button_child ); i++;
3141 fsb->fsb.apply_button_child =
3144 XtAddCallback(fsb->fsb.apply_button_child, XmNactivateCallback,
3145 ApplyCallback, (XtPointer) fsb);
3149 XtSetArg(args[i], XmNleftWidget,fsb->fsb.apply_button_child ); i++;
3151 fsb->fsb.reset_button_child =
3154 XtAddCallback(fsb->fsb.reset_button_child, XmNactivateCallback,
3155 ResetCallback, (XtPointer) fsb);
3159 XtSetArg(args[i], XmNleftWidget,fsb->fsb.reset_button_child ); i++;
3161 fsb->fsb.cancel_button_child =
3164 XtAddCallback(fsb->fsb.cancel_button_child, XmNactivateCallback,
3165 CancelCallback, (XtPointer) fsb);
3171 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.ok_button_child); i++;
3172 fsb->fsb.separator_child =
3179 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.separator_child); i++;
3180 fsb->fsb.size_label_child =
3186 XtSetArg(args[i], XmNleftWidget, fsb->fsb.size_label_child); i++;
3188 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.size_label_child); i++;
3189 fsb->fsb.size_text_field_child =
3192 XtAddCallback(fsb->fsb.size_text_field_child, XmNvalueChangedCallback,
3193 SizeSelect, (XtPointer) fsb);
3194 XtAddCallback(fsb->fsb.size_text_field_child, XmNmodifyVerifyCallback,
3195 TextVerify, (XtPointer) fsb);
3198 fsb->fsb.size_menu = XmCreatePulldownMenu(form, "sizeMenu", args, i);
3200 CreateSizeMenu(fsb, False);
3204 XtSetArg(args[i], XmNleftWidget, fsb->fsb.size_text_field_child); i++;
3206 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.size_label_child); i++;
3207 XtSetArg(args[i], XmNsubMenuId, fsb->fsb.size_menu); i++;
3208 fsb->fsb.size_option_menu_child =
3210 XtManageChild(fsb->fsb.size_option_menu_child);
3214 XtSetArg(args[i], XmNleftWidget, fsb->fsb.size_option_menu_child); i++;
3216 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.separator_child); i++;
3217 fsb->fsb.size_multiple_label_child =
3224 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.size_label_child); i++;
3225 fsb->fsb.preview_button_child =
3228 XtAddCallback(fsb->fsb.preview_button_child, XmNactivateCallback,
3229 PreviewCallback, (XtPointer) fsb);
3233 XtSetArg(args[i], XmNrightWidget, fsb->fsb.preview_button_child); i++;
3235 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.preview_button_child); i++;
3236 fsb->fsb.sampler_button_child =
3239 if (fsb->fsb.show_sampler_button) {
3240 XtManageChild(fsb->fsb.sampler_button_child);
3242 XtAddCallback(fsb->fsb.sampler_button_child, XmNactivateCallback,
3243 ShowSamplerCallback, (XtPointer) fsb);
3250 fsb->fsb.family_label_child =
3259 fsb->fsb.face_label_child =
3267 XtSetArg(args[i], XmNtopWidget, fsb->fsb.family_label_child); i++;
3271 fsb->fsb.family_multiple_label_child =
3277 XtSetArg(args[i], XmNtopWidget, fsb->fsb.face_label_child); i++;
3281 fsb->fsb.face_multiple_label_child =
3288 fsb->fsb.family_scrolled_list_child =
3290 XtAddCallback(fsb->fsb.family_scrolled_list_child,
3291 XmNbrowseSelectionCallback, FamilySelect, (XtPointer) fsb);
3292 XtAddCallback(fsb->fsb.family_scrolled_list_child,
3294 PreviewDoubleClick, (XtPointer) fsb);
3298 XtSetArg(args[i], XmNtopWidget, fsb->fsb.family_label_child); i++;
3300 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.size_text_field_child); i++;
3304 XtSetValues(XtParent(fsb->fsb.family_scrolled_list_child), args, i);
3305 XtManageChild(fsb->fsb.family_scrolled_list_child);
3310 fsb->fsb.face_scrolled_list_child =
3312 XtAddCallback(fsb->fsb.face_scrolled_list_child,
3313 XmNbrowseSelectionCallback, FaceSelect, (XtPointer) fsb);
3314 XtAddCallback(fsb->fsb.face_scrolled_list_child,
3316 (XtPointer) fsb);
3320 XtSetArg(args[i], XmNtopWidget, fsb->fsb.face_label_child); i++;
3322 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.size_text_field_child); i++;
3326 XtSetValues(XtParent(fsb->fsb.face_scrolled_list_child), args, i);
3327 XtManageChild(fsb->fsb.face_scrolled_list_child);
3331 XtSetArg(args[i], XmNbottomWidget, fsb->fsb.size_text_field_child); i++;
3335 fsb->fsb.multiple_master_button_child =
3338 XtAddCallback(fsb->fsb.multiple_master_button_child, XmNactivateCallback,
3339 ShowCreatorCallback, (XtPointer) fsb);
3342 XtSetArg(args[i], XmNdefaultButton, fsb->fsb.ok_button_child); i++;
3346 static void DisplayFontFamilies(FontSelectionBoxWidget fsb)
3351 CSlist = (XmString *) XtMalloc(fsb->fsb.family_count * sizeof(XmString));
3353 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
3357 XtVaSetValues(fsb->fsb.family_scrolled_list_child,
3358 XmNitemCount, fsb->fsb.family_count,
3365 static void SetUpCurrentFontFromName(FontSelectionBoxWidget fsb)
3372 fsb->fsb.currently_selected_face = NULL;
3373 fsb->fsb.currently_selected_family = NULL;
3374 fsb->fsb.currently_selected_blend = NULL;
3376 if (fsb->fsb.font_name_multiple || fsb->fsb.font_name == NULL) {
3377 fsb->fsb.font_name = NULL;
3378 fsb->fsb.font_family = NULL;
3379 fsb->fsb.font_blend = NULL;
3380 fsb->fsb.font_face = NULL;
3381 if (fsb->fsb.font_name_multiple) {
3382 fsb->fsb.current_family_multiple = True;
3383 fsb->fsb.current_face_multiple = True;
3384 ManageFamilyMultiple(fsb);
3385 ManageFaceMultiple(fsb);
3387 XmListDeselectAllItems(fsb->fsb.family_scrolled_list_child);
3388 XmListDeselectAllItems(fsb->fsb.face_scrolled_list_child);
3389 XmListDeleteAllItems(fsb->fsb.face_scrolled_list_child);
3390 XmListAddItem(fsb->fsb.face_scrolled_list_child, CSempty, 1);
3394 if (!fsb->fsb.font_name_multiple) {
3395 fsb->fsb.current_family_multiple = False;
3396 fsb->fsb.current_face_multiple = False;
3397 UnmanageFamilyMultiple(fsb);
3398 UnmanageFaceMultiple(fsb);
3401 fsb->fsb.font_name = Canonical(fsb->fsb.font_name);
3403 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
3406 if (f->font_name == fsb->fsb.font_name) {
3407 fsb->fsb.font_family = ff->family_name;
3408 fsb->fsb.font_face = f->face_name;
3409 SetUpFaceList(fsb, ff);
3410 ListSelectPos(fsb->fsb.family_scrolled_list_child, i, False);
3411 ListSelectPos(fsb->fsb.face_scrolled_list_child, j, False);
3412 fsb->fsb.currently_selected_face = f;
3413 fsb->fsb.currently_selected_family = ff;
3414 fsb->fsb.currently_selected_blend = NULL;
3420 if (b->font_name == fsb->fsb.font_name) {
3421 fsb->fsb.font_family = ff->family_name;
3422 fsb->fsb.font_face = f->face_name;
3423 SetUpFaceList(fsb, ff);
3424 ListSelectPos(fsb->fsb.family_scrolled_list_child, i,
3426 ListSelectPos(fsb->fsb.face_scrolled_list_child, j,
3428 fsb->fsb.currently_selected_face = f;
3429 fsb->fsb.currently_selected_family = ff;
3430 fsb->fsb.currently_selected_blend = b;
3442 fsb->fsb.font_name = NULL;
3443 fsb->fsb.font_family = NULL;
3444 fsb->fsb.font_face = NULL;
3445 fsb->fsb.font_blend = NULL;
3446 XmListDeselectAllItems(fsb->fsb.family_scrolled_list_child);
3447 XmListDeselectAllItems(fsb->fsb.face_scrolled_list_child);
3448 XmListDeleteAllItems(fsb->fsb.face_scrolled_list_child);
3449 XmListAddItem(fsb->fsb.face_scrolled_list_child, CSempty, 1);
3452 static void SetUpCurrentFontFromFamilyFace(FontSelectionBoxWidget fsb)
3459 fsb->fsb.currently_selected_face = NULL;
3460 fsb->fsb.currently_selected_family = NULL;
3461 fsb->fsb.currently_selected_blend = NULL;
3463 if (fsb->fsb.font_family_multiple) {
3464 fsb->fsb.font_family = NULL;
3465 fsb->fsb.current_family_multiple = True;
3466 ManageFamilyMultiple(fsb);
3468 fsb->fsb.current_family_multiple = False;
3469 UnmanageFamilyMultiple(fsb);
3472 if (fsb->fsb.font_face_multiple) {
3473 fsb->fsb.font_face = NULL;
3474 fsb->fsb.current_face_multiple = True;
3475 ManageFaceMultiple(fsb);
3477 fsb->fsb.current_face_multiple = False;
3478 UnmanageFaceMultiple(fsb);
3481 fsb->fsb.font_name_multiple =
3482 fsb->fsb.font_family_multiple || fsb->fsb.font_face_multiple;
3484 if (fsb->fsb.font_family != NULL) {
3485 fsb->fsb.font_family = Canonical(fsb->fsb.font_family);
3487 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
3488 if (fsb->fsb.font_family == ff->family_name) {
3489 ListSelectPos(fsb->fsb.family_scrolled_list_child, i, False);
3490 fsb->fsb.currently_selected_family = ff;
3491 SetUpFaceList(fsb, ff);
3496 if (ff == NULL) fsb->fsb.font_family = NULL;
3499 if (fsb->fsb.font_family == NULL) {
3500 fsb->fsb.font_face = NULL;
3501 fsb->fsb.font_blend = NULL;
3502 fsb->fsb.font_name = NULL;
3503 XmListDeselectAllItems(fsb->fsb.family_scrolled_list_child);
3504 XmListDeselectAllItems(fsb->fsb.face_scrolled_list_child);
3505 XmListDeleteAllItems(fsb->fsb.face_scrolled_list_child);
3506 XmListAddItem(fsb->fsb.face_scrolled_list_child, CSempty, 1);
3510 if (fsb->fsb.font_face != NULL) {
3511 fsb->fsb.font_face = Canonical(fsb->fsb.font_face);
3515 if (fsb->fsb.font_face == f->face_name) {
3516 fsb->fsb.currently_selected_face = f;
3517 if (fsb->fsb.font_blend != NULL) {
3518 fsb->fsb.font_blend = Canonical(fsb->fsb.font_blend);
3521 if (b->blend_name == fsb->fsb.font_blend) {
3522 fsb->fsb.currently_selected_blend = b;
3527 fsb->fsb.font_blend = NULL;
3531 ListSelectPos(fsb->fsb.face_scrolled_list_child, i, False);
3536 if (f == NULL) fsb->fsb.font_face = NULL;
3539 XmListDeselectAllItems(fsb->fsb.face_scrolled_list_child);
3542 if (f == NULL && !fsb->fsb.font_face_multiple) GetInitialFace(fsb, ff);
3545 static void SetUpCurrentFont(FontSelectionBoxWidget fsb)
3547 if (fsb->fsb.use_font_name) SetUpCurrentFontFromName(fsb);
3548 else SetUpCurrentFontFromFamilyFace(fsb);
3551 static void SetUpCurrentSize(FontSelectionBoxWidget fsb)
3555 if (fsb->fsb.font_size_multiple) {
3557 XtVaSetValues(fsb->fsb.size_text_field_child, XmNvalue, "", NULL);
3559 fsb->fsb.current_size_multiple = True;
3560 ManageSizeMultiple(fsb);
3562 } else UnmanageSizeMultiple(fsb);
3564 if (fsb->fsb.currently_selected_size == 0.0) {
3565 sprintf(buf, "%g", fsb->fsb.font_size);
3566 } else sprintf(buf, "%g", fsb->fsb.currently_selected_size);
3569 XtVaSetValues(fsb->fsb.size_text_field_child, XmNvalue, buf, NULL);
3573 static void SetUpCurrentSelections(FontSelectionBoxWidget fsb)
3575 SetUpCurrentFont(fsb);
3576 SetUpCurrentSize(fsb);
3577 if (fsb->fsb.preview_on_change) DoPreview(fsb, False);
3578 DoValueChangedCallback(fsb);
3588 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) new;
3594 if (fsb->fsb.size_count > 0 && fsb->fsb.sizes == NULL) {
3600 fsb->fsb.size_count = 0;
3603 if (fsb->fsb.size_count < 0) {
3609 fsb->fsb.size_count = 0;
3612 if (fsb->fsb.max_pending_deletes <= 0) {
3618 fsb->fsb.max_pending_deletes = 1;
3623 if (fsb->fsb.preview_string != NULL) {
3624 fsb->fsb.preview_string = XtNewString(fsb->fsb.preview_string);
3626 if (fsb->fsb.default_resource_path != NULL) {
3627 fsb->fsb.default_resource_path =
3628 XtNewString(fsb->fsb.default_resource_path);
3630 if (fsb->fsb.resource_path_override != NULL) {
3631 fsb->fsb.resource_path_override =
3632 XtNewString(fsb->fsb.resource_path_override);
3637 if (fsb->fsb.context == NULL) {
3638 fsb->fsb.context = XDPSGetSharedContext(XtDisplay(fsb));
3641 if (_XDPSTestComponentInitialized(fsb->fsb.context,
3644 XDPSRegisterContext(fsb->fsb.context, False);
3648 (void) _XDPSSetComponentInitialized(fsb->fsb.context,
3650 _DPSFDefineFontEnumFunctions(fsb->fsb.context);
3653 DPSversion(fsb->fsb.context, 20, version);
3654 fsb->fsb.old_server = (atof(version) < 1007);
3658 fsb->fsb.gstate = 0;
3659 fsb->fsb.sampler = fsb->fsb.creator = NULL;
3660 fsb->fsb.known_families = NULL;
3661 fsb->fsb.family_count = 0;
3662 fsb->fsb.currently_previewed = NULL;
3663 fsb->fsb.currently_selected_face = NULL;
3664 fsb->fsb.currently_selected_family = NULL;
3665 fsb->fsb.currently_previewed_blend = NULL;
3666 fsb->fsb.currently_selected_blend = NULL;
3667 fsb->fsb.currently_previewed_size = 0.0;
3668 fsb->fsb.currently_selected_size = 0.0;
3669 fsb->fsb.pending_delete_count = 0;
3670 fsb->fsb.pending_delete_font = NULL;
3671 fsb->fsb.preview_fixed = False;
3672 fsb->fsb.current_family_multiple = False;
3673 fsb->fsb.current_face_multiple = False;
3674 fsb->fsb.current_size_multiple = False;
3675 fsb->fsb.blends_changed = False;
3677 GetFontNames(fsb);
3678 CreateChildren(fsb);
3680 DisplayFontFamilies(fsb);
3681 SetUpCurrentSelections(fsb);
3682 DesensitizeReset(fsb);
3683 if (fsb->fsb.show_sampler) ShowSampler(fsb);
3706 FontSelectionBoxWidget fsb)
3715 for (ff = fsb->fsb.known_families; ff != NULL; ff = next_ff) {
3724 fsb->fsb.known_families = NULL;
3729 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) widget;
3733 if (fsb->fsb.gstate != 0) XDPSFreeContextGState(fsb->fsb.context,
3734 fsb->fsb.gstate);
3735 if (fsb->fsb.preview_string != NULL) XtFree(fsb->fsb.preview_string);
3736 if (fsb->fsb.default_resource_path != NULL) {
3737 XtFree(fsb->fsb.default_resource_path);
3739 if (fsb->fsb.resource_path_override != NULL) {
3740 XtFree(fsb->fsb.resource_path_override);
3743 FreeFontLists(fsb);
3748 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) widget;
3750 XtResizeWidget(fsb->fsb.pane_child, fsb->core.width, fsb->core.height, 0);
3765 #define NE(field) newfsb->fsb.field != oldfsb->fsb.field
3767 if (NE(field)) newfsb->fsb.field = oldfsb->fsb.field;
3791 if (newfsb->fsb.size_count > 0 && newfsb->fsb.sizes == NULL) {
3797 newfsb->fsb.size_count = 0;
3800 if (newfsb->fsb.size_count < 0) {
3806 newfsb->fsb.size_count = 0;
3809 if (newfsb->fsb.max_pending_deletes <= 0) {
3815 newfsb->fsb.max_pending_deletes = 1;
3819 XtFree(oldfsb->fsb.preview_string);
3820 newfsb->fsb.preview_string = XtNewString(newfsb->fsb.preview_string);
3825 XtFree(oldfsb->fsb.default_resource_path);
3826 newfsb->fsb.default_resource_path =
3827 XtNewString(newfsb->fsb.default_resource_path);
3832 XtFree(oldfsb->fsb.resource_path_override);
3833 newfsb->fsb.resource_path_override =
3834 XtNewString(newfsb->fsb.resource_path_override);
3838 if (newfsb->fsb.undef_unused_fonts) UndefSomeUnusedFonts(newfsb, False);
3841 if (newfsb->fsb.context == NULL) {
3842 newfsb->fsb.context = XDPSGetSharedContext(XtDisplay(newfsb));
3844 if (_XDPSTestComponentInitialized(newfsb->fsb.context,
3847 XDPSRegisterContext(newfsb->fsb.context, False);
3850 (void) _XDPSSetComponentInitialized(newfsb->fsb.context,
3852 _DPSFDefineFontEnumFunctions(newfsb->fsb.context);
3858 newfsb->fsb.pending_delete_font = NULL;
3859 newfsb->fsb.pending_delete_count = 0;
3872 if (newfsb->fsb.show_sampler) ShowSampler(newfsb);
3873 else XtPopdown(newfsb->fsb.sampler);
3877 if (newfsb->fsb.show_sampler_button) {
3878 XtManageChild(newfsb->fsb.sampler_button_child);
3879 } else XtUnmanageChild(newfsb->fsb.sampler_button_child);
3882 if (NE(font_size)) newfsb->fsb.currently_selected_size = 0.0;
3890 else if (do_preview && newfsb->fsb.preview_on_change) {
3895 XtIsSensitive(newfsb->fsb.reset_button_child)) {
3897 if ((newfsb->fsb.font_size_multiple ||
3898 newfsb->fsb.font_size == newfsb->fsb.currently_selected_size) &&
3899 (newfsb->fsb.font_name_multiple ||
3900 newfsb->fsb.currently_selected_face == NULL ||
3901 newfsb->fsb.font_name ==
3902 newfsb->fsb.currently_selected_face->font_name)) {
3935 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
3937 w->core.width = fsb->composite.children[0]->core.width;
3938 w->core.height = fsb->composite.children[0]->core.height;
4020 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4022 UndefUnusedFonts((Widget)fsb);
4023 fsb->fsb.pending_delete_font = NULL;
4024 fsb->fsb.pending_delete_count = 0;
4025 FreeFontLists(fsb);
4027 GetFontNames(fsb);
4028 DisplayFontFamilies(fsb);
4029 SetUpCurrentSelections(fsb);
4046 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4050 *count = fsb->fsb.family_count;
4053 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4075 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4081 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4125 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4131 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4134 if (!fsb->fsb.get_server_fonts) {
4136 _DPSFIsFontResident(fsb->fsb.context, f->font_name,
4142 ret = DownloadFont(fsb, name, fsb->fsb.context,
4143 fsb->fsb.make_fonts_shared);
4144 if (fsb->fsb.make_fonts_shared && ret) f->resident = True;
4151 return DownloadFont(fsb, name, fsb->fsb.context,
4152 fsb->fsb.make_fonts_shared);
4171 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4181 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4221 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4227 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4280 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4286 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4368 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4371 _DPSFGetTextDimensions(fsb->fsb.context, text, font, size, x, y,
4455 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4464 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4518 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4529 if (fsb->fsb.currently_selected_face->font_name == name) {
4530 bd = fsb->fsb.currently_selected_face->blend_data;
4533 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4615 FontSelectionBoxWidget fsb = (FontSelectionBoxWidget) w;
4628 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4665 newb->CS_blend_name = CS(blend_name, (Widget) fsb);
4670 newb->CS_space_blend_name = CS(spaceBlend, (Widget) fsb);
4694 if (b == fsb->fsb.currently_previewed_blend) DoPreview(fsb, False);
4715 if (f->in_font_creator) _FSBSetCreatorFamily(fsb->fsb.creator, ff);
4716 if (ff == fsb->fsb.currently_selected_family) SetUpFaceList(fsb, ff);
4717 fsb->fsb.blends_changed = True;
4718 WriteBlends(fsb);
4738 FontSelectionBoxWidget fsb,
4746 fsb->fsb.current_family_multiple = False;
4747 fsb->fsb.current_face_multiple = False;
4748 UnmanageFamilyMultiple(fsb);
4749 UnmanageFaceMultiple(fsb);
4753 for (ff = fsb->fsb.known_families; ff != NULL; ff = ff->next) {
4775 SetUpFaceList(fsb, ff);
4776 ListSelectPos(fsb->fsb.family_scrolled_list_child, i, False);
4777 ListSelectPos(fsb->fsb.face_scrolled_list_child, j, False);
4778 fsb->fsb.currently_selected_face = f;
4779 fsb->fsb.currently_selected_family = ff;
4780 fsb->fsb.currently_selected_blend = b;
4781 SensitizeReset(fsb);
4782 DoPreview(fsb, False);