home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_qt3.idb / usr / freeware / Qt / extensions / xt / src / qxt.h.z / qxt.h
Encoding:
C/C++ Source or Header  |  2002-04-08  |  2.9 KB  |  94 lines

  1. /****************************************************************************
  2. ** $Id:  qt/qxt.h   3.0.3   edited Oct 12 12:18 $
  3. **
  4. ** Definition of Qt extension classes for Xt/Motif support.
  5. **
  6. ** Created : 980107
  7. **
  8. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the Qt GUI Toolkit.
  11. **
  12. ** This file may be distributed under the terms of the Q Public License
  13. ** as defined by Trolltech AS of Norway and appearing in the file
  14. ** LICENSE.QPL included in the packaging of this file.
  15. **
  16. ** This file may be distributed and/or modified under the terms of the
  17. ** GNU General Public License version 2 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.GPL included in the
  19. ** packaging of this file.
  20. **
  21. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  22. ** licenses may use this file in accordance with the Qt Commercial License
  23. ** Agreement provided with the Software.
  24. **
  25. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  26. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  27. **
  28. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  29. **   information about Qt Commercial License Agreements.
  30. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  31. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  32. **
  33. ** Contact info@trolltech.com if any conditions of this licensing are
  34. ** not clear to you.
  35. **
  36. **********************************************************************/
  37.  
  38. #ifndef QXT_H
  39. #define QXT_H
  40.  
  41. #include <qapplication.h>
  42. #include <qwidget.h>
  43.  
  44. #include <X11/Intrinsic.h>
  45.  
  46. #ifdef Bool
  47. #undef Bool
  48. #endif // Bool
  49.  
  50. class QXtApplication : public QApplication {
  51.     Q_OBJECT
  52.     void init();
  53.  
  54. public:
  55.     QXtApplication(int& argc, char** argv,
  56.     const char* appclass=0,
  57.     XrmOptionDescRec *options=0, int num_options=0,
  58.     const char** resources=0);
  59.     QXtApplication(Display *, HANDLE = 0, HANDLE = 0);
  60.     QXtApplication(Display *, int, char **, HANDLE = 0, HANDLE = 0);
  61.     ~QXtApplication();
  62. };
  63.  
  64. class QXtWidget : public QWidget {
  65.     Q_OBJECT
  66.     Widget xtw;
  67.     Widget xtparent;
  68.     bool   need_reroot;
  69.     void init(const char* name, WidgetClass widget_class,
  70.             Widget parent, QWidget* qparent,
  71.             ArgList args, Cardinal num_args,
  72.             bool managed);
  73.     friend void qwidget_realize( Widget widget, XtValueMask* mask,
  74.                  XSetWindowAttributes* attributes );
  75.  
  76. public:
  77.     QXtWidget(const char* name, Widget parent, bool managed=FALSE);
  78.     QXtWidget(const char* name, WidgetClass widget_class,
  79.           QWidget *parent=0, ArgList args=0, Cardinal num_args=0,
  80.           bool managed=FALSE);
  81.     ~QXtWidget();
  82.  
  83.     Widget xtWidget() const { return xtw; }
  84.     bool isActiveWindow() const;
  85.     void setActiveWindow();
  86.  
  87. protected:
  88.     void moveEvent( QMoveEvent* );
  89.     void resizeEvent( QResizeEvent* );
  90.     bool x11Event( XEvent * );
  91. };
  92.  
  93. #endif
  94.