new()->wxDialog()
Default constructor.
new(Parent,Id,Title)->wxDialog()
Types:
Parent = wxWindow:wxWindow()
Id = integer()
Title = unicode:chardata()
new(Parent,Id,Title,Options::[Option])->wxDialog()
Types:
Parent = wxWindow:wxWindow()
Id = integer()
Title = unicode:chardata()
Option =
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}
Constructor.
See: create/5destroy(This::wxDialog())->ok
Destructor.
Deletes any child windows before deleting the physical window.
See overview_windowdeletion for more info.
create(This,Parent,Id,Title)->boolean()
Types:
This = wxDialog()
Parent = wxWindow:wxWindow()
Id = integer()
Title = unicode:chardata()
create(This,Parent,Id,Title,Options::[Option])->boolean()
Types:
This = wxDialog()
Parent = wxWindow:wxWindow()
Id = integer()
Title = unicode:chardata()
Option =
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}
Used for two-step dialog box construction.
See: new/4createButtonSizer(This,Flags)->wxSizer:wxSizer()
Types:
This = wxDialog()
Flags = integer()
Creates a sizer with standard buttons.
flags is a bit list of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE, wxHELP,
wxNO_DEFAULT.
The sizer lays out the buttons in a manner appropriate to the platform.
This function uses createStdDialogButtonSizer/2 internally for most platforms but doesn't create
the sizer at all for the platforms with hardware buttons (such as smartphones) for which it sets
up the hardware buttons appropriately and returns NULL, so don't forget to test that the return
value is valid before using it.
createStdDialogButtonSizer(This,Flags)->
wxStdDialogButtonSizer:wxStdDialogButtonSizer()
Types:
This = wxDialog()
Flags = integer()
Creates a wxStdDialogButtonSizer with standard buttons.
flags is a bit list of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE, wxHELP,
wxNO_DEFAULT.
The sizer lays out the buttons in a manner appropriate to the platform.
endModal(This,RetCode)->ok
Types:
This = wxDialog()
RetCode = integer()
Ends a modal dialog, passing a value to be returned from the showModal/1 invocation.
See: showModal/1, getReturnCode/1, setReturnCode/2getAffirmativeId(This)->integer()
Types:
This = wxDialog()
Gets the identifier of the button which works like standard OK button in this dialog.
See: setAffirmativeId/2getReturnCode(This)->integer()
Types:
This = wxDialog()
Gets the return code for this window.
Remark: A return code is normally associated with a modal dialog, where showModal/1 returns a code
to the application.
See: setReturnCode/2, showModal/1, endModal/2isModal(This)->boolean()
Types:
This = wxDialog()
Returns true if the dialog box is modal, false otherwise.
setAffirmativeId(This,Id)->ok
Types:
This = wxDialog()
Id = integer()
Sets the identifier to be used as OK button.
When the button with this identifier is pressed, the dialog calls wxWindow:validate/1 and
wxWindow:transferDataFromWindow/1 and, if they both return true, closes the dialog with the
affirmative id return code.
Also, when the user presses a hardware OK button on the devices having one or the special OK
button in the PocketPC title bar, an event with this id is generated.
By default, the affirmative id is wxID_OK.
See: getAffirmativeId/1, SetEscapeId() (not implemented in wx)
setReturnCode(This,RetCode)->ok
Types:
This = wxDialog()
RetCode = integer()
Sets the return code for this window.
A return code is normally associated with a modal dialog, where showModal/1 returns a code to the
application. The function endModal/2 calls setReturnCode/2.
See: getReturnCode/1, showModal/1, endModal/2show(This)->boolean()
Types:
This = wxDialog()
show(This,Options::[Option])->boolean()
Types:
This = wxDialog()
Option = {show, boolean()}
Hides or shows the dialog.
The preferred way of dismissing a modal dialog is to use endModal/2.
showModal(This)->integer()
Types:
This = wxDialog()
Shows an application-modal dialog.
Program flow does not return until the dialog has been dismissed with endModal/2.
Notice that it is possible to call showModal/1 for a dialog which had been previously shown with
show/2, this allows making an existing modeless dialog modal. However showModal/1 can't be called
twice without intervening endModal/2 calls.
Note that this function creates a temporary event loop which takes precedence over the
application's main event loop (see wxEventLoopBase (not implemented in wx)) and which is destroyed
when the dialog is dismissed. This also results in a call to wxApp::ProcessPendingEvents() (not
implemented in wx).
Return: The value set with setReturnCode/2.
See: ShowWindowModal() (not implemented in wx), ShowWindowModalThenDo() (not implemented in wx),
endModal/2, getReturnCode/1, setReturnCode/2
wxWidgets team. wx 2.1.1 wxDialog(3erl)