2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include <exec/types.h>
10 #include <proto/exec.h>
11 #include <proto/reqtools.h>
12 #include <proto/intuition.h>
13 #include <exec/libraries.h>
14 #include <exec/memory.h>
15 #include <aros/libcall.h>
17 #include "reqtools_intern.h"
19 /*****************************************************************************
23 AROS_LH3(ULONG
, rtFontRequestA
,
27 AROS_LHA(struct rtFontRequester
*, fontreq
, A1
),
28 AROS_LHA(char *, title
, A3
),
29 AROS_LHA(struct TagItem
*, taglist
, A0
),
33 struct ReqToolsBase
*, ReqToolsBase
, 16, ReqTools
)
36 Let the user select a font and a style (optional).
39 fontreq - pointer to a struct rtFontRequester allocated with
41 title - pointer to requester window title (null terminated).
42 taglist - pointer to a TagItem array.
45 RT_Window - see rtEZRequestA()
47 RT_ReqPos - see rtEZRequestA()
49 RT_LeftOffset - see rtEZRequestA()
51 RT_TopOffset - see rtEZRequestA()
53 RT_PubScrName - see rtEZRequestA()
55 RT_Screen - see rtEZRequestA()
57 RT_ReqHandler - see rtEZRequestA()
59 RT_WaitPointer - see rtEZRequestA()
61 RT_LockWindow - [V38] see rtEZRequestA()
63 RT_ScreenToFront - [V38] see rtEZRequestA()
65 RT_ShareIDCMP - [V38] see rtEZRequestA()
67 RT_Locale - [V38] see rtEZRequestA()
69 RT_IntuiMsgFunc - (struct Hook *) [V38] The requester will call
70 this hook for each IDCMP message it gets that doesn't belong to
71 its window. Only applies if you used the RT_ShareIDCMP tag to
72 share the IDCMP port with the parent window. Parameters are as
75 A0 - (struct Hook *) your hook
76 A2 - (struct rtFontRequester *) your requester
77 A1 - (struct IntuiMessage *) the message
79 After you have finished examining the message and your hook
80 returns, ReqTools will reply the message. So do not reply the
83 RT_Underscore - (char) [V38] Indicates the symbol that precedes the
84 character in a gadget's label to be underscored. This will also
85 define the keyboard shortcut for this gadget. Currently only
86 needed for RTFO_OkText. Usually set to '_'.
88 RT_DefaultFont - (struct TextFont *) This tag allows you to specify
89 the font to be used in the requester when the screen font is
90 proportional. Default is GfxBase->DefaultFont. This tag is
91 obsolete in ReqTools 2.2 and higher.
93 RT_TextAttr - [V38] see rtFileRequestA()
95 RTFO_Flags - (ULONG) Several flags:
97 FREQF_NOBUFFER - do not buffer the font list for subsequent
98 calls to rtFontRequestA().
100 FREQF_FIXEDWIDTH - only show fixed-width fonts.
102 FREQF_COLORFONTS - show color fonts also.
104 FREQF_CHANGEPALETTE - change the screen's palette to match that
105 of a selected color font.
107 FREQF_LEAVEPALETTE - leave the palette as it is when exiting
108 rtFontRequestA() Useful in combination with
111 FREQF_SCALE - allow fonts to be scaled when they don't exist in
112 the requested size. (works on Kickstart 2.0 only, has no
115 FREQF_STYLE - include gadgets so the user may select the font's
118 RTFO_Height - (ULONG) Suggested height of font requester window.
120 RTFO_OkText - (char *) Replacement text for "Ok" gadget. Maximum 6
121 chars. (7 is still ok, but not esthetically pleasing)
123 RTFO_SampleHeight - (ULONG) Height of font sample display in pixels
126 RTFO_MinHeight - (ULONG) Minimum font size displayed.
128 RTFO_MaxHeight - (ULONG) Maximum font size displayed.
130 RTFO_FilterFunc - (struct Hook *) [V38] Call this hook for each
131 available font. Parameters are as follows:
133 A0 - (struct Hook *) your hook
134 A2 - (struct rtFontRequester *) your filereq
135 A1 - (struct TextAttr *) textattr of font
137 If your hook returns TRUE the font will be accepted. If it
138 returns FALSE the font will be skipped and will not appear in
139 the requester. IMPORTANT NOTE: If you change your hook's
140 behavior you _MUST_ purge the requester's buffer (using
144 bool - TRUE if the user selected a font (freq->Attr holds the
145 font), FALSE if the requester was canceled.
148 You CANNOT call the font requester from a task because it may use
151 Automatically adjusts the requester to the screen font.
153 If the requester got too big for the screen because of a very large
154 font, the topaz.font will be used.
156 rtFontRequest() checks the pr_WindowPtr of your process to find the
157 screen to put the requester on.
170 ******************************************************************************/
174 return (ULONG
)FileRequestA((struct RealFileRequester
*)fontreq
, NULL
, title
, taglist
); /* in filereq.c */
178 } /* rtFontRequestA */