The IFontDialogHandler class handles the various messages that affect the font dialog.
Create a handler derived from IFontDialogHandler and
attach it to a font dialog.
You can do this by calling
IHandler::handleEventsFor
to pass the appropriate font dialog to the font dialog handler.
Note:
When the font dialog handler receives a font dialog event, it creates an IFontDialog object and routes that object to the IFontDialogHandler::modelessResults virtual function. Override this virtual function to supply your own specialized processing of a font dialog event.
The return value from the virtual function specifies whether the font dialog event is passed on for additional processing, as follows:
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IFontDialogHandler()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IFontDialogHandler()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members determine if the event is one of the font dialog events. If it is, it calls the appropriate function.
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
If a font dialog event is received, the appropriate virtual function is called.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members are called when a file dialog event occurs. Override these to provide your own processing.
![]() |
protected:
virtual bool modelessApply( IFontDialog* modelessDialog, IFont* appliedFont )
Called when the apply button of a modeless dialog is pressed. Allows you to update an application based on the current setting of the dialog without closing the dialog.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
![]() |
protected:
virtual bool modelessResults(IFontDialog* endingDialog)
Called when a modeless dialog is ended. This function is called even if the dialog is cancelled. This is done so that you can destroy the IFontDialog if needed. Use IFontDialog::pressedOK to determine whether the user ended the dialog by pressing the OK push button.
If you need to destroy the IFontDialog object, do not delete the IFontDialog* pointer from within IFontDialog::modelessResults. Instead, call the following function:
endingDialog->setAutoDeleteObject().
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IHandler()
virtual IString asDebugInfo() const
virtual IString asString() const
virtual IHandler& disable()
virtual IHandler& enable(bool enable = true)
virtual IHandler& handleEventsFor(IWindow* window)
IHandler()
bool isEnabled() const
virtual IHandler& stopHandlingEventsFor(IWindow* window)
virtual IEventResult defaultProcedure(IEvent& event)
virtual bool dispatchHandlerEvent(IEvent& event) = 0