summaryrefslogtreecommitdiffstats
path: root/doc/html/qmotifdialog.html
blob: 33bf6a196c791d9737367cf663c07b839fed6524 (plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/extensions/motif/src/qmotifdialog.cpp:167 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQMotifDialog Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQMotifDialog Class Reference</h1>

<p>The TQMotifDialog class provides the TQDialog API for Motif-based dialogs.
<a href="#details">More...</a>
<p>This class is part of the <b>TQt Motif Extension</b>.
<p><tt>#include &lt;<a href="qmotifdialog-h.html">qmotifdialog.h</a>&gt;</tt>
<p>Inherits <a href="qdialog.html">TQDialog</a>.
<p><a href="qmotifdialog-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>enum DialogType { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working } &nbsp;<em>(obsolete)</em></li>
<li class=fn>TQMotifDialog ( DialogType&nbsp;dialogtype, Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 ) &nbsp;<em>(obsolete)</em></li>
<li class=fn>TQMotifDialog ( Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 ) &nbsp;<em>(obsolete)</em></li>
<li class=fn><a href="#TQMotifDialog-3"><b>TQMotifDialog</b></a> ( Widget&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )</li>
<li class=fn><a href="#TQMotifDialog-4"><b>TQMotifDialog</b></a> ( TQWidget&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )</li>
<li class=fn>virtual <a href="#~TQMotifDialog"><b>~TQMotifDialog</b></a> ()</li>
<li class=fn>Widget <a href="#shell"><b>shell</b></a> () const</li>
<li class=fn>Widget <a href="#dialog"><b>dialog</b></a> () const</li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li class=fn>void <a href="#acceptCallback"><b>acceptCallback</b></a> ( Widget, XtPointer&nbsp;client_data, XtPointer )</li>
<li class=fn>void <a href="#rejectCallback"><b>rejectCallback</b></a> ( Widget, XtPointer&nbsp;client_data, XtPointer )</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
<p> This class is defined in the <b>TQt <a href="motif-extension.html#Motif">Motif</a> Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main TQt API.
<p>

The TQMotifDialog class provides the <a href="qdialog.html">TQDialog</a> API for Motif-based dialogs.

<p> 
<p> TQMotifDialog provides two separate modes of operation. The
application programmer can use TQMotifDialog with an existing
Motif-based dialog and a <a href="qwidget.html">TQWidget</a> parent, or the application
programmer can use TQMotifDialog with a custom TQt-based dialog and
a Motif-based parent. Modality continues to work as expected.
<p> Motif-based dialogs must have a <tt>Shell</tt> widget parent with a
single child, due to requirements of the Motif toolkit. The <tt>Shell</tt> widget, which is a special subclass of <tt>XmDialogShell</tt>, is
created during construction. It can be accessed using the <a href="#shell">shell</a>()
member function.
<p> The single child of the <tt>Shell</tt> can be accessed using the
<a href="#dialog">dialog</a>() member function <em>after</em> it has been created.
<p> The <a href="#acceptCallback">acceptCallback</a>() and <a href="#rejectCallback">rejectCallback</a>() functions provide a
convenient way to call <a href="qdialog.html#accept">TQDialog::accept</a>() and <a href="qdialog.html#reject">TQDialog::reject</a>()
through callbacks. A pointer to the TQMotifDialog should be passed
as the <tt>client_data</tt> argument to the callback.
<p> The API and behavior TQMotifDialog is identical to that of <a href="qdialog.html">TQDialog</a>
when using a custom TQt-based dialog with a Motif-based parent.
The only difference is that a Motif-based <em>parent</em> argument is
passed to the constructor, instead of a <a href="qwidget.html">TQWidget</a> parent.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="DialogType-enum"></a>TQMotifDialog::DialogType</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> 
<p> This enum lists the predefined <a href="motif-extension.html#Motif">Motif</a> dialog types.
<ul>
<li><tt>TQMotifDialog::Prompt</tt>
<li><tt>TQMotifDialog::Selection</tt>
<li><tt>TQMotifDialog::Command</tt>
<li><tt>TQMotifDialog::FileSelection</tt>
<li><tt>TQMotifDialog::Template</tt>
<li><tt>TQMotifDialog::Error</tt>
<li><tt>TQMotifDialog::Information</tt>
<li><tt>TQMotifDialog::Message</tt>
<li><tt>TQMotifDialog::Question</tt>
<li><tt>TQMotifDialog::Warning</tt>
<li><tt>TQMotifDialog::Working</tt>
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQMotifDialog"></a>TQMotifDialog::TQMotifDialog ( <a href="qmotifdialog.html#DialogType-enum">DialogType</a>&nbsp;dialogtype, Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Creates a TQMotifDialog using one of the predefined <a href="motif-extension.html#Motif">Motif</a> dialog
types. The <em>name</em>, <em>modal</em> and <em>flags</em> arguments are passed to
the <a href="qdialog.html">TQDialog</a> constructor.
<p> This constructor creates a Shell widget, which is a special
subclass of XmDialogShell. The <em>parent</em>, <em>args</em> and <em>argcount</em>
arguments are passed to XtCreatePopupShell() when creating the
subclass. You can access the Shell widget with the <a href="#shell">shell</a>() member
function.
<p> This constructor also creates the dialog widget with the Shell
widget as its parent. The type of the dialog created is specified
by the <em>dialogtype</em> argument. See the DialogType enum for a list
of available dialog types. You can access the dialog widget with
the <a href="#dialog">dialog</a>() member function.
<p> <b>Warning:</b> TQMotifDialog takes ownership of the child widget and
destroys it during destruction. You should not destroy the dialog
widget yourself.
<p> <p>See also <a href="#DialogType-enum">DialogType</a>, <a href="#shell">shell</a>(), and <a href="#dialog">dialog</a>().

<h3 class=fn><a name="TQMotifDialog-2"></a>TQMotifDialog::TQMotifDialog ( Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Creates a TQMotifDialog which allows the application programmer to
use the <a href="motif-extension.html#Motif">Motif</a>-based <em>parent</em> for a custom <a href="qdialog.html">TQDialog</a>. The <em>name</em>,
<em>modal</em> and <em>flags</em> arguments are passed to the TQDialog
constructor.
<p> This constructor creates a Shell widget, which is a special
subclass of XmDialogShell. The <em>args</em> and <em>argcount</em> arguments
are passed to XtCreatePopupShell() when creating the subclass.
You can access the Shell widget with the <a href="#shell">shell</a>() member function.
<p> The dialog widget is not created by the constructor. You must
create the dialog widget as a child of the the widget returned by
shell(). You can access the child widget with the <a href="#dialog">dialog</a>() member
function.
<p> A dialog widget is not created by this constructor. Instead, you
should create the dialog widget as a child of this
dialog. TQMotifDialog will take ownership of your custom dialog,
and you can access it with the dialog() member function.
<p> <b>Warning:</b> TQMotifDialog takes ownership of the child widget and
destroys it during destruction. You should not destroy the dialog
widget yourself.
<p> <p>See also <a href="#shell">shell</a>() and <a href="#dialog">dialog</a>().

<h3 class=fn><a name="TQMotifDialog-3"></a>TQMotifDialog::TQMotifDialog ( Widget&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )
</h3>
Creates a TQMotifDialog which allows the application programmer to
use the <a href="motif-extension.html#Motif">Motif</a>-based <em>parent</em> for a custom <a href="qdialog.html">TQDialog</a>. The <em>name</em>,
<em>modal</em> and <em>flags</em> arguments are passed to the TQDialog
constructor.
<p> This constructor creates a <tt>Shell</tt> widget, which is a special
subclass of <tt>XmDialogShell</tt>. You can access the <tt>Shell</tt> widget
with the <a href="#shell">shell</a>() member function.
<p> <p>See also <a href="#shell">shell</a>().

<h3 class=fn><a name="TQMotifDialog-4"></a>TQMotifDialog::TQMotifDialog ( <a href="qwidget.html">TQWidget</a>&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )
</h3>
Creates a TQMotifDialog which allows the application programmer to
use a <a href="qwidget.html">TQWidget</a> parent for an existing <a href="motif-extension.html#Motif">Motif</a>-based dialog. The <em>parent</em>, <em>name</em>, <em>modal</em> and <em>flags</em> arguments are passed to the
<a href="qdialog.html">TQDialog</a> constructor.
<p> This constructor creates a <tt>Shell</tt> widget, which is a special
subclass of <tt>XmDialogShell</tt>. You can access the <tt>Shell</tt> widget
with the <a href="#shell">shell</a>() member functon.
<p> A dialog widget is not created by this constructor. Instead, you
should create the dialog widget as a child of this
dialog. TQMotifDialog will take ownership of your custom dialog,
and you can access it with the <a href="#dialog">dialog</a>() member function.
<p> <b>Warning:</b> TQMotifDialog takes ownership of the child widget and
destroys it during destruction. You should not destroy the dialog
widget yourself.
<p> <p>See also <a href="#shell">shell</a>() and <a href="#dialog">dialog</a>().

<h3 class=fn><a name="~TQMotifDialog"></a>TQMotifDialog::~TQMotifDialog ()<tt> [virtual]</tt>
</h3>
Destroys the <a href="qdialog.html">TQDialog</a>, dialog widget and <tt>Shell</tt> widget.

<h3 class=fn>void <a name="acceptCallback"></a>TQMotifDialog::acceptCallback ( Widget, XtPointer&nbsp;client_data, XtPointer )<tt> [static]</tt>
</h3>
Convenient Xt/Motif callback to accept the TQMotifDialog.
<p> The data is passed in <em>client_data</em>.

<h3 class=fn>Widget <a name="dialog"></a>TQMotifDialog::dialog () const
</h3>
Returns the <a href="motif-extension.html#Motif">Motif</a> widget embedded in this dialog.

<h3 class=fn>void <a name="rejectCallback"></a>TQMotifDialog::rejectCallback ( Widget, XtPointer&nbsp;client_data, XtPointer )<tt> [static]</tt>
</h3>
Convenient Xt/Motif callback to reject the TQMotifDialog.
<p> The data is passed in <em>client_data</em>.

<h3 class=fn>Widget <a name="shell"></a>TQMotifDialog::shell () const
</h3>
Returns the <tt>Shell</tt> widget embedded in this dialog.

<p>Example: <a href="motif-dialog-example.html#x2707">dialog/mainwindow.cpp</a>.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>