File: appFontTool.h

package info (click to toggle)
ted 2.16-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,944 kB
  • ctags: 20,273
  • sloc: ansic: 167,980; makefile: 12,518; sh: 263
file content (144 lines) | stat: -rw-r--r-- 3,953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/************************************************************************/
/*									*/
/*  A Font/Text attribute Selection Page on an inspector.		*/
/*									*/
/************************************************************************/

#   ifndef APP_FONT_TOOL_H
#   define APP_FONT_TOOL_H

#   include	<docExpandedTextAttribute.h>
#   include	<appFrame.h>
#   include	<appEncodingMenu.h>
#   include	<appColorChooser.h>

/************************************************************************/
/*									*/
/*  Represents a font chooser.						*/
/*									*/
/************************************************************************/

typedef struct AppFontToolResources
    {
    char *			aftrFamily;
    char *			aftrFace;
    char *			aftrSize;
    char *			aftrRevert;
    char *			aftrSet;
    char *			aftrTextColor;

    char *			aftrTextUnderlined;
    char *			aftrTextStrikethrough;

    char *			aftrSuperscript;
    char *			aftrSubscript;

    char *			aftrSmallcaps;
    char *			aftrCapitals;

    ColorChooserResources	aftrTextColorChooserResources;

    char *			aftrEncodings[ENCODINGps_COUNT];
    char *			aftrFaces[FONTface_COUNT];
    } AppFontToolResources;

typedef void (*FontChooserSetFont)(
				void *				target,
				const ExpandedTextAttribute *	etaSet,
				const PropertyMask *		taSetMask );

typedef struct AppFontChooser
    {
    EditApplication *		afcApplication;
    AppInspector *		afcInspector;
    int				afcSubjectPage;

    APP_WIDGET			afcFamilyList;
    APP_WIDGET			afcFaceList;
    APP_WIDGET			afcSizeList;
    APP_WIDGET			afcSizeText;

    APP_WIDGET			afcColorRow;
    APP_WIDGET			afcTextColorLabel;
    ColorChooser		afcTextColorChooser;

    APP_WIDGET			afcUnderlinedToggle;
    APP_WIDGET			afcStrikethroughToggle;

    APP_WIDGET			afcSuperscriptToggle;
    APP_WIDGET			afcSubscriptToggle;

    APP_WIDGET			afcSmallcapsToggle;
    APP_WIDGET			afcCapitalsToggle;

    APP_WIDGET			afcButtonRow;
    APP_WIDGET			afcRevertButton;
    APP_WIDGET			afcSetButton;

    APP_WIDGET			afcSampleDrawing;
    APP_WIDGET			afcX11Name;
    APP_WIDGET			afcPsName;

    AppEncodingMenu		afcEncodingMenu;

    int				afcFontFamilyChosen;
    int				afcFaceChosen;
    PropertyMask		afcChosenMask;
    ExpandedTextAttribute	afcTextAttributeChosen;

    PropertyMask		afcSetMask;
    ExpandedTextAttribute	afcTextAttributeSet;

    void *			afcTarget;

    FontChooserSetFont		afcSetFont;
    
    unsigned int		afcCurrentDocumentId;
    DocumentFontList		afcDocumentFontList;

    AppDrawingData		afcDrawingData;
    const PostScriptFontList *	afcPostScriptFontList;
    APP_FONT *			afcFont;
    char			afcChoiceText[120+1];
    char			afcX11ChoiceText[120+1];
    int				afcFaceMapFwd[FONTface_COUNT];
    int				afcFaceMapBck[FONTface_COUNT];
    AppFontToolResources	afcResources;
    } AppFontChooser;

/************************************************************************/
/*									*/
/*  Routine declarations						*/
/*									*/
/************************************************************************/

extern void appFontToolFillPage(AppFontChooser *		afc,
				const AppFontToolResources *	aftr,
				int				subjectPage,
				InspectorSubject *		is,
				APP_WIDGET			pageWidget,
				const InspectorSubjectResources * isr );

extern void appFontToolGetResourceTable(EditApplication *		ea,
					AppFontToolResources *		aftr );

extern void appFontChooserCleanPage( AppFontChooser *	afc );

extern void appFontToolFillChoosers(
				AppFontChooser *		afc,
				const AppFontToolResources *	aftr );

extern void appFontToolFinishPage(
				AppFontChooser *		afc,
				const AppFontToolResources *	aftr );

extern int appFontExpandCurrentFont(
				AppFontChooser *		afc,
				const PropertyMask *		newMask,
				const TextAttribute *		taNew,
				unsigned int			documentId,
				const DocumentFontList *	dfl,
				const RGB8Color *		colors,
				int				colorCount );

#   endif /*	APP_FONT_TOOL_H  */