Class: Fox::FXMessageBox

Inherits:
FXDialogBox show all
Defined in:
rdoc-sources/FXMessageBox.rb

Overview

A Message Box is a convenience class which provides a dialog for very simple common yes/no type interactions with the user. The message box has an optional icon, a title string, and the question which is presented to the user. It also has up to three buttons which furnish standard responses to the question. Message boxes are usually run modally: the question must be answered before the program may continue.

Message box buttons

MBOX_OK

Message box has a only an Ok button

MBOX_OK_CANCEL

Message box has Ok and Cancel buttons

MBOX_YES_NO

Message box has Yes and No buttons

MBOX_YES_NO_CANCEL

Message box has Yes, No, and Cancel buttons

MBOX_QUIT_CANCEL

Message box has Quit and Cancel buttons

MBOX_QUIT_SAVE_CANCEL

Message box has Quit, Save, and Cancel buttons

MBOX_SKIP_SKIPALL_CANCEL

Message box has Skip, *Skip All* and Cancel buttons

MBOX_SAVE_CANCEL_DONTSAVE

Message box has *Don’t Save*, Cancel and Save buttons

Return values

MBOX_CLICKED_YES

The Yes button was clicked

MBOX_CLICKED_NO

The No button was clicked

MBOX_CLICKED_OK

The Ok button was clicked

MBOX_CLICKED_CANCEL

The Cancel button was clicked

MBOX_CLICKED_QUIT

The Quit button was clicked

MBOX_CLICKED_SAVE

The Save button was clicked

MBOX_CLICKED_SKIP

The Skip button was clicked

MBOX_CLICKED_SKIPALL

The *Skip All* button was clicked

MBOX_CLICKED_DONTSAVE

The *Don’t Save* button was clicked (same as MBOX_CLICKED_NO)

Instance Attribute Summary

Attributes inherited from FXTopWindow

#decorations, #hSpacing, #icon, #miniIcon, #packingHints, #padBottom, #padLeft, #padRight, #padTop, #title, #vSpacing

Attributes inherited from FXWindow

#accelTable, #backColor, #defaultCursor, #dragCursor, #first, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y

Attributes inherited from FXDrawable

#height, #visual, #width

Attributes inherited from FXId

#app, #userData, #xid

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FXDialogBox

#execute

Methods inherited from FXTopWindow

#close, #getWMBorders, #maximize, #maximized?, #minimize, #minimized?, #place, #restore, #show

Methods inherited from FXComposite

#maxChildHeight, #maxChildWidth

Methods inherited from FXWindow

#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, after?, #after?, before?, #before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=

Methods included from Responder2

#connect

Methods inherited from FXDrawable

#resize

Methods inherited from FXId

#create, #created?, #destroy, #detach, #runOnUiThread

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(owner, caption, text, ic = nil, opts = 0, x = 0, y = 0) ⇒ FXMessageBox

Construct message box with given caption, icon, and message text. If owner is a window, the message box will float over that window. If owner is the application, the message box will be free-floating.



40
41
# File 'rdoc-sources/FXMessageBox.rb', line 40

def initialize(owner, caption, text, ic=nil, opts=0, x=0, y=0) # :yields: theMessageBox
end

Class Method Details

.error(owner, opts, caption, message) ⇒ Object

Show a modal error message; returns one of the return values listed above. If owner is a window, the message box will float over that window. If owner is the application, the message box will be free-floating.



48
# File 'rdoc-sources/FXMessageBox.rb', line 48

def FXMessageBox.error(owner, opts, caption, message); end

.information(owner, opts, caption, message) ⇒ Object

Show a modal information dialog; returns one of the return values listed above. If owner is a window, the message box will float over that window. If owner is the application, the message box will be free-floating.



69
# File 'rdoc-sources/FXMessageBox.rb', line 69

def FXMessageBox.information(owner, opts, caption, message); end

.question(owner, opts, caption, message) ⇒ Object

Show a modal question dialog; returns one of the return values listed above. If owner is a window, the message box will float over that window. If owner is the application, the message box will be free-floating.



62
# File 'rdoc-sources/FXMessageBox.rb', line 62

def FXMessageBox.question(owner, opts, caption, message); end

.warning(owner, opts, caption, message) ⇒ Object

Show a modal warning message; returns one of the return values listed above. If owner is a window, the message box will float over that window. If owner is the application, the message box will be free-floating.



55
# File 'rdoc-sources/FXMessageBox.rb', line 55

def FXMessageBox.warning(owner, opts, caption, message); end