#ifndef _FontSelectionBoxP_H
#define _FontSelectionBoxP_H
#include <DPS/FontSB.h>
#define MAX_AXES 4
#define MAX_BLENDS 16
typedef struct _BlendRec {
char *blend_name;
char *font_name;
XmString CS_blend_name;
XmString CS_space_blend_name;
float data[MAX_AXES];
struct _BlendRec *next;
} BlendRec;
typedef struct {
int num_axes, num_designs;
int min[MAX_AXES], max[MAX_AXES];
String name[MAX_AXES];
int internal_points[MAX_AXES];
int *internal_break[MAX_AXES];
float *internal_value[MAX_AXES];
float *design_positions;
BlendRec *blends;
} BlendDataRec;
typedef struct _FontRec {
char *font_name;
char *face_name;
XmString CS_face_name;
char *full_name;
Boolean resident;
Boolean temp_resident;
struct _FontRec *pending_delete_next;
struct _FontRec *next;
int blend_count;
Boolean in_font_creator;
BlendDataRec *blend_data;
} FontRec;
typedef struct _FontFamilyRec {
char *family_name;
char *sort_key;
FontRec *fonts;
int font_count;
struct _FontFamilyRec *next;
int blend_count;
} FontFamilyRec;
typedef struct {
DPSContext context;
String preview_string;
float *sizes;
int size_count;
String default_resource_path;
String resource_path_override;
String font_name;
String font_family;
String font_face;
float font_size;
Boolean use_font_name;
Boolean font_name_multiple;
Boolean font_family_multiple;
Boolean font_face_multiple;
Boolean font_size_multiple;
Boolean get_server_fonts;
Boolean get_afm;
Boolean auto_preview;
Boolean preview_on_change;
Boolean undef_unused_fonts;
Boolean make_fonts_shared;
Boolean show_sampler;
Boolean show_sampler_button;
Cardinal max_pending_deletes;
XtCallbackList ok_callback;
XtCallbackList apply_callback;
XtCallbackList reset_callback;
XtCallbackList cancel_callback;
XtCallbackList validate_callback;
XtCallbackList face_select_callback;
XtCallbackList create_sampler_callback;
Widget pane_child;
Widget preview_child;
Widget panel_child;
Widget family_label_child;
Widget family_multiple_label_child;
Widget family_scrolled_list_child;
Widget face_label_child;
Widget face_multiple_label_child;
Widget face_scrolled_list_child;
Widget size_label_child;
Widget size_text_field_child;
Widget size_option_menu_child;
Widget size_multiple_label_child;
Widget sampler_button_child;
Widget preview_button_child;
Widget separator_child;
Widget ok_button_child;
Widget apply_button_child;
Widget reset_button_child;
Widget cancel_button_child;
DPSGState gstate;
Widget other_size;
Widget size_menu;
Widget sampler;
FontFamilyRec *known_families;
int family_count;
Boolean preview_fixed;
Boolean current_family_multiple, current_face_multiple;
Boolean current_size_multiple;
FontRec *pending_delete_font;
int pending_delete_count;
FontRec *currently_previewed;
FontRec *currently_selected_face;
FontFamilyRec *currently_selected_family;
float currently_previewed_size;
float currently_selected_size;
String font_blend;
Boolean typographic_sort;
XtCallbackList create_creator_callback;
XtCallbackList value_changed_callback;
Widget multiple_master_button_child;
Widget creator, creator_shell;
BlendRec *currently_previewed_blend;
BlendRec *currently_selected_blend;
Boolean blends_changed;
Boolean old_server;
} FontSelectionBoxPart;
typedef struct _FontSelectionBoxRec {
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
FontSelectionBoxPart fsb;
} FontSelectionBoxRec;
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef void (*FSBSetFontNameProc) (Widget w,
String font_name,
Bool font_name_multiple);
typedef void (*FSBSetFontFamilyFaceProc) (Widget w,
String font_family,
String font_face,
Bool font_family_multiple,
Bool font_face_multiple);
typedef void (*FSBSetFontSizeProc) (Widget w,
double font_size,
Bool font_size_multiple);
typedef void (*FSBRefreshFontListProc) (Widget w);
typedef void (*FSBGetFamilyListProc) (Widget w, int *count_return,
String **family_return);
typedef void (*FSBGetFaceListProc) (Widget w, String family, int *count_return,
String **face_return,
String **font_return);
typedef void (*FSBUndefUnusedFontsProc) (Widget w);
typedef Boolean (*FSBDownloadFontNameProc) (Widget w, String font_name);
typedef Boolean (*FSBMatchFontFaceProc) (Widget w, String old_face,
String new_family, String *new_face);
typedef void (*FSBFontNameToFamilyFaceProc) (Widget w, String font_name,
String *family, String *face);
typedef void (*FSBFontFamilyFaceToNameProc) (Widget w, String family,
String face, String *font_name);
typedef String (*FSBFindAFMProc) (Widget w, String font_name);
typedef String (*FSBFindFontFileProc) (Widget w, String font_name);
typedef void (*FSBGetTextDimensionsProc) (Widget w, String text, String font,
double size, double x, double y,
float *dx, float *dy,
float *left, float *right,
float *top, float *bottom);
typedef void (*FSBSetFontFamilyFaceBlendProc) (Widget w,
String font_family,
String font_face,
String font_blend,
Bool font_family_multiple,
Bool font_face_multiple);
typedef void (*FSBFontNameToFamilyFaceBlendProc) (Widget w, String font_name,
String *family, String *face,
String *blend);
typedef void (*FSBFontFamilyFaceBlendToNameProc) (Widget w, String family,
String face, String blend,
String *font_name);
typedef void (*FSBGetBlendListProc) (Widget w, String name,
int *count_return, String **blend_return,
String **font_name_return,
float **axis_values_return);
typedef void (*FSBGetBlendInfoProc) (Widget w, String name,
int *num_axes_return,
int *num_designs_return,
String **axis_names_return,
float **blend_positions_return,
int **blend_map_count_return,
int **blend_design_coords_return,
float **blend_normalized_coords_return);
typedef Boolean (*FSBChangeBlendsProc) (Widget w, String base_name,
String blend_name,
FSBBlendAction action,
int *axis_values,
float *axis_percents);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#define InheritSetFontName ((FSBSetFontNameProc) _XtInherit)
#define InheritSetFontFamilyFace ((FSBSetFontFamilyFaceProc) _XtInherit)
#define InheritSetFontSize ((FSBSetFontSizeProc) _XtInherit)
#define InheritRefreshFontList ((FSBRefreshFontListProc) _XtInherit)
#define InheritGetFamilyList ((FSBGetFamilyListProc) _XtInherit)
#define InheritGetFaceList ((FSBGetFaceListProc) _XtInherit)
#define InheritUndefUnusedFonts ((FSBUndefUnusedFontsProc) _XtInherit)
#define InheritDownloadFontName ((FSBDownloadFontNameProc) _XtInherit)
#define InheritMatchFontFace ((FSBMatchFontFaceProc) _XtInherit)
#define InheritFontNameToFamilyFace ((FSBFontNameToFamilyFaceProc) _XtInherit)
#define InheritFontFamilyFaceToName ((FSBFontFamilyFaceToNameProc) _XtInherit)
#define InheritFindAFM ((FSBFindAFMProc) _XtInherit)
#define InheritFindFontFile ((FSBFindFontFileProc) _XtInherit)
#define InheritGetTextDimensions ((FSBGetTextDimensionsProc) _XtInherit)
#define InheritSetFontFamilyFaceBlend \
((FSBSetFontFamilyFaceBlendProc) _XtInherit)
#define InheritFontNameToFamilyFaceBlend \
((FSBFontNameToFamilyFaceBlendProc) _XtInherit)
#define InheritFontFamilyFaceBlendToName \
((FSBFontFamilyFaceBlendToNameProc) _XtInherit)
#define InheritGetBlendList ((FSBGetBlendListProc) _XtInherit)
#define InheritGetBlendInfo ((FSBGetBlendInfoProc) _XtInherit)
#define InheritChangeBlends ((FSBChangeBlendsProc) _XtInherit)
typedef struct {
FSBSetFontNameProc set_font_name;
FSBSetFontFamilyFaceProc set_font_family_face;
FSBSetFontSizeProc set_font_size;
FSBRefreshFontListProc refresh_font_list;
FSBGetFamilyListProc get_family_list;
FSBGetFaceListProc get_face_list;
FSBUndefUnusedFontsProc undef_unused_fonts;
FSBDownloadFontNameProc download_font_name;
FSBMatchFontFaceProc match_font_face;
FSBFontNameToFamilyFaceProc font_name_to_family_face;
FSBFontFamilyFaceToNameProc font_family_face_to_name;
FSBFindAFMProc find_afm;
FSBFindFontFileProc find_font_file;
FSBGetTextDimensionsProc get_text_dimensions;
FSBSetFontFamilyFaceBlendProc set_font_family_face_blend;
FSBFontNameToFamilyFaceBlendProc font_name_to_family_face_blend;
FSBFontFamilyFaceBlendToNameProc font_family_face_blend_to_name;
FSBGetBlendListProc get_blend_list;
FSBGetBlendInfoProc get_blend_info;
FSBChangeBlendsProc change_blends;
XtPointer extension;
} FontSelectionBoxClassPart;
typedef struct _FontSelectionBoxClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
FontSelectionBoxClassPart fsb_class;
} FontSelectionBoxClassRec, *FontSelectionBoxWidgetClass;
extern FontSelectionBoxClassRec fontSelectionBoxClassRec;
#endif