824N/A/*
824N/A * FontSB.h
824N/A *
824N/A * (c) Copyright 1991-1994 Adobe Systems Incorporated.
824N/A * All rights reserved.
824N/A *
824N/A * Permission to use, copy, modify, distribute, and sublicense this software
824N/A * and its documentation for any purpose and without fee is hereby granted,
824N/A * provided that the above copyright notices appear in all copies and that
824N/A * both those copyright notices and this permission notice appear in
824N/A * supporting documentation and that the name of Adobe Systems Incorporated
824N/A * not be used in advertising or publicity pertaining to distribution of the
824N/A * software without specific, written prior permission. No trademark license
824N/A * to use the Adobe trademarks is hereby granted. If the Adobe trademark
824N/A * "Display PostScript"(tm) is used to describe this software, its
824N/A * functionality or for any other purpose, such use shall be limited to a
824N/A * statement that this software works in conjunction with the Display
824N/A * PostScript system. Proper trademark attribution to reflect Adobe's
824N/A * ownership of the trademark shall be given whenever any such reference to
824N/A * the Display PostScript system is made.
824N/A *
824N/A * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
824N/A * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
824N/A * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
824N/A * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
824N/A * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
824N/A * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
824N/A * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
824N/A * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
824N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
824N/A * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
824N/A *
824N/A * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
824N/A * Incorporated which may be registered in certain jurisdictions
824N/A *
824N/A * Author: Adobe Systems Incorporated
824N/A */
824N/A/* $XFree86$ */
824N/A
824N/A#ifndef _FontSelectionBox_h
824N/A#define _FontSelectionBox_h
824N/A
824N/A/* New resouce names and classes */
824N/A
824N/A#define XtNcontext "context"
824N/A#define XtCContext "Context"
824N/A#define XtNpreviewString "previewString"
824N/A#define XtCPreviewString "PreviewString"
824N/A#define XtNsizes "sizes"
824N/A#define XtCSizes "Sizes"
824N/A#define XtNsizeCount "sizeCount"
824N/A#define XtCSizeCount "SizeCount"
824N/A#define XtNdefaultResourcePath "defaultResourcePath"
824N/A#define XtCDefaultResourcePath "DefaultResourcePath"
824N/A#define XtNresourcePathOverride "resourcePathOverride"
824N/A#define XtCResourcePathOverride "ResourcePathOverride"
824N/A#define XtNuseFontName "useFontName"
824N/A#define XtCUseFontName "UseFontName"
824N/A#define XtNfontName "fontName"
824N/A#define XtCFontName "FontName"
824N/A#define XtNfontFamily "fontFamily"
824N/A#define XtCFontFamily "FontFamily"
824N/A#define XtNfontFace "fontFace"
824N/A#define XtCFontFace "FontFace"
824N/A#define XtNfontSize "fontSize"
824N/A#define XtCFontSize "FontSize"
824N/A#define XtNfontBlend "fontBlend"
824N/A#define XtCFontBlend "FontBlend"
824N/A#define XtNfontNameMultiple "fontNameMultiple"
824N/A#define XtCFontNameMultiple "FontNameMultiple"
824N/A#define XtNfontFamilyMultiple "fontFamilyMultiple"
824N/A#define XtCFontFamilyMultiple "FontFamilyMultiple"
824N/A#define XtNfontFaceMultiple "fontFaceMultiple"
824N/A#define XtCFontFaceMultiple "FontFaceMultiple"
824N/A#define XtNfontSizeMultiple "fontSizeMultiple"
824N/A#define XtCFontSizeMultiple "FontSizeMultiple"
824N/A#define XtNgetServerFonts "getServerFonts"
824N/A#define XtCGetServerFonts "GetServerFonts"
824N/A#define XtNgetAFM "getAFM"
824N/A#define XtCGetAFM "GetAFM"
824N/A#define XtNautoPreview "autoPreview"
824N/A#define XtCAutoPreview "AutoPreview"
824N/A#define XtNpreviewOnChange "previewOnChange"
824N/A#define XtCPreviewOnChange "PreviewOnChange"
824N/A#define XtNundefUnusedFonts "undefUnusedFonts"
824N/A#define XtCUndefUnusedFonts "UndefUnusedFonts"
824N/A#define XtNmaxPendingDeletes "maxPendingDeletes"
824N/A#define XtCMaxPendingDeletes "MaxPendingDeletes"
824N/A#define XtNmakeFontsShared "makeFontsShared"
824N/A#define XtCMakeFontsShared "MakeFontsShared"
824N/A#define XtNshowSampler "showSampler"
824N/A#define XtCShowSampler "ShowSampler"
824N/A#define XtNshowSamplerButton "showSamplerButton"
824N/A#define XtCShowSamplerButton "ShowSamplerButton"
824N/A#define XtNtypographicSort "typographicSort"
824N/A#define XtCTypographicSort "TypographicSort"
824N/A#define XtNokCallback "okCallback"
824N/A#define XtNapplyCallback "applyCallback"
824N/A#define XtNresetCallback "resetCallback"
824N/A#ifndef XtNcancelCallback
824N/A#define XtNcancelCallback "cancelCallback"
824N/A#endif
824N/A#define XtNvalidateCallback "validateCallback"
824N/A#define XtNfaceSelectCallback "faceSelectCallback"
824N/A#define XtNvalueChangedCallback "valueChangedCallback"
824N/A#define XtNcreateSamplerCallback "createSamplerCallback"
824N/A#define XtNcreateCreatorCallback "createCreatorCallback"
824N/A
824N/A/* Read-only resources for all the subwidgets */
824N/A
824N/A#define XtNpaneChild "paneChild"
824N/A#define XtNpreviewChild "previewChild"
824N/A#define XtNpanelChild "panelChild"
824N/A#define XtNfamilyLabelChild "familyLabelChild"
824N/A#define XtNfamilyMultipleLabelChild "familyMultipleLabelChild"
824N/A#define XtNfamilyScrolledListChild "familyScrolledListChild"
824N/A#define XtNfaceLabelChild "faceLabelChild"
824N/A#define XtNfaceMultipleLabelChild "faceMultipleLabelChild"
824N/A#define XtNfaceScrolledListChild "faceScrolledListChild"
824N/A#define XtNsizeLabelChild "sizeLabelChild"
824N/A#define XtNsizeTextFieldChild "sizeTextFieldChild"
824N/A#define XtNsizeOptionMenuChild "sizeOptionMenuChild"
824N/A#define XtNsizeMultipleLabelChild "sizeMultipleLabelChild"
824N/A#define XtNsamplerButtonChild "samplerButtonChild"
824N/A#define XtNpreviewButtonChild "previewButtonChild"
824N/A#define XtNseparatorChild "separatorChild"
824N/A#define XtNokButtonChild "okButtonChild"
824N/A#define XtNapplyButtonChild "applyButtonChild"
824N/A#define XtNresetButtonChild "resetButtonChild"
824N/A#define XtNcancelButtonChild "cancelButtonChild"
824N/A#define XtNmultipleMasterButtonChild "multipleMasterButtonChild"
824N/A
824N/A/* New resource types */
824N/A
824N/A#define XtRFloatList "FloatList"
824N/A#define XtRDPSContext "DPSContext"
824N/A
824N/A/* Class record constants */
824N/A
824N/Aextern WidgetClass fontSelectionBoxWidgetClass;
824N/A
824N/Atypedef struct _FontSelectionBoxRec *FontSelectionBoxWidget;
824N/A
824N/Atypedef enum {FSBNone, FSBOne, FSBMultiple} FSBSelectionType;
824N/Atypedef enum {FSBOK, FSBApply, FSBReset, FSBCancel,
824N/A FSBValueChanged} FSBCallbackReason;
824N/A
824N/Atypedef struct {
824N/A FSBCallbackReason reason;
824N/A String family;
824N/A String face;
824N/A float size;
824N/A String name;
824N/A String afm_filename;
824N/A FSBSelectionType family_selection;
824N/A FSBSelectionType face_selection;
824N/A FSBSelectionType size_selection;
824N/A FSBSelectionType name_selection;
824N/A Boolean afm_present;
824N/A Boolean unused;
824N/A String blend;
824N/A String base_name;
824N/A float axis_percent[4];
824N/A} FSBCallbackRec;
824N/A
824N/Atypedef struct {
824N/A FSBCallbackReason reason;
824N/A String family;
824N/A String face;
824N/A float size;
824N/A String name;
824N/A String afm_filename;
824N/A FSBSelectionType family_selection;
824N/A FSBSelectionType face_selection;
824N/A FSBSelectionType size_selection;
824N/A FSBSelectionType name_selection;
824N/A Boolean afm_present;
824N/A Boolean doit;
824N/A String blend;
824N/A String base_name;
824N/A float axis_percent[4];
824N/A} FSBValidateCallbackRec;
824N/A
824N/Atypedef struct {
824N/A String *available_faces;
824N/A int num_available_faces;
824N/A String current_face;
824N/A String new_face;
824N/A} FSBFaceSelectCallbackRec;
824N/A
824N/Atypedef struct {
824N/A Widget sampler;
824N/A Widget sampler_shell;
824N/A} FSBCreateSamplerCallbackRec;
824N/A
824N/Atypedef struct {
824N/A Widget creator;
824N/A Widget creator_shell;
824N/A} FSBCreateCreatorCallbackRec;
824N/A
824N/Atypedef enum {FSBAddBlend, FSBReplaceBlend, FSBDeleteBlend} FSBBlendAction;
824N/A
824N/A/* Convenience and info routines */
824N/A
824N/A#if defined(__cplusplus) || defined(c_plusplus)
824N/Aextern "C" {
824N/A#endif
824N/A
824N/A/* Note use of Bool and double in prototypes: this makes the library
824N/A work correctly when linked with no-prototype compiled objects */
824N/A
824N/Aextern void FSBSetFontName(Widget w,
824N/A String font_name,
824N/A Bool font_name_multiple);
824N/A
824N/Aextern void FSBSetFontFamilyFace(Widget w,
824N/A String font_family, String font_face,
824N/A Bool font_family_multiple,
824N/A Bool font_face_multiple);
824N/A
824N/Aextern void FSBSetFontSize(Widget w, double font_size,
824N/A Bool font_size_multiple);
824N/A
824N/Aextern void FSBRefreshFontList(Widget w);
824N/A
824N/Aextern void FSBGetFamilyList(Widget w, int *count_return,
824N/A String **family_return);
824N/A
824N/Aextern void FSBGetFaceList(Widget w, String family, int *count_return,
824N/A String **face_return, String **font_return);
824N/A
824N/Aextern void FSBUndefineUnusedFonts(Widget w);
824N/A
824N/Aextern Boolean FSBDownloadFontName(Widget w, String font_name);
824N/A
824N/Aextern Boolean FSBMatchFontFace(Widget w, String old_face, String new_family,
824N/A String *new_face);
824N/A
824N/Aextern void FSBFontNameToFamilyFace(Widget w, String font_name,
824N/A String *family, String *face);
824N/A
824N/Aextern void FSBFontFamilyFaceToName(Widget w, String family, String face,
824N/A String *font_name);
824N/A
824N/Aextern String FSBFindAFM(Widget w, String font_name);
824N/A
824N/Aextern String FSBFindFontFile(Widget w, String font_name);
824N/A
824N/Aextern void FSBGetTextDimensions(Widget w, String text, String font,
824N/A double size, double x, double y,
824N/A float *dx, float *dy,
824N/A float *left, float *right,
824N/A float *top, float *bottom);
824N/A
824N/Aextern void FSBSetFontFamilyFaceBlend(Widget w, String family, String face,
824N/A String blend, Bool family_multiple,
824N/A Bool face_multiple);
824N/A
824N/Aextern void FSBFontNameToFamilyFaceBlend(Widget w, String font_name,
824N/A String *family, String *face,
824N/A String *blend);
824N/A
824N/Aextern void FSBFontFamilyFaceBlendToName(Widget w, String family, String face,
824N/A String blend, String *font_name);
824N/A
824N/Aextern void FSBGetBlendList(Widget w, String font_name, int *count_return,
824N/A String **blend_return, String **font_name_return,
824N/A float **axis_values_return);
824N/A
824N/Aextern void FSBGetBlendInfo(Widget w, String name, int *num_axes_return,
824N/A int *num_designs_return,
824N/A String **axis_names_return,
824N/A float **blend_positions_return,
824N/A int **blend_map_count_return,
824N/A int **blend_design_coords_return,
824N/A float **blend_normalized_coords_return);
824N/A
824N/Aextern Boolean FSBChangeBlends(Widget w, String base_name, String blend_name,
824N/A FSBBlendAction action, int *axis_values,
824N/A float *axis_percents);
824N/A
824N/A#if defined(__cplusplus) || defined(c_plusplus)
824N/A}
824N/A#endif
824N/A
824N/A#endif /* _FontSelectionBox_h */
824N/A/* DON'T ADD ANYTHING AFTER THIS #endif */