1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
<html>
<head>
<title>EAGLE Help: dlgDialog</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>dlgDialog</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Executes a User Language Dialog.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>int dlgDialog(string Title) <i>block</i> ;</tt>
<p>
<dt>
<b>Returns</b>
<dd>
The <tt>dlgDialog</tt> function returns an integer value that can be given a user defined meaning
through a call to the <tt><a href=313.htm>dlgAccept()</a></tt> function.<br>
If the dialog is simply closed, the return value will be <tt>0</tt>.
<p>
<dt>
<b>Description</b>
<dd>
The <tt>dlgDialog</tt> function executes the dialog defined by
<tt><a href=216.htm>block</a></tt>.
This is the only dialog object that actually is a User Language builtin
function. Therefore it can be used anywhere where a function call is allowed.
<p>
The <tt>block</tt> normally contains only other <a href=287.htm>dialog objects</a>,
but it is also possible to use other User Language statements, for example to conditionally add
objects to the dialog (see the second example below).
<p>
By default a <tt>dlgDialog</tt> contains a <a href=310.htm>dlgVBoxLayout</a>,
so a simple dialog doesn't have to worry about the layout.
<p>
A <tt>dlgDialog</tt> should at some point contain a call to the <tt><a href=313.htm>dlgAccept()</a></tt>
function in order to allow the user to close the dialog and accept its contents.
<p>
If all you need is a simple message box or file dialog you might want to use one of the
<a href=283.htm>Predefined Dialogs</a> instead.
<p>
</dl>
<b>See also</b> <a href=292.htm>dlgGridLayout</a>,
<a href=294.htm>dlgHBoxLayout</a>,
<a href=310.htm>dlgVBoxLayout</a>,
<a href=313.htm>dlgAccept</a>,
<a href=315.htm>dlgReset</a>,
<a href=316.htm>dlgReject</a>,
<a href=318.htm>A Complete Example</a>
<p>
<b>Examples</b>
<pre>
int Result = dlgDialog("Hello") {
dlgLabel("Hello world");
dlgPushButton("+OK") dlgAccept();
};
int haveButton = 1;
dlgDialog("Test") {
dlgLabel("Start");
if (haveButton)
dlgPushButton("Here") dlgAccept();
};
</pre>
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|