You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
5.4 KiB
128 lines
5.4 KiB
<!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/doc/index.doc:3 -->
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>TQt Motif Extension</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 Classes</font></a>
|
|
| <a href="mainclasses.html">
|
|
<font color="#004faf">Main Classes</font></a>
|
|
| <a href="annotated.html">
|
|
<font color="#004faf">Annotated</font></a>
|
|
| <a href="groups.html">
|
|
<font color="#004faf">Grouped 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>TQt Motif Extension</h1>
|
|
|
|
|
|
<p> <!-- index Motif --><a name="Motif"></a>
|
|
<p> This module is part of the <a href="commercialeditions.html">TQt Enterprise
|
|
Edition</a> and is <em>not</em> part of the Free or Non-Commercial
|
|
Editions.
|
|
<p> <h2> Introduction
|
|
</h2>
|
|
<a name="1"></a><p> The TQt Motif Extension assists the migration of old Xt and Motif based
|
|
applications to the more comfortable TQt toolkit. This extension
|
|
replaces the older Xt/Motif Support Extension included with earlier
|
|
versions of TQt.
|
|
<p> The TQt Motif Extension consists of the following classes:
|
|
<p> <ul>
|
|
<li> <a href="qmotif.html">TQMotif</a> - Provides the basis of the TQt Motif Extension.
|
|
<li> <a href="qmotifwidget.html">TQMotifWidget</a> - Provides the <a href="ntqwidget.html">TQWidget</a> API for Motif widgets.
|
|
<li> <a href="qmotifdialog.html">TQMotifDialog</a> - Provides the <a href="ntqdialog.html">TQDialog</a> API for Motif dialogs.
|
|
<li> <a href="qxtwidget.html">TQXtWidget</a> - The Xt/Motif integration widget from the previous
|
|
Xt/Motif extension. This class is unsupported and has many known
|
|
problems and limitations. It is provided only to keep existing source
|
|
working; it should not be used in new code.
|
|
</ul>
|
|
<p> <h3> Additional Documentation
|
|
</h3>
|
|
<a name="1-1"></a><p> <ul>
|
|
<p> <li> <a href="motif-examples.html">Examples</a>
|
|
<li> <a href="motif-walkthrough.html">Migration Walkthrough</a> - A
|
|
complete migration of a Motif based program to the TQt toolkit.
|
|
<p> </ul>
|
|
<p> <h2> Common Problems
|
|
</h2>
|
|
<a name="2"></a><p> <h3> Incorrect CDE Color Scheme
|
|
</h3>
|
|
<a name="2-1"></a><p> <a href="qmotifwidget.html">TQMotifWidget</a> and <a href="qmotifdialog.html">TQMotifDialog</a> will use the same Visual, Colormap
|
|
and color depth that <a href="ntqapplication.html">TQApplication</a> uses. When using CDE, the color
|
|
scheme may be incorrect when using a Visual, Colormap and color depth
|
|
that is not the default. To work around this problem, add the
|
|
following resource string to your startup files (for example,
|
|
<tt>$HOME/.dt/sessions/current/dt.resources</tt>):
|
|
<p> <pre>
|
|
*userColorObj: false
|
|
</pre>
|
|
|
|
<p> <h3> X11 Header Conflicts
|
|
</h3>
|
|
<a name="2-2"></a><p> The X11 headers define some constants that conflict with the TQt
|
|
headers. The solution is to include all TQt headers first, followed by
|
|
headers from this extension, and all Xt/Motif and X11 headers last.
|
|
For example:
|
|
<p> <pre>
|
|
// TQt headers first
|
|
#include <<a href="qapplication-h.html">ntqapplication.h</a>>
|
|
#include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>>
|
|
#include <<a href="qsocket-h.html">ntqsocket.h</a>>
|
|
...
|
|
|
|
// TQMotif* headers next
|
|
#include <<a href="qmotif-h.html">qmotif.h</a>>
|
|
#include <<a href="qmotifdialog-h.html">qmotifdialog.h</a>>
|
|
#include <<a href="qmotifwidget-h.html">qmotifwidget.h</a>>
|
|
|
|
// Xt/Motif and X11 headers last
|
|
#include <X11/Xlib.h>
|
|
#include <Xt/Intrinsic.h>
|
|
#include <Xm/Xm.h>
|
|
...
|
|
</pre>
|
|
|
|
<p> <h3> Multiple Screen Support
|
|
</h3>
|
|
<a name="2-3"></a><p> <a href="qmotifwidget.html">TQMotifWidget</a> can be used together with <a href="ntqdesktopwidget.html">TQDesktopWidget</a> to create
|
|
top-level windows on multiple screens. A common mistake is to create
|
|
a TQMotifWidget on a non-default screen while the Xt/Motif widgets are
|
|
created on the default screen. The solution is to specify the screen
|
|
to both TQMotifWidget and the Xt/Motif child. For example:
|
|
<p> <pre>
|
|
Display *dpy = TQMotif::<a href="qmotif.html#x11Display">x11Display</a>();
|
|
Arg args[1];
|
|
|
|
// make sure both TQMotifWidget and the XmMainWindow are on screen 1
|
|
XtSetArg(args[0], XtNscreen, ScreenOfDisplay(dpy, 1));
|
|
<a href="qmotifwidget.html">TQMotifWidget</a> *toplevel =
|
|
new <a href="qmotifwidget.html">TQMotifWidget</a>(TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()->screen(1),
|
|
xmMainWindowWidgetClass, args, 1, "mainwindow");
|
|
</pre>
|
|
|
|
<p>
|
|
<!-- eof -->
|
|
<p><address><hr><div align=center>
|
|
<table width=100% cellspacing=0 border=0><tr>
|
|
<td>Copyright © 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>
|