Class: Iup::FontDialog

Inherits:
Widget
  • Object
show all
Defined in:
lib/wrapped/fontdialog.rb

Overview

A FontDialog allows the user to select a font.

Attributes

parentdialog

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.

previewtext

The text to use for preview of font selection.

status

read-only returns ‘1’ if ‘OK’ pressed, or null

title

Title text for the message dialog.

value

Initial value of font for dialog, and return value if ‘OK’ pressed.

Instance Attribute Summary

Attributes inherited from Widget

#handle

Instance Method Summary collapse

Methods inherited from Widget

#assign_handle, #enterwindow_cb, #getfocus_cb, #help_cb, #k_any, #killfocus_cb, #leavewindow_cb, #map_cb, #open_controls, #unmap_cb

Methods included from AttributeBuilders

#define_attribute, #define_id_attribute, #define_id_readonly, #define_id_writeonly, #define_property_attribute, #define_property_writeonly, #define_readonly, #define_writeonly

Methods included from CallbackSetter

#define_callback

Constructor Details

#initialize(&block) ⇒ FontDialog

Creates a dialog, using the optional block to set its attributes.



19
20
21
22
23
# File 'lib/wrapped/fontdialog.rb', line 19

def initialize &block
  @handle = IupLib.IupFontDlg

  self.instance_eval &block if block_given?
end

Instance Method Details

#parentdialog(parent = nil) ⇒ Object

– attributes



32
33
34
# File 'lib/wrapped/fontdialog.rb', line 32

def parentdialog parent=nil #:nodoc:
  attribute_reference 'PARENTDIALOG', Dialog, parent
end

Shows the dialog at position x, y.



26
27
28
# File 'lib/wrapped/fontdialog.rb', line 26

def popup x=0, y=0
  IupLib.IupPopup @handle, x, y
end