The IFontDialog::Settings class contains input for an IFontDialog object. The font dialog displays with the items you specify in the Settings object. If you do not specify a Settings object on the IFontDialog constructor, a default Settings object is constructed for you. This default object provides a font dialog with no other settings in effect. You can pass the following items within an IFontDialog::Settings object to an IFontDialog:
You can also pass the following items within a Settings object:
You can construct and destruct object of this class. There is one constructor, the default, which accepts an optional IFont object. If you specify an IFont object, it is used as the initially selected font in the dialog. If the user selects the OK push button, the specified font is changed to the font selected by the user.
![]() |
public:
~Settings()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
Settings(IFont* font = 0)
You can construct an object of this class by using this constructor, which accepts an optional IFont object. If specified, this IFont object is used to specify the initial font to display in the dialog.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to customize the font dialog presented to the user. This includes the dialog's title, font preview text, dialog position, and the dialog template to use.
![]() |
public:
Settings& setDialogTemplate(const IResourceId& templateId)
Sets a dialog template resource to use in place of the supplied default font dialog.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
![]() |
public:
Settings& setPosition(const IPoint& position)
Sets the initial placement of the dialog.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
Settings& setPreviewText(const char* previewText)
Sets the text to display in the font sample box.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Sets the font dialog's title.
public:
Settings& setTitle(const char* title)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
Settings& setTitle(const IResourceId& text)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set information about the initial font that is displayed in the font dialog.
![]() |
public:
Settings& setFamily(const char* fontFamily)
Sets the font family name for the initial set of fonts displayed in the font dialog.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
Settings& setFont(IFont* font)
Sets the font to be displayed as the initial selection in the dialog.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
Settings& setPointSize(unsigned long pointSize)
Sets the point size for the initial set of fonts displayed in the font dialog.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
If you specify a point size of 0, X-scalable fonts are displayed.
![]() |
public:
Settings& setSizeList(const char* sizeList)
Sets the list of point size choices.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
This only affects dialogs for vector fonts in an OS/2 operating system. A dialog for an OS/2 operating system bitmap font has the size list automatically set to the available sizes for the bitmap font.
Use these members to set the presentation space that is used to determine which fonts are available.
![]() |
public:
Settings& setDisplayPS( const IPresSpaceHandle& presSpaceHandle )
Sets the display's presentation space. The dialog uses this presentation space to determine which fonts are available.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
![]() |
public:
Settings& setPrinterPS( const IPresSpaceHandle& presSpaceHandle )
Sets the printer's presentation space. The dialog uses this presentation space to determine which fonts are available for the printer.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |