IFontDialog::Settings

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:

OS/2 Considerations

You can also pass the following items within a Settings object:


IFontDialog::Settings - Member Functions and Data by Group

Constructors & Destructor

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.


[view class]
~Settings
public:
~Settings()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
Settings
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Dialog Customization

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.


[view class]
setDialogTemplate
public:
Settings& setDialogTemplate(const IResourceId& templateId)

Sets a dialog template resource to use in place of the supplied default font dialog.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
setPosition
public:
Settings& setPosition(const IPoint& position)

Sets the initial placement of the dialog.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setPreviewText
public:
Settings& setPreviewText(const char* previewText)

Sets the text to display in the font sample box.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setTitle

Sets the font dialog's title.


Overload 1
public:
Settings& setTitle(const char* title)

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
Settings& setTitle(const IResourceId& text)

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Setting Information about the Initial Font

Use these members to set information about the initial font that is displayed in the font dialog.


[view class]
setFamily
public:
Settings& setFamily(const char* fontFamily)

Sets the font family name for the initial set of fonts displayed in the font dialog.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Yes


[view class]
setFont
public:
Settings& setFont(IFont* font)

Sets the font to be displayed as the initial selection in the dialog.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setPointSize
public:
Settings& setPointSize(unsigned long pointSize)

Sets the point size for the initial set of fonts displayed in the font dialog.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Yes

AIX Considerations

If you specify a point size of 0, X-scalable fonts are displayed.


[view class]
setSizeList
public:
Settings& setSizeList(const char* sizeList)

Sets the list of point size choices.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Yes

OS/2 Considerations

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.


Setting the Presentation Space

Use these members to set the presentation space that is used to determine which fonts are available.


[view class]
setDisplayPS
public:
Settings& setDisplayPS( const IPresSpaceHandle& presSpaceHandle )

Sets the display's presentation space. The dialog uses this presentation space to determine which fonts are available.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
setPrinterPS
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


IFontDialog::Settings - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data