Class: Iup::MessageDialog
Overview
A MessageDialog is used to display a message along with one or more buttons.
Also see: Iup#message
Attributes
- buttondefault
-
Index of default button, ‘1’ / ‘2’ / ‘3’.
- buttonresponse
-
Index of the pressed button, ‘1’ / ‘2’ / ‘3’.
- buttons
-
Choice of buttons to display: ‘OK’ / ‘OKCANCEL’ / ‘RETRYCANCEL’ / ‘YESNO’ / ‘YESNOCANCEL’. If help_cb is defined, then a ‘help’ button is also displayed.
- dialogtype
-
Selects the icon to display: ‘error’ / ‘information’ / ‘message’ / ‘question’ / ‘warning’.
- 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.
- title
-
Title text for the message dialog.
- value
-
Message text to display within the dialog.
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#initialize(&block) ⇒ MessageDialog
constructor
Creates a dialog, using the optional block to set its attributes.
-
#parentdialog(parent = nil) ⇒ Object
:nodoc:.
-
#popup(x = 0, y = 0) ⇒ Object
Shows the dialog at position x, y.
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
Constructor Details
#initialize(&block) ⇒ MessageDialog
Creates a dialog, using the optional block to set its attributes.
25 26 27 28 29 |
# File 'lib/wrapped/messagedialog.rb', line 25 def initialize &block @handle = IupLib.IupMessageDlg self.instance_eval &block if block_given? end |
Instance Method Details
#parentdialog(parent = nil) ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/wrapped/messagedialog.rb', line 43 def parentdialog parent=nil # :nodoc: attribute_reference 'PARENTDIALOG', Dialog, parent end |
#popup(x = 0, y = 0) ⇒ Object
Shows the dialog at position x, y.
32 33 34 |
# File 'lib/wrapped/messagedialog.rb', line 32 def popup x=0, y=0 IupLib.IupPopup @handle, x, y end |