home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / include / qdrawutil.h < prev    next >
C/C++ Source or Header  |  2001-10-11  |  5KB  |  141 lines

  1. /****************************************************************************
  2. ** $Id:  qt/qdrawutil.h   3.0.0   edited Sep 3 11:27 $
  3. **
  4. ** Definition of draw utilities
  5. **
  6. ** Created : 950920
  7. **
  8. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the kernel module 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 QDRAWUTIL_H
  39. #define QDRAWUTIL_H
  40.  
  41. #ifndef QT_H
  42. #include "qnamespace.h"
  43. #include "qstring.h" // char*->QString conversion
  44. #endif // QT_H
  45.  
  46. class QPainter;
  47. class QColorGroup;
  48. class QPoint;
  49. class QBrush;
  50. class QRect;
  51. class QPixmap;
  52.  
  53. #ifndef QT_NO_DRAWUTIL
  54. //
  55. // Standard shade drawing
  56. //
  57.  
  58. Q_EXPORT
  59. void qDrawShadeLine( QPainter *p, int x1, int y1, int x2, int y2,
  60.              const QColorGroup &g, bool sunken = TRUE,
  61.              int lineWidth = 1, int midLineWidth = 0 );
  62.  
  63. Q_EXPORT
  64. void qDrawShadeLine( QPainter *p, const QPoint &p1, const QPoint &p2,
  65.              const QColorGroup &g, bool sunken = TRUE,
  66.              int lineWidth = 1, int midLineWidth = 0 );
  67.  
  68. Q_EXPORT
  69. void qDrawShadeRect( QPainter *p, int x, int y, int w, int h,
  70.              const QColorGroup &, bool sunken=FALSE,
  71.              int lineWidth = 1, int midLineWidth = 0,
  72.              const QBrush *fill = 0 );
  73.  
  74. Q_EXPORT
  75. void qDrawShadeRect( QPainter *p, const QRect &r,
  76.              const QColorGroup &, bool sunken=FALSE,
  77.              int lineWidth = 1, int midLineWidth = 0,
  78.              const QBrush *fill = 0 );
  79.  
  80. Q_EXPORT
  81. void qDrawShadePanel( QPainter *p, int x, int y, int w, int h,
  82.               const QColorGroup &, bool sunken=FALSE,
  83.               int lineWidth = 1, const QBrush *fill = 0 );
  84.  
  85. Q_EXPORT
  86. void qDrawShadePanel( QPainter *p, const QRect &r,
  87.               const QColorGroup &, bool sunken=FALSE,
  88.               int lineWidth = 1, const QBrush *fill = 0 );
  89.  
  90. Q_EXPORT
  91. void qDrawWinButton( QPainter *p, int x, int y, int w, int h,
  92.              const QColorGroup &g, bool sunken = FALSE,
  93.              const QBrush *fill = 0 );
  94.  
  95. Q_EXPORT
  96. void qDrawWinButton( QPainter *p, const QRect &r,
  97.              const QColorGroup &g, bool sunken = FALSE,
  98.              const QBrush *fill = 0 );
  99.  
  100. Q_EXPORT
  101. void qDrawWinPanel( QPainter *p, int x, int y, int w, int h,
  102.             const QColorGroup &, bool sunken=FALSE,
  103.             const QBrush *fill = 0 );
  104.  
  105. Q_EXPORT
  106. void qDrawWinPanel( QPainter *p, const QRect &r,
  107.             const QColorGroup &, bool sunken=FALSE,
  108.             const QBrush *fill = 0 );
  109.  
  110. Q_EXPORT
  111. void qDrawPlainRect( QPainter *p, int x, int y, int w, int h, const QColor &,
  112.              int lineWidth = 1, const QBrush *fill = 0 );
  113.  
  114. Q_EXPORT
  115. void qDrawPlainRect( QPainter *p, const QRect &r, const QColor &,
  116.              int lineWidth = 1, const QBrush *fill = 0 );
  117.  
  118.  
  119. //
  120. // Other obsolete drawing functions.
  121. // Use QStyle::itemRect(), QStyle::drawItem() and QStyle::drawArrow() instead.
  122. //
  123. Q_EXPORT
  124. QRect qItemRect( QPainter *p, Qt::GUIStyle gs, int x, int y, int w, int h,
  125.         int flags, bool enabled,
  126.         const QPixmap *pixmap, const QString& text, int len=-1 );
  127.  
  128. Q_EXPORT
  129. void qDrawItem( QPainter *p, Qt::GUIStyle gs, int x, int y, int w, int h,
  130.         int flags, const QColorGroup &g, bool enabled,
  131.         const QPixmap *pixmap, const QString& text,
  132.         int len=-1, const QColor* penColor = 0 );
  133.  
  134. Q_EXPORT
  135. void qDrawArrow( QPainter *p, Qt::ArrowType type, Qt::GUIStyle style, bool down,
  136.          int x, int y, int w, int h,
  137.          const QColorGroup &g, bool enabled );
  138.  
  139. #endif // QT_NO_DRAWUTIL
  140. #endif // QDRAWUTIL_H
  141.