class Iup::FontDialog
A predefined modal dialog to select a font.
Example
dlg = Iup::FontDialog.new do d.title = "Select a new font" d.font = "Times, bold 18" end dlg.popup
Note that popup must be used to show the dialog.
Attributes
This dialog will be always in front of the parent dialog. If the parent is minimized, this dialog is automatically minimized. Important Closing the parent will also close the child, but the child dialogβs CLOSE_CB method will not be called.
The text to use for preview of font selection.
returns β1β if βOKβ pressed, or null
Title text for the message dialog.
Initial value of font for dialog, and return value if βOKβ pressed.
Public Class Methods
Source
# File lib/wrapped/fontdialog.rb, line 19 def initialize @handle = IupLib.IupFontDlg yield self if block_given? end
Creates a new dialog. If a block is given, the new instance is yielded to it.
Public Instance Methods
Source
# File lib/wrapped/fontdialog.rb, line 28 def popup x=0, y=0 IupLib.IupPopup @handle, x, y end
Shows the dialog at position x, y.
-
x- x-coordinate to use, or one of show constants -
y- y-coordinate to use, or one of show constants