summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/bindings
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit90825e2392b2d70e43c7a25b8a3752299a933894 (patch)
treee33aa27f02b74604afbfd0ea4f1cfca8833d882a /qtsharp/src/bindings
downloadtdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz
tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtsharp/src/bindings')
-rw-r--r--qtsharp/src/bindings/Makefile.am23
-rw-r--r--qtsharp/src/bindings/qt.build493
-rw-r--r--qtsharp/src/bindings/static/AlignmentFlags.cs40
-rw-r--r--qtsharp/src/bindings/static/ArrowType.cs33
-rw-r--r--qtsharp/src/bindings/static/BGMode.cs31
-rw-r--r--qtsharp/src/bindings/static/BackgroundMode.cs49
-rw-r--r--qtsharp/src/bindings/static/BrushStyle.cs45
-rw-r--r--qtsharp/src/bindings/static/ButtonState.cs40
-rw-r--r--qtsharp/src/bindings/static/CursorShape.cs47
-rw-r--r--qtsharp/src/bindings/static/DateFormat.cs32
-rw-r--r--qtsharp/src/bindings/static/DeclareQtSignalAttribute.cs16
-rw-r--r--qtsharp/src/bindings/static/Dock.cs43
-rw-r--r--qtsharp/src/bindings/static/GUIStyle.cs34
-rw-r--r--qtsharp/src/bindings/static/IQMenuData.cs115
-rw-r--r--qtsharp/src/bindings/static/ImageConversionFlags.cs46
-rw-r--r--qtsharp/src/bindings/static/Key.cs269
-rw-r--r--qtsharp/src/bindings/static/Modifier.cs35
-rw-r--r--qtsharp/src/bindings/static/Orientation.cs31
-rw-r--r--qtsharp/src/bindings/static/PaintUnit.cs35
-rw-r--r--qtsharp/src/bindings/static/PenCapStyle.cs33
-rw-r--r--qtsharp/src/bindings/static/PenJoinStyle.cs33
-rw-r--r--qtsharp/src/bindings/static/PenStyle.cs36
-rw-r--r--qtsharp/src/bindings/static/QApplication.cs1031
-rw-r--r--qtsharp/src/bindings/static/QByteArray.cs84
-rw-r--r--qtsharp/src/bindings/static/QCallBack.cs37
-rw-r--r--qtsharp/src/bindings/static/QEventArgs.cs42
-rw-r--r--qtsharp/src/bindings/static/QEventList.cs55
-rw-r--r--qtsharp/src/bindings/static/QGL.cs49
-rw-r--r--qtsharp/src/bindings/static/QMenuBar.cs815
-rw-r--r--qtsharp/src/bindings/static/QMenuData.cs719
-rw-r--r--qtsharp/src/bindings/static/QNull.cs35
-rw-r--r--qtsharp/src/bindings/static/QObject.cs609
-rw-r--r--qtsharp/src/bindings/static/QPopupMenu.cs830
-rw-r--r--qtsharp/src/bindings/static/QString.cs1340
-rw-r--r--qtsharp/src/bindings/static/QStyle.cs595
-rw-r--r--qtsharp/src/bindings/static/QToolButton.cs290
-rw-r--r--qtsharp/src/bindings/static/QWidgetStack.cs173
-rw-r--r--qtsharp/src/bindings/static/QtSignal.cs848
-rw-r--r--qtsharp/src/bindings/static/QtSignalMap.cs99
-rw-r--r--qtsharp/src/bindings/static/QtSlot.cs284
-rw-r--r--qtsharp/src/bindings/static/QtSupport.cs750
-rw-r--r--qtsharp/src/bindings/static/RasterOp.cs48
-rw-r--r--qtsharp/src/bindings/static/StringComparisonMode.cs34
-rw-r--r--qtsharp/src/bindings/static/TextFlags.cs37
-rw-r--r--qtsharp/src/bindings/static/TextFormat.cs32
-rw-r--r--qtsharp/src/bindings/static/UIEffect.cs35
-rw-r--r--qtsharp/src/bindings/static/WidgetFlags.cs66
-rw-r--r--qtsharp/src/bindings/static/WidgetState.cs53
-rw-r--r--qtsharp/src/bindings/static/WindowsVersion.cs38
49 files changed, 10587 insertions, 0 deletions
diff --git a/qtsharp/src/bindings/Makefile.am b/qtsharp/src/bindings/Makefile.am
new file mode 100644
index 00000000..9732e2ec
--- /dev/null
+++ b/qtsharp/src/bindings/Makefile.am
@@ -0,0 +1,23 @@
+all: Qt.dll
+
+QWidget.cs:
+ $(CLI) ../generator/generator.exe -f ../api/qt.xml -d .
+
+Qt.dll: QWidget.cs $(wildcard *.cs) $(wildcard static/*.cs)
+ cp static/*.cs .
+ csant -D$(CSC_NAME)=$(CSC) -C $(CSC_NAME)
+
+clean:
+ -rm Qt.dll
+
+distclean: clean
+ -rm *.cs
+
+install:
+ if ! test -d $(DESTDIR)$(libdir); then $(INSTALL) -d -m 0755 $(DESTDIR)$(libdir); fi
+ $(INSTALL) -m 0644 Qt.dll $(DESTDIR)$(libdir)
+
+uninstall:
+ rm -rf $(libdir)/Qt.dll
+
+.PHONY: all clean distclean install uninstall
diff --git a/qtsharp/src/bindings/qt.build b/qtsharp/src/bindings/qt.build
new file mode 100644
index 00000000..46ca68ae
--- /dev/null
+++ b/qtsharp/src/bindings/qt.build
@@ -0,0 +1,493 @@
+<?xml version="1.0">
+<project name="Qt#" default="all">
+ <target name="all">
+ <compile output="Qt.dll" target="library" optimize="true">
+ <arg compiler="cscc" value="-w" />
+ <arg compiler="mcs" value="-nowarn:0108" />
+ <arg compiler="mcs" value="-nowarn:0114" />
+ <arg compiler="csc" value="/nowarn:108" />
+ <arg compiler="csc" value="/nowarn:114" />
+ <arg compiler="csc" value="/nowarn:0679" />
+ <arg compiler="csc" value="/nowarn:0659" />
+ <sources>
+ <!-- FIXME Really need to throttled unneeded classes
+ this list of four-hundred-plus source files sucks -->
+
+ <file name="AlignmentFlags.cs" />
+ <file name="ArrowType.cs" />
+ <file name="BGMode.cs" />
+ <file name="BackgroundMode.cs" />
+ <file name="BrushStyle.cs" />
+ <file name="ButtonState.cs" />
+ <file name="CursorShape.cs" />
+ <file name="DateFormat.cs" />
+ <file name="Dock.cs" />
+ <file name="GUIStyle.cs" />
+ <file name="IQAccessible.cs" />
+ <file name="IQIODevice.cs" />
+ <file name="IQLayoutItem.cs" />
+ <file name="IQMenuData.cs" />
+ <file name="IQMimeSource.cs" />
+ <file name="IQPaintDevice.cs" />
+ <file name="IQRangeControl.cs" />
+ <file name="IQShared.cs" />
+ <file name="IQUrl.cs" />
+ <file name="IQXmlContentHandler.cs" />
+ <file name="IQXmlDTDHandler.cs" />
+ <file name="IQXmlDeclHandler.cs" />
+ <file name="IQXmlEntityResolver.cs" />
+ <file name="IQXmlErrorHandler.cs" />
+ <file name="ImageConversionFlags.cs" />
+ <file name="Item.cs" />
+ <file name="Key.cs" />
+ <file name="Modifier.cs" />
+ <file name="Orientation.cs" />
+ <file name="PaintUnit.cs" />
+ <file name="PenCapStyle.cs" />
+ <file name="PenJoinStyle.cs" />
+ <file name="PenStyle.cs" />
+ <file name="QAccel.cs" />
+ <file name="QAccessible.cs" />
+ <file name="QAccessibleFactoryInterface.cs" />
+ <file name="QAccessibleInterface.cs" />
+ <file name="QAccessibleObject.cs" />
+ <file name="QAction.cs" />
+ <file name="QActionGroup.cs" />
+ <file name="QApplication.cs" />
+ <file name="QAsciiBucket.cs" />
+ <file name="QAsyncIO.cs" />
+ <file name="QAuBucket.cs" />
+ <file name="QAuServer.cs" />
+ <file name="QBaseBucket.cs" />
+ <file name="QBig5Codec.cs" />
+ <file name="QBitVal.cs" />
+ <file name="QBitmap.cs" />
+ <file name="QBoxLayout.cs" />
+ <file name="QBrush.cs" />
+ <file name="QBuffer.cs" />
+ <file name="QButton.cs" />
+ <file name="QButtonGroup.cs" />
+ <file name="QByteArray.cs" />
+ <file name="QCDEStyle.cs" />
+ <file name="QCString.cs" />
+ <file name="QCallBack.cs" />
+ <file name="QCanvas.cs" />
+ <file name="QCanvasEllipse.cs" />
+ <file name="QCanvasItem.cs" />
+ <file name="QCanvasItemList.cs" />
+ <file name="QCanvasLine.cs" />
+ <file name="QCanvasPixmap.cs" />
+ <file name="QCanvasPixmapArray.cs" />
+ <file name="QCanvasPolygon.cs" />
+ <file name="QCanvasPolygonalItem.cs" />
+ <file name="QCanvasRectangle.cs" />
+ <file name="QCanvasSpline.cs" />
+ <file name="QCanvasSprite.cs" />
+ <file name="QCanvasText.cs" />
+ <file name="QCanvasView.cs" />
+ <file name="QChar.cs" />
+ <file name="QCharRef.cs" />
+ <file name="QCheckBox.cs" />
+ <file name="QCheckListItem.cs" />
+ <file name="QCheckTableItem.cs" />
+ <file name="QChildEvent.cs" />
+ <file name="QClassInfo.cs" />
+ <file name="QCleanupHandler.cs" />
+ <file name="QClipboard.cs" />
+ <file name="QCloseEvent.cs" />
+ <file name="QColor.cs" />
+ <file name="QColorDialog.cs" />
+ <file name="QColorDrag.cs" />
+ <file name="QColorGroup.cs" />
+ <file name="QComboBox.cs" />
+ <file name="QComboTableItem.cs" />
+ <file name="QCommonStyle.cs" />
+ <file name="QCompactStyle.cs" />
+ <file name="QConnection.cs" />
+ <file name="QConnectionList.cs" />
+ <file name="QConnectionListIt.cs" />
+ <file name="QConstString.cs" />
+ <file name="QContextMenuEvent.cs" />
+ <file name="QCursor.cs" />
+ <file name="QCustomEvent.cs" />
+ <file name="QCustomMenuItem.cs" />
+ <file name="QDataPump.cs" />
+ <file name="QDataSink.cs" />
+ <file name="QDataSource.cs" />
+ <file name="QDataStream.cs" />
+ <file name="QDate.cs" />
+ <file name="QDateEdit.cs" />
+ <file name="QDateTime.cs" />
+ <file name="QDateTimeEdit.cs" />
+ <file name="QDateTimeEditBase.cs" />
+ <file name="QDesktopWidget.cs" />
+ <file name="QDial.cs" />
+ <file name="QDialog.cs" />
+ <file name="QDir.cs" />
+ <file name="QDirSortItem.cs" />
+ <file name="QDns.cs" />
+ <file name="QDnsSocket.cs" />
+ <file name="QDockArea.cs" />
+ <file name="QDockAreaLayout.cs" />
+ <file name="QDockWindow.cs" />
+ <file name="QDomAttr.cs" />
+ <file name="QDomCDATASection.cs" />
+ <file name="QDomCharacterData.cs" />
+ <file name="QDomComment.cs" />
+ <file name="QDomDocument.cs" />
+ <file name="QDomDocumentFragment.cs" />
+ <file name="QDomDocumentType.cs" />
+ <file name="QDomElement.cs" />
+ <file name="QDomEntity.cs" />
+ <file name="QDomEntityReference.cs" />
+ <file name="QDomImplementation.cs" />
+ <file name="QDomNamedNodeMap.cs" />
+ <file name="QDomNode.cs" />
+ <file name="QDomNodeList.cs" />
+ <file name="QDomNotation.cs" />
+ <file name="QDomProcessingInstruction.cs" />
+ <file name="QDomText.cs" />
+ <file name="QDoubleValidator.cs" />
+ <file name="QDragEnterEvent.cs" />
+ <file name="QDragLeaveEvent.cs" />
+ <file name="QDragManager.cs" />
+ <file name="QDragMoveEvent.cs" />
+ <file name="QDragObject.cs" />
+ <file name="QDragResponseEvent.cs" />
+ <file name="QDropEvent.cs" />
+ <file name="QDropSite.cs" />
+ <file name="QEditorFactory.cs" />
+ <file name="QErrorMessage.cs" />
+ <file name="QEucJpCodec.cs" />
+ <file name="QEucKrCodec.cs" />
+ <file name="QEvent.cs" />
+ <file name="QEventArgs.cs" />
+ <file name="QEventList.cs" />
+ <file name="QFile.cs" />
+ <file name="QFileDialog.cs" />
+ <file name="QFileIconProvider.cs" />
+ <file name="QFileInfo.cs" />
+ <file name="QFilePreview.cs" />
+ <file name="QFocusData.cs" />
+ <file name="QFocusEvent.cs" />
+ <file name="QFont.cs" />
+ <file name="QFontDatabase.cs" />
+ <file name="QFontDialog.cs" />
+ <file name="QFontInfo.cs" />
+ <file name="QFontMetrics.cs" />
+ <file name="QFrame.cs" />
+ <file name="QFtp.cs" />
+ <file name="QGArray.cs" />
+ <file name="QGCache.cs" />
+ <file name="QGCacheIterator.cs" />
+ <file name="QGDict.cs" />
+ <file name="QGDictIterator.cs" />
+ <file name="QGLayoutIterator.cs" />
+ <file name="QGList.cs" />
+ <file name="QGListIterator.cs" />
+ <file name="QGPlugin.cs" />
+ <file name="QGVector.cs" />
+ <file name="QGbkCodec.cs" />
+ <file name="QGrid.cs" />
+ <file name="QGridLayout.cs" />
+ <file name="QGridView.cs" />
+ <file name="QGroupBox.cs" />
+ <file name="QGuardedPtr.cs" />
+ <file name="QGuardedPtrPrivate.cs" />
+ <file name="QHBox.cs" />
+ <file name="QHBoxLayout.cs" />
+ <file name="QHButtonGroup.cs" />
+ <file name="QHGroupBox.cs" />
+ <file name="QHeader.cs" />
+ <file name="QHebrewCodec.cs" />
+ <file name="QHideEvent.cs" />
+ <file name="QHostAddress.cs" />
+ <file name="QHttp.cs" />
+ <file name="QIMEvent.cs" />
+ <file name="QIODevice.cs" />
+ <file name="QIODeviceSource.cs" />
+ <file name="QIconDrag.cs" />
+ <file name="QIconDragItem.cs" />
+ <file name="QIconSet.cs" />
+ <file name="QIconView.cs" />
+ <file name="QIconViewItem.cs" />
+ <file name="QImage.cs" />
+ <file name="QImageConsumer.cs" />
+ <file name="QImageDecoder.cs" />
+ <file name="QImageDrag.cs" />
+ <file name="QImageFormat.cs" />
+ <file name="QImageFormatPlugin.cs" />
+ <file name="QImageFormatType.cs" />
+ <file name="QImageIO.cs" />
+ <file name="QImageTextKeyLang.cs" />
+ <file name="QInputDialog.cs" />
+ <file name="QIntBucket.cs" />
+ <file name="QIntValidator.cs" />
+ <file name="QInterlaceStyle.cs" />
+ <file name="QInternal.cs" />
+ <file name="QJisCodec.cs" />
+ <file name="QJpUnicodeConv.cs" />
+ <file name="QKeyEvent.cs" />
+ <file name="QKeySequence.cs" />
+ <file name="QLCDNumber.cs" />
+ <file name="QLNode.cs" />
+ <file name="QLabel.cs" />
+ <file name="QLayout.cs" />
+ <file name="QLayoutItem.cs" />
+ <file name="QLayoutIterator.cs" />
+ <file name="QLibrary.cs" />
+ <file name="QLineEdit.cs" />
+ <file name="QListBox.cs" />
+ <file name="QListBoxItem.cs" />
+ <file name="QListBoxPixmap.cs" />
+ <file name="QListBoxText.cs" />
+ <file name="QListView.cs" />
+ <file name="QListViewItem.cs" />
+ <file name="QListViewItemIterator.cs" />
+ <file name="QLocalFs.cs" />
+ <file name="QMCPI.cs" />
+ <file name="QMainWindow.cs" />
+ <file name="QMap.cs" />
+ <file name="QMapConstIterator.cs" />
+ <file name="QMapIterator.cs" />
+ <file name="QMapNode.cs" />
+ <file name="QMapNodeBase.cs" />
+ <file name="QMapPrivate.cs" />
+ <file name="QMapPrivateBase.cs" />
+ <file name="QMemArray.cs" />
+ <file name="QMenuBar.cs" />
+ <file name="QMenuData.cs" />
+ <file name="QMenuItem.cs" />
+ <file name="QMessageBox.cs" />
+ <file name="QMetaData.cs" />
+ <file name="QMetaEnum.cs" />
+ <file name="QMetaObject.cs" />
+ <file name="QMetaObjectCleanUp.cs" />
+ <file name="QMetaProperty.cs" />
+ <file name="QMimeSource.cs" />
+ <file name="QMimeSourceFactory.cs" />
+ <file name="QMotifPlusStyle.cs" />
+ <file name="QMotifStyle.cs" />
+ <file name="QMouseEvent.cs" />
+ <file name="QMoveEvent.cs" />
+ <file name="QMovie.cs" />
+ <file name="QMultiLineEdit.cs" />
+ <file name="QMutex.cs" />
+ <file name="QNPInstance.cs" />
+ <file name="QNPStream.cs" />
+ <file name="QNPWidget.cs" />
+ <file name="QNPlugin.cs" />
+ <file name="QNetworkOperation.cs" />
+ <file name="QNetworkProtocol.cs" />
+ <file name="QNetworkProtocolFactory.cs" />
+ <file name="QNetworkProtocolFactoryBase.cs" />
+ <file name="QNull.cs" />
+ <file name="QObject.cs" />
+ <file name="QObjectCleanupHandler.cs" />
+ <file name="QObjectList.cs" />
+ <file name="QObjectListIt.cs" />
+ <file name="QPDevCmdParam.cs" />
+ <file name="QPNGImagePacker.cs" />
+ <file name="QPNGImageWriter.cs" />
+ <file name="QPaintDevice.cs" />
+ <file name="QPaintDeviceMetrics.cs" />
+ <file name="QPaintDeviceX11Data.cs" />
+ <file name="QPaintEvent.cs" />
+ <file name="QPainter.cs" />
+ <file name="QPair.cs" />
+ <file name="QPalette.cs" />
+ <file name="QPen.cs" />
+ <file name="QPicture.cs" />
+ <file name="QPixmap.cs" />
+ <file name="QPixmapCache.cs" />
+ <file name="QPixmapData.cs" />
+ <file name="QPlatinumStyle.cs" />
+ <file name="QPoint.cs" />
+ <file name="QPointArray.cs" />
+ <file name="QPolygonScanner.cs" />
+ <file name="QPopupMenu.cs" />
+ <file name="QPrintDialog.cs" />
+ <file name="QPrinter.cs" />
+ <file name="QProcess.cs" />
+ <file name="QProgressBar.cs" />
+ <file name="QProgressDialog.cs" />
+ <file name="QPtrBucket.cs" />
+ <file name="QPtrCollection.cs" />
+ <file name="QPtrList.cs" />
+ <file name="QPtrListIterator.cs" />
+ <file name="QPtrQueue.cs" />
+ <file name="QPtrStack.cs" />
+ <file name="QPtrVector.cs" />
+ <file name="QPushButton.cs" />
+ <file name="QRadioButton.cs" />
+ <file name="QRangeControl.cs" />
+ <file name="QRect.cs" />
+ <file name="QRegExp.cs" />
+ <file name="QRegExpValidator.cs" />
+ <file name="QRegion.cs" />
+ <file name="QRemoteFactory.cs" />
+ <file name="QRemotePlugin.cs" />
+ <file name="QResizeEvent.cs" />
+ <file name="QSGIStyle.cs" />
+ <file name="QScrollBar.cs" />
+ <file name="QScrollView.cs" />
+ <file name="QSemaphore.cs" />
+ <file name="QSemiModal.cs" />
+ <file name="QSenderObject.cs" />
+ <file name="QServerSocket.cs" />
+ <file name="QSessionManager.cs" />
+ <file name="QSettings.cs" />
+ <file name="QShared.cs" />
+ <file name="QSharedMemory.cs" />
+ <file name="QShowEvent.cs" />
+ <file name="QSignal.cs" />
+ <file name="QSignalMapper.cs" />
+ <file name="QSimpleRichText.cs" />
+ <file name="QSingleCleanupHandler.cs" />
+ <file name="QSize.cs" />
+ <file name="QSizeGrip.cs" />
+ <file name="QSizePolicy.cs" />
+ <file name="QSjisCodec.cs" />
+ <file name="QSlider.cs" />
+ <file name="QSocket.cs" />
+ <file name="QSocketDevice.cs" />
+ <file name="QSocketNotifier.cs" />
+ <file name="QSortedList.cs" />
+ <file name="QSound.cs" />
+ <file name="QSpacerItem.cs" />
+ <file name="QSpinBox.cs" />
+ <file name="QSpinWidget.cs" />
+ <file name="QSplitter.cs" />
+ <file name="QStatusBar.cs" />
+ <file name="QStoredDrag.cs" />
+ <file name="QStrIList.cs" />
+ <file name="QStrIVec.cs" />
+ <file name="QStrList.cs" />
+ <file name="QStrVec.cs" />
+ <file name="QString.cs" />
+ <file name="QStringBucket.cs" />
+ <file name="QStringData.cs" />
+ <file name="QStringList.cs" />
+ <file name="QStyleFactory.cs" />
+ <file name="QStyleOption.cs" />
+ <file name="QStylePlugin.cs" />
+ <file name="QStyleSheet.cs" />
+ <file name="QStyleSheetItem.cs" />
+ <file name="QTLWExtra.cs" />
+ <file name="QTSManip.cs" />
+ <file name="QTab.cs" />
+ <file name="QTabBar.cs" />
+ <file name="QTabDialog.cs" />
+ <file name="QTabWidget.cs" />
+ <file name="QTable.cs" />
+ <file name="QTableItem.cs" />
+ <file name="QTableSelection.cs" />
+ <file name="QTabletEvent.cs" />
+ <file name="QTextBrowser.cs" />
+ <file name="QTextCodec.cs" />
+ <file name="QTextCodecFactory.cs" />
+ <file name="QTextCodecPlugin.cs" />
+ <file name="QTextDecoder.cs" />
+ <file name="QTextDrag.cs" />
+ <file name="QTextEdit.cs" />
+ <file name="QTextEncoder.cs" />
+ <file name="QTextIStream.cs" />
+ <file name="QTextOStream.cs" />
+ <file name="QTextOStreamIterator.cs" />
+ <file name="QTextStream.cs" />
+ <file name="QTextView.cs" />
+ <file name="QThread.cs" />
+ <file name="QTime.cs" />
+ <file name="QTimeEdit.cs" />
+ <file name="QTimer.cs" />
+ <file name="QTimerEvent.cs" />
+ <file name="QToolBar.cs" />
+ <file name="QToolButton.cs" />
+ <file name="QToolTip.cs" />
+ <file name="QToolTipGroup.cs" />
+ <file name="QTranslator.cs" />
+ <file name="QTranslatorMessage.cs" />
+ <file name="QTsciiCodec.cs" />
+ <file name="QUriDrag.cs" />
+ <file name="QUrl.cs" />
+ <file name="QUrlInfo.cs" />
+ <file name="QUrlOperator.cs" />
+ <file name="QUtf16Codec.cs" />
+ <file name="QUtf8Codec.cs" />
+ <file name="QUuid.cs" />
+ <file name="QVBox.cs" />
+ <file name="QVBoxLayout.cs" />
+ <file name="QVButtonGroup.cs" />
+ <file name="QVFbHeader.cs" />
+ <file name="QVFbKeyData.cs" />
+ <file name="QVGroupBox.cs" />
+ <file name="QValidator.cs" />
+ <file name="QValueList.cs" />
+ <file name="QValueListConstIterator.cs" />
+ <file name="QValueListIterator.cs" />
+ <file name="QValueListNode.cs" />
+ <file name="QValueListPrivate.cs" />
+ <file name="QValueStack.cs" />
+ <file name="QValueVector.cs" />
+ <file name="QValueVectorPrivate.cs" />
+ <file name="QVariant.cs" />
+ <file name="QWExtra.cs" />
+ <file name="QWMatrix.cs" />
+ <file name="QWaitCondition.cs" />
+ <file name="QWhatsThis.cs" />
+ <file name="QWheelEvent.cs" />
+ <file name="QWidget.cs" />
+ <file name="QWidgetFactory.cs" />
+ <file name="QWidgetItem.cs" />
+ <file name="QWidgetList.cs" />
+ <file name="QWidgetListIt.cs" />
+ <file name="QWidgetPlugin.cs" />
+ <file name="QWidgetStack.cs" />
+ <file name="QWindowsMime.cs" />
+ <file name="QWindowsStyle.cs" />
+ <file name="QWizard.cs" />
+ <file name="QWorkspace.cs" />
+ <file name="QXmlAttributes.cs" />
+ <file name="QXmlContentHandler.cs" />
+ <file name="QXmlDTDHandler.cs" />
+ <file name="QXmlDeclHandler.cs" />
+ <file name="QXmlDefaultHandler.cs" />
+ <file name="QXmlEntityResolver.cs" />
+ <file name="QXmlErrorHandler.cs" />
+ <file name="QXmlInputSource.cs" />
+ <file name="QXmlLexicalHandler.cs" />
+ <file name="QXmlLocator.cs" />
+ <file name="QXmlNamespaceSupport.cs" />
+ <file name="QXmlParseException.cs" />
+ <file name="QXmlReader.cs" />
+ <file name="QXmlSimpleReader.cs" />
+ <file name="QXtApplication.cs" />
+ <file name="QXtWidget.cs" />
+ <file name="QtMultiLineEdit.cs" />
+ <file name="QtSupport.cs" />
+ <file name="QtTableView.cs" />
+ <file name="RasterOp.cs" />
+ <file name="StringComparisonMode.cs" />
+ <file name="TextFlags.cs" />
+ <file name="TextFormat.cs" />
+ <file name="UIEffect.cs" />
+ <file name="WidgetFlags.cs" />
+ <file name="WidgetState.cs" />
+ <file name="WindowsVersion.cs" />
+ <file name="QStyle.cs" />
+ <file name="QtSignal.cs" />
+ <file name="QtSlot.cs" />
+ <file name="QtSignalMap.cs" />
+ <file name="DeclareQtSignalAttribute.cs" />
+ <file name="QGL.cs" />
+ <file name="QGLColormap.cs" />
+ <file name="QGLContext.cs" />
+ <file name="QGLFormat.cs" />
+ <file name="QGLWidget.cs" />
+ </sources>
+ <references>
+ <file name="System.dll" />
+ </references>
+ </compile>
+ </target>
+</project>
diff --git a/qtsharp/src/bindings/static/AlignmentFlags.cs b/qtsharp/src/bindings/static/AlignmentFlags.cs
new file mode 100644
index 00000000..4b6ca5c8
--- /dev/null
+++ b/qtsharp/src/bindings/static/AlignmentFlags.cs
@@ -0,0 +1,40 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum AlignmentFlags {
+ AlignAuto = 0,
+ AlignLeft = 1,
+ AlignRight = 2,
+ AlignHCenter = 4,
+ AlignJustify = 8,
+ AlignHorizontal_Mask = AlignLeft|AlignRight|AlignHCenter|AlignJustify,
+ AlignTop = 16,
+ AlignBottom = 32,
+ AlignVCenter = 64,
+ AlignVertical_Mask = AlignTop|AlignBottom|AlignVCenter,
+ AlignCenter = AlignVCenter|AlignHCenter
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/ArrowType.cs b/qtsharp/src/bindings/static/ArrowType.cs
new file mode 100644
index 00000000..0abb3468
--- /dev/null
+++ b/qtsharp/src/bindings/static/ArrowType.cs
@@ -0,0 +1,33 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum ArrowType {
+ UpArrow = 0,
+ DownArrow = 1,
+ LeftArrow = 2,
+ RightArrow = 3
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/BGMode.cs b/qtsharp/src/bindings/static/BGMode.cs
new file mode 100644
index 00000000..5ee8abdb
--- /dev/null
+++ b/qtsharp/src/bindings/static/BGMode.cs
@@ -0,0 +1,31 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum BGMode {
+ TransparentMode = 0,
+ OpaqueMode = 1
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/BackgroundMode.cs b/qtsharp/src/bindings/static/BackgroundMode.cs
new file mode 100644
index 00000000..83100dc1
--- /dev/null
+++ b/qtsharp/src/bindings/static/BackgroundMode.cs
@@ -0,0 +1,49 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum BackgroundMode {
+ FixedColor = 0,
+ FixedPixmap = 1,
+ NoBackground = 2,
+ PaletteForeground = 3,
+ PaletteButton = 4,
+ PaletteLight = 5,
+ PaletteMidlight = 6,
+ PaletteDark = 7,
+ PaletteMid = 8,
+ PaletteText = 9,
+ PaletteBrightText = 10,
+ PaletteBase = 11,
+ PaletteBackground = 12,
+ PaletteShadow = 13,
+ PaletteHighlight = 14,
+ PaletteHighlightedText = 15,
+ PaletteButtonText = 16,
+ PaletteLink = 17,
+ PaletteLinkVisited = 18,
+ X11ParentRelative = 19
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/BrushStyle.cs b/qtsharp/src/bindings/static/BrushStyle.cs
new file mode 100644
index 00000000..4605dbed
--- /dev/null
+++ b/qtsharp/src/bindings/static/BrushStyle.cs
@@ -0,0 +1,45 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum BrushStyle {
+ NoBrush = 0,
+ SolidPattern = 1,
+ Dense1Pattern = 2,
+ Dense2Pattern = 3,
+ Dense3Pattern = 4,
+ Dense4Pattern = 5,
+ Dense5Pattern = 6,
+ Dense6Pattern = 7,
+ Dense7Pattern = 8,
+ HorPattern = 9,
+ VerPattern = 10,
+ CrossPattern = 11,
+ BDiagPattern = 12,
+ FDiagPattern = 13,
+ DiagCrossPattern = 14,
+ CustomPattern = 24
+ }
+}
diff --git a/qtsharp/src/bindings/static/ButtonState.cs b/qtsharp/src/bindings/static/ButtonState.cs
new file mode 100644
index 00000000..9b058bd0
--- /dev/null
+++ b/qtsharp/src/bindings/static/ButtonState.cs
@@ -0,0 +1,40 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum ButtonState {
+ NoButton = 0,
+ LeftButton = 1,
+ RightButton = 2,
+ MidButton = 4,
+ MouseButtonMask = 255,
+ ShiftButton = 256,
+ ControlButton = 512,
+ AltButton = 1024,
+ MetaButton = 2048,
+ KeyButtonMask = 4095,
+ Keypad = 16384
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/CursorShape.cs b/qtsharp/src/bindings/static/CursorShape.cs
new file mode 100644
index 00000000..33f277e3
--- /dev/null
+++ b/qtsharp/src/bindings/static/CursorShape.cs
@@ -0,0 +1,47 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum CursorShape {
+ ArrowCursor = 0,
+ UpArrowCursor = 1,
+ CrossCursor = 2,
+ WaitCursor = 3,
+ IbeamCursor = 4,
+ SizeVerCursor = 5,
+ SizeHorCursor = 6,
+ SizeBDiagCursor = 7,
+ SizeFDiagCursor = 8,
+ SizeAllCursor = 9,
+ BlankCursor = 10,
+ SplitVCursor = 11,
+ SplitHCursor = 12,
+ PointingHandCursor = 13,
+ ForbiddenCursor = 14,
+ WhatsThisCursor = 15,
+ LastCursor = WhatsThisCursor,
+ BitmapCursor = 24
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/DateFormat.cs b/qtsharp/src/bindings/static/DateFormat.cs
new file mode 100644
index 00000000..6572b43b
--- /dev/null
+++ b/qtsharp/src/bindings/static/DateFormat.cs
@@ -0,0 +1,32 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum DateFormat {
+ TextDate = 0,
+ ISODate = 1,
+ LocalDate = 2
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/DeclareQtSignalAttribute.cs b/qtsharp/src/bindings/static/DeclareQtSignalAttribute.cs
new file mode 100644
index 00000000..9d9dceed
--- /dev/null
+++ b/qtsharp/src/bindings/static/DeclareQtSignalAttribute.cs
@@ -0,0 +1,16 @@
+namespace Qt {
+ using System;
+
+ [AttributeUsage(AttributeTargets.Class, Inherited=true, AllowMultiple=true)]
+ public class DeclareQtSignalAttribute: Attribute {
+ private string signalName;
+
+ internal string SignalName {
+ get { return signalName; }
+ }
+
+ public DeclareQtSignalAttribute(string signalname) {
+ signalName = signalname.Replace(" ", "");
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/Dock.cs b/qtsharp/src/bindings/static/Dock.cs
new file mode 100644
index 00000000..09f11da6
--- /dev/null
+++ b/qtsharp/src/bindings/static/Dock.cs
@@ -0,0 +1,43 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum Dock {
+ DockUnmanaged = 0,
+ DockTornOff = 1,
+ DockTop = 2,
+ DockBottom = 3,
+ DockRight = 4,
+ DockLeft = 5,
+ DockMinimized = 6,
+ Unmanaged = DockUnmanaged,
+ TornOff = DockTornOff,
+ Top = DockTop,
+ Bottom = DockBottom,
+ Right = DockRight,
+ Left = DockLeft,
+ Minimized = DockMinimized
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/GUIStyle.cs b/qtsharp/src/bindings/static/GUIStyle.cs
new file mode 100644
index 00000000..d9e264b3
--- /dev/null
+++ b/qtsharp/src/bindings/static/GUIStyle.cs
@@ -0,0 +1,34 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum GUIStyle {
+ MacStyle = 0,
+ WindowsStyle = 1,
+ Win3Style = 2,
+ PMStyle = 3,
+ MotifStyle = 4
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/IQMenuData.cs b/qtsharp/src/bindings/static/IQMenuData.cs
new file mode 100644
index 00000000..2e1a5614
--- /dev/null
+++ b/qtsharp/src/bindings/static/IQMenuData.cs
@@ -0,0 +1,115 @@
+// QMenuData.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+
+ public interface IQMenuData {
+ Hashtable MenuConnections { get; }
+ uint Count ();
+ int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier, int index);
+ int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier, int index);
+ int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index);
+ int InsertItem (string text, int identifier, int index);
+ int InsertItem (QIconSet icon, string text, int identifier, int index);
+ int InsertItem (string text, QPopupMenu popup, int identifier, int index);
+ int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier, int index);
+ int InsertItem (QPixmap pixmap, int identifier, int index);
+ int InsertItem (QIconSet icon, QPixmap pixmap, int identifier, int index);
+ int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier, int index);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier, int index);
+ int InsertItem (QWidget widget, int identifier, int index);
+ int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier, int index);
+ int InsertItem (QCustomMenuItem custom, int identifier, int index);
+ int InsertSeparator (int index);
+ void RemoveItem (int identifier);
+ void RemoveItemAt (int index);
+ void Clear ();
+ QKeySequence Accel (int identifier);
+ void SetAccel (QKeySequence key, int identifier);
+ QIconSet IconSet (int identifier);
+ string Text (int identifier);
+ QPixmap Pixmap (int identifier);
+ void SetWhatsThis (int identifier, string arg1);
+ string WhatsThis (int identifier);
+ void ChangeItem (int identifier, string text);
+ void ChangeItem (int identifier, QPixmap pixmap);
+ void ChangeItem (int identifier, QIconSet icon, string text);
+ void ChangeItem (int identifier, QIconSet icon, QPixmap pixmap);
+ void ChangeItem (string text, int identifier);
+ void ChangeItem (QPixmap pixmap, int identifier);
+ void ChangeItem (QIconSet icon, string text, int identifier);
+ bool IsItemActive (int identifier);
+ bool IsItemEnabled (int identifier);
+ void SetItemEnabled (int identifier, bool enable);
+ bool IsItemChecked (int identifier);
+ void SetItemChecked (int identifier, bool check);
+ int IndexOf (int identifier);
+ void SetId (int index, int identifier);
+ bool ConnectItem (int identifier, QObject receiver, string member);
+ bool DisconnectItem (int identifier, QObject receiver, string member);
+ bool SetItemParameter (int identifier, int param);
+ int ItemParameter (int identifier);
+ QMenuItem FindItem (int identifier);
+ QMenuItem FindItem (int identifier, QMenuData parent);
+ QMenuItem FindPopup (QPopupMenu arg1, int[] index);
+ int InsertItem (string text, QObject receiver, string member);
+ int InsertItem (string text, QObject receiver, string member, QKeySequence accel);
+ int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier);
+ int InsertItem (QIconSet icon, string text, QObject receiver, string member);
+ int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel);
+ int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier);
+ int InsertItem (QPixmap pixmap, QObject receiver, string member);
+ int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel);
+ int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier);
+ int InsertItem (string text);
+ int InsertItem (string text, int identifier);
+ int InsertItem (QIconSet icon, string text);
+ int InsertItem (QIconSet icon, string text, int identifier);
+ int InsertItem (string text, QPopupMenu popup);
+ int InsertItem (string text, QPopupMenu popup, int identifier);
+ int InsertItem (QIconSet icon, string text, QPopupMenu popup);
+ int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier);
+ int InsertItem (QPixmap pixmap);
+ int InsertItem (QPixmap pixmap, int identifier);
+ int InsertItem (QIconSet icon, QPixmap pixmap);
+ int InsertItem (QIconSet icon, QPixmap pixmap, int identifier);
+ int InsertItem (QPixmap pixmap, QPopupMenu popup);
+ int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup);
+ int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier);
+ int InsertItem (QWidget widget);
+ int InsertItem (QWidget widget, int identifier);
+ int InsertItem (QIconSet icon, QCustomMenuItem custom);
+ int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier);
+ int InsertItem (QCustomMenuItem custom);
+ int InsertItem (QCustomMenuItem custom, int identifier);
+ int InsertSeparator ();
+ QMenuItem FindPopup (QPopupMenu arg1);
+ //IntPtr QMenuData ();
+ }
+}
diff --git a/qtsharp/src/bindings/static/ImageConversionFlags.cs b/qtsharp/src/bindings/static/ImageConversionFlags.cs
new file mode 100644
index 00000000..010199bf
--- /dev/null
+++ b/qtsharp/src/bindings/static/ImageConversionFlags.cs
@@ -0,0 +1,46 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum ImageConversionFlags {
+ ColorMode_Mask = 3,
+ AutoColor = 0,
+ ColorOnly = 3,
+ MonoOnly = 2,
+ AlphaDither_Mask = 12,
+ ThresholdAlphaDither = 0,
+ OrderedAlphaDither = 4,
+ DiffuseAlphaDither = 8,
+ NoAlpha = 12,
+ Dither_Mask = 48,
+ DiffuseDither = 0,
+ OrderedDither = 16,
+ ThresholdDither = 32,
+ DitherMode_Mask = 192,
+ AutoDither = 0,
+ PreferDither = 64,
+ AvoidDither = 128
+ }
+}
diff --git a/qtsharp/src/bindings/static/Key.cs b/qtsharp/src/bindings/static/Key.cs
new file mode 100644
index 00000000..1e02dd37
--- /dev/null
+++ b/qtsharp/src/bindings/static/Key.cs
@@ -0,0 +1,269 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum Key {
+ Key_Escape = 4096,
+ Key_Tab = 4097,
+ Key_Backtab = 4098,
+ Key_BackTab = Key_Backtab,
+ Key_Backspace = 4099,
+ Key_BackSpace = Key_Backspace,
+ Key_Return = 4100,
+ Key_Enter = 4101,
+ Key_Insert = 4102,
+ Key_Delete = 4103,
+ Key_Pause = 4104,
+ Key_Print = 4105,
+ Key_SysReq = 4106,
+ Key_Home = 4112,
+ Key_End = 4113,
+ Key_Left = 4114,
+ Key_Up = 4115,
+ Key_Right = 4116,
+ Key_Down = 4117,
+ Key_Prior = 4118,
+ Key_PageUp = Key_Prior,
+ Key_Next = 4119,
+ Key_PageDown = Key_Next,
+ Key_Shift = 4128,
+ Key_Control = 4129,
+ Key_Meta = 4130,
+ Key_Alt = 4131,
+ Key_CapsLock = 4132,
+ Key_NumLock = 4133,
+ Key_ScrollLock = 4134,
+ Key_F1 = 4144,
+ Key_F2 = 4145,
+ Key_F3 = 4146,
+ Key_F4 = 4147,
+ Key_F5 = 4148,
+ Key_F6 = 4149,
+ Key_F7 = 4150,
+ Key_F8 = 4151,
+ Key_F9 = 4152,
+ Key_F10 = 4153,
+ Key_F11 = 4154,
+ Key_F12 = 4155,
+ Key_F13 = 4156,
+ Key_F14 = 4157,
+ Key_F15 = 4158,
+ Key_F16 = 4159,
+ Key_F17 = 4160,
+ Key_F18 = 4161,
+ Key_F19 = 4162,
+ Key_F20 = 4163,
+ Key_F21 = 4164,
+ Key_F22 = 4165,
+ Key_F23 = 4166,
+ Key_F24 = 4167,
+ Key_F25 = 4168,
+ Key_F26 = 4169,
+ Key_F27 = 4170,
+ Key_F28 = 4171,
+ Key_F29 = 4172,
+ Key_F30 = 4173,
+ Key_F31 = 4174,
+ Key_F32 = 4175,
+ Key_F33 = 4176,
+ Key_F34 = 4177,
+ Key_F35 = 4178,
+ Key_Super_L = 4179,
+ Key_Super_R = 4180,
+ Key_Menu = 4181,
+ Key_Hyper_L = 4182,
+ Key_Hyper_R = 4183,
+ Key_Help = 4184,
+ Key_Direction_L = 4185,
+ Key_Direction_R = 4192,
+ Key_Space = 32,
+ Key_Any = Key_Space,
+ Key_Exclam = 33,
+ Key_QuoteDbl = 34,
+ Key_NumberSign = 35,
+ Key_Dollar = 36,
+ Key_Percent = 37,
+ Key_Ampersand = 38,
+ Key_Apostrophe = 39,
+ Key_ParenLeft = 40,
+ Key_ParenRight = 41,
+ Key_Asterisk = 42,
+ Key_Plus = 43,
+ Key_Comma = 44,
+ Key_Minus = 45,
+ Key_Period = 46,
+ Key_Slash = 47,
+ Key_0 = 48,
+ Key_1 = 49,
+ Key_2 = 50,
+ Key_3 = 51,
+ Key_4 = 52,
+ Key_5 = 53,
+ Key_6 = 54,
+ Key_7 = 55,
+ Key_8 = 56,
+ Key_9 = 57,
+ Key_Colon = 58,
+ Key_Semicolon = 59,
+ Key_Less = 60,
+ Key_Equal = 61,
+ Key_Greater = 62,
+ Key_Question = 63,
+ Key_At = 64,
+ Key_A = 65,
+ Key_B = 66,
+ Key_C = 67,
+ Key_D = 68,
+ Key_E = 69,
+ Key_F = 70,
+ Key_G = 71,
+ Key_H = 72,
+ Key_I = 73,
+ Key_J = 74,
+ Key_K = 75,
+ Key_L = 76,
+ Key_M = 77,
+ Key_N = 78,
+ Key_O = 79,
+ Key_P = 80,
+ Key_Q = 81,
+ Key_R = 82,
+ Key_S = 83,
+ Key_T = 84,
+ Key_U = 85,
+ Key_V = 86,
+ Key_W = 87,
+ Key_X = 88,
+ Key_Y = 89,
+ Key_Z = 90,
+ Key_BracketLeft = 91,
+ Key_Backslash = 92,
+ Key_BracketRight = 93,
+ Key_AsciiCircum = 94,
+ Key_Underscore = 95,
+ Key_QuoteLeft = 96,
+ Key_BraceLeft = 123,
+ Key_Bar = 124,
+ Key_BraceRight = 125,
+ Key_AsciiTilde = 126,
+ Key_nobreakspace = 160,
+ Key_exclamdown = 161,
+ Key_cent = 162,
+ Key_sterling = 163,
+ Key_currency = 164,
+ Key_yen = 165,
+ Key_brokenbar = 166,
+ Key_section = 167,
+ Key_diaeresis = 168,
+ Key_copyright = 169,
+ Key_ordfeminine = 170,
+ Key_guillemotleft = 171,
+ Key_notsign = 172,
+ Key_hyphen = 173,
+ Key_registered = 174,
+ Key_macron = 175,
+ Key_degree = 176,
+ Key_plusminus = 177,
+ Key_twosuperior = 178,
+ Key_threesuperior = 179,
+ Key_acute = 180,
+ Key_mu = 181,
+ Key_paragraph = 182,
+ Key_periodcentered = 183,
+ Key_cedilla = 184,
+ Key_onesuperior = 185,
+ Key_masculine = 186,
+ Key_guillemotright = 187,
+ Key_onequarter = 188,
+ Key_onehalf = 189,
+ Key_threequarters = 190,
+ Key_questiondown = 191,
+ Key_Agrave = 192,
+ Key_Aacute = 193,
+ Key_Acircumflex = 194,
+ Key_Atilde = 195,
+ Key_Adiaeresis = 196,
+ Key_Aring = 197,
+ Key_AE = 198,
+ Key_Ccedilla = 199,
+ Key_Egrave = 200,
+ Key_Eacute = 201,
+ Key_Ecircumflex = 202,
+ Key_Ediaeresis = 203,
+ Key_Igrave = 204,
+ Key_Iacute = 205,
+ Key_Icircumflex = 206,
+ Key_Idiaeresis = 207,
+ Key_ETH = 208,
+ Key_Ntilde = 209,
+ Key_Ograve = 210,
+ Key_Oacute = 211,
+ Key_Ocircumflex = 212,
+ Key_Otilde = 213,
+ Key_Odiaeresis = 214,
+ Key_multiply = 215,
+ Key_Ooblique = 216,
+ Key_Ugrave = 217,
+ Key_Uacute = 218,
+ Key_Ucircumflex = 219,
+ Key_Udiaeresis = 220,
+ Key_Yacute = 221,
+ Key_THORN = 222,
+ Key_ssharp = 223,
+ Key_agrave = 224,
+ Key_aacute = 225,
+ Key_acircumflex = 226,
+ Key_atilde = 227,
+ Key_adiaeresis = 228,
+ Key_aring = 229,
+ Key_ae = 230,
+ Key_ccedilla = 231,
+ Key_egrave = 232,
+ Key_eacute = 233,
+ Key_ecircumflex = 234,
+ Key_ediaeresis = 235,
+ Key_igrave = 236,
+ Key_iacute = 237,
+ Key_icircumflex = 238,
+ Key_idiaeresis = 239,
+ Key_eth = 240,
+ Key_ntilde = 241,
+ Key_ograve = 242,
+ Key_oacute = 243,
+ Key_ocircumflex = 244,
+ Key_otilde = 245,
+ Key_odiaeresis = 246,
+ Key_division = 247,
+ Key_oslash = 248,
+ Key_ugrave = 249,
+ Key_uacute = 250,
+ Key_ucircumflex = 251,
+ Key_udiaeresis = 252,
+ Key_yacute = 253,
+ Key_thorn = 254,
+ Key_ydiaeresis = 255,
+ Key_unknown = 65535
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/Modifier.cs b/qtsharp/src/bindings/static/Modifier.cs
new file mode 100644
index 00000000..74f1b376
--- /dev/null
+++ b/qtsharp/src/bindings/static/Modifier.cs
@@ -0,0 +1,35 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum Modifier {
+ SHIFT = 2097152,
+ CTRL = 4194304,
+ ALT = 8388608,
+ MODIFIER_MASK = 14680064,
+ UNICODE_ACCEL = 268435456,
+ ASCII_ACCEL = UNICODE_ACCEL
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/Orientation.cs b/qtsharp/src/bindings/static/Orientation.cs
new file mode 100644
index 00000000..ab04bc29
--- /dev/null
+++ b/qtsharp/src/bindings/static/Orientation.cs
@@ -0,0 +1,31 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum Orientation {
+ Horizontal = 0,
+ Vertical = 1
+ }
+}
diff --git a/qtsharp/src/bindings/static/PaintUnit.cs b/qtsharp/src/bindings/static/PaintUnit.cs
new file mode 100644
index 00000000..44463912
--- /dev/null
+++ b/qtsharp/src/bindings/static/PaintUnit.cs
@@ -0,0 +1,35 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum PaintUnit {
+ PixelUnit = 0,
+ LoMetricUnit = 1,
+ HiMetricUnit = 2,
+ LoEnglishUnit = 3,
+ HiEnglishUnit = 4,
+ TwipsUnit = 5
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/PenCapStyle.cs b/qtsharp/src/bindings/static/PenCapStyle.cs
new file mode 100644
index 00000000..dc8cc5d9
--- /dev/null
+++ b/qtsharp/src/bindings/static/PenCapStyle.cs
@@ -0,0 +1,33 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum PenCapStyle {
+ FlatCap = 0,
+ SquareCap = 16,
+ RoundCap = 32,
+ MPenCapStyle = 48
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/PenJoinStyle.cs b/qtsharp/src/bindings/static/PenJoinStyle.cs
new file mode 100644
index 00000000..3d2d1fd6
--- /dev/null
+++ b/qtsharp/src/bindings/static/PenJoinStyle.cs
@@ -0,0 +1,33 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum PenJoinStyle {
+ MiterJoin = 0,
+ BevelJoin = 64,
+ RoundJoin = 128,
+ MPenJoinStyle = 192
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/PenStyle.cs b/qtsharp/src/bindings/static/PenStyle.cs
new file mode 100644
index 00000000..ce6ac476
--- /dev/null
+++ b/qtsharp/src/bindings/static/PenStyle.cs
@@ -0,0 +1,36 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum PenStyle {
+ NoPen = 0,
+ SolidLine = 1,
+ DashLine = 2,
+ DotLine = 3,
+ DashDotLine = 4,
+ DashDotDotLine = 5,
+ MPenStyle = 15
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/QApplication.cs b/qtsharp/src/bindings/static/QApplication.cs
new file mode 100644
index 00000000..ee7e443a
--- /dev/null
+++ b/qtsharp/src/bindings/static/QApplication.cs
@@ -0,0 +1,1031 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+
+ public class QApplication : QObject, IDisposable {
+
+ public enum Type {
+ Tty = 0,
+ GuiClient = 1,
+ GuiServer = 2
+ }
+
+ public enum ColorMode {
+ NormalColors = 0,
+ CustomColors = 1
+ }
+
+ public enum ColorSpec {
+ NormalColor = 0,
+ CustomColor = 1,
+ ManyColor = 2
+ }
+
+ public enum Encoding {
+ DefaultCodec = 0,
+ UnicodeUTF8 = 1
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QApplication (int argc, string[] argv);
+ public QApplication (string[] argv) : this (QNull.Instance)
+ {
+ QObject.qApp = this;
+ qparent = null;
+ argv = ParseArguments (argv);
+ rawObject = qt_new_QApplication (argv.Length, argv);
+ RegisterObject (this);
+ RegisterEventDelegate ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QApplication1 (int argc, string[] argv, bool GUIenabled);
+ public QApplication (string[] argv, bool GUIenabled) : this (QNull.Instance)
+ {
+ QObject.qApp = this;
+ qparent = null;
+ argv = ParseArguments (argv);
+ rawObject = qt_new_QApplication1 (argv.Length, argv, GUIenabled);
+ RegisterObject (this);
+ RegisterEventDelegate ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QApplication2 (int argc, string[] argv, Type arg1);
+ public QApplication (string[] argv, Type arg1) : this (QNull.Instance)
+ {
+ QObject.qApp = this;
+ qparent = null;
+ argv = ParseArguments (argv);
+ rawObject = qt_new_QApplication2 (argv.Length, argv, arg1);
+ RegisterObject (this);
+ RegisterEventDelegate ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QApplication3 (IntPtr dpy, uint visual, uint cmap);
+ public QApplication (IntPtr dpy, uint visual, uint cmap) : this (QNull.Instance)
+ {
+ QObject.qApp = this;
+ qparent = null;
+ rawObject = qt_new_QApplication3 (dpy, visual, cmap);
+ RegisterObject (this);
+ RegisterEventDelegate ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QApplication4 (IntPtr dpy, int argc, string[] argv, uint visual, uint cmap);
+ public QApplication (IntPtr dpy, string[] argv, uint visual, uint cmap) : this (QNull.Instance)
+ {
+ QObject.qApp = this;
+ qparent = null;
+ argv = ParseArguments (argv);
+ rawObject = qt_new_QApplication4 (dpy, argv.Length, argv, visual, cmap);
+ RegisterObject (this);
+ RegisterEventDelegate ();
+ }
+
+ public QApplication (IntPtr dpy) : this (dpy, (uint) 0) {}
+
+ public QApplication (IntPtr dpy, uint visual) : this (dpy, visual, (uint) 0) {}
+
+ public QApplication (IntPtr dpy, string[] argv) : this (dpy, argv, (uint) 0) {}
+
+ public QApplication (IntPtr dpy, string[] argv, uint visual) : this (dpy, argv, visual, (uint) 0) {}
+
+ internal QApplication () : this (QNull.Instance) {}
+
+ internal QApplication (QNull dummy) : base (QNull.Instance) {}
+
+ ~QApplication ()
+ {
+ Dispose (false);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QApplication (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QApplication (rawObject);
+ deleted = true;
+ }
+
+ private string[] ParseArguments (string[] args)
+ {
+ ArrayList newargs = new ArrayList();
+
+ foreach (string arg in args) {
+ switch (arg) {
+ case "--qts-help":
+ PrintHelp ();
+ Environment.Exit(0);
+ break;
+ case "--qts-debug":
+ QtSupport.enableDebug = true;
+ break;
+ case "--qts-notracking":
+ QtSupport.disableTracking = true;
+ break;
+ case "--qts-trace-objects":
+ QtSupport.traceObjects = true;
+ break;
+ case "--qts-trace-connects":
+ QtSignal.traceConnects = true;
+ break;
+ case "--qts-trace-children":
+ QtSupport.traceChildren = true;
+ break;
+ default:
+ newargs.Add (arg);
+ break;
+ }
+ }
+
+ return newargs.ToArray (typeof (string)) as string[];
+ }
+
+ private void PrintHelp ()
+ {
+ Msg ("Qt# Options:");
+ Msg ("");
+ Msg ("--qts-help\t\tDisplay help.");
+ Msg ("--qts-debug\t\tEnable debug mode.");
+ Msg ("--qts-notracking\tDisable object tracking.");
+ Msg ("--qts-trace-objects\tTrace object tracking.");
+ Msg ("--qts-trace-connects\tTrace signal connections.");
+ Msg ("--qts-trace-children\tTrace parent/child relationships.");
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_argc (IntPtr raw);
+ public int Argc ()
+ {
+ return qt_QApplication_argc (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string[] qt_QApplication_argv (IntPtr raw);
+ public string[] Argv ()
+ {
+ return qt_QApplication_argv (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern Type qt_QApplication_type (IntPtr raw);
+ public Type TheType ()
+ {
+ return qt_QApplication_type (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_mainWidget (IntPtr raw);
+ public QWidget MainWidget ()
+ {
+ return (QWidget)LookupObject (qt_QApplication_mainWidget (rawObject), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setMainWidget (IntPtr raw, IntPtr arg1);
+ public void SetMainWidget (QWidget arg1)
+ {
+ qt_QApplication_setMainWidget (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_polish (IntPtr raw, IntPtr arg1);
+ public void Polish (QWidget arg1)
+ {
+ qt_QApplication_polish (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_focusWidget (IntPtr raw);
+ public QWidget FocusWidget ()
+ {
+ return (QWidget)LookupObject (qt_QApplication_focusWidget (rawObject), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_activeWindow (IntPtr raw);
+ public QWidget ActiveWindow ()
+ {
+ return (QWidget)LookupObject (qt_QApplication_activeWindow (rawObject), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_exec (IntPtr raw);
+ public int Exec ()
+ {
+ return qt_QApplication_exec (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_processEvents (IntPtr raw);
+ public void ProcessEvents ()
+ {
+ qt_QApplication_processEvents (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_processEvents1 (IntPtr raw, int maxtime);
+ public void ProcessEvents (int maxtime)
+ {
+ qt_QApplication_processEvents1 (rawObject, maxtime);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_hasPendingEvents (IntPtr raw);
+ public bool HasPendingEvents ()
+ {
+ return qt_QApplication_hasPendingEvents (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_enter_loop (IntPtr raw);
+ public int Enter_loop ()
+ {
+ return qt_QApplication_enter_loop (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_exit_loop (IntPtr raw);
+ public void Exit_loop ()
+ {
+ qt_QApplication_exit_loop (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_loopLevel (IntPtr raw);
+ public int LoopLevel ()
+ {
+ return qt_QApplication_loopLevel (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_notify (IntPtr raw, IntPtr arg1, IntPtr arg2);
+ public bool Notify (QObject arg1, QEvent arg2)
+ {
+ return qt_QApplication_notify (rawObject, arg1.RawObject, arg2.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setDefaultCodec (IntPtr raw, IntPtr arg1);
+ public void SetDefaultCodec (QTextCodec arg1)
+ {
+ qt_QApplication_setDefaultCodec (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_defaultCodec (IntPtr raw);
+ public QTextCodec DefaultCodec ()
+ {
+ return (QTextCodec)LookupObject (qt_QApplication_defaultCodec (rawObject), typeof(QTextCodec));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_installTranslator (IntPtr raw, IntPtr arg1);
+ public void InstallTranslator (QTranslator arg1)
+ {
+ qt_QApplication_installTranslator (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_removeTranslator (IntPtr raw, IntPtr arg1);
+ public void RemoveTranslator (QTranslator arg1)
+ {
+ qt_QApplication_removeTranslator (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_translate (IntPtr raw, string context, string key, string comment, Encoding encoding);
+ public string Translate (string context, string key, string comment, Encoding encoding)
+ {
+ QString qstr = new QString (qt_QApplication_translate (rawObject, context, key, comment, encoding));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_macEventFilter (IntPtr raw, IntPtr arg1);
+ public bool MacEventFilter (IntPtr arg1)
+ {
+ return qt_QApplication_macEventFilter (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_winEventFilter (IntPtr raw, IntPtr arg1);
+ public bool WinEventFilter (IntPtr arg1)
+ {
+ return qt_QApplication_winEventFilter (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_x11EventFilter (IntPtr raw, IntPtr arg1);
+ public bool X11EventFilter (IntPtr arg1)
+ {
+ return qt_QApplication_x11EventFilter (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_x11ClientMessage (IntPtr raw, IntPtr arg1, IntPtr arg2, bool passive_only);
+ public int X11ClientMessage (QWidget arg1, IntPtr arg2, bool passive_only)
+ {
+ return qt_QApplication_x11ClientMessage (rawObject, arg1.RawObject, arg2, passive_only);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_qwsEventFilter (IntPtr raw, IntPtr arg1);
+ public bool QwsEventFilter (IntPtr arg1)
+ {
+ return qt_QApplication_qwsEventFilter (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_qwsSetCustomColors (IntPtr raw, int colortable, int start, int numColors);
+ public void QwsSetCustomColors (int colortable, int start, int numColors)
+ {
+ qt_QApplication_qwsSetCustomColors (rawObject, colortable, start, numColors);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_winFocus (IntPtr raw, IntPtr arg1, bool arg2);
+ public void WinFocus (QWidget arg1, bool arg2)
+ {
+ qt_QApplication_winFocus (rawObject, arg1.RawObject, arg2);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_isSessionRestored (IntPtr raw);
+ public bool IsSessionRestored ()
+ {
+ return qt_QApplication_isSessionRestored (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_sessionId (IntPtr raw);
+ public string SessionId ()
+ {
+ QString qstr = new QString (qt_QApplication_sessionId (rawObject));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_commitData (IntPtr raw, IntPtr sm);
+ public void CommitData (QSessionManager sm)
+ {
+ qt_QApplication_commitData (rawObject, sm.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_saveState (IntPtr raw, IntPtr sm);
+ public void SaveState (QSessionManager sm)
+ {
+ qt_QApplication_saveState (rawObject, sm.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_wakeUpGuiThread (IntPtr raw);
+ public void WakeUpGuiThread ()
+ {
+ qt_QApplication_wakeUpGuiThread (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_lock (IntPtr raw);
+ public void Q_lock ()
+ {
+ qt_QApplication_lock (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_unlock (IntPtr raw, bool wakeUpGui);
+ public void Unlock (bool wakeUpGui)
+ {
+ qt_QApplication_unlock (rawObject, wakeUpGui);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_locked (IntPtr raw);
+ public bool Locked ()
+ {
+ return qt_QApplication_locked (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_tryLock (IntPtr raw);
+ public bool TryLock ()
+ {
+ return qt_QApplication_tryLock (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setEnableRemoteControl (IntPtr raw, bool enable, IntPtr appId);
+ public void SetEnableRemoteControl (bool enable, QUuid appId)
+ {
+ qt_QApplication_setEnableRemoteControl (rawObject, enable, appId.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_remoteControlEnabled (IntPtr raw);
+ public bool RemoteControlEnabled ()
+ {
+ return qt_QApplication_remoteControlEnabled (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_applicationId (IntPtr raw);
+ public QUuid ApplicationId ()
+ {
+ return (QUuid)LookupObject (qt_QApplication_applicationId (rawObject), typeof(QUuid));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_quit (IntPtr raw);
+ public void Quit ()
+ {
+ qt_QApplication_quit (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_closeAllWindows (IntPtr raw);
+ public void CloseAllWindows ()
+ {
+ qt_QApplication_closeAllWindows (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_style ();
+ public static QStyle Style ()
+ {
+ return (QStyle)LookupObject (qt_QApplication_style (), typeof(QStyle));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setStyle (IntPtr arg1);
+ public static void SetStyle (QStyle arg1)
+ {
+ qt_QApplication_setStyle (arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_setStyle1 (IntPtr arg1);
+ public static QStyle SetStyle (string arg1)
+ {
+ return (QStyle)LookupObject (qt_QApplication_setStyle1 (new QString (arg1).RawObject), typeof(QStyle));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern ColorMode qt_QApplication_colorMode ();
+ public static ColorMode TheColorMode ()
+ {
+ return qt_QApplication_colorMode ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setColorMode (QApplication.ColorMode arg1);
+ public static void SetColorMode (QApplication.ColorMode arg1)
+ {
+ qt_QApplication_setColorMode (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_colorSpec ();
+ public static int TheColorSpec ()
+ {
+ return qt_QApplication_colorSpec ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setColorSpec (int arg1);
+ public static void SetColorSpec (int arg1)
+ {
+ qt_QApplication_setColorSpec (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_overrideCursor ();
+ public static QCursor OverrideCursor ()
+ {
+ return (QCursor)LookupObject (qt_QApplication_overrideCursor (), typeof(QCursor));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setOverrideCursor (IntPtr arg1, bool replace);
+ public static void SetOverrideCursor (QCursor arg1, bool replace)
+ {
+ qt_QApplication_setOverrideCursor (arg1.RawObject, replace);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_restoreOverrideCursor ();
+ public static void RestoreOverrideCursor ()
+ {
+ qt_QApplication_restoreOverrideCursor ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_hasGlobalMouseTracking ();
+ public static bool HasGlobalMouseTracking ()
+ {
+ return qt_QApplication_hasGlobalMouseTracking ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setGlobalMouseTracking (bool enable);
+ public static void SetGlobalMouseTracking (bool enable)
+ {
+ qt_QApplication_setGlobalMouseTracking (enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_palette (IntPtr arg1);
+ public static QPalette Palette (QWidget arg1)
+ {
+ return (QPalette)LookupObject (qt_QApplication_palette (arg1.RawObject), typeof(QPalette));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setPalette (IntPtr arg1, bool informWidgets, string className);
+ public static void SetPalette (QPalette arg1, bool informWidgets, string className)
+ {
+ qt_QApplication_setPalette (arg1.RawObject, informWidgets, className);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_font (IntPtr arg1);
+ public static QFont Font (QWidget arg1)
+ {
+ return (QFont)LookupObject (qt_QApplication_font (arg1.RawObject), typeof(QFont));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setFont (IntPtr arg1, bool informWidgets, string className);
+ public static void SetFont (QFont arg1, bool informWidgets, string className)
+ {
+ qt_QApplication_setFont (arg1.RawObject, informWidgets, className);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_fontMetrics ();
+ public static QFontMetrics FontMetrics ()
+ {
+ return (QFontMetrics)LookupObject (qt_QApplication_fontMetrics (), typeof(QFontMetrics));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_allWidgets ();
+ public static QWidgetList AllWidgets ()
+ {
+ return (QWidgetList)LookupObject (qt_QApplication_allWidgets (), typeof(QWidgetList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_topLevelWidgets ();
+ public static QWidgetList TopLevelWidgets ()
+ {
+ return (QWidgetList)LookupObject (qt_QApplication_topLevelWidgets (), typeof(QWidgetList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_desktop ();
+ public static QDesktopWidget Desktop ()
+ {
+ return (QDesktopWidget)LookupObject (qt_QApplication_desktop (), typeof(QDesktopWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_activePopupWidget ();
+ public static QWidget ActivePopupWidget ()
+ {
+ return (QWidget)LookupObject (qt_QApplication_activePopupWidget (), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_activeModalWidget ();
+ public static QWidget ActiveModalWidget ()
+ {
+ return (QWidget)LookupObject (qt_QApplication_activeModalWidget (), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_clipboard ();
+ public static QClipboard Clipboard ()
+ {
+ return (QClipboard)LookupObject (qt_QApplication_clipboard (), typeof(QClipboard));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_widgetAt (int x, int y, bool child);
+ public static QWidget WidgetAt (int x, int y, bool child)
+ {
+ return (QWidget)LookupObject (qt_QApplication_widgetAt (x, y, child), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_widgetAt1 (IntPtr arg1, bool child);
+ public static QWidget WidgetAt (QPoint arg1, bool child)
+ {
+ return (QWidget)LookupObject (qt_QApplication_widgetAt1 (arg1.RawObject, child), typeof(QWidget));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_exit (int retcode);
+ public static void Exit (int retcode)
+ {
+ qt_QApplication_exit (retcode);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_sendPostedEvents (IntPtr receiver, int event_type);
+ public static void SendPostedEvents (QObject receiver, int event_type)
+ {
+ qt_QApplication_sendPostedEvents (receiver.RawObject, event_type);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_sendPostedEvents1 ();
+ public static void SendPostedEvents ()
+ {
+ qt_QApplication_sendPostedEvents1 ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_removePostedEvents (IntPtr receiver);
+ public static void RemovePostedEvents (QObject receiver)
+ {
+ qt_QApplication_removePostedEvents (receiver.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_startingUp ();
+ public static bool StartingUp ()
+ {
+ return qt_QApplication_startingUp ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_closingDown ();
+ public static bool ClosingDown ()
+ {
+ return qt_QApplication_closingDown ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_flushX ();
+ public static void FlushX ()
+ {
+ qt_QApplication_flushX ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_flush ();
+ public static void Flush ()
+ {
+ qt_QApplication_flush ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_syncX ();
+ public static void SyncX ()
+ {
+ qt_QApplication_syncX ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_beep ();
+ public static void Beep ()
+ {
+ qt_QApplication_beep ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setWinStyleHighlightColor (IntPtr c);
+ public static void SetWinStyleHighlightColor (QColor c)
+ {
+ qt_QApplication_setWinStyleHighlightColor (c.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_winStyleHighlightColor ();
+ public static QColor WinStyleHighlightColor ()
+ {
+ return (QColor)LookupObject (qt_QApplication_winStyleHighlightColor (), typeof(QColor));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setDesktopSettingsAware (bool arg1);
+ public static void SetDesktopSettingsAware (bool arg1)
+ {
+ qt_QApplication_setDesktopSettingsAware (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_desktopSettingsAware ();
+ public static bool DesktopSettingsAware ()
+ {
+ return qt_QApplication_desktopSettingsAware ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setCursorFlashTime (int arg1);
+ public static void SetCursorFlashTime (int arg1)
+ {
+ qt_QApplication_setCursorFlashTime (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_cursorFlashTime ();
+ public static int CursorFlashTime ()
+ {
+ return qt_QApplication_cursorFlashTime ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setDoubleClickInterval (int arg1);
+ public static void SetDoubleClickInterval (int arg1)
+ {
+ qt_QApplication_setDoubleClickInterval (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_doubleClickInterval ();
+ public static int DoubleClickInterval ()
+ {
+ return qt_QApplication_doubleClickInterval ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setWheelScrollLines (int arg1);
+ public static void SetWheelScrollLines (int arg1)
+ {
+ qt_QApplication_setWheelScrollLines (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_wheelScrollLines ();
+ public static int WheelScrollLines ()
+ {
+ return qt_QApplication_wheelScrollLines ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setGlobalStrut (IntPtr arg1);
+ public static void SetGlobalStrut (QSize arg1)
+ {
+ qt_QApplication_setGlobalStrut (arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_globalStrut ();
+ public static QSize GlobalStrut ()
+ {
+ return (QSize)LookupObject (qt_QApplication_globalStrut (), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setLibraryPaths (IntPtr arg1);
+ public static void SetLibraryPaths (QStringList arg1)
+ {
+ qt_QApplication_setLibraryPaths (arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_libraryPaths ();
+ public static QStringList LibraryPaths ()
+ {
+ return (QStringList)LookupObject (qt_QApplication_libraryPaths (), typeof(QStringList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_addLibraryPath (IntPtr arg1);
+ public static void AddLibraryPath (string arg1)
+ {
+ qt_QApplication_addLibraryPath (new QString (arg1).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_removeLibraryPath (IntPtr arg1);
+ public static void RemoveLibraryPath (string arg1)
+ {
+ qt_QApplication_removeLibraryPath (new QString (arg1).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setStartDragTime (int ms);
+ public static void SetStartDragTime (int ms)
+ {
+ qt_QApplication_setStartDragTime (ms);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_startDragTime ();
+ public static int StartDragTime ()
+ {
+ return qt_QApplication_startDragTime ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setStartDragDistance (int l);
+ public static void SetStartDragDistance (int l)
+ {
+ qt_QApplication_setStartDragDistance (l);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_startDragDistance ();
+ public static int StartDragDistance ()
+ {
+ return qt_QApplication_startDragDistance ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setReverseLayout (bool b);
+ public static void SetReverseLayout (bool b)
+ {
+ qt_QApplication_setReverseLayout (b);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_reverseLayout ();
+ public static bool ReverseLayout ()
+ {
+ return qt_QApplication_reverseLayout ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QApplication_horizontalAlignment (int align);
+ public static int HorizontalAlignment (int align)
+ {
+ return qt_QApplication_horizontalAlignment (align);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_isEffectEnabled (Qt.UIEffect arg1);
+ public static bool IsEffectEnabled (Qt.UIEffect arg1)
+ {
+ return qt_QApplication_isEffectEnabled (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_setEffectEnabled (Qt.UIEffect arg1, bool enable);
+ public static void SetEffectEnabled (Qt.UIEffect arg1, bool enable)
+ {
+ qt_QApplication_setEffectEnabled (arg1, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QApplication_qwsDecoration ();
+ public static IntPtr QwsDecoration ()
+ {
+ return qt_QApplication_qwsDecoration ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_qwsSetDecoration (IntPtr arg1);
+ public static void QwsSetDecoration (IntPtr arg1)
+ {
+ qt_QApplication_qwsSetDecoration (arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern Qt.WindowsVersion qt_QApplication_winVersion ();
+ public static Qt.WindowsVersion WinVersion ()
+ {
+ return qt_QApplication_winVersion ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_winMouseButtonUp ();
+ public static void WinMouseButtonUp ()
+ {
+ qt_QApplication_winMouseButtonUp ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_create_xim ();
+ public static void Create_xim ()
+ {
+ qt_QApplication_create_xim ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QApplication_close_xim ();
+ public static void Close_xim ()
+ {
+ qt_QApplication_close_xim ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QApplication_x11_apply_settings ();
+ public static bool X11_apply_settings ()
+ {
+ return qt_QApplication_x11_apply_settings ();
+ }
+
+ public string Translate (string context, string key)
+ {
+ return Translate(context, key, "");
+ }
+
+ public string Translate (string context, string key, string comment)
+ {
+ return Translate(context, key, comment, Encoding.DefaultCodec);
+ }
+
+ public void Unlock ()
+ {
+ Unlock(true);
+ }
+
+ public void SetEnableRemoteControl (bool enable)
+ {
+ SetEnableRemoteControl(enable, new QUuid ());
+ }
+
+ public static void SetOverrideCursor (QCursor arg1)
+ {
+ SetOverrideCursor(arg1, false);
+ }
+
+ public static QPalette Palette ()
+ {
+ return Palette(new QWidget ());
+ }
+
+ public static void SetPalette (QPalette arg1)
+ {
+ SetPalette(arg1, false);
+ }
+
+ public static void SetPalette (QPalette arg1, bool informWidgets)
+ {
+ SetPalette(arg1, informWidgets, "");
+ }
+
+ public static QFont Font ()
+ {
+ return Font(new QWidget ());
+ }
+
+ public static void SetFont (QFont arg1)
+ {
+ SetFont(arg1, false);
+ }
+
+ public static void SetFont (QFont arg1, bool informWidgets)
+ {
+ SetFont(arg1, informWidgets, "");
+ }
+
+ public static QWidget WidgetAt (int x, int y)
+ {
+ return WidgetAt(x, y, false);
+ }
+
+ public static QWidget WidgetAt (QPoint arg1)
+ {
+ return WidgetAt(arg1, false);
+ }
+
+ public static void Exit ()
+ {
+ Exit((int) 0);
+ }
+
+ public static void SetEffectEnabled (Qt.UIEffect arg1)
+ {
+ SetEffectEnabled(arg1, true);
+ }
+
+ // Begin interface methods.
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QByteArray.cs b/qtsharp/src/bindings/static/QByteArray.cs
new file mode 100644
index 00000000..5bb37574
--- /dev/null
+++ b/qtsharp/src/bindings/static/QByteArray.cs
@@ -0,0 +1,84 @@
+// QByteArray.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public class QByteArray : QMemArray, IDisposable {
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QByteArray ();
+ public QByteArray () : this (QNull.Instance)
+ {
+ rawObject = qt_new_QByteArray ();
+ RegisterObject (this);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QByteArray1 (int size);
+ public QByteArray (int size) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QByteArray1 (size);
+ RegisterObject (this);
+ }
+
+ internal QByteArray (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QByteArray (QNull dummy) : base (QNull.Instance) {}
+
+ ~QByteArray ()
+ {
+ Dispose (false);
+ }
+
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ // libqtc lacks a qt_del_QByteArray function
+ deleted = true;
+ }
+
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QByteArray_assign1
+ (IntPtr rawObject, [MarshalAs(UnmanagedType.LPArray)] byte[] b,
+ uint length );
+
+ public static implicit operator QByteArray (byte[] bArray)
+ {
+ QByteArray qbArray = new QByteArray (bArray.Length);
+ qbArray.rawObject =
+ qt_QByteArray_assign1 (qbArray.rawObject, bArray, (uint) bArray.Length);
+ GC.KeepAlive (bArray);
+ return qbArray;
+ }
+
+ // Begin interface methods.
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QCallBack.cs b/qtsharp/src/bindings/static/QCallBack.cs
new file mode 100644
index 00000000..e3ae5c94
--- /dev/null
+++ b/qtsharp/src/bindings/static/QCallBack.cs
@@ -0,0 +1,37 @@
+// QCallBack.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Reflection;
+
+ public class QCallBack {
+
+ public Object receiver;
+ public MethodInfo info;
+
+ public QCallBack (Object receiver, MethodInfo info)
+ {
+ this.receiver = receiver;
+ this.info = info;
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QEventArgs.cs b/qtsharp/src/bindings/static/QEventArgs.cs
new file mode 100644
index 00000000..f4264911
--- /dev/null
+++ b/qtsharp/src/bindings/static/QEventArgs.cs
@@ -0,0 +1,42 @@
+// QEventArgs.cs - QEventArgs c-sharp support file
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+namespace Qt {
+
+ using Qt;
+ using System;
+
+ public class QEventArgs : EventArgs {
+ private QEvent qevent;
+ private string name;
+
+ public QEvent Event {
+ get { return qevent; }
+ }
+
+ public string Name {
+ get { return name; }
+ }
+
+ public QEventArgs(string n, QEvent e) {
+ qevent = e;
+ name = n;
+ }
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/QEventList.cs b/qtsharp/src/bindings/static/QEventList.cs
new file mode 100644
index 00000000..d10afb71
--- /dev/null
+++ b/qtsharp/src/bindings/static/QEventList.cs
@@ -0,0 +1,55 @@
+// QtSupport.cs - QtSupport c-sharp support file
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+namespace Qt {
+
+ using System;
+ using System.Collections;
+
+ internal class QEventList
+ {
+ private Hashtable events;
+
+ internal QEventList ()
+ {
+ events = new Hashtable ();
+ }
+
+ internal void Add (String name, System.Delegate handler)
+ {
+ if (events [name] == null)
+ events.Add (name, new ArrayList ());
+
+ ((ArrayList)events [name]).Add (handler);
+ }
+
+ internal void Remove (String name, System.Delegate handler)
+ {
+ if (events [name] == null)
+ return;
+
+ ((ArrayList)events [name]).Remove (handler);
+ }
+
+ internal ArrayList QEventHandlers (String name)
+ {
+ return (ArrayList)events [name];
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QGL.cs b/qtsharp/src/bindings/static/QGL.cs
new file mode 100644
index 00000000..f95a645f
--- /dev/null
+++ b/qtsharp/src/bindings/static/QGL.cs
@@ -0,0 +1,49 @@
+// QGL.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+
+ public class QGL {
+
+ public enum FormatOption {
+ DoubleBuffer = 1,
+ DepthBuffer = 2,
+ Rgba = 4,
+ AlphaChannel = 8,
+ AccumBuffer = 16,
+ StencilBuffer = 32,
+ StereoBuffers = 64,
+ DirectRendering = 128,
+ HasOverlay = 256,
+ SingleBuffer = DoubleBuffer << 16,
+ NoDepthBuffer = DepthBuffer << 16,
+ ColorIndex = Rgba << 16,
+ NoAlphaChannel = AlphaChannel << 16,
+ NoAccumBuffer = AccumBuffer << 16,
+ NoStencilBuffer = StencilBuffer << 16,
+ NoStereoBuffers = StereoBuffers << 16,
+ IndirectRendering = DirectRendering << 16,
+ NoOverlay = HasOverlay << 16
+ }
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QMenuBar.cs b/qtsharp/src/bindings/static/QMenuBar.cs
new file mode 100644
index 00000000..405d7dd0
--- /dev/null
+++ b/qtsharp/src/bindings/static/QMenuBar.cs
@@ -0,0 +1,815 @@
+// QMenuBar.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Regenerated by Adam Treat on August 03 2002
+//
+// TODO
+// o Override Dispose method, make sure slots are disconnected.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+
+ public class QMenuBar : QFrame, IQMenuData, IDisposable {
+
+ private Hashtable menuConnections;
+
+ public Hashtable MenuConnections {
+ get { return menuConnections; }
+ }
+
+ public enum Separator {
+ Never = 0,
+ InWindowsStyle = 1
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QMenuBar (IntPtr parent, string name);
+ public QMenuBar (QWidget parent, string name) : this (QNull.Instance)
+ {
+ qparent = parent;
+ if (qparent == null) parent = new QWidget (IntPtr.Zero);
+ rawObject = qt_new_QMenuBar (parent.RawObject, name);
+ if (qparent == null) RegisterObject (this);
+ else qparent.AddChild (this);
+ }
+
+ public QMenuBar () : this (new QWidget ()) {}
+
+ public QMenuBar (QWidget parent) : this (parent, "") {}
+
+ internal QMenuBar (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QMenuBar (QNull dummy) : base (QNull.Instance)
+ {
+ menuConnections = new Hashtable();
+ }
+
+ ~QMenuBar ()
+ {
+ Dispose (false);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QMenuBar (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QMenuBar (rawObject);
+ deleted = true;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_updateItem (IntPtr raw, int identifier);
+ public void UpdateItem (int identifier)
+ {
+ qt_QMenuBar_updateItem (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_show (IntPtr raw);
+ public void Show ()
+ {
+ qt_QMenuBar_show (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_hide (IntPtr raw);
+ public void Hide ()
+ {
+ qt_QMenuBar_hide (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuBar_eventFilter (IntPtr raw, IntPtr arg1, IntPtr arg2);
+ public bool EventFilter (QObject arg1, QEvent arg2)
+ {
+ return qt_QMenuBar_eventFilter (rawObject, arg1.RawObject, arg2.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuBar_heightForWidth (IntPtr raw, int arg1);
+ public int HeightForWidth (int arg1)
+ {
+ return qt_QMenuBar_heightForWidth (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern QMenuBar.Separator qt_QMenuBar_separator (IntPtr raw);
+ public QMenuBar.Separator TheSeparator ()
+ {
+ return qt_QMenuBar_separator (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_setSeparator (IntPtr raw, QMenuBar.Separator when);
+ public void SetSeparator (QMenuBar.Separator when)
+ {
+ qt_QMenuBar_setSeparator (rawObject, when);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_setDefaultUp (IntPtr raw, bool arg1);
+ public void SetDefaultUp (bool arg1)
+ {
+ qt_QMenuBar_setDefaultUp (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuBar_isDefaultUp (IntPtr raw);
+ public bool IsDefaultUp ()
+ {
+ return qt_QMenuBar_isDefaultUp (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuBar_customWhatsThis (IntPtr raw);
+ public bool CustomWhatsThis ()
+ {
+ return qt_QMenuBar_customWhatsThis (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuBar_sizeHint (IntPtr raw);
+ public QSize SizeHint ()
+ {
+ return (QSize)LookupObject (qt_QMenuBar_sizeHint (rawObject), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuBar_minimumSize (IntPtr raw);
+ public QSize MinimumSize ()
+ {
+ return (QSize)LookupObject (qt_QMenuBar_minimumSize (rawObject), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuBar_minimumSizeHint (IntPtr raw);
+ public QSize MinimumSizeHint ()
+ {
+ return (QSize)LookupObject (qt_QMenuBar_minimumSizeHint (rawObject), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_activateItemAt (IntPtr raw, int index);
+ public void ActivateItemAt (int index)
+ {
+ qt_QMenuBar_activateItemAt (rawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_initialize ();
+ public static void Initialize ()
+ {
+ qt_QMenuBar_initialize ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_cleanup ();
+ public static void Cleanup ()
+ {
+ qt_QMenuBar_cleanup ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_drawContents (IntPtr raw, IntPtr arg1);
+ protected void DrawContents (QPainter arg1)
+ {
+ qt_QMenuBar_drawContents (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_fontChange (IntPtr raw, IntPtr arg1);
+ protected void FontChange (QFont arg1)
+ {
+ qt_QMenuBar_fontChange (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_menuContentsChanged (IntPtr raw);
+ protected void MenuContentsChanged ()
+ {
+ qt_QMenuBar_menuContentsChanged (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_menuStateChanged (IntPtr raw);
+ protected void MenuStateChanged ()
+ {
+ qt_QMenuBar_menuStateChanged (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_styleChange (IntPtr raw, IntPtr arg1);
+ protected void StyleChange (QStyle arg1)
+ {
+ qt_QMenuBar_styleChange (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuBar_itemAtPos (IntPtr raw, IntPtr arg1);
+ protected int ItemAtPos (QPoint arg1)
+ {
+ return qt_QMenuBar_itemAtPos (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuBar_hidePopups (IntPtr raw);
+ protected void HidePopups ()
+ {
+ qt_QMenuBar_hidePopups (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuBar_itemRect (IntPtr raw, int item);
+ protected QRect ItemRect (int item)
+ {
+ return (QRect)LookupObject (qt_QMenuBar_itemRect (rawObject, item), typeof(QRect));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuBar_QMenuData (IntPtr raw);
+ public IntPtr QMenuData ()
+ {
+ return qt_QMenuBar_QMenuData (rawObject);
+ }
+
+ // Begin interface methods.
+
+
+ //********************* A temporary hack to divert connections to CSharpConnect *****************//
+
+ // This makes my brain hurt!
+ // :-) Mine too!
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (text, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (icon, text, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (pixmap, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (icon, pixmap, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public bool ConnectItem (int identifier, QObject receiver, string member)
+ {
+ return Qt.QMenuData.ConnectItem (this, QMenuData (), identifier, receiver, member);
+
+ }
+
+ public bool DisconnectItem (int identifier, QObject receiver, string member)
+ {
+ return Qt.QMenuData.DisconnectItem (this, QMenuData (), identifier, receiver, member);
+ }
+
+ //********************* A temporary hack to divert connections to CSharpConnect *****************//
+
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern uint qt_QMenuData_count (IntPtr raw);
+ public uint Count ()
+ {
+ return qt_QMenuData_count (QMenuData ());
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem4 (IntPtr raw, IntPtr text, int identifier, int index);
+ public int InsertItem (string text, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem4 (QMenuData (), new QString (text).RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem5 (IntPtr raw, IntPtr icon, IntPtr text, int identifier, int index);
+ public int InsertItem (QIconSet icon, string text, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem5 (QMenuData (), icon.RawObject, new QString (text).RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem6 (IntPtr raw, IntPtr text, IntPtr popup, int identifier, int index);
+ public int InsertItem (string text, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem6 (QMenuData (), new QString (text).RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem7 (IntPtr raw, IntPtr icon, IntPtr text, IntPtr popup, int identifier, int index);
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem7 (QMenuData (), icon.RawObject, new QString (text).RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem8 (IntPtr raw, IntPtr pixmap, int identifier, int index);
+ public int InsertItem (QPixmap pixmap, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem8 (QMenuData (), pixmap.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem9 (IntPtr raw, IntPtr icon, IntPtr pixmap, int identifier, int index);
+ public int InsertItem (QIconSet icon, QPixmap pixmap, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem9 (QMenuData (), icon.RawObject, pixmap.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem10 (IntPtr raw, IntPtr pixmap, IntPtr popup, int identifier, int index);
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem10 (QMenuData (), pixmap.RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem11 (IntPtr raw, IntPtr icon, IntPtr pixmap, IntPtr popup, int identifier, int index);
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem11 (QMenuData (), icon.RawObject, pixmap.RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem12 (IntPtr raw, IntPtr widget, int identifier, int index);
+ public int InsertItem (QWidget widget, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem12 (QMenuData (), widget.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem13 (IntPtr raw, IntPtr icon, IntPtr custom, int identifier, int index);
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem13 (QMenuData (), icon.RawObject, custom.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem14 (IntPtr raw, IntPtr custom, int identifier, int index);
+ public int InsertItem (QCustomMenuItem custom, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem14 (QMenuData (), custom.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertSeparator (IntPtr raw, int index);
+ public int InsertSeparator (int index)
+ {
+ return qt_QMenuData_insertSeparator (QMenuData (), index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_removeItem (IntPtr raw, int identifier);
+ public void RemoveItem (int identifier)
+ {
+ qt_QMenuData_removeItem (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_removeItemAt (IntPtr raw, int index);
+ public void RemoveItemAt (int index)
+ {
+ qt_QMenuData_removeItemAt (QMenuData (), index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_clear (IntPtr raw);
+ public void Clear ()
+ {
+ qt_QMenuData_clear (QMenuData ());
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier);
+ public QKeySequence Accel (int identifier)
+ {
+ return (QKeySequence)LookupObject (qt_QMenuData_accel (QMenuData (), identifier), typeof(QKeySequence));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier);
+ public void SetAccel (QKeySequence key, int identifier)
+ {
+ qt_QMenuData_setAccel (QMenuData (), key.RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier);
+ public QIconSet IconSet (int identifier)
+ {
+ return (QIconSet)LookupObject (qt_QMenuData_iconSet (QMenuData (), identifier), typeof(QIconSet));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier);
+ public string Text (int identifier)
+ {
+ QString qstr = new QString (qt_QMenuData_text (QMenuData (), identifier));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_pixmap (IntPtr raw, int identifier);
+ public QPixmap Pixmap (int identifier)
+ {
+ return (QPixmap)LookupObject (qt_QMenuData_pixmap (QMenuData (), identifier), typeof(QPixmap));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setWhatsThis (IntPtr raw, int identifier, IntPtr arg1);
+ public void SetWhatsThis (int identifier, string arg1)
+ {
+ qt_QMenuData_setWhatsThis (QMenuData (), identifier, new QString (arg1).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier);
+ public string WhatsThis (int identifier)
+ {
+ QString qstr = new QString (qt_QMenuData_whatsThis (QMenuData (), identifier));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem (IntPtr raw, int identifier, IntPtr text);
+ public void ChangeItem (int identifier, string text)
+ {
+ qt_QMenuData_changeItem (QMenuData (), identifier, new QString (text).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem1 (IntPtr raw, int identifier, IntPtr pixmap);
+ public void ChangeItem (int identifier, QPixmap pixmap)
+ {
+ qt_QMenuData_changeItem1 (QMenuData (), identifier, pixmap.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem2 (IntPtr raw, int identifier, IntPtr icon, IntPtr text);
+ public void ChangeItem (int identifier, QIconSet icon, string text)
+ {
+ qt_QMenuData_changeItem2 (QMenuData (), identifier, icon.RawObject, new QString (text).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem3 (IntPtr raw, int identifier, IntPtr icon, IntPtr pixmap);
+ public void ChangeItem (int identifier, QIconSet icon, QPixmap pixmap)
+ {
+ qt_QMenuData_changeItem3 (QMenuData (), identifier, icon.RawObject, pixmap.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem4 (IntPtr raw, IntPtr text, int identifier);
+ public void ChangeItem (string text, int identifier)
+ {
+ qt_QMenuData_changeItem4 (QMenuData (), new QString (text).RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier);
+ public void ChangeItem (QPixmap pixmap, int identifier)
+ {
+ qt_QMenuData_changeItem5 (QMenuData (), pixmap.RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem6 (IntPtr raw, IntPtr icon, IntPtr text, int identifier);
+ public void ChangeItem (QIconSet icon, string text, int identifier)
+ {
+ qt_QMenuData_changeItem6 (QMenuData (), icon.RawObject, new QString (text).RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemActive (IntPtr raw, int identifier);
+ public bool IsItemActive (int identifier)
+ {
+ return qt_QMenuData_isItemActive (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemEnabled (IntPtr raw, int identifier);
+ public bool IsItemEnabled (int identifier)
+ {
+ return qt_QMenuData_isItemEnabled (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setItemEnabled (IntPtr raw, int identifier, bool enable);
+ public void SetItemEnabled (int identifier, bool enable)
+ {
+ qt_QMenuData_setItemEnabled (QMenuData (), identifier, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemChecked (IntPtr raw, int identifier);
+ public bool IsItemChecked (int identifier)
+ {
+ return qt_QMenuData_isItemChecked (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setItemChecked (IntPtr raw, int identifier, bool check);
+ public void SetItemChecked (int identifier, bool check)
+ {
+ qt_QMenuData_setItemChecked (QMenuData (), identifier, check);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_indexOf (IntPtr raw, int identifier);
+ public int IndexOf (int identifier)
+ {
+ return qt_QMenuData_indexOf (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_idAt (IntPtr raw, int index);
+ public int IdAt (int index)
+ {
+ return qt_QMenuData_idAt (QMenuData (), index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setId (IntPtr raw, int index, int identifier);
+ public void SetId (int index, int identifier)
+ {
+ qt_QMenuData_setId (QMenuData (), index, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_setItemParameter (IntPtr raw, int identifier, int param);
+ public bool SetItemParameter (int identifier, int param)
+ {
+ return qt_QMenuData_setItemParameter (QMenuData (), identifier, param);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_itemParameter (IntPtr raw, int identifier);
+ public int ItemParameter (int identifier)
+ {
+ return qt_QMenuData_itemParameter (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier);
+ public QMenuItem FindItem (int identifier)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findItem (QMenuData (), identifier), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent);
+ public QMenuItem FindItem (int identifier, QMenuData parent)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findItem1 (QMenuData (), identifier, parent.RawObject), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index);
+ public QMenuItem FindPopup (QPopupMenu arg1, int[] index)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findPopup (QMenuData (), arg1.RawObject, index), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1);
+ protected void MenuInsPopup (QPopupMenu arg1)
+ {
+ qt_QMenuData_menuInsPopup (QMenuData (), arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1);
+ protected void MenuDelPopup (QPopupMenu arg1)
+ {
+ qt_QMenuData_menuDelPopup (QMenuData (), arg1.RawObject);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member)
+ {
+ return InsertItem(text, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(text, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(text, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member)
+ {
+ return InsertItem(icon, text, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(icon, text, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member)
+ {
+ return InsertItem(pixmap, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(pixmap, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member)
+ {
+ return InsertItem(icon, pixmap, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(icon, pixmap, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(icon, pixmap, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (string text)
+ {
+ return InsertItem(text, (int) -1);
+ }
+
+ public int InsertItem (string text, int identifier)
+ {
+ return InsertItem(text, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text)
+ {
+ return InsertItem(icon, text, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, int identifier)
+ {
+ return InsertItem(icon, text, identifier, (int) -1);
+ }
+
+ public int InsertItem (string text, QPopupMenu popup)
+ {
+ return InsertItem(text, popup, (int) -1);
+ }
+
+ public int InsertItem (string text, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(text, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup)
+ {
+ return InsertItem(icon, text, popup, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(icon, text, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap)
+ {
+ return InsertItem(pixmap, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, int identifier)
+ {
+ return InsertItem(pixmap, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap)
+ {
+ return InsertItem(icon, pixmap, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, int identifier)
+ {
+ return InsertItem(icon, pixmap, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup)
+ {
+ return InsertItem(pixmap, popup, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(pixmap, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup)
+ {
+ return InsertItem(icon, pixmap, popup, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(icon, pixmap, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QWidget widget)
+ {
+ return InsertItem(widget, (int) -1);
+ }
+
+ public int InsertItem (QWidget widget, int identifier)
+ {
+ return InsertItem(widget, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom)
+ {
+ return InsertItem(icon, custom, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier)
+ {
+ return InsertItem(icon, custom, identifier, (int) -1);
+ }
+
+ public int InsertItem (QCustomMenuItem custom)
+ {
+ return InsertItem(custom, (int) -1);
+ }
+
+ public int InsertItem (QCustomMenuItem custom, int identifier)
+ {
+ return InsertItem(custom, identifier, (int) -1);
+ }
+
+ public int InsertSeparator ()
+ {
+ return InsertSeparator((int) -1);
+ }
+
+ public QMenuItem FindPopup (QPopupMenu arg1)
+ {
+ return FindPopup(arg1, new int[]{0});
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QMenuData.cs b/qtsharp/src/bindings/static/QMenuData.cs
new file mode 100644
index 00000000..dc2813a0
--- /dev/null
+++ b/qtsharp/src/bindings/static/QMenuData.cs
@@ -0,0 +1,719 @@
+// QMenuData.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Regenerated by Adam Treat on August 03 2002
+//
+// TODO
+// o The QMenu* and QPopupMenu classes need serious analysis. I've only added
+// functionality for C# slot support - I've not made sure its all working. :-)
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+
+ public class QMenuData : QtSupport, IQMenuData, IDisposable {
+
+ private Hashtable menuConnections;
+
+ public Hashtable MenuConnections {
+ get { return menuConnections; }
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QMenuData ();
+ public QMenuData () : this (QNull.Instance)
+ {
+ rawObject = qt_new_QMenuData ();
+ RegisterObject (this);
+ }
+
+ internal QMenuData (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QMenuData (QNull dummy) : base (QNull.Instance)
+ {
+ menuConnections = new Hashtable();
+ }
+
+ ~QMenuData ()
+ {
+ Dispose(false);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QMenuData (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QMenuData (rawObject);
+ deleted = true;
+ }
+
+ // The next two static methods are here to service all IQMenuData implementors.
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_connectItem (IntPtr raw, int identifier, IntPtr receiver, string member);
+
+ internal static bool ConnectItem (IQMenuData menu, IntPtr menudata, int id, QObject receiver, string slot)
+ {
+ if (QtSignal.traceConnects)
+ ErrMsg ("ConnectItem: ({0}) {1}, {2}, ({3}) {4}, {5}", menudata, menu, id, receiver.RawObject, receiver, slot);
+
+ QtSlot slotobj = new QtSlot(receiver, QtSignal.NormalizeParam(slot));
+
+ if (slotobj.IsCSharpSlot) {
+ ArrayList cxlist;
+
+ if ((cxlist = (ArrayList)menu.MenuConnections[id]) == null)
+ menu.MenuConnections[id] = cxlist = new ArrayList();
+ else if (cxlist.Contains(slotobj))
+ return false;
+
+ Delegate del;
+
+ switch (slotobj.Args) {
+ case "()":
+ del = Delegate.CreateDelegate (typeof (QtSignal.del_void), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_item_void (menudata, id, receiver.RawObject, del);
+ break;
+ case "(int)":
+ del = Delegate.CreateDelegate (typeof (QtSignal.del_int), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_item_int (((QtSupport)menu).RawObject, id, receiver.RawObject, del);
+ break;
+ default:
+ throw new ArgumentException("Unsupported slot arguments: " + slotobj.Args);
+ }
+
+ if (slotobj.WrapperPtr == IntPtr.Zero) {
+ return false;
+ }
+
+ slotobj.Callback = del;
+ cxlist.Add(slotobj);
+ return true;
+ }
+ else {
+ return qt_QMenuData_connectItem(menudata, id, receiver.RawObject, slot);
+ }
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_disconnectItem (IntPtr raw, int identifier, IntPtr receiver, string member);
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QObject (IntPtr raw);
+
+ internal static bool DisconnectItem (IQMenuData menu, IntPtr menudata, int id, QObject receiver, string slot)
+ {
+ if (QtSignal.traceConnects)
+ ErrMsg ("DisconnectItem: ({0}) {1}, {2}, ({3}) {4}, {5}", menudata, menu, id, receiver.RawObject, receiver, slot);
+
+ QtSlot slotobj = new QtSlot(receiver, QtSignal.NormalizeParam(slot));
+
+ if (slotobj.IsCSharpSlot) {
+ ArrayList cxlist;
+
+ if ((cxlist = (ArrayList)menu.MenuConnections[id]) == null)
+ return false;
+ else if (!cxlist.Contains(slotobj))
+ return false;
+
+ // FIXME Make sure LastIndexOf tests equality with Equals. MS docs are unclear...
+ slotobj = (QtSlot)cxlist[cxlist.LastIndexOf(slotobj)];
+ cxlist.Remove(slotobj);
+ if (cxlist.Count == 0)
+ menu.MenuConnections.Remove (cxlist);
+
+ // FIXME Make sure QObject's dtor auto-disconnects menu items.
+ qt_del_QObject (slotobj.WrapperPtr);
+ return true;
+ }
+ else {
+ return qt_QMenuData_disconnectItem (menudata, id, receiver.RawObject, slot);
+ }
+ }
+
+ // Hack so QMenuData implements IQMenuData...
+
+ public bool setItemParameter (int identifier, int param)
+ {
+ return false;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern uint qt_QMenuData_count (IntPtr raw);
+ public uint Count ()
+ {
+ return qt_QMenuData_count (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem4 (IntPtr raw, IntPtr text, int identifier, int index);
+ public int InsertItem (string text, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem4 (rawObject, new QString (text).RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem5 (IntPtr raw, IntPtr icon, IntPtr text, int identifier, int index);
+ public int InsertItem (QIconSet icon, string text, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem5 (rawObject, icon.RawObject, new QString (text).RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem6 (IntPtr raw, IntPtr text, IntPtr popup, int identifier, int index);
+ public int InsertItem (string text, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem6 (rawObject, new QString (text).RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem7 (IntPtr raw, IntPtr icon, IntPtr text, IntPtr popup, int identifier, int index);
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem7 (rawObject, icon.RawObject, new QString (text).RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem8 (IntPtr raw, IntPtr pixmap, int identifier, int index);
+ public int InsertItem (QPixmap pixmap, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem8 (rawObject, pixmap.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem9 (IntPtr raw, IntPtr icon, IntPtr pixmap, int identifier, int index);
+ public int InsertItem (QIconSet icon, QPixmap pixmap, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem9 (rawObject, icon.RawObject, pixmap.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem10 (IntPtr raw, IntPtr pixmap, IntPtr popup, int identifier, int index);
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem10 (rawObject, pixmap.RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem11 (IntPtr raw, IntPtr icon, IntPtr pixmap, IntPtr popup, int identifier, int index);
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem11 (rawObject, icon.RawObject, pixmap.RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem12 (IntPtr raw, IntPtr widget, int identifier, int index);
+ public int InsertItem (QWidget widget, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem12 (rawObject, widget.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem13 (IntPtr raw, IntPtr icon, IntPtr custom, int identifier, int index);
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem13 (rawObject, icon.RawObject, custom.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem14 (IntPtr raw, IntPtr custom, int identifier, int index);
+ public int InsertItem (QCustomMenuItem custom, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem14 (rawObject, custom.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertSeparator (IntPtr raw, int index);
+ public int InsertSeparator (int index)
+ {
+ return qt_QMenuData_insertSeparator (rawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_removeItem (IntPtr raw, int identifier);
+ public void RemoveItem (int identifier)
+ {
+ qt_QMenuData_removeItem (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_removeItemAt (IntPtr raw, int index);
+ public void RemoveItemAt (int index)
+ {
+ qt_QMenuData_removeItemAt (rawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_clear (IntPtr raw);
+ public void Clear ()
+ {
+ qt_QMenuData_clear (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier);
+ public QKeySequence Accel (int identifier)
+ {
+ return (QKeySequence)LookupObject (qt_QMenuData_accel (rawObject, identifier), typeof(QKeySequence));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier);
+ public void SetAccel (QKeySequence key, int identifier)
+ {
+ qt_QMenuData_setAccel (rawObject, key.RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier);
+ public QIconSet IconSet (int identifier)
+ {
+ return (QIconSet)LookupObject (qt_QMenuData_iconSet (rawObject, identifier), typeof(QIconSet));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier);
+ public string Text (int identifier)
+ {
+ QString qstr = new QString (qt_QMenuData_text (rawObject, identifier));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_pixmap (IntPtr raw, int identifier);
+ public QPixmap Pixmap (int identifier)
+ {
+ return (QPixmap)LookupObject (qt_QMenuData_pixmap (rawObject, identifier), typeof(QPixmap));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setWhatsThis (IntPtr raw, int identifier, IntPtr arg1);
+ public void SetWhatsThis (int identifier, string arg1)
+ {
+ qt_QMenuData_setWhatsThis (rawObject, identifier, new QString (arg1).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier);
+ public string WhatsThis (int identifier)
+ {
+ QString qstr = new QString (qt_QMenuData_whatsThis (rawObject, identifier));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem (IntPtr raw, int identifier, IntPtr text);
+ public void ChangeItem (int identifier, string text)
+ {
+ qt_QMenuData_changeItem (rawObject, identifier, new QString (text).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem1 (IntPtr raw, int identifier, IntPtr pixmap);
+ public void ChangeItem (int identifier, QPixmap pixmap)
+ {
+ qt_QMenuData_changeItem1 (rawObject, identifier, pixmap.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem2 (IntPtr raw, int identifier, IntPtr icon, IntPtr text);
+ public void ChangeItem (int identifier, QIconSet icon, string text)
+ {
+ qt_QMenuData_changeItem2 (rawObject, identifier, icon.RawObject, new QString (text).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem3 (IntPtr raw, int identifier, IntPtr icon, IntPtr pixmap);
+ public void ChangeItem (int identifier, QIconSet icon, QPixmap pixmap)
+ {
+ qt_QMenuData_changeItem3 (rawObject, identifier, icon.RawObject, pixmap.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem4 (IntPtr raw, IntPtr text, int identifier);
+ public void ChangeItem (string text, int identifier)
+ {
+ qt_QMenuData_changeItem4 (rawObject, new QString (text).RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier);
+ public void ChangeItem (QPixmap pixmap, int identifier)
+ {
+ qt_QMenuData_changeItem5 (rawObject, pixmap.RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem6 (IntPtr raw, IntPtr icon, IntPtr text, int identifier);
+ public void ChangeItem (QIconSet icon, string text, int identifier)
+ {
+ qt_QMenuData_changeItem6 (rawObject, icon.RawObject, new QString (text).RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemActive (IntPtr raw, int identifier);
+ public bool IsItemActive (int identifier)
+ {
+ return qt_QMenuData_isItemActive (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemEnabled (IntPtr raw, int identifier);
+ public bool IsItemEnabled (int identifier)
+ {
+ return qt_QMenuData_isItemEnabled (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setItemEnabled (IntPtr raw, int identifier, bool enable);
+ public void SetItemEnabled (int identifier, bool enable)
+ {
+ qt_QMenuData_setItemEnabled (rawObject, identifier, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemChecked (IntPtr raw, int identifier);
+ public bool IsItemChecked (int identifier)
+ {
+ return qt_QMenuData_isItemChecked (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setItemChecked (IntPtr raw, int identifier, bool check);
+ public void SetItemChecked (int identifier, bool check)
+ {
+ qt_QMenuData_setItemChecked (rawObject, identifier, check);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_indexOf (IntPtr raw, int identifier);
+ public int IndexOf (int identifier)
+ {
+ return qt_QMenuData_indexOf (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_idAt (IntPtr raw, int index);
+ public int IdAt (int index)
+ {
+ return qt_QMenuData_idAt (rawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setId (IntPtr raw, int index, int identifier);
+ public void SetId (int index, int identifier)
+ {
+ qt_QMenuData_setId (rawObject, index, identifier);
+ }
+
+ //********************* A temporary hack to divert connections to CSharpConnect *****************//
+
+ public bool ConnectItem (int identifier, QObject receiver, string slot)
+ {
+ return ConnectItem (this, this.RawObject, identifier, receiver, slot);
+ }
+
+ public bool DisconnectItem (int identifier, QObject receiver, string slot)
+ {
+ return DisconnectItem (this, this.RawObject, identifier, receiver, slot);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (text, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (icon, text, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (pixmap, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (icon, pixmap, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ //********************* A temporary hack to divert connections to CSharpConnect *****************//
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_setItemParameter (IntPtr raw, int identifier, int param);
+ public bool SetItemParameter (int identifier, int param)
+ {
+ return qt_QMenuData_setItemParameter (rawObject, identifier, param);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_itemParameter (IntPtr raw, int identifier);
+ public int ItemParameter (int identifier)
+ {
+ return qt_QMenuData_itemParameter (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier);
+ public QMenuItem FindItem (int identifier)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findItem (rawObject, identifier), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent);
+ public QMenuItem FindItem (int identifier, QMenuData parent)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findItem1 (rawObject, identifier, parent.RawObject), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index);
+ public QMenuItem FindPopup (QPopupMenu arg1, int[] index)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findPopup (rawObject, arg1.RawObject, index), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1);
+ protected void MenuInsPopup (QPopupMenu arg1)
+ {
+ qt_QMenuData_menuInsPopup (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1);
+ protected void MenuDelPopup (QPopupMenu arg1)
+ {
+ qt_QMenuData_menuDelPopup (rawObject, arg1.RawObject);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member)
+ {
+ return InsertItem(text, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(text, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(text, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member)
+ {
+ return InsertItem(icon, text, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(icon, text, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member)
+ {
+ return InsertItem(pixmap, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(pixmap, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member)
+ {
+ return InsertItem(icon, pixmap, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(icon, pixmap, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(icon, pixmap, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (string text)
+ {
+ return InsertItem(text, (int) -1);
+ }
+
+ public int InsertItem (string text, int identifier)
+ {
+ return InsertItem(text, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text)
+ {
+ return InsertItem(icon, text, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, int identifier)
+ {
+ return InsertItem(icon, text, identifier, (int) -1);
+ }
+
+ public int InsertItem (string text, QPopupMenu popup)
+ {
+ return InsertItem(text, popup, (int) -1);
+ }
+
+ public int InsertItem (string text, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(text, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup)
+ {
+ return InsertItem(icon, text, popup, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(icon, text, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap)
+ {
+ return InsertItem(pixmap, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, int identifier)
+ {
+ return InsertItem(pixmap, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap)
+ {
+ return InsertItem(icon, pixmap, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, int identifier)
+ {
+ return InsertItem(icon, pixmap, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup)
+ {
+ return InsertItem(pixmap, popup, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(pixmap, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup)
+ {
+ return InsertItem(icon, pixmap, popup, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(icon, pixmap, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QWidget widget)
+ {
+ return InsertItem(widget, (int) -1);
+ }
+
+ public int InsertItem (QWidget widget, int identifier)
+ {
+ return InsertItem(widget, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom)
+ {
+ return InsertItem(icon, custom, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier)
+ {
+ return InsertItem(icon, custom, identifier, (int) -1);
+ }
+
+ public int InsertItem (QCustomMenuItem custom)
+ {
+ return InsertItem(custom, (int) -1);
+ }
+
+ public int InsertItem (QCustomMenuItem custom, int identifier)
+ {
+ return InsertItem(custom, identifier, (int) -1);
+ }
+
+ public int InsertSeparator ()
+ {
+ return InsertSeparator((int) -1);
+ }
+
+ public QMenuItem FindPopup (QPopupMenu arg1)
+ {
+ return FindPopup(arg1, new int[]{0});
+ }
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_item_void (IntPtr instance, int id, IntPtr receiver, Delegate method);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_item_int (IntPtr instance, int id, IntPtr receiver, Delegate method);
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QNull.cs b/qtsharp/src/bindings/static/QNull.cs
new file mode 100644
index 00000000..d017da1c
--- /dev/null
+++ b/qtsharp/src/bindings/static/QNull.cs
@@ -0,0 +1,35 @@
+// QNull.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+namespace Qt {
+
+ using Qt;
+ using System;
+
+ internal struct QNull {
+
+ private static readonly QNull instance = new QNull (null);
+
+ private QNull (Object dummy) {}
+
+ internal static QNull Instance {
+ get {return instance;}
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QObject.cs b/qtsharp/src/bindings/static/QObject.cs
new file mode 100644
index 00000000..d016fa62
--- /dev/null
+++ b/qtsharp/src/bindings/static/QObject.cs
@@ -0,0 +1,609 @@
+// QObject.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Regenerated by Adam Treat on August 30 2002
+//
+// NOTES
+// o Methods related to Qt reflection have been marked internal. Most of them
+// should eventually be throttled, and this file regenerated
+// o Some event-related methods are also marked internal. I don't think we use
+// any of them, they can likely be throttled.
+//
+// TODO
+// o Should use children() in object tree tracking for constructing
+// complete tree representations.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+
+ //[DeclareQtSignal ("ChildDestroyed(QObject)")]
+ public class QObject : QtSupport, IDisposable {
+
+ // Hold an instance of the QApplication object
+ private static QApplication qapp;
+ private QtSignalMap csSignalMap;
+ private QtSignalMap cppSignalMap;
+
+ public static QApplication qApp {
+ get {return qapp;}
+ set {qapp = value;}
+ }
+
+ internal QtSignalMap CsSignalMap {
+ get { return csSignalMap; }
+ }
+
+ internal QtSignalMap CppSignalMap {
+ get { return cppSignalMap; }
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QObject (IntPtr parent, string name);
+ public QObject (QObject parent, string name) : this (QNull.Instance)
+ {
+ qparent = parent;
+
+ if (qparent == null)
+ parent = new QWidget (IntPtr.Zero);
+ else
+ qparent.AddChild (this);
+
+ rawObject = qt_new_QObject (parent.RawObject, name);
+ RegisterObject (this);
+ }
+
+ public QObject (QObject parent) : this (parent, "") {}
+
+ internal QObject () : this (QNull.Instance) {}
+
+ internal QObject (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject (this);
+ }
+
+ internal QObject (QNull dummy) : base (QNull.Instance)
+ {
+ InitSignals ();
+ }
+
+ // FIXME This ctor used only by QtSignal
+ internal QObject (NoSignalInit dummy) : base (QNull.Instance)
+ {
+ rawObject = qt_new_QObject (IntPtr.Zero, "");
+ RegisterObject (this);
+ }
+
+ ~QObject ()
+ {
+ Dispose(false);
+ }
+
+ protected override void Dispose (bool disposeManaged)
+ {
+ if (disposed)
+ return;
+
+ if (rawObject == IntPtr.Zero)
+ deleted = true;
+
+ if (disposeManaged) {
+ disposed = true;
+
+ UnregisterObject (this);
+
+ if (qparent != null ) {
+ if (qparent.Disposed)
+ deleted = true;
+ else
+ qparent.RemoveChild (this);
+ }
+
+ Disconnect ();
+
+ foreach (QtSupport qts in qchildren)
+ qts.Dispose ();
+
+ // UnregisterObject (); // FIXME
+ }
+
+ /*
+ DbgMsg ("({0}) {1}:: {2} managed. {3} native instance.",
+ deleted ? IntPtr.Zero : rawObject,
+ this,
+ disposeManaged ? "Disposing" : "Not disposing",
+ deleted ? "Not deleting" : "Deleting");
+ */
+
+ qparent = null;
+ qchildren = null;
+
+ Delete ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QObject (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QObject (rawObject);
+ deleted = true;
+ }
+
+ private void InitSignals ()
+ {
+ csSignalMap = new QtSignalMap (this, "C# Signals");
+ cppSignalMap = new QtSignalMap (this, "C++ Signals");
+
+ object[] attrs = GetType ().GetCustomAttributes (typeof (DeclareQtSignalAttribute), true);
+
+ foreach (DeclareQtSignalAttribute attr in attrs) {
+ string signal = attr.SignalName;
+
+ if (!CsSignalMap.Contains (signal))
+ CsSignalMap[signal] = new QtSignal (this, signal);
+ }
+ }
+
+ // [QtSlot]
+ internal protected void NativeDestroyed ()
+ {
+ deleted = true;
+ Dispose ();
+ }
+
+ public QObject QtCast()
+ {
+ string QtType = this.ClassName();
+ Type newType = Type.GetType( "Qt." + QtType );
+ object[] paramArray = { this.RawObject };
+ return (QObject) Activator.CreateInstance( newType, paramArray );
+ }
+
+ public static bool Connect(QObject sender, string signal, QObject receiver, string slot)
+ {
+ return QtSignal.Connect(sender, signal, receiver, slot);
+ }
+
+ public bool Connect (QObject sender, string signal, string member)
+ {
+ return Connect (sender, signal, this, member);
+ }
+
+ public static bool Disconnect(QObject sender, string signal, QObject receiver, string slot)
+ {
+ return QtSignal.Disconnect(sender, signal, receiver, slot);
+ }
+
+ public bool Disconnect ()
+ {
+ return Disconnect (this, null, null, null);
+ }
+
+ public bool Disconnect (string signal, QObject receiver, string member)
+ {
+ return Disconnect(this, signal, receiver, member);
+ }
+
+ public bool Disconnect (QObject receiver, string slot)
+ {
+ return Disconnect (this, null, receiver, slot);
+ }
+
+ public void Emit (string signal, params object[] args)
+ {
+ string sig = signal.Replace (" ", "");
+
+ if (CsSignalMap.Contains (sig))
+ CsSignalMap[sig].Emit (args);
+ else
+ throw new ArgumentException (this+" does not emit requested signal '"+sig+"'");
+ }
+
+ public void DumpConnections()
+ {
+ ErrMsg ("** ({0}) {1}: Dumping '{2}' map.", rawObject, this, CsSignalMap.Name);
+ CsSignalMap.DumpMap ();
+
+ ErrMsg ("** ({0}) {1}: Dumping '{2}' map.", rawObject, this, CppSignalMap.Name);
+ CppSignalMap.DumpMap ();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string qt_QObject_className (IntPtr raw);
+ public string ClassName ()
+ {
+ return qt_QObject_className (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_tr (IntPtr raw, string arg1, string arg2);
+ public string Tr (string arg1, string arg2)
+ {
+ QString qstr = new QString (qt_QObject_tr (rawObject, arg1, arg2));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_trUtf8 (IntPtr raw, string arg1, string arg2);
+ public string TrUtf8 (string arg1, string arg2)
+ {
+ QString qstr = new QString (qt_QObject_trUtf8 (rawObject, arg1, arg2));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_metaObject (IntPtr raw);
+ public QMetaObject MetaObject ()
+ {
+ return (QMetaObject)LookupObject (qt_QObject_metaObject (rawObject), typeof(QMetaObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_event (IntPtr raw, IntPtr arg1);
+ public bool Q_event (QEvent arg1)
+ {
+ return qt_QObject_event (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_eventFilter (IntPtr raw, IntPtr arg1, IntPtr arg2);
+ public bool EventFilter (QObject arg1, QEvent arg2)
+ {
+ return qt_QObject_eventFilter (rawObject, arg1.RawObject, arg2.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_isA (IntPtr raw, string arg1);
+ public bool IsA (string arg1)
+ {
+ return qt_QObject_isA (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_inherits (IntPtr raw, string arg1);
+ public bool Inherits (string arg1)
+ {
+ return qt_QObject_inherits (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string qt_QObject_name (IntPtr raw);
+ public string Name ()
+ {
+ return qt_QObject_name (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string qt_QObject_name1 (IntPtr raw, string defaultName);
+ public string Name (string defaultName)
+ {
+ return qt_QObject_name1 (rawObject, defaultName);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_setName (IntPtr raw, string name);
+ public void SetName (string name)
+ {
+ qt_QObject_setName (rawObject, name);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_isWidgetType (IntPtr raw);
+ public bool IsWidgetType ()
+ {
+ return qt_QObject_isWidgetType (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_highPriority (IntPtr raw);
+ public bool HighPriority ()
+ {
+ return qt_QObject_highPriority (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_signalsBlocked (IntPtr raw);
+ public bool SignalsBlocked ()
+ {
+ return qt_QObject_signalsBlocked (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_blockSignals (IntPtr raw, bool b);
+ public void BlockSignals (bool b)
+ {
+ qt_QObject_blockSignals (rawObject, b);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QObject_startTimer (IntPtr raw, int interval);
+ public int StartTimer (int interval)
+ {
+ return qt_QObject_startTimer (rawObject, interval);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_killTimer (IntPtr raw, int identifier);
+ public void KillTimer (int identifier)
+ {
+ qt_QObject_killTimer (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_killTimers (IntPtr raw);
+ public void KillTimers ()
+ {
+ qt_QObject_killTimers (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_child (IntPtr raw, string objName, string inheritsClass, bool recursiveSearch);
+ public QObject Child (string objName, string inheritsClass, bool recursiveSearch)
+ {
+ return (QObject)LookupObject (qt_QObject_child (rawObject, objName, inheritsClass, recursiveSearch), typeof(QObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_children (IntPtr raw);
+ public QObjectList Children ()
+ {
+ return (QObjectList)LookupObject (qt_QObject_children (rawObject), typeof(QObjectList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_queryList (IntPtr raw, string inheritsClass, string objName, bool regexpMatch, bool recursiveSearch);
+ public QObjectList QueryList (string inheritsClass, string objName, bool regexpMatch, bool recursiveSearch)
+ {
+ return (QObjectList)LookupObject (qt_QObject_queryList (rawObject, inheritsClass, objName, regexpMatch, recursiveSearch), typeof(QObjectList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_insertChild (IntPtr raw, IntPtr arg1);
+ public void InsertChild (QObject arg1)
+ {
+ qt_QObject_insertChild (rawObject, arg1.RawObject);
+ }
+
+ /*[DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_removeChild (IntPtr raw, IntPtr arg1);
+ public void RemoveChild (QObject arg1)
+ {
+ qt_QObject_removeChild (rawObject, arg1.RawObject);
+ }*/
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_installEventFilter (IntPtr raw, IntPtr arg1);
+ public void InstallEventFilter (QObject arg1)
+ {
+ qt_QObject_installEventFilter (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_removeEventFilter (IntPtr raw, IntPtr arg1);
+ public void RemoveEventFilter (QObject arg1)
+ {
+ qt_QObject_removeEventFilter (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_dumpObjectTree (IntPtr raw);
+ public void DumpObjectTree ()
+ {
+ qt_QObject_dumpObjectTree (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_dumpObjectInfo (IntPtr raw);
+ public void DumpObjectInfo ()
+ {
+ qt_QObject_dumpObjectInfo (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_setProperty (IntPtr raw, string name, IntPtr value);
+ public bool SetProperty (string name, QVariant value)
+ {
+ return qt_QObject_setProperty (rawObject, name, value.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_property (IntPtr raw, string name);
+ public QVariant Property (string name)
+ {
+ return (QVariant)LookupObject (qt_QObject_property (rawObject, name), typeof(QVariant));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_parent (IntPtr raw);
+ public QObject Parent ()
+ {
+ return (QObject)LookupObject (qt_QObject_parent (rawObject), typeof(QObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_deleteLater (IntPtr raw);
+ public void DeleteLater ()
+ {
+ qt_QObject_deleteLater (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_objectTrees ();
+ public static QObjectList ObjectTrees ()
+ {
+ return (QObjectList)LookupObject (qt_QObject_objectTrees (), typeof(QObjectList));
+ }
+
+ /*FIXME
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_connectInternal (IntPtr sender, int signal_index, IntPtr receiver, int membcode, int member_index);
+ public static void ConnectInternal (QObject sender, int signal_index, QObject receiver, int membcode, int member_index)
+ {
+ qt_QObject_connectInternal (sender.RawObject, signal_index, receiver.RawObject, membcode, member_index);
+ }
+ */
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_activate_filters (IntPtr raw, IntPtr arg1);
+ protected bool Activate_filters (QEvent arg1)
+ {
+ return qt_QObject_activate_filters (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_receivers (IntPtr raw, string signal);
+ protected QConnectionList Receivers (string signal)
+ {
+ return (QConnectionList)LookupObject (qt_QObject_receivers (rawObject, signal), typeof(QConnectionList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_receivers1 (IntPtr raw, int signal);
+ protected QConnectionList Receivers (int signal)
+ {
+ return (QConnectionList)LookupObject (qt_QObject_receivers1 (rawObject, signal), typeof(QConnectionList));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_activate_signal (IntPtr raw, int signal);
+ protected void Activate_signal (int signal)
+ {
+ qt_QObject_activate_signal (rawObject, signal);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_activate_signal1 (IntPtr raw, int signal, int arg1);
+ protected void Activate_signal (int signal, int arg1)
+ {
+ qt_QObject_activate_signal1 (rawObject, signal, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_activate_signal2 (IntPtr raw, int signal, double arg1);
+ protected void Activate_signal (int signal, double arg1)
+ {
+ qt_QObject_activate_signal2 (rawObject, signal, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_activate_signal3 (IntPtr raw, int signal, IntPtr arg1);
+ protected void Activate_signal (int signal, string arg1)
+ {
+ qt_QObject_activate_signal3 (rawObject, signal, new QString (arg1).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_activate_signal_bool (IntPtr raw, int signal, bool arg1);
+ protected void Activate_signal_bool (int signal, bool arg1)
+ {
+ qt_QObject_activate_signal_bool (rawObject, signal, arg1);
+ }
+
+ /*
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_activate_signal4 (IntPtr raw, IntPtr clist, IntPtr o);
+ protected void Activate_signal (QConnectionList clist, IntPtr o)
+ {
+ qt_QObject_activate_signal4 (rawObject, clist.RawObject, o);
+ }
+ */
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_sender (IntPtr raw);
+ protected QObject Sender ()
+ {
+ return (QObject)LookupObject (qt_QObject_sender (rawObject), typeof(QObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_connectNotify (IntPtr raw, string signal);
+ protected void ConnectNotify (string signal)
+ {
+ qt_QObject_connectNotify (rawObject, signal);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QObject_disconnectNotify (IntPtr raw, string signal);
+ protected void DisconnectNotify (string signal)
+ {
+ qt_QObject_disconnectNotify (rawObject, signal);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_checkConnectArgs (IntPtr raw, string signal, IntPtr receiver, string member);
+ protected bool CheckConnectArgs (string signal, QObject receiver, string member)
+ {
+ return qt_QObject_checkConnectArgs (rawObject, signal, receiver.RawObject, member);
+ }
+
+ /*
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QObject_normalizeSignalSlot (string signalSlot);
+ protected static QCString NormalizeSignalSlot (string signalSlot)
+ {
+ return (QCString)LookupObject (qt_QObject_normalizeSignalSlot (signalSlot), typeof(QCString));
+ }
+ */
+
+ public QObject Child (string objName)
+ {
+ return Child(objName, null);
+ }
+
+ public QObject Child (string objName, string inheritsClass)
+ {
+ return Child(objName, inheritsClass, true);
+ }
+
+ public QObjectList QueryList ()
+ {
+ return QueryList("");
+ }
+
+ public QObjectList QueryList (string inheritsClass)
+ {
+ return QueryList(inheritsClass, "");
+ }
+
+ public QObjectList QueryList (string inheritsClass, string objName)
+ {
+ return QueryList(inheritsClass, objName, true);
+ }
+
+ public QObjectList QueryList (string inheritsClass, string objName, bool regexpMatch)
+ {
+ return QueryList(inheritsClass, objName, regexpMatch, true);
+ }
+ }
+
+ // FIXME Used only by QtSignal
+ internal class NoSignalInit
+ {
+ public static readonly NoSignalInit Instance = new NoSignalInit ();
+ }
+}
diff --git a/qtsharp/src/bindings/static/QPopupMenu.cs b/qtsharp/src/bindings/static/QPopupMenu.cs
new file mode 100644
index 00000000..a4b6da09
--- /dev/null
+++ b/qtsharp/src/bindings/static/QPopupMenu.cs
@@ -0,0 +1,830 @@
+// QPopupMenu.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Regenerated by Adam Treat on August 03 2002
+//
+// TODO
+// o Override Dispose method, make sure slots are disconnected.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+
+ public class QPopupMenu : QFrame, IQMenuData, IDisposable {
+
+ private Hashtable menuConnections;
+
+ public Hashtable MenuConnections {
+ get { return menuConnections; }
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QPopupMenu (IntPtr parent, string name);
+ public QPopupMenu (QWidget parent, string name) : this (QNull.Instance)
+ {
+ qparent = parent;
+ if (qparent == null) parent = new QWidget (IntPtr.Zero);
+ rawObject = qt_new_QPopupMenu (parent.RawObject, name);
+ if (qparent == null) RegisterObject (this);
+ else qparent.AddChild (this);
+ }
+
+ public QPopupMenu () : this (new QWidget ()) {}
+
+ public QPopupMenu (QWidget parent) : this (parent, "") {}
+
+ internal QPopupMenu (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QPopupMenu (QNull dummy) : base (QNull.Instance)
+ {
+ menuConnections = new Hashtable();
+ }
+
+ ~QPopupMenu ()
+ {
+ Dispose (false);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QPopupMenu (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QPopupMenu (rawObject);
+ deleted = true;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_popup (IntPtr raw, IntPtr pos, int indexAtPoint);
+ public void Popup (QPoint pos, int indexAtPoint)
+ {
+ qt_QPopupMenu_popup (rawObject, pos.RawObject, indexAtPoint);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_updateItem (IntPtr raw, int identifier);
+ public void UpdateItem (int identifier)
+ {
+ qt_QPopupMenu_updateItem (rawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_setCheckable (IntPtr raw, bool arg1);
+ public void SetCheckable (bool arg1)
+ {
+ qt_QPopupMenu_setCheckable (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QPopupMenu_isCheckable (IntPtr raw);
+ public bool IsCheckable ()
+ {
+ return qt_QPopupMenu_isCheckable (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_setFont (IntPtr raw, IntPtr arg1);
+ public void SetFont (QFont arg1)
+ {
+ qt_QPopupMenu_setFont (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_show (IntPtr raw);
+ public void Show ()
+ {
+ qt_QPopupMenu_show (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_hide (IntPtr raw);
+ public void Hide ()
+ {
+ qt_QPopupMenu_hide (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_exec (IntPtr raw);
+ public int Exec ()
+ {
+ return qt_QPopupMenu_exec (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_exec1 (IntPtr raw, IntPtr pos, int indexAtPoint);
+ public int Exec (QPoint pos, int indexAtPoint)
+ {
+ return qt_QPopupMenu_exec1 (rawObject, pos.RawObject, indexAtPoint);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_setActiveItem (IntPtr raw, int arg1);
+ public void SetActiveItem (int arg1)
+ {
+ qt_QPopupMenu_setActiveItem (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QPopupMenu_sizeHint (IntPtr raw);
+ public QSize SizeHint ()
+ {
+ return (QSize)LookupObject (qt_QPopupMenu_sizeHint (rawObject), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_idAt (IntPtr raw, int index);
+ public int IdAt (int index)
+ {
+ return qt_QPopupMenu_idAt (rawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_idAt1 (IntPtr raw, IntPtr pos);
+ public int IdAt (QPoint pos)
+ {
+ return qt_QPopupMenu_idAt1 (rawObject, pos.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QPopupMenu_customWhatsThis (IntPtr raw);
+ public bool CustomWhatsThis ()
+ {
+ return qt_QPopupMenu_customWhatsThis (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_insertTearOffHandle (IntPtr raw, int identifier, int index);
+ public int InsertTearOffHandle (int identifier, int index)
+ {
+ return qt_QPopupMenu_insertTearOffHandle (rawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_activateItemAt (IntPtr raw, int index);
+ public void ActivateItemAt (int index)
+ {
+ qt_QPopupMenu_activateItemAt (rawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QPopupMenu_itemGeometry (IntPtr raw, int index);
+ public QRect ItemGeometry (int index)
+ {
+ return (QRect)LookupObject (qt_QPopupMenu_itemGeometry (rawObject, index), typeof(QRect));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_itemHeight (IntPtr raw, int arg1);
+ protected int ItemHeight (int arg1)
+ {
+ return qt_QPopupMenu_itemHeight (rawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_itemHeight1 (IntPtr raw, IntPtr mi);
+ protected int ItemHeight (QMenuItem mi)
+ {
+ return qt_QPopupMenu_itemHeight1 (rawObject, mi.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_drawItem (IntPtr raw, IntPtr p, int tab, IntPtr mi, bool act, int x, int y, int w, int h);
+ protected void DrawItem (QPainter p, int tab, QMenuItem mi, bool act, int x, int y, int w, int h)
+ {
+ qt_QPopupMenu_drawItem (rawObject, p.RawObject, tab, mi.RawObject, act, x, y, w, h);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_drawContents (IntPtr raw, IntPtr arg1);
+ protected void DrawContents (QPainter arg1)
+ {
+ qt_QPopupMenu_drawContents (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QPopupMenu_styleChange (IntPtr raw, IntPtr arg1);
+ protected void StyleChange (QStyle arg1)
+ {
+ qt_QPopupMenu_styleChange (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_columns (IntPtr raw);
+ protected int Columns ()
+ {
+ return qt_QPopupMenu_columns (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QPopupMenu_focusNextPrevChild (IntPtr raw, bool next);
+ protected bool FocusNextPrevChild (bool next)
+ {
+ return qt_QPopupMenu_focusNextPrevChild (rawObject, next);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QPopupMenu_itemAtPos (IntPtr raw, IntPtr arg1, bool ignoreSeparator);
+ protected int ItemAtPos (QPoint arg1, bool ignoreSeparator)
+ {
+ return qt_QPopupMenu_itemAtPos (rawObject, arg1.RawObject, ignoreSeparator);
+ }
+
+ public void Popup (QPoint pos)
+ {
+ Popup(pos, (int) 0);
+ }
+
+ public int Exec (QPoint pos)
+ {
+ return Exec(pos, (int) 0);
+ }
+
+ public int InsertTearOffHandle ()
+ {
+ return InsertTearOffHandle((int) -1);
+ }
+
+ public int InsertTearOffHandle (int identifier)
+ {
+ return InsertTearOffHandle(identifier, (int) -1);
+ }
+
+ protected int ItemAtPos (QPoint arg1)
+ {
+ return ItemAtPos(arg1, true);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QPopupMenu_QMenuData (IntPtr raw);
+ public IntPtr QMenuData ()
+ {
+ return qt_QPopupMenu_QMenuData (rawObject);
+ }
+
+ // Begin interface methods.
+
+
+ //********************* A temporary hack to divert connections to CSharpConnect *****************//
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (text, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (icon, text, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (pixmap, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier, int index)
+ {
+ int id = InsertItem (icon, pixmap, identifier, index);
+ SetAccel (accel, id);
+ ConnectItem (id, receiver, member);
+ return id;
+ }
+
+ public bool ConnectItem (int identifier, QObject receiver, string member)
+ {
+ return Qt.QMenuData.ConnectItem (this, QMenuData (), identifier, receiver, member);
+ }
+
+ public bool DisconnectItem (int identifier, QObject receiver, string member)
+ {
+ return Qt.QMenuData.DisconnectItem (this, QMenuData (), identifier, receiver, member);
+ }
+
+ //********************* A temporary hack to divert connections to CSharpConnect *****************//
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern uint qt_QMenuData_count (IntPtr raw);
+ public uint Count ()
+ {
+ return qt_QMenuData_count (QMenuData ());
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem4 (IntPtr raw, IntPtr text, int identifier, int index);
+ public int InsertItem (string text, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem4 (QMenuData (), new QString (text).RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem5 (IntPtr raw, IntPtr icon, IntPtr text, int identifier, int index);
+ public int InsertItem (QIconSet icon, string text, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem5 (QMenuData (), icon.RawObject, new QString (text).RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem6 (IntPtr raw, IntPtr text, IntPtr popup, int identifier, int index);
+ public int InsertItem (string text, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem6 (QMenuData (), new QString (text).RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem7 (IntPtr raw, IntPtr icon, IntPtr text, IntPtr popup, int identifier, int index);
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem7 (QMenuData (), icon.RawObject, new QString (text).RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem8 (IntPtr raw, IntPtr pixmap, int identifier, int index);
+ public int InsertItem (QPixmap pixmap, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem8 (QMenuData (), pixmap.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem9 (IntPtr raw, IntPtr icon, IntPtr pixmap, int identifier, int index);
+ public int InsertItem (QIconSet icon, QPixmap pixmap, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem9 (QMenuData (), icon.RawObject, pixmap.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem10 (IntPtr raw, IntPtr pixmap, IntPtr popup, int identifier, int index);
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem10 (QMenuData (), pixmap.RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem11 (IntPtr raw, IntPtr icon, IntPtr pixmap, IntPtr popup, int identifier, int index);
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem11 (QMenuData (), icon.RawObject, pixmap.RawObject, popup.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem12 (IntPtr raw, IntPtr widget, int identifier, int index);
+ public int InsertItem (QWidget widget, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem12 (QMenuData (), widget.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem13 (IntPtr raw, IntPtr icon, IntPtr custom, int identifier, int index);
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem13 (QMenuData (), icon.RawObject, custom.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertItem14 (IntPtr raw, IntPtr custom, int identifier, int index);
+ public int InsertItem (QCustomMenuItem custom, int identifier, int index)
+ {
+ return qt_QMenuData_insertItem14 (QMenuData (), custom.RawObject, identifier, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_insertSeparator (IntPtr raw, int index);
+ public int InsertSeparator (int index)
+ {
+ return qt_QMenuData_insertSeparator (QMenuData (), index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_removeItem (IntPtr raw, int identifier);
+ public void RemoveItem (int identifier)
+ {
+ qt_QMenuData_removeItem (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_removeItemAt (IntPtr raw, int index);
+ public void RemoveItemAt (int index)
+ {
+ qt_QMenuData_removeItemAt (QMenuData (), index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_clear (IntPtr raw);
+ public void Clear ()
+ {
+ qt_QMenuData_clear (QMenuData ());
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier);
+ public QKeySequence Accel (int identifier)
+ {
+ return (QKeySequence)LookupObject (qt_QMenuData_accel (QMenuData (), identifier), typeof(QKeySequence));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier);
+ public void SetAccel (QKeySequence key, int identifier)
+ {
+ qt_QMenuData_setAccel (QMenuData (), key.RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier);
+ public QIconSet IconSet (int identifier)
+ {
+ return (QIconSet)LookupObject (qt_QMenuData_iconSet (QMenuData (), identifier), typeof(QIconSet));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier);
+ public string Text (int identifier)
+ {
+ QString qstr = new QString (qt_QMenuData_text (QMenuData (), identifier));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_pixmap (IntPtr raw, int identifier);
+ public QPixmap Pixmap (int identifier)
+ {
+ return (QPixmap)LookupObject (qt_QMenuData_pixmap (QMenuData (), identifier), typeof(QPixmap));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setWhatsThis (IntPtr raw, int identifier, IntPtr arg1);
+ public void SetWhatsThis (int identifier, string arg1)
+ {
+ qt_QMenuData_setWhatsThis (QMenuData (), identifier, new QString (arg1).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier);
+ public string WhatsThis (int identifier)
+ {
+ QString qstr = new QString (qt_QMenuData_whatsThis (QMenuData (), identifier));
+ string str = qstr.Latin1 ();
+ qstr.Dispose ();
+ return str;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem (IntPtr raw, int identifier, IntPtr text);
+ public void ChangeItem (int identifier, string text)
+ {
+ qt_QMenuData_changeItem (QMenuData (), identifier, new QString (text).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem1 (IntPtr raw, int identifier, IntPtr pixmap);
+ public void ChangeItem (int identifier, QPixmap pixmap)
+ {
+ qt_QMenuData_changeItem1 (QMenuData (), identifier, pixmap.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem2 (IntPtr raw, int identifier, IntPtr icon, IntPtr text);
+ public void ChangeItem (int identifier, QIconSet icon, string text)
+ {
+ qt_QMenuData_changeItem2 (QMenuData (), identifier, icon.RawObject, new QString (text).RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem3 (IntPtr raw, int identifier, IntPtr icon, IntPtr pixmap);
+ public void ChangeItem (int identifier, QIconSet icon, QPixmap pixmap)
+ {
+ qt_QMenuData_changeItem3 (QMenuData (), identifier, icon.RawObject, pixmap.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem4 (IntPtr raw, IntPtr text, int identifier);
+ public void ChangeItem (string text, int identifier)
+ {
+ qt_QMenuData_changeItem4 (QMenuData (), new QString (text).RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier);
+ public void ChangeItem (QPixmap pixmap, int identifier)
+ {
+ qt_QMenuData_changeItem5 (QMenuData (), pixmap.RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_changeItem6 (IntPtr raw, IntPtr icon, IntPtr text, int identifier);
+ public void ChangeItem (QIconSet icon, string text, int identifier)
+ {
+ qt_QMenuData_changeItem6 (QMenuData (), icon.RawObject, new QString (text).RawObject, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemActive (IntPtr raw, int identifier);
+ public bool IsItemActive (int identifier)
+ {
+ return qt_QMenuData_isItemActive (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemEnabled (IntPtr raw, int identifier);
+ public bool IsItemEnabled (int identifier)
+ {
+ return qt_QMenuData_isItemEnabled (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setItemEnabled (IntPtr raw, int identifier, bool enable);
+ public void SetItemEnabled (int identifier, bool enable)
+ {
+ qt_QMenuData_setItemEnabled (QMenuData (), identifier, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_isItemChecked (IntPtr raw, int identifier);
+ public bool IsItemChecked (int identifier)
+ {
+ return qt_QMenuData_isItemChecked (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setItemChecked (IntPtr raw, int identifier, bool check);
+ public void SetItemChecked (int identifier, bool check)
+ {
+ qt_QMenuData_setItemChecked (QMenuData (), identifier, check);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_indexOf (IntPtr raw, int identifier);
+ public int IndexOf (int identifier)
+ {
+ return qt_QMenuData_indexOf (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_setId (IntPtr raw, int index, int identifier);
+ public void SetId (int index, int identifier)
+ {
+ qt_QMenuData_setId (QMenuData (), index, identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QMenuData_setItemParameter (IntPtr raw, int identifier, int param);
+ public bool SetItemParameter (int identifier, int param)
+ {
+ return qt_QMenuData_setItemParameter (QMenuData (), identifier, param);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QMenuData_itemParameter (IntPtr raw, int identifier);
+ public int ItemParameter (int identifier)
+ {
+ return qt_QMenuData_itemParameter (QMenuData (), identifier);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier);
+ public QMenuItem FindItem (int identifier)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findItem (QMenuData (), identifier), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent);
+ public QMenuItem FindItem (int identifier, QMenuData parent)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findItem1 (QMenuData (), identifier, parent.RawObject), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index);
+ public QMenuItem FindPopup (QPopupMenu arg1, int[] index)
+ {
+ return (QMenuItem)LookupObject (qt_QMenuData_findPopup (QMenuData (), arg1.RawObject, index), typeof(QMenuItem));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1);
+ protected void MenuInsPopup (QPopupMenu arg1)
+ {
+ qt_QMenuData_menuInsPopup (QMenuData (), arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1);
+ protected void MenuDelPopup (QPopupMenu arg1)
+ {
+ qt_QMenuData_menuDelPopup (QMenuData (), arg1.RawObject);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member)
+ {
+ return InsertItem(text, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(text, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (string text, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(text, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member)
+ {
+ return InsertItem(icon, text, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(icon, text, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member)
+ {
+ return InsertItem(pixmap, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(pixmap, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member)
+ {
+ return InsertItem(icon, pixmap, receiver, member, new QKeySequence ());
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel)
+ {
+ return InsertItem(icon, pixmap, receiver, member, accel, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QObject receiver, string member, QKeySequence accel, int identifier)
+ {
+ return InsertItem(icon, pixmap, receiver, member, accel, identifier, (int) -1);
+ }
+
+ public int InsertItem (string text)
+ {
+ return InsertItem(text, (int) -1);
+ }
+
+ public int InsertItem (string text, int identifier)
+ {
+ return InsertItem(text, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text)
+ {
+ return InsertItem(icon, text, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, int identifier)
+ {
+ return InsertItem(icon, text, identifier, (int) -1);
+ }
+
+ public int InsertItem (string text, QPopupMenu popup)
+ {
+ return InsertItem(text, popup, (int) -1);
+ }
+
+ public int InsertItem (string text, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(text, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup)
+ {
+ return InsertItem(icon, text, popup, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, string text, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(icon, text, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap)
+ {
+ return InsertItem(pixmap, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, int identifier)
+ {
+ return InsertItem(pixmap, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap)
+ {
+ return InsertItem(icon, pixmap, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, int identifier)
+ {
+ return InsertItem(icon, pixmap, identifier, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup)
+ {
+ return InsertItem(pixmap, popup, (int) -1);
+ }
+
+ public int InsertItem (QPixmap pixmap, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(pixmap, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup)
+ {
+ return InsertItem(icon, pixmap, popup, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QPixmap pixmap, QPopupMenu popup, int identifier)
+ {
+ return InsertItem(icon, pixmap, popup, identifier, (int) -1);
+ }
+
+ public int InsertItem (QWidget widget)
+ {
+ return InsertItem(widget, (int) -1);
+ }
+
+ public int InsertItem (QWidget widget, int identifier)
+ {
+ return InsertItem(widget, identifier, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom)
+ {
+ return InsertItem(icon, custom, (int) -1);
+ }
+
+ public int InsertItem (QIconSet icon, QCustomMenuItem custom, int identifier)
+ {
+ return InsertItem(icon, custom, identifier, (int) -1);
+ }
+
+ public int InsertItem (QCustomMenuItem custom)
+ {
+ return InsertItem(custom, (int) -1);
+ }
+
+ public int InsertItem (QCustomMenuItem custom, int identifier)
+ {
+ return InsertItem(custom, identifier, (int) -1);
+ }
+
+ public int InsertSeparator ()
+ {
+ return InsertSeparator((int) -1);
+ }
+
+ public QMenuItem FindPopup (QPopupMenu arg1)
+ {
+ return FindPopup(arg1, new int[]{0});
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QString.cs b/qtsharp/src/bindings/static/QString.cs
new file mode 100644
index 00000000..fd532256
--- /dev/null
+++ b/qtsharp/src/bindings/static/QString.cs
@@ -0,0 +1,1340 @@
+// QString.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Static file customized to allow unicode strings and
+// other features
+
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public class QString : QtSupport, IDisposable {
+
+ public enum SectionFlags {
+ SectionDefault = 0,
+ SectionSkipEmpty = 1,
+ SectionIncludeLeadingSep = 2,
+ SectionIncludeTrailingSep = 4,
+ SectionCaseInsensitiveSeps = 8
+ }
+
+
+ [DllImport("libqtc")]
+ private static extern IntPtr qt_QString_null ();
+ public static readonly QString Null = new QString (qt_QString_null ());
+
+ // TODO: Is there a good reason why this C# constructor is public?
+ [DllImport("libqtc")]
+ private static extern IntPtr qt_new_QString ();
+ public QString () : this (QNull.Instance)
+ {
+ rawObject = qt_new_QString ();
+ }
+
+ // TODO: Make sure there is a QChar constructor that
+ // handles unicode conversion
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QString1 (IntPtr arg1);
+ public QString (QChar arg1) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QString1 (arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QString2 (IntPtr arg1);
+ public QString (QString arg1) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QString2 (arg1.RawObject);
+ }
+
+ // TODO: Verify that this works. We have weak support for
+ // QByteArray
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QString3 (IntPtr arg1);
+ public QString (QByteArray arg1) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QString3 (arg1.RawObject);
+ }
+
+ // TODO: This signature is wrong. The C++ version is
+ // takes a pointer to a sequence of QChars, not a single
+ // QChar
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QString4 (IntPtr unicode, uint length);
+ public QString (QChar unicode, uint length) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QString4 (unicode.RawObject, length);
+
+ }
+
+ [DllImport("libqtc")]
+ private static extern IntPtr qt_QString_setUnicodeCodes(
+ IntPtr raw,
+ [MarshalAs(UnmanagedType.LPWStr)] string s,
+ uint len);
+
+ public QString( string s ): this( QNull.Instance )
+ {
+ rawObject = qt_new_QString ();
+ rawObject = qt_QString_setUnicodeCodes(
+ rawObject, s, (uint) s.Length );
+ }
+
+ internal QString (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+
+ }
+
+ internal QString (QNull dummy) : base (QNull.Instance) {}
+
+
+ [DllImport("libqtc")]
+ private static extern void qt_del_QString (IntPtr str);
+ ~QString ()
+ {
+ qt_del_QString (rawObject);
+ }
+
+
+ [DllImport("libqtc")]
+ private static extern ushort qt_QChar_unicode (IntPtr raw);
+
+ public char this[int index]
+ {
+ get
+ {
+ return (char) qt_QChar_unicode(
+ qt_QString_at( rawObject, (uint) index ) );
+ }
+ }
+
+ public static implicit operator string ( QString s )
+ {
+ int length = (int) s.Length();
+ char[] t = new char[length];
+
+ for (int i = 0; i < length; i++ )
+ t[i] = s[i];
+
+ return new String(t);
+ }
+
+ public static implicit operator QString ( string s )
+ {
+ return new QString(s);
+ }
+
+ public override string ToString ()
+ {
+ return (string) this;
+ }
+
+ public static QString operator + ( QString a, QString b )
+ {
+ QString result = new QString (qt_new_QString2( a.rawObject ));
+ result.rawObject =
+ qt_QString_append2( result.rawObject, b.rawObject );
+ return result;
+ }
+
+ // TODO: Do we need ==, !=, Equals(), etc?
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QString_isNull (IntPtr raw);
+ public bool IsNull ()
+ {
+ return qt_QString_isNull (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QString_isEmpty (IntPtr raw);
+ public bool IsEmpty ()
+ {
+ return qt_QString_isEmpty (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern uint qt_QString_length (IntPtr raw);
+ public uint Length ()
+ {
+ return qt_QString_length (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QString_truncate (IntPtr raw, uint pos);
+ public void Truncate (uint pos)
+ {
+ qt_QString_truncate (rawObject, pos);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_fill (IntPtr raw, IntPtr c, int len);
+ public QString Fill (QChar c, int len)
+ {
+ return new QString (qt_QString_fill (rawObject, c.RawObject, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg (IntPtr raw, long a, int fieldwidth, int Q_base);
+ public QString Arg (long a, int fieldwidth, int Q_base)
+ {
+ return new QString (qt_QString_arg (rawObject, a, fieldwidth, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg1 (IntPtr raw, ulong a, int fieldwidth, int Q_base);
+ public QString Arg (ulong a, int fieldwidth, int Q_base)
+ {
+ return new QString (qt_QString_arg1 (rawObject, a, fieldwidth, Q_base));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg2 (IntPtr raw, int a, int fieldwidth, int Q_base);
+ public QString Arg (int a, int fieldwidth, int Q_base)
+ {
+ return new QString (qt_QString_arg2 (rawObject, a, fieldwidth, Q_base));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg3 (IntPtr raw, uint a, int fieldwidth, int Q_base);
+ public QString Arg (uint a, int fieldwidth, int Q_base)
+ {
+ return new QString (qt_QString_arg3 (rawObject, a, fieldwidth, Q_base));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg4 (IntPtr raw, short a, int fieldwidth, int Q_base);
+ public QString Arg (short a, int fieldwidth, int Q_base)
+ {
+ return new QString (qt_QString_arg4 (rawObject, a, fieldwidth, Q_base));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg5 (IntPtr raw, ushort a, int fieldwidth, int Q_base);
+ public QString Arg (ushort a, int fieldwidth, int Q_base)
+ {
+ return new QString (qt_QString_arg5 (rawObject, a, fieldwidth, Q_base));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg6 (IntPtr raw, char a, int fieldwidth);
+ public QString Arg (char a, int fieldwidth)
+ {
+ return new QString (qt_QString_arg6 (rawObject, a, fieldwidth));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg7 (IntPtr raw, IntPtr a, int fieldwidth);
+ public QString Arg (QChar a, int fieldwidth)
+ {
+ return new QString (qt_QString_arg7 (rawObject, a.RawObject, fieldwidth));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg8 (IntPtr raw, IntPtr a, int fieldwidth);
+ public QString Arg (QString a, int fieldwidth)
+ {
+ return new QString (qt_QString_arg8 (rawObject, a.RawObject, fieldwidth));
+
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_arg9 (IntPtr raw, double a, int fieldwidth, char fmt, int prec);
+ public QString Arg (double a, int fieldwidth, char fmt, int prec)
+ {
+ return new QString (qt_QString_arg9 (rawObject, a, fieldwidth, fmt, prec));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_find (IntPtr raw, IntPtr c, int index, bool cs);
+ public int Find (QChar c, int index, bool cs)
+ {
+ return qt_QString_find (rawObject, c.RawObject, index, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_find1 (IntPtr raw, char c, int index, bool cs);
+ public int Find (char c, int index, bool cs)
+ {
+ return qt_QString_find1 (rawObject, c, index, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_find2 (IntPtr raw, IntPtr str, int index, bool cs);
+ public int Find (QString str, int index, bool cs)
+ {
+ return qt_QString_find2 (rawObject, str.RawObject, index, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_find3 (IntPtr raw, IntPtr arg1, int index);
+ public int Find (QRegExp arg1, int index)
+ {
+ return qt_QString_find3 (rawObject, arg1.RawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_find4 (IntPtr raw, string str, int index);
+ public int Find (string str, int index)
+ {
+ return qt_QString_find4 (rawObject, str, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_findRev (IntPtr raw, IntPtr c, int index, bool cs);
+ public int FindRev (QChar c, int index, bool cs)
+ {
+ return qt_QString_findRev (rawObject, c.RawObject, index, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_findRev1 (IntPtr raw, char c, int index, bool cs);
+ public int FindRev (char c, int index, bool cs)
+ {
+ return qt_QString_findRev1 (rawObject, c, index, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_findRev2 (IntPtr raw, IntPtr str, int index, bool cs);
+ public int FindRev (QString str, int index, bool cs)
+ {
+ return qt_QString_findRev2 (rawObject, str.RawObject, index, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_findRev3 (IntPtr raw, IntPtr arg1, int index);
+ public int FindRev (QRegExp arg1, int index)
+ {
+ return qt_QString_findRev3 (rawObject, arg1.RawObject, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_findRev4 (IntPtr raw, string str, int index);
+ public int FindRev (string str, int index)
+ {
+ return qt_QString_findRev4 (rawObject, str, index);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_contains (IntPtr raw, IntPtr c, bool cs);
+ public int Contains (QChar c, bool cs)
+ {
+ return qt_QString_contains (rawObject, c.RawObject, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_contains1 (IntPtr raw, char c, bool cs);
+ public int Contains (char c, bool cs)
+ {
+ return qt_QString_contains1 (rawObject, c, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_contains2 (IntPtr raw, string str, bool cs);
+ public int Contains (string str, bool cs)
+ {
+ return qt_QString_contains2 (rawObject, str, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_contains3 (IntPtr raw, IntPtr str, bool cs);
+ public int Contains (QString str, bool cs)
+ {
+ return qt_QString_contains3 (rawObject, str.RawObject, cs);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_contains4 (IntPtr raw, IntPtr arg1);
+ public int Contains (QRegExp arg1)
+ {
+ return qt_QString_contains4 (rawObject, arg1.RawObject);
+ }
+
+ // TODO: This is wrong. sep should be a QChar* in C++ terms
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_section (IntPtr raw, IntPtr sep, int start, int end, QString.SectionFlags SectionFlags);
+ public QString Section (QChar sep, int start, int end, QString.SectionFlags SectionFlags)
+ {
+ return new QString (qt_QString_section (rawObject, sep.RawObject, start, end, SectionFlags));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_section1 (IntPtr raw, char sep, int start, int end, QString.SectionFlags SectionFlags);
+ public QString Section (char sep, int start, int end, QString.SectionFlags SectionFlags)
+ {
+ return new QString (qt_QString_section1 (rawObject, sep, start, end, SectionFlags));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_section2 (IntPtr raw, string in_sep, int start, int end, QString.SectionFlags SectionFlags);
+ public QString Section (string in_sep, int start, int end, QString.SectionFlags SectionFlags)
+ {
+ return new QString (qt_QString_section2 (rawObject, in_sep, start, end, SectionFlags));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_section3 (IntPtr raw, IntPtr in_sep, int start, int end, QString.SectionFlags SectionFlags);
+ public QString Section (QString in_sep, int start, int end, QString.SectionFlags SectionFlags)
+ {
+ return new QString (qt_QString_section3 (rawObject, in_sep.RawObject, start, end, SectionFlags));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_section4 (IntPtr raw, IntPtr reg, int start, int end, QString.SectionFlags SectionFlags);
+ public QString Section (QRegExp reg, int start, int end, QString.SectionFlags SectionFlags)
+ {
+ return new QString (qt_QString_section4 (rawObject, reg.RawObject, start, end, SectionFlags));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_left (IntPtr raw, uint len);
+ public QString Left (uint len)
+ {
+ return new QString (qt_QString_left (rawObject, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_right (IntPtr raw, uint len);
+ public QString Right (uint len)
+ {
+ return new QString (qt_QString_right (rawObject, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_mid (IntPtr raw, uint index, uint len);
+ public QString Mid (uint index, uint len)
+ {
+ return new QString (qt_QString_mid (rawObject, index, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_leftJustify (IntPtr raw, uint width, IntPtr fill, bool trunc);
+ public QString LeftJustify (uint width, QChar fill, bool trunc)
+ {
+ return new QString (qt_QString_leftJustify (rawObject, width, fill.RawObject, trunc));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_rightJustify (IntPtr raw, uint width, IntPtr fill, bool trunc);
+ public QString RightJustify (uint width, QChar fill, bool trunc)
+ {
+ return new QString (qt_QString_rightJustify (rawObject, width, fill.RawObject, trunc));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_lower (IntPtr raw);
+ public QString Lower ()
+ {
+ return new QString (qt_QString_lower (rawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_upper (IntPtr raw);
+ public QString Upper ()
+ {
+ return new QString (qt_QString_upper (rawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_stripWhiteSpace (IntPtr raw);
+ public QString StripWhiteSpace ()
+ {
+ return new QString (qt_QString_stripWhiteSpace (rawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_simplifyWhiteSpace (IntPtr raw);
+ public QString SimplifyWhiteSpace ()
+ {
+ return new QString (qt_QString_simplifyWhiteSpace (rawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_insert (IntPtr raw, uint index, IntPtr arg1);
+ public QString Insert (uint index, QString arg1)
+ {
+ return new QString (qt_QString_insert (rawObject, index, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_insert1 (IntPtr raw, uint index, IntPtr arg1, uint len);
+ public QString Insert (uint index, QChar arg1, uint len)
+ {
+ return new QString (qt_QString_insert1 (rawObject, index, arg1.RawObject, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_insert2 (IntPtr raw, uint index, IntPtr arg1);
+ public QString Insert (uint index, QChar arg1)
+ {
+ return new QString (qt_QString_insert2 (rawObject, index, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_insert3 (IntPtr raw, uint index, char c);
+ public QString Insert (uint index, char c)
+ {
+ return new QString (qt_QString_insert3 (rawObject, index, c));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_append (IntPtr raw, char arg1);
+ public QString Append (char arg1)
+ {
+ return new QString (qt_QString_append (rawObject, arg1));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_append1 (IntPtr raw, IntPtr arg1);
+ public QString Append (QChar arg1)
+ {
+ return new QString (qt_QString_append1 (rawObject, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_append2 (IntPtr raw, IntPtr arg1);
+ public QString Append (QString arg1)
+ {
+ return new QString (qt_QString_append2 (rawObject, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_prepend (IntPtr raw, char arg1);
+ public QString Prepend (char arg1)
+ {
+ return new QString (qt_QString_prepend (rawObject, arg1));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_prepend1 (IntPtr raw, IntPtr arg1);
+ public QString Prepend (QChar arg1)
+ {
+ return new QString (qt_QString_prepend1 (rawObject, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_prepend2 (IntPtr raw, IntPtr arg1);
+ public QString Prepend (QString arg1)
+ {
+ return new QString (qt_QString_prepend2 (rawObject, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_remove (IntPtr raw, uint index, uint len);
+ public QString Remove (uint index, uint len)
+ {
+ return new QString (qt_QString_remove (rawObject, index, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_replace (IntPtr raw, uint index, uint len, IntPtr arg1);
+ public QString Replace (uint index, uint len, QString arg1)
+ {
+ return new QString (qt_QString_replace (rawObject, index, len, arg1.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_replace1 (IntPtr raw, uint index, uint len, IntPtr arg1, uint clen);
+ public QString Replace (uint index, uint len, QChar arg1, uint clen)
+ {
+ return new QString (qt_QString_replace1 (rawObject, index, len, arg1.RawObject, clen));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_replace2 (IntPtr raw, IntPtr arg1, IntPtr arg2);
+ public QString Replace (QRegExp arg1, QString arg2)
+ {
+ return new QString (qt_QString_replace2 (rawObject, arg1.RawObject, arg2.RawObject));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern short qt_QString_toShort (IntPtr raw, bool ok, int Q_base);
+ public short ToShort (bool ok, int Q_base)
+ {
+ return qt_QString_toShort (rawObject, ok, Q_base);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern ushort qt_QString_toUShort (IntPtr raw, bool ok, int Q_base);
+ public ushort ToUShort (bool ok, int Q_base)
+ {
+ return qt_QString_toUShort (rawObject, ok, Q_base);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_toInt (IntPtr raw, bool ok, int Q_base);
+ public int ToInt (bool ok, int Q_base)
+ {
+ return qt_QString_toInt (rawObject, ok, Q_base);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern uint qt_QString_toUInt (IntPtr raw, bool ok, int Q_base);
+ public uint ToUInt (bool ok, int Q_base)
+ {
+ return qt_QString_toUInt (rawObject, ok, Q_base);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern long qt_QString_toLong (IntPtr raw, bool ok, int Q_base);
+ public long ToLong (bool ok, int Q_base)
+ {
+ return qt_QString_toLong (rawObject, ok, Q_base);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern ulong qt_QString_toULong (IntPtr raw, bool ok, int Q_base);
+ public ulong ToULong (bool ok, int Q_base)
+ {
+ return qt_QString_toULong (rawObject, ok, Q_base);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern float qt_QString_toFloat (IntPtr raw, bool ok);
+ public float ToFloat (bool ok)
+ {
+ return qt_QString_toFloat (rawObject, ok);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern double qt_QString_toDouble (IntPtr raw, bool ok);
+ public double ToDouble (bool ok)
+ {
+ return qt_QString_toDouble (rawObject, ok);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum (IntPtr raw, short arg1, int Q_base);
+ public QString SetNum (short arg1, int Q_base)
+ {
+ return new QString (qt_QString_setNum (rawObject, arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum1 (IntPtr raw, ushort arg1, int Q_base);
+ public QString SetNum (ushort arg1, int Q_base)
+ {
+ return new QString (qt_QString_setNum1 (rawObject, arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum2 (IntPtr raw, int arg1, int Q_base);
+ public QString SetNum (int arg1, int Q_base)
+ {
+ return new QString (qt_QString_setNum2 (rawObject, arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum3 (IntPtr raw, uint arg1, int Q_base);
+ public QString SetNum (uint arg1, int Q_base)
+ {
+ return new QString (qt_QString_setNum3 (rawObject, arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum4 (IntPtr raw, long arg1, int Q_base);
+ public QString SetNum (long arg1, int Q_base)
+ {
+ return new QString (qt_QString_setNum4 (rawObject, arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum5 (IntPtr raw, ulong arg1, int Q_base);
+ public QString SetNum (ulong arg1, int Q_base)
+ {
+ return new QString (qt_QString_setNum5 (rawObject, arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum6 (IntPtr raw, float arg1, char f, int prec);
+ public QString SetNum (float arg1, char f, int prec)
+ {
+ return new QString (qt_QString_setNum6 (rawObject, arg1, f, prec));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setNum7 (IntPtr raw, double arg1, char f, int prec);
+ public QString SetNum (double arg1, char f, int prec)
+ {
+ return new QString (qt_QString_setNum7 (rawObject, arg1, f, prec));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QString_setExpand (IntPtr raw, uint index, IntPtr c);
+ public void SetExpand (uint index, QChar c)
+ {
+ qt_QString_setExpand (rawObject, index, c.RawObject);
+ }
+
+ // TODO: The QChar functions need to get fixed
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_at (IntPtr raw, uint i);
+ public QChar At (uint i)
+ {
+ return LookupObject (qt_QString_at (rawObject, i), typeof (QChar)) as QChar;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_constref (IntPtr raw, uint i);
+ public QChar Constref (uint i)
+ {
+ return LookupObject (qt_QString_constref (rawObject, i), typeof (QChar)) as QChar;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_ref (IntPtr raw, uint i);
+ public QChar Q_ref (uint i)
+ {
+ return LookupObject (qt_QString_ref (rawObject, i), typeof (QChar)) as QChar;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_unicode (IntPtr raw);
+ public QChar Unicode ()
+ {
+ return LookupObject (qt_QString_unicode (rawObject), typeof (QChar)) as QChar;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string qt_QString_ascii (IntPtr raw);
+ public string Ascii ()
+ {
+ return qt_QString_ascii (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string qt_QString_latin1 (IntPtr raw);
+ public string Latin1 ()
+ {
+ return qt_QString_latin1 (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_utf8 (IntPtr raw);
+ public QCString Utf8 ()
+ {
+ return LookupObject (qt_QString_utf8 (rawObject), typeof (QCString)) as QCString;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_local8Bit (IntPtr raw);
+ public QCString Local8Bit ()
+ {
+ return LookupObject (qt_QString_local8Bit (rawObject), typeof (QCString)) as QCString;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setUnicode (IntPtr raw, IntPtr unicode, uint len);
+ public QString SetUnicode (QChar unicode, uint len)
+ {
+ return new QString (qt_QString_setUnicode (rawObject, unicode.RawObject, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_setLatin1 (IntPtr raw, string arg1, int len);
+ public QString SetLatin1 (string arg1, int len)
+ {
+ return new QString (qt_QString_setLatin1 (rawObject, arg1, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_compare (IntPtr raw, IntPtr s);
+ public int Compare (QString s)
+ {
+ return qt_QString_compare (rawObject, s.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_localeAwareCompare (IntPtr raw, IntPtr s);
+ public int LocaleAwareCompare (QString s)
+ {
+ return qt_QString_localeAwareCompare (rawObject, s.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QString_compose (IntPtr raw);
+ public void Compose ()
+ {
+ qt_QString_compose (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern string qt_QString_data (IntPtr raw);
+ public string Data ()
+ {
+ return qt_QString_data (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QString_startsWith (IntPtr raw, IntPtr arg1);
+ public bool StartsWith (QString arg1)
+ {
+ return qt_QString_startsWith (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QString_endsWith (IntPtr raw, IntPtr arg1);
+ public bool EndsWith (QString arg1)
+ {
+ return qt_QString_endsWith (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QString_setLength (IntPtr raw, uint newLength);
+ public void SetLength (uint newLength)
+ {
+ qt_QString_setLength (rawObject, newLength);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QString_simpleText (IntPtr raw);
+ public bool SimpleText ()
+ {
+ return qt_QString_simpleText (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QString_isRightToLeft (IntPtr raw);
+ public bool IsRightToLeft ()
+ {
+ return qt_QString_isRightToLeft (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_number (long arg1, int Q_base);
+ public static QString Number (long arg1, int Q_base)
+ {
+ return new QString (qt_QString_number (arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_number1 (ulong arg1, int Q_base);
+ public static QString Number (ulong arg1, int Q_base)
+ {
+ return new QString (qt_QString_number1 (arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_number2 (int arg1, int Q_base);
+ public static QString Number (int arg1, int Q_base)
+ {
+ return new QString (qt_QString_number2 (arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_number3 (uint arg1, int Q_base);
+ public static QString Number (uint arg1, int Q_base)
+ {
+ return new QString (qt_QString_number3 (arg1, Q_base));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_number4 (double arg1, char f, int prec);
+ public static QString Number (double arg1, char f, int prec)
+ {
+ return new QString (qt_QString_number4 (arg1, f, prec));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_fromLatin1 (string arg1, int len);
+ public static QString FromLatin1 (string arg1, int len)
+ {
+ return new QString (qt_QString_fromLatin1 (arg1, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_fromUtf8 (QString arg1, int len);
+ public static QString FromUtf8 (string arg1, int len)
+ {
+ return new QString (qt_QString_fromUtf8 (arg1, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QString_fromLocal8Bit (QString arg1, int len);
+ public static QString FromLocal8Bit (string arg1, int len)
+ {
+ return new QString (qt_QString_fromLocal8Bit (arg1, len));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_compare1 (IntPtr s1, IntPtr s2);
+ public static int Compare (QString s1, QString s2)
+ {
+ return qt_QString_compare1 (s1.RawObject, s2.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QString_localeAwareCompare1 (IntPtr s1, IntPtr s2);
+ public static int LocaleAwareCompare (QString s1, QString s2)
+ {
+ return qt_QString_localeAwareCompare1 (s1.RawObject, s2.RawObject);
+ }
+
+ public QString Fill (QChar c)
+ {
+ return Fill(c, (int) -1);
+ }
+
+ public QString Arg (long a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (long a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (int) 10);
+ }
+
+ public QString Arg (ulong a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (ulong a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (int) 10);
+ }
+
+ public QString Arg (int a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (int a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (int) 10);
+ }
+
+ public QString Arg (uint a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (uint a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (int) 10);
+ }
+
+ public QString Arg (short a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (short a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (int) 10);
+ }
+
+ public QString Arg (ushort a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (ushort a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (int) 10);
+ }
+
+ public QString Arg (char a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (QChar a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (QString a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (double a)
+ {
+ return Arg(a, (int) 0);
+ }
+
+ public QString Arg (double a, int fieldwidth)
+ {
+ return Arg(a, fieldwidth, (char) 'g');
+ }
+
+ public QString Arg (double a, int fieldwidth, char fmt)
+ {
+ return Arg(a, fieldwidth, fmt, (int) -1);
+ }
+
+ public int Find (QChar c)
+ {
+ return Find(c, (int) 0);
+ }
+
+ public int Find (QChar c, int index)
+ {
+ return Find(c, index, true);
+ }
+
+ public int Find (char c)
+ {
+ return Find(c, (int) 0);
+ }
+
+ public int Find (char c, int index)
+ {
+ return Find(c, index, true);
+ }
+
+ public int Find (QString str)
+ {
+ return Find(str, (int) 0);
+ }
+
+ public int Find (QString str, int index)
+ {
+ return Find(str, index, true);
+ }
+
+ public int Find (QRegExp arg1)
+ {
+ return Find(arg1, (int) 0);
+ }
+
+ public int Find (string str)
+ {
+ return Find(str, (int) 0);
+ }
+
+ public int FindRev (QChar c)
+ {
+ return FindRev(c, (int) -1);
+ }
+
+ public int FindRev (QChar c, int index)
+ {
+ return FindRev(c, index, true);
+ }
+
+ public int FindRev (char c)
+ {
+ return FindRev(c, (int) -1);
+ }
+
+ public int FindRev (char c, int index)
+ {
+ return FindRev(c, index, true);
+ }
+
+ public int FindRev (QString str)
+ {
+ return FindRev(str, (int) -1);
+ }
+
+ public int FindRev (QString str, int index)
+ {
+ return FindRev(str, index, true);
+ }
+
+ public int FindRev (QRegExp arg1)
+ {
+ return FindRev(arg1, (int) -1);
+ }
+
+ public int FindRev (string str)
+ {
+ return FindRev(str, (int) -1);
+ }
+
+ public int Contains (QChar c)
+ {
+ return Contains(c, true);
+ }
+
+ public int Contains (char c)
+ {
+ return Contains(c, true);
+ }
+
+ public int Contains (QString str)
+ {
+ return Contains(str, true);
+ }
+
+ public int Contains (string str)
+ {
+ return Contains(str, true);
+ }
+
+ public QString Section (QChar sep, int start)
+ {
+ return Section(sep, start, (int) 1);
+ }
+
+ public QString Section (QChar sep, int start, int end)
+ {
+ return Section(sep, start, end, QString.SectionFlags.SectionDefault);
+ }
+
+ public QString Section (char sep, int start)
+ {
+ return Section(sep, start, (int) 1);
+ }
+
+ public QString Section (char sep, int start, int end)
+ {
+ return Section(sep, start, end, QString.SectionFlags.SectionDefault);
+ }
+
+ public QString Section (QString in_sep, int start)
+ {
+ return Section(in_sep, start, (int) 1);
+ }
+
+ public QString Section (QString in_sep, int start, int end)
+ {
+ return Section(in_sep, start, end, QString.SectionFlags.SectionDefault);
+ }
+
+ public QString Section (string in_sep, int start)
+ {
+ return Section(in_sep, start, (int) 1);
+ }
+
+ public QString Section (string in_sep, int start, int end)
+ {
+ return Section(in_sep, start, end, QString.SectionFlags.SectionDefault);
+ }
+
+ public QString Section (QRegExp reg, int start)
+ {
+ return Section(reg, start, (int) 1);
+ }
+
+ public QString Section (QRegExp reg, int start, int end)
+ {
+ return Section(reg, start, end, QString.SectionFlags.SectionDefault);
+ }
+
+ public QString Mid (uint index)
+ {
+ return Mid(index, (uint) 1);
+ }
+
+ public QString LeftJustify (uint width)
+ {
+ return LeftJustify(width, new QChar ());
+ }
+
+ public QString LeftJustify (uint width, QChar fill)
+ {
+ return LeftJustify(width, fill, false);
+ }
+
+ public QString RightJustify (uint width)
+ {
+ return RightJustify(width, new QChar ());
+ }
+
+ public QString RightJustify (uint width, QChar fill)
+ {
+ return RightJustify(width, fill, false);
+ }
+
+ public short ToShort ()
+ {
+ return ToShort(false);
+ }
+
+ public short ToShort (bool ok)
+ {
+ return ToShort(ok, (int) 10);
+ }
+
+ public ushort ToUShort ()
+ {
+ return ToUShort(false);
+ }
+
+ public ushort ToUShort (bool ok)
+ {
+ return ToUShort(ok, (int) 10);
+ }
+
+ public int ToInt ()
+ {
+ return ToInt(false);
+ }
+
+ public int ToInt (bool ok)
+ {
+ return ToInt(ok, (int) 10);
+ }
+
+ public uint ToUInt ()
+ {
+ return ToUInt(false);
+ }
+
+ public uint ToUInt (bool ok)
+ {
+ return ToUInt(ok, (int) 10);
+ }
+
+ public long ToLong ()
+ {
+ return ToLong(false);
+ }
+
+ public long ToLong (bool ok)
+ {
+ return ToLong(ok, (int) 10);
+ }
+
+ public ulong ToULong ()
+ {
+ return ToULong(false);
+ }
+
+ public ulong ToULong (bool ok)
+ {
+ return ToULong(ok, (int) 10);
+ }
+
+ public float ToFloat ()
+ {
+ return ToFloat(false);
+ }
+
+ public double ToDouble ()
+ {
+ return ToDouble(false);
+ }
+
+ public QString SetNum (short arg1)
+ {
+ return SetNum(arg1, (int) 10);
+ }
+
+ public QString SetNum (ushort arg1)
+ {
+ return SetNum(arg1, (int) 10);
+ }
+
+ public QString SetNum (int arg1)
+ {
+ return SetNum(arg1, (int) 10);
+ }
+
+ public QString SetNum (uint arg1)
+ {
+ return SetNum(arg1, (int) 10);
+ }
+
+ public QString SetNum (long arg1)
+ {
+ return SetNum(arg1, (int) 10);
+ }
+
+ public QString SetNum (ulong arg1)
+ {
+ return SetNum(arg1, (int) 10);
+ }
+
+ public QString SetNum (float arg1)
+ {
+ return SetNum(arg1, (char) 'g');
+ }
+
+ public QString SetNum (float arg1, char f)
+ {
+ return SetNum(arg1, f, (int) 6);
+ }
+
+ public QString SetNum (double arg1)
+ {
+ return SetNum(arg1, (char) 'g');
+ }
+
+ public QString SetNum (double arg1, char f)
+ {
+ return SetNum(arg1, f, (int) 6);
+ }
+
+ public QString SetLatin1 (QString arg1)
+ {
+ return SetLatin1(arg1, (int) -1);
+ }
+
+ public static QString Number (long arg1)
+ {
+ return Number(arg1, (int) 10);
+ }
+
+ public static QString Number (ulong arg1)
+ {
+ return Number(arg1, (int) 10);
+ }
+
+ public static QString Number (int arg1)
+ {
+ return Number(arg1, (int) 10);
+ }
+
+ public static QString Number (uint arg1)
+ {
+ return Number(arg1, (int) 10);
+ }
+
+ public static QString Number (double arg1)
+ {
+ return Number(arg1, (char) 'g');
+ }
+
+ public static QString Number (double arg1, char f)
+ {
+ return Number(arg1, f, (int) 6);
+ }
+
+ public static QString FromLatin1 (QString arg1)
+ {
+ return FromLatin1(arg1, (int) -1);
+ }
+
+ public static QString FromUtf8 (QString arg1)
+ {
+ return FromUtf8(arg1, (int) -1);
+ }
+
+ public static QString FromLocal8Bit (QString arg1)
+ {
+ return FromLocal8Bit(arg1, (int) -1);
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QStyle.cs b/qtsharp/src/bindings/static/QStyle.cs
new file mode 100644
index 00000000..c61ec005
--- /dev/null
+++ b/qtsharp/src/bindings/static/QStyle.cs
@@ -0,0 +1,595 @@
+// QStyle.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public class QStyle : QObject, IDisposable {
+
+ public enum PrimitiveElement: long {
+ PE_ButtonCommand = 0,
+ PE_ButtonDefault = 1,
+ PE_ButtonBevel = 2,
+ PE_ButtonTool = 3,
+ PE_ButtonDropDown = 4,
+ PE_FocusRect = 5,
+ PE_ArrowUp = 6,
+ PE_ArrowDown = 7,
+ PE_ArrowRight = 8,
+ PE_ArrowLeft = 9,
+ PE_SpinWidgetUp = 10,
+ PE_SpinWidgetDown = 11,
+ PE_SpinWidgetPlus = 12,
+ PE_SpinWidgetMinus = 13,
+ PE_Indicator = 14,
+ PE_IndicatorMask = 15,
+ PE_ExclusiveIndicator = 16,
+ PE_ExclusiveIndicatorMask = 17,
+ PE_DockWindowHandle = 18,
+ PE_DockWindowSeparator = 19,
+ PE_DockWindowResizeHandle = 20,
+ PE_Splitter = 21,
+ PE_Panel = 22,
+ PE_PanelPopup = 23,
+ PE_PanelMenuBar = 24,
+ PE_PanelDockWindow = 25,
+ PE_TabBarBase = 26,
+ PE_HeaderSection = 27,
+ PE_HeaderArrow = 28,
+ PE_StatusBarSection = 29,
+ PE_GroupBoxFrame = 30,
+ PE_Separator = 31,
+ PE_SizeGrip = 32,
+ PE_CheckMark = 33,
+ PE_ScrollBarAddLine = 34,
+ PE_ScrollBarSubLine = 35,
+ PE_ScrollBarAddPage = 36,
+ PE_ScrollBarSubPage = 37,
+ PE_ScrollBarSlider = 38,
+ PE_ScrollBarFirst = 39,
+ PE_ScrollBarLast = 40,
+ PE_ProgressBarChunk = 41,
+ PE_PanelLineEdit = 42,
+ PE_PanelTabWidget = 43,
+ PE_WindowFrame = 44,
+ PE_CustomBase = 251658240
+ }
+
+ public enum StyleFlags {
+ Style_Default = 0,
+ Style_Enabled = 1,
+ Style_Raised = 2,
+ Style_Sunken = 4,
+ Style_Off = 8,
+ Style_NoChange = 16,
+ Style_On = 32,
+ Style_Down = 64,
+ Style_Horizontal = 128,
+ Style_HasFocus = 256,
+ Style_Top = 512,
+ Style_Bottom = 1024,
+ Style_FocusAtBorder = 2048,
+ Style_AutoRaise = 4096,
+ Style_MouseOver = 8192,
+ Style_Up = 16384,
+ Style_Selected = 32768,
+ Style_Active = 65536,
+ Style_ButtonDefault = 131072
+ }
+
+ public enum ControlElement: long {
+ CE_PushButton = 0,
+ CE_PushButtonLabel = 1,
+ CE_CheckBox = 2,
+ CE_CheckBoxLabel = 3,
+ CE_RadioButton = 4,
+ CE_RadioButtonLabel = 5,
+ CE_TabBarTab = 6,
+ CE_TabBarLabel = 7,
+ CE_ProgressBarGroove = 8,
+ CE_ProgressBarContents = 9,
+ CE_ProgressBarLabel = 10,
+ CE_PopupMenuItem = 11,
+ CE_MenuBarItem = 12,
+ CE_ToolButtonLabel = 13,
+ CE_CustomBase = 4026531840
+ }
+
+ public enum SubRect: long {
+ SR_PushButtonContents = 0,
+ SR_PushButtonFocusRect = 1,
+ SR_CheckBoxIndicator = 2,
+ SR_CheckBoxContents = 3,
+ SR_CheckBoxFocusRect = 4,
+ SR_RadioButtonIndicator = 5,
+ SR_RadioButtonContents = 6,
+ SR_RadioButtonFocusRect = 7,
+ SR_ComboBoxFocusRect = 8,
+ SR_SliderFocusRect = 9,
+ SR_DockWindowHandleRect = 10,
+ SR_ProgressBarGroove = 11,
+ SR_ProgressBarContents = 12,
+ SR_ProgressBarLabel = 13,
+ SR_ToolButtonContents = 14,
+ SR_CustomBase = 4026531840
+ }
+
+ public enum ComplexControl: long {
+ CC_SpinWidget = 0,
+ CC_ComboBox = 1,
+ CC_ScrollBar = 2,
+ CC_Slider = 3,
+ CC_ToolButton = 4,
+ CC_TitleBar = 5,
+ CC_ListView = 6,
+ CC_CustomBase = 4026531840
+ }
+
+ public enum SubControl: long {
+ SC_None = 0,
+ SC_ScrollBarAddLine = 1,
+ SC_ScrollBarSubLine = 2,
+ SC_ScrollBarAddPage = 4,
+ SC_ScrollBarSubPage = 8,
+ SC_ScrollBarFirst = 16,
+ SC_ScrollBarLast = 32,
+ SC_ScrollBarSlider = 64,
+ SC_ScrollBarGroove = 128,
+ SC_SpinWidgetUp = 1,
+ SC_SpinWidgetDown = 2,
+ SC_SpinWidgetFrame = 4,
+ SC_SpinWidgetEditField = 8,
+ SC_SpinWidgetButtonField = 16,
+ SC_ComboBoxFrame = 1,
+ SC_ComboBoxEditField = 2,
+ SC_ComboBoxArrow = 4,
+ SC_SliderGroove = 1,
+ SC_SliderHandle = 2,
+ SC_SliderTickmarks = 4,
+ SC_ToolButton = 1,
+ SC_ToolButtonMenu = 2,
+ SC_TitleBarLabel = 1,
+ SC_TitleBarSysMenu = 2,
+ SC_TitleBarMinButton = 4,
+ SC_TitleBarMaxButton = 8,
+ SC_TitleBarCloseButton = 16,
+ SC_TitleBarNormalButton = 32,
+ SC_TitleBarShadeButton = 64,
+ SC_TitleBarUnshadeButton = 128,
+ SC_ListView = 1,
+ SC_ListViewBranch = 2,
+ SC_ListViewExpand = 4,
+ SC_All = 4294967295
+ }
+
+ public enum PixelMetric: long {
+ PM_ButtonMargin = 0,
+ PM_ButtonDefaultIndicator = 1,
+ PM_MenuButtonIndicator = 2,
+ PM_ButtonShiftHorizontal = 3,
+ PM_ButtonShiftVertical = 4,
+ PM_DefaultFrameWidth = 5,
+ PM_SpinBoxFrameWidth = 6,
+ PM_MaximumDragDistance = 7,
+ PM_ScrollBarExtent = 8,
+ PM_ScrollBarSliderMin = 9,
+ PM_SliderThickness = 10,
+ PM_SliderControlThickness = 11,
+ PM_SliderLength = 12,
+ PM_SliderTickmarkOffset = 13,
+ PM_SliderSpaceAvailable = 14,
+ PM_DockWindowSeparatorExtent = 15,
+ PM_DockWindowHandleExtent = 16,
+ PM_DockWindowFrameWidth = 17,
+ PM_MenuBarFrameWidth = 18,
+ PM_TabBarTabOverlap = 19,
+ PM_TabBarTabHSpace = 20,
+ PM_TabBarTabVSpace = 21,
+ PM_TabBarBaseHeight = 22,
+ PM_TabBarBaseOverlap = 23,
+ PM_ProgressBarChunkWidth = 24,
+ PM_SplitterWidth = 25,
+ PM_TitleBarHeight = 26,
+ PM_IndicatorWidth = 27,
+ PM_IndicatorHeight = 28,
+ PM_ExclusiveIndicatorWidth = 29,
+ PM_ExclusiveIndicatorHeight = 30,
+ PM_CustomBase = 4026531840
+ }
+
+ public enum ContentsType: long {
+ CT_PushButton = 0,
+ CT_CheckBox = 1,
+ CT_RadioButton = 2,
+ CT_ToolButton = 3,
+ CT_ComboBox = 4,
+ CT_Splitter = 5,
+ CT_DockWindow = 6,
+ CT_ProgressBar = 7,
+ CT_PopupMenuItem = 8,
+ CT_CustomBase = 4026531840
+ }
+
+ public enum StyleHint: long {
+ SH_EtchDisabledText = 0,
+ SH_GUIStyle = 1,
+ SH_ScrollBar_BackgroundMode = 2,
+ SH_ScrollBar_MiddleClickAbsolutePosition = 3,
+ SH_ScrollBar_ScrollWhenPointerLeavesControl = 4,
+ SH_TabBar_SelectMouseType = 5,
+ SH_TabBar_Alignment = 6,
+ SH_Header_ArrowAlignment = 7,
+ SH_Slider_SnapToValue = 8,
+ SH_Slider_SloppyKeyEvents = 9,
+ SH_ProgressDialog_CenterCancelButton = 10,
+ SH_ProgressDialog_TextLabelAlignment = 11,
+ SH_PrintDialog_RightAlignButtons = 12,
+ SH_MainWindow_SpaceBelowMenuBar = 13,
+ SH_FontDialog_SelectAssociatedText = 14,
+ SH_PopupMenu_AllowActiveAndDisabled = 15,
+ SH_PopupMenu_SpaceActivatesItem = 16,
+ SH_PopupMenu_SubMenuPopupDelay = 17,
+ SH_ScrollView_FrameOnlyAroundContents = 18,
+ SH_MenuBar_AltKeyNavigation = 19,
+ SH_ComboBox_ListMouseTracking = 20,
+ SH_PopupMenu_MouseTracking = 21,
+ SH_MenuBar_MouseTracking = 22,
+ SH_ItemView_ChangeHighlightOnFocus = 23,
+ SH_Widget_ShareActivation = 24,
+ SH_Workspace_FillSpaceOnMaximize = 25,
+ SH_ComboBox_Popup = 26,
+ SH_TitleBar_NoBorder = 27,
+ SH_ScrollBar_StopMouseOverSlider = 28,
+ SH_BlinkCursorWhenTextSelected = 29,
+ SH_RichText_FullWidthSelection = 30,
+ SH_CustomBase = 4026531840
+ }
+
+ public enum StylePixmap: long {
+ SP_TitleBarMinButton = 0,
+ SP_TitleBarMaxButton = 1,
+ SP_TitleBarCloseButton = 2,
+ SP_TitleBarNormalButton = 3,
+ SP_TitleBarShadeButton = 4,
+ SP_TitleBarUnshadeButton = 5,
+ SP_DockWindowCloseButton = 6,
+ SP_MessageBoxInformation = 7,
+ SP_MessageBoxWarning = 8,
+ SP_MessageBoxCritical = 9,
+ SP_CustomBase = 4026531840
+ }
+
+ internal QStyle () : this (QNull.Instance) {}
+
+ internal QStyle (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QStyle (QNull dummy) : base (QNull.Instance) {}
+
+ ~QStyle ()
+ {
+ Dispose(false);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QStyle (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QStyle (rawObject);
+ deleted = true;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_polish (IntPtr raw, IntPtr arg1);
+ public void polish (QWidget arg1)
+ {
+ qt_QStyle_polish (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_unPolish (IntPtr raw, IntPtr arg1);
+ public void unPolish (QWidget arg1)
+ {
+ qt_QStyle_unPolish (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_polish1 (IntPtr raw, IntPtr arg1);
+ public void polish (QApplication arg1)
+ {
+ qt_QStyle_polish1 (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_unPolish1 (IntPtr raw, IntPtr arg1);
+ public void unPolish (QApplication arg1)
+ {
+ qt_QStyle_unPolish1 (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_polish2 (IntPtr raw, IntPtr arg1);
+ public void polish (QPalette arg1)
+ {
+ qt_QStyle_polish2 (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_polishPopupMenu (IntPtr raw, IntPtr arg1);
+ public void polishPopupMenu (QPopupMenu arg1)
+ {
+ qt_QStyle_polishPopupMenu (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_itemRect (IntPtr raw, IntPtr p, IntPtr r, int flags, bool enabled, IntPtr pixmap, IntPtr text, int len);
+ public QRect itemRect (QPainter p, QRect r, int flags, bool enabled, QPixmap pixmap, string text, int len)
+ {
+ return (QRect)LookupObject (qt_QStyle_itemRect (rawObject, p.RawObject, r.RawObject, flags, enabled, pixmap.RawObject, new QString (text).RawObject, len), typeof(QRect));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_drawItem (IntPtr raw, IntPtr p, IntPtr r, int flags, IntPtr g, bool enabled, IntPtr pixmap, IntPtr text, int len, IntPtr penColor);
+ public void drawItem (QPainter p, QRect r, int flags, QColorGroup g, bool enabled, QPixmap pixmap, string text, int len, QColor penColor)
+ {
+ qt_QStyle_drawItem (rawObject, p.RawObject, r.RawObject, flags, g.RawObject, enabled, pixmap.RawObject, new QString (text).RawObject, len, penColor.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_drawPrimitive (IntPtr raw, QStyle.PrimitiveElement pe, IntPtr p, IntPtr r, IntPtr cg, QStyle.StyleFlags flags, IntPtr arg1);
+ public void drawPrimitive (QStyle.PrimitiveElement pe, QPainter p, QRect r, QColorGroup cg, QStyle.StyleFlags flags, QStyleOption arg1)
+ {
+ qt_QStyle_drawPrimitive (rawObject, pe, p.RawObject, r.RawObject, cg.RawObject, flags, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_drawControl (IntPtr raw, QStyle.ControlElement element, IntPtr p, IntPtr widget, IntPtr r, IntPtr cg, QStyle.StyleFlags how, IntPtr arg1);
+ public void drawControl (QStyle.ControlElement element, QPainter p, QWidget widget, QRect r, QColorGroup cg, QStyle.StyleFlags how, QStyleOption arg1)
+ {
+ qt_QStyle_drawControl (rawObject, element, p.RawObject, widget.RawObject, r.RawObject, cg.RawObject, how, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_drawControlMask (IntPtr raw, QStyle.ControlElement element, IntPtr p, IntPtr widget, IntPtr r, IntPtr arg1);
+ public void drawControlMask (QStyle.ControlElement element, QPainter p, QWidget widget, QRect r, QStyleOption arg1)
+ {
+ qt_QStyle_drawControlMask (rawObject, element, p.RawObject, widget.RawObject, r.RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_subRect (IntPtr raw, QStyle.SubRect r, IntPtr widget);
+ public QRect subRect (QStyle.SubRect r, QWidget widget)
+ {
+ return (QRect)LookupObject (qt_QStyle_subRect (rawObject, r, widget.RawObject), typeof(QRect));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_drawComplexControl (IntPtr raw, QStyle.ComplexControl control, IntPtr p, IntPtr widget, IntPtr r, IntPtr cg, QStyle.StyleFlags how, QStyle.SubControl sub, QStyle.SubControl subActive, IntPtr arg1);
+ public void drawComplexControl (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r, QColorGroup cg, QStyle.StyleFlags how, QStyle.SubControl sub, QStyle.SubControl subActive, QStyleOption arg1)
+ {
+ qt_QStyle_drawComplexControl (rawObject, control, p.RawObject, widget.RawObject, r.RawObject, cg.RawObject, how, sub, subActive, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_drawComplexControlMask (IntPtr raw, QStyle.ComplexControl control, IntPtr p, IntPtr widget, IntPtr r, IntPtr arg1);
+ public void drawComplexControlMask (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r, QStyleOption arg1)
+ {
+ qt_QStyle_drawComplexControlMask (rawObject, control, p.RawObject, widget.RawObject, r.RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_querySubControlMetrics (IntPtr raw, QStyle.ComplexControl control, IntPtr widget, QStyle.SubControl sc, IntPtr arg1);
+ public QRect querySubControlMetrics (QStyle.ComplexControl control, QWidget widget, QStyle.SubControl sc, QStyleOption arg1)
+ {
+ return (QRect)LookupObject (qt_QStyle_querySubControlMetrics (rawObject, control, widget.RawObject, sc, arg1.RawObject), typeof(QRect));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern QStyle.SubControl qt_QStyle_querySubControl (IntPtr raw, QStyle.ComplexControl control, IntPtr widget, IntPtr pos, IntPtr arg1);
+ public QStyle.SubControl querySubControl (QStyle.ComplexControl control, QWidget widget, QPoint pos, QStyleOption arg1)
+ {
+ return qt_QStyle_querySubControl (rawObject, control, widget.RawObject, pos.RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QStyle_pixelMetric (IntPtr raw, QStyle.PixelMetric metric, IntPtr widget);
+ public int pixelMetric (QStyle.PixelMetric metric, QWidget widget)
+ {
+ return qt_QStyle_pixelMetric (rawObject, metric, widget.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_sizeFromContents (IntPtr raw, QStyle.ContentsType contents, IntPtr widget, IntPtr contentsSize, IntPtr arg1);
+ public QSize sizeFromContents (QStyle.ContentsType contents, QWidget widget, QSize contentsSize, QStyleOption arg1)
+ {
+ return (QSize)LookupObject (qt_QStyle_sizeFromContents (rawObject, contents, widget.RawObject, contentsSize.RawObject, arg1.RawObject), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QStyle_styleHint (IntPtr raw, StyleHint stylehint, IntPtr widget, IntPtr arg1, IntPtr returnData);
+ public int styleHint (StyleHint stylehint, QWidget widget, QStyleOption arg1, IntPtr returnData)
+ {
+ return qt_QStyle_styleHint (rawObject, stylehint, widget.RawObject, arg1.RawObject, returnData);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_stylePixmap (IntPtr raw, QStyle.StylePixmap stylepixmap, IntPtr widget, IntPtr arg1);
+ public QPixmap stylePixmap (QStyle.StylePixmap stylepixmap, QWidget widget, QStyleOption arg1)
+ {
+ return (QPixmap)LookupObject (qt_QStyle_stylePixmap (rawObject, stylepixmap, widget.RawObject, arg1.RawObject), typeof(QPixmap));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QStyle_defaultFrameWidth (IntPtr raw);
+ public int defaultFrameWidth ()
+ {
+ return qt_QStyle_defaultFrameWidth (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QStyle_tabbarMetrics (IntPtr raw, IntPtr t, int hf, int vf, int ov);
+ public void tabbarMetrics (QWidget t, int hf, int vf, int ov)
+ {
+ qt_QStyle_tabbarMetrics (rawObject, t.RawObject, hf, vf, ov);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_scrollBarExtent (IntPtr raw);
+ public QSize scrollBarExtent ()
+ {
+ return (QSize)LookupObject (qt_QStyle_scrollBarExtent (rawObject), typeof(QSize));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_visualRect (IntPtr logical, IntPtr w);
+ public static QRect visualRect (QRect logical, QWidget w)
+ {
+ return (QRect)LookupObject (qt_QStyle_visualRect (logical.RawObject, w.RawObject), typeof(QRect));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QStyle_visualRect1 (IntPtr logical, IntPtr bounding);
+ public static QRect visualRect (QRect logical, QRect bounding)
+ {
+ return (QRect)LookupObject (qt_QStyle_visualRect1 (logical.RawObject, bounding.RawObject), typeof(QRect));
+ }
+
+ public QRect itemRect (QPainter p, QRect r, int flags, bool enabled, QPixmap pixmap, string text)
+ {
+ return itemRect(p, r, flags, enabled, pixmap, text, (int) -1);
+ }
+
+ public void drawItem (QPainter p, QRect r, int flags, QColorGroup g, bool enabled, QPixmap pixmap, string text)
+ {
+ drawItem(p, r, flags, g, enabled, pixmap, text, (int) -1);
+ }
+
+ public void drawItem (QPainter p, QRect r, int flags, QColorGroup g, bool enabled, QPixmap pixmap, string text, int len)
+ {
+ drawItem(p, r, flags, g, enabled, pixmap, text, len, new QColor ());
+ }
+
+ public void drawPrimitive (QStyle.PrimitiveElement pe, QPainter p, QRect r, QColorGroup cg)
+ {
+ drawPrimitive(pe, p, r, cg, QStyle.StyleFlags.Style_Default);
+ }
+
+ public void drawPrimitive (QStyle.PrimitiveElement pe, QPainter p, QRect r, QColorGroup cg, QStyle.StyleFlags flags)
+ {
+ drawPrimitive(pe, p, r, cg, flags, new QStyleOption ());
+ }
+
+ public void drawControl (QStyle.ControlElement element, QPainter p, QWidget widget, QRect r, QColorGroup cg)
+ {
+ drawControl(element, p, widget, r, cg, QStyle.StyleFlags.Style_Default);
+ }
+
+ public void drawControl (QStyle.ControlElement element, QPainter p, QWidget widget, QRect r, QColorGroup cg, QStyle.StyleFlags how)
+ {
+ drawControl(element, p, widget, r, cg, how, new QStyleOption ());
+ }
+
+ public void drawControlMask (QStyle.ControlElement element, QPainter p, QWidget widget, QRect r)
+ {
+ drawControlMask(element, p, widget, r, new QStyleOption ());
+ }
+
+ public void drawComplexControl (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r, QColorGroup cg)
+ {
+ drawComplexControl(control, p, widget, r, cg, QStyle.StyleFlags.Style_Default);
+ }
+
+ public void drawComplexControl (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r, QColorGroup cg, QStyle.StyleFlags how)
+ {
+ drawComplexControl(control, p, widget, r, cg, how, QStyle.SubControl.SC_All);
+ }
+
+ public void drawComplexControl (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r, QColorGroup cg, QStyle.StyleFlags how, QStyle.SubControl sub)
+ {
+ drawComplexControl(control, p, widget, r, cg, how, sub, QStyle.SubControl.SC_None);
+ }
+
+ public void drawComplexControl (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r, QColorGroup cg, QStyle.StyleFlags how, QStyle.SubControl sub, QStyle.SubControl subActive)
+ {
+ drawComplexControl(control, p, widget, r, cg, how, sub, subActive, new QStyleOption ());
+ }
+
+ public void drawComplexControlMask (QStyle.ComplexControl control, QPainter p, QWidget widget, QRect r)
+ {
+ drawComplexControlMask(control, p, widget, r, new QStyleOption ());
+ }
+
+ public QRect querySubControlMetrics (QStyle.ComplexControl control, QWidget widget, QStyle.SubControl sc)
+ {
+ return querySubControlMetrics(control, widget, sc, new QStyleOption ());
+ }
+
+ public QStyle.SubControl querySubControl (QStyle.ComplexControl control, QWidget widget, QPoint pos)
+ {
+ return querySubControl(control, widget, pos, new QStyleOption ());
+ }
+
+ public int pixelMetric (QStyle.PixelMetric metric)
+ {
+ return pixelMetric(metric, new QWidget ());
+ }
+
+ public QSize sizeFromContents (QStyle.ContentsType contents, QWidget widget, QSize contentsSize)
+ {
+ return sizeFromContents(contents, widget, contentsSize, new QStyleOption ());
+ }
+
+ public int styleHint (StyleHint stylehint)
+ {
+ return styleHint(stylehint, new QWidget ());
+ }
+
+ public int styleHint (StyleHint stylehint, QWidget widget)
+ {
+ return styleHint(stylehint, widget, new QStyleOption ());
+ }
+
+ public int styleHint (StyleHint stylehint, QWidget widget, QStyleOption arg1)
+ {
+ return styleHint(stylehint, widget, arg1, (IntPtr) 0);
+ }
+
+ public QPixmap stylePixmap (QStyle.StylePixmap stylepixmap)
+ {
+ return stylePixmap(stylepixmap, new QWidget ());
+ }
+
+ public QPixmap stylePixmap (QStyle.StylePixmap stylepixmap, QWidget widget)
+ {
+ return stylePixmap(stylepixmap, widget, new QStyleOption ());
+ }
+
+ // Begin interface methods.
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QToolButton.cs b/qtsharp/src/bindings/static/QToolButton.cs
new file mode 100644
index 00000000..90f36785
--- /dev/null
+++ b/qtsharp/src/bindings/static/QToolButton.cs
@@ -0,0 +1,290 @@
+// QToolButton.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Created static file 26 January 2003
+// Marcus Urban
+
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public class QToolButton : QButton, IDisposable {
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QToolButton (IntPtr parent, string name);
+ public QToolButton (QWidget parent, string name) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QToolButton (parent != null ? parent.RawObject : IntPtr.Zero, name);
+
+ if ((qparent = parent) != null)
+ qparent.AddChild (this);
+
+ RegisterObject (this);
+ Connect (this, SIGNAL ("destroyed ()"), SLOT ("NativeDestroyed ()"));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QToolButton1 (IntPtr iconSet, IntPtr textLabel, IntPtr groupText, IntPtr receiver, string slot, IntPtr parent, string name);
+ public QToolButton (QIconSet iconSet, QString textLabel, QString groupText, QObject receiver, string slot, QToolBar parent, string name) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QToolButton1 (iconSet.RawObject, textLabel.RawObject, groupText.RawObject, IntPtr.Zero, null, parent != null ? parent.RawObject : IntPtr.Zero, name);
+ Connect( this, SIGNAL("clicked()"), receiver, slot );
+
+
+ if ((qparent = parent) != null)
+ qparent.AddChild (this);
+
+ RegisterObject (this);
+ Connect (this, SIGNAL ("destroyed ()"), SLOT ("NativeDestroyed ()"));
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QToolButton2 (Qt.ArrowType type, IntPtr parent, string name);
+ public QToolButton (Qt.ArrowType type, QWidget parent, string name) : this (QNull.Instance)
+ {
+ rawObject = qt_new_QToolButton2 (type, parent != null ? parent.RawObject : IntPtr.Zero, name);
+
+ if ((qparent = parent) != null)
+ qparent.AddChild (this);
+
+ RegisterObject (this);
+ Connect (this, SIGNAL ("destroyed ()"), SLOT ("NativeDestroyed ()"));
+ }
+
+ public QToolButton (QWidget parent) : this (parent, "") {}
+
+ internal QToolButton () : this (QNull.Instance) {}
+
+ internal QToolButton (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QToolButton (QNull dummy) : base (QNull.Instance) {}
+
+ ~QToolButton ()
+ {
+ Dispose (false);
+ }
+
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ // libqtc lacks a qt_del_QToolButton function
+ deleted = true;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setUsesBigPixmap (IntPtr raw, bool enable);
+ public void SetUsesBigPixmap (bool enable)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setUsesBigPixmap (rawObject, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setUsesTextLabel (IntPtr raw, bool enable);
+ public void SetUsesTextLabel (bool enable)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setUsesTextLabel (rawObject, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setTextLabel (IntPtr raw, IntPtr arg1, bool arg2);
+ public void SetTextLabel (QString arg1, bool arg2)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setTextLabel (rawObject, arg1.RawObject, arg2);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setToggleButton (IntPtr raw, bool enable);
+ public void SetToggleButton (bool enable)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setToggleButton (rawObject, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setOn (IntPtr raw, bool enable);
+ public void SetOn (bool enable)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setOn (rawObject, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_toggle (IntPtr raw);
+ public void Toggle ()
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_toggle (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setTextLabel1 (IntPtr raw, IntPtr arg1);
+ public void SetTextLabel (QString arg1)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setTextLabel1 (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setIconSet (IntPtr raw, IntPtr set);
+ public void SetIconSet (QIconSet set)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setIconSet (rawObject, set.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setIconSet1 (IntPtr raw, IntPtr set, bool on);
+ public void SetIconSet (QIconSet set, bool on)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setIconSet1 (rawObject, set.RawObject, on);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QToolButton_iconSet (IntPtr raw, bool on);
+ public QIconSet IconSet (bool on)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ return LookupObject (qt_QToolButton_iconSet (rawObject, on), typeof (QIconSet)) as QIconSet;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setPopupDelay (IntPtr raw, int delay);
+ public void SetPopupDelay (int delay)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setPopupDelay (rawObject, delay);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QToolButton_popupDelay (IntPtr raw);
+ public int PopupDelay ()
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ return qt_QToolButton_popupDelay (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_openPopup (IntPtr raw);
+ public void OpenPopup ()
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_openPopup (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_setAutoRaise (IntPtr raw, bool enable);
+ public void SetAutoRaise (bool enable)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_setAutoRaise (rawObject, enable);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QToolButton_autoRaise (IntPtr raw);
+ public bool AutoRaise ()
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ return qt_QToolButton_autoRaise (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_drawButtonLabel (IntPtr raw, IntPtr arg1);
+ protected void DrawButtonLabel (QPainter arg1)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_drawButtonLabel (rawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QToolButton_uses3D (IntPtr raw);
+ protected bool Uses3D ()
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ return qt_QToolButton_uses3D (rawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QToolButton_eventFilter (IntPtr raw, IntPtr o, IntPtr e);
+ protected bool EventFilter (QObject o, QEvent e)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ return qt_QToolButton_eventFilter (rawObject, o.RawObject, e.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QToolButton_paletteChange (IntPtr raw, IntPtr arg1);
+ protected void PaletteChange (QPalette arg1)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (this+": Attempted use of disposed object");
+
+ qt_QToolButton_paletteChange (rawObject, arg1.RawObject);
+ }
+
+ // Begin interface methods.
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QWidgetStack.cs b/qtsharp/src/bindings/static/QWidgetStack.cs
new file mode 100644
index 00000000..f48da641
--- /dev/null
+++ b/qtsharp/src/bindings/static/QWidgetStack.cs
@@ -0,0 +1,173 @@
+// QWidgetStack.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+
+ public class QWidgetStack : QFrame, IDisposable {
+
+ private ArrayList widgets;
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_new_QWidgetStack (IntPtr parent, string name);
+ public QWidgetStack (QWidget parent, string name) : this (QNull.Instance)
+ {
+ if ((qparent = parent) != null)
+ qparent.AddChild (this);
+ rawObject = qt_new_QWidgetStack (parent != null ? parent.RawObject : IntPtr.Zero, name);
+ RegisterObject (this);
+ }
+
+ public QWidgetStack () : this (new QWidget ()) {}
+
+ public QWidgetStack (QWidget parent) : this (parent, "") {}
+
+ internal QWidgetStack (IntPtr ptr) : this (QNull.Instance)
+ {
+ rawObject = ptr;
+ RegisterObject(this);
+ }
+
+ internal QWidgetStack (QNull dummy) : base (QNull.Instance)
+ {
+ widgets = new ArrayList ();
+ }
+
+ ~QWidgetStack ()
+ {
+ Dispose (false);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QWidgetStack (IntPtr raw);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QWidgetStack (rawObject);
+ deleted = true;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QWidgetStack_addWidget (IntPtr raw, IntPtr arg1, int arg2);
+ public int AddWidget (QWidget arg1, int arg2)
+ {
+ if (! widgets.Contains (arg1)) widgets.Add (arg1);
+ return qt_QWidgetStack_addWidget (RawObject, arg1.RawObject, arg2);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_removeWidget (IntPtr raw, IntPtr arg1);
+ public void RemoveWidget (QWidget arg1)
+ {
+ widgets.Remove (arg1);
+ qt_QWidgetStack_removeWidget (RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QWidgetStack_sizeHint (IntPtr raw);
+ public QSize SizeHint ()
+ {
+ return LookupObject (qt_QWidgetStack_sizeHint (RawObject), typeof(QSize)) as QSize;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QWidgetStack_minimumSizeHint (IntPtr raw);
+ public QSize MinimumSizeHint ()
+ {
+ return LookupObject (qt_QWidgetStack_minimumSizeHint (RawObject), typeof(QSize)) as QSize;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_show (IntPtr raw);
+ public void Show ()
+ {
+ qt_QWidgetStack_show (RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QWidgetStack_widget (IntPtr raw, int arg1);
+ public QWidget Widget (int arg1)
+ {
+ return LookupObject (qt_QWidgetStack_widget (RawObject, arg1), typeof(QWidget)) as QWidget;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern int qt_QWidgetStack_id (IntPtr raw, IntPtr arg1);
+ public int Id (QWidget arg1)
+ {
+ return qt_QWidgetStack_id (RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern IntPtr qt_QWidgetStack_visibleWidget (IntPtr raw);
+ public QWidget VisibleWidget ()
+ {
+ return LookupObject (qt_QWidgetStack_visibleWidget (RawObject), typeof(QWidget)) as QWidget;
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_setFrameRect (IntPtr raw, IntPtr arg1);
+ public void SetFrameRect (QRect arg1)
+ {
+ qt_QWidgetStack_setFrameRect (RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_raiseWidget (IntPtr raw, int arg1);
+ public void RaiseWidget (int arg1)
+ {
+ qt_QWidgetStack_raiseWidget (RawObject, arg1);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_raiseWidget1 (IntPtr raw, IntPtr arg1);
+ public void RaiseWidget (QWidget arg1)
+ {
+ qt_QWidgetStack_raiseWidget1 (RawObject, arg1.RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_frameChanged (IntPtr raw);
+ protected void FrameChanged ()
+ {
+ qt_QWidgetStack_frameChanged (RawObject);
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_QWidgetStack_setChildGeometries (IntPtr raw);
+ protected void SetChildGeometries ()
+ {
+ qt_QWidgetStack_setChildGeometries (RawObject);
+ }
+
+ public int AddWidget (QWidget arg1)
+ {
+ return AddWidget(arg1, (int) -1);
+ }
+
+ // Begin interface methods.
+
+ }
+}
diff --git a/qtsharp/src/bindings/static/QtSignal.cs b/qtsharp/src/bindings/static/QtSignal.cs
new file mode 100644
index 00000000..f76291f5
--- /dev/null
+++ b/qtsharp/src/bindings/static/QtSignal.cs
@@ -0,0 +1,848 @@
+// QtSignal.cs - Signal/slot connection support for Qt#
+//
+// Copyright (C) 2002 Nick Zigarovich (nick@chemlab.org)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// TODO
+// o See about eliminating huge ConnectSignalTo* DisconnectSignalFrom* methods;
+// want to make methods for each connection case that deal with QtSignal and
+// QtSlot instances directly.
+//
+
+namespace Qt {
+ using System;
+ using System.Collections;
+ using System.Runtime.InteropServices;
+ using System.Reflection;
+
+ internal class QtSignal: QObject, IDisposable {
+ internal static bool traceConnects;
+
+ static QtSignal ()
+ {
+ traceConnects = false;
+ }
+
+ private QObject sender;
+ private string signal;
+ private string name;
+ private string args;
+ private ArrayList slots;
+ private ArrayList signals;
+
+ public string Identifier {
+ get { return MakeSigId(sender, signal); }
+ }
+
+ public QObject Sender {
+ get { return sender; }
+ }
+
+ public string Signal {
+ get { return signal; }
+ }
+
+ public string Name {
+ get { return name; }
+ }
+
+ public string Args {
+ get { return args; }
+ }
+
+ public string MangledArgs {
+ get { return MangleArgs(Args); }
+ }
+
+ public ArrayList Signals {
+ get { return signals; }
+ }
+
+ public ArrayList Slots {
+ get { return slots; }
+ }
+
+ public QtSignal (QObject sender, string signal): base (NoSignalInit.Instance)
+ {
+ this.sender = sender;
+ this.signal = signal;
+ string[] sigspl = signal.Split(new char[] {'('});
+ name = sigspl[0];
+ args = "(" + sigspl[1];
+ slots = new ArrayList();
+ signals = new ArrayList();
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern void qt_del_QObject (IntPtr obj);
+ internal override void Delete ()
+ {
+ if (deleted) return;
+
+ qt_del_QObject (rawObject);
+ deleted = true;
+ }
+
+ public bool IsCSharpSignal()
+ {
+ return sender.CsSignalMap.Contains(signal);
+ }
+
+ internal static bool Connect(QObject sender, string signal, QObject receiver, string slot)
+ {
+ if (IsSlot(signal)) {
+ return false;
+ // throw new ArgumentException("Received a slot where a signal was expected");
+ }
+
+ if (IsSignal(slot))
+ return ConnectSignalToSignal(sender, NormalizeParam(signal), receiver, NormalizeParam(slot));
+ else
+ return ConnectSignalToSlot(sender, NormalizeParam(signal), receiver, NormalizeParam(slot));
+ }
+
+ private static bool ConnectSignalToSlot(QObject sender, string signal, QObject receiver, string slot)
+ {
+ QtSignal sigobj;
+ QtSlot slotobj = new QtSlot(receiver, slot);
+
+ if (traceConnects)
+ ErrMsg ("ConnectSignalToSlot: ({0}) {1}, {2}, ({3}) {4}, {5}", sender.RawObject, sender, signal,
+ receiver.RawObject, receiver, slot);
+
+ // Connect C# signal to...
+ if (sender.CsSignalMap.Contains(signal)) {
+ sigobj = sender.CsSignalMap[signal];
+
+ // ...a C# slot
+ if (slotobj.IsCSharpSlot) {
+ if (sigobj.Slots.Contains(slotobj))
+ return false;
+
+ sigobj.Slots.Add(slotobj);
+ return true;
+ }
+ // ...a C++ slot
+ else {
+ // C++ slots are C# methods, so we should never get here.
+ throw new ArgumentException(receiver+" has no slot '"+slot+"'");
+ }
+ }
+ // Connect C++ signal to...
+ else {
+ // ...a C# slot
+ if (slotobj.IsCSharpSlot) {
+ string id = MakeSigId(sender, signal);
+
+ if (!sender.CppSignalMap.Contains(id))
+ sigobj = sender.CppSignalMap[id] = new QtSignal(sender, signal);
+ else {
+ sigobj = sender.CppSignalMap[id];
+
+ if (sigobj.Slots.Contains(slotobj))
+ return false;
+ }
+
+ Delegate del;
+ string realsignal;
+
+ switch (slotobj.Args) {
+ case "()":
+ del = Delegate.CreateDelegate (typeof (del_void), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_void (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(bool)":
+ del = Delegate.CreateDelegate (typeof (del_bool), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_bool (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(short)":
+ del = Delegate.CreateDelegate (typeof (del_short), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_short (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(int)":
+ del = Delegate.CreateDelegate (typeof (del_int), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_int (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(long)":
+ del = Delegate.CreateDelegate (typeof (del_long), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_long (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(float)":
+ del = Delegate.CreateDelegate (typeof (del_float), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_float (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(double)":
+ del = Delegate.CreateDelegate (typeof (del_double), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_double (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(QString)":
+ realsignal = sigobj.Name + "(const QString&)";
+ Console.WriteLine("Connecting signal, sigobj.Name = {0}, realsignal = {1}",
+ sigobj.Name, realsignal);
+ del = Delegate.CreateDelegate (typeof (del_QString), slotobj, "SlotBridge_QString");
+ slotobj.WrapperPtr = csharp_connect_QString (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QDockWindow)":
+ realsignal = sigobj.Name + "(QDockWindow*)";
+ del = Delegate.CreateDelegate (typeof (del_QDockWindow), slotobj, "SlotBridge_QDockWindow");
+ slotobj.WrapperPtr = csharp_connect_QDockWindow (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QDropEvent)":
+ realsignal = sigobj.Name + "(QDropEvent*)";
+ del = Delegate.CreateDelegate (typeof (del_QDropEvent), slotobj, "SlotBridge_QDropEvent");
+ slotobj.WrapperPtr = csharp_connect_QDropEvent (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QDropEvent,QListViewItem)":
+ realsignal = sigobj.Name + "(QDropEvent*,QListViewItem*)";
+ del = Delegate.CreateDelegate (typeof (del_QDropEventQListViewItem), slotobj, "SlotBridge_QDropEventQListViewItem");
+ slotobj.WrapperPtr = csharp_connect_QDropEventQListViewItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QIconViewItem)":
+ realsignal = sigobj.Name + "(QIconViewItem*)";
+ del = Delegate.CreateDelegate (typeof (del_QIconViewItem), slotobj, "SlotBridge_QIconViewItem");
+ slotobj.WrapperPtr = csharp_connect_QIconViewItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QListBoxItem)":
+ realsignal = sigobj.Name + "(QListBoxItem*)";
+ del = Delegate.CreateDelegate (typeof (del_QListBoxItem), slotobj, "SlotBridge_QListBoxItem");
+ slotobj.WrapperPtr = csharp_connect_QListBoxItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QListViewItem)":
+ realsignal = sigobj.Name + "(QListViewItem*)";
+ del = Delegate.CreateDelegate (typeof (del_QListViewItem), slotobj, "SlotBridge_QListViewItem");
+ slotobj.WrapperPtr = csharp_connect_QListViewItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QListViewItem,QListViewItem)":
+ realsignal = sigobj.Name + "(QListViewItem*,QListViewItem*)";
+ del = Delegate.CreateDelegate (typeof (del_QListViewItemQListViewItem), slotobj, "SlotBridge_QListViewItemQListViewItem");
+ slotobj.WrapperPtr = csharp_connect_QListViewItemQListViewItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QListViewItem,QListViewItem,QListViewItem)":
+ realsignal = sigobj.Name + "(QListViewItem*,QListViewItem*,QListViewItem*)";
+ del = Delegate.CreateDelegate (typeof (del_QListViewItemQListViewItemQListViewItem), slotobj, "SlotBridge_QListViewItemQListViewItemQListViewItem");
+ slotobj.WrapperPtr = csharp_connect_QListViewItemQListViewItemQListViewItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QNetworkOperation)":
+ realsignal = sigobj.Name + "(QNetworkOperation*)";
+ del = Delegate.CreateDelegate (typeof (del_QNetworkOperation), slotobj, "SlotBridge_QNetworkOperation");
+ slotobj.WrapperPtr = csharp_connect_QNetworkOperation (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QObject)":
+ realsignal = sigobj.Name + "(QObject*)";
+ del = Delegate.CreateDelegate (typeof (del_QObject), slotobj, "SlotBridge_QObject");
+ slotobj.WrapperPtr = csharp_connect_QObject (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QToolBar)":
+ realsignal = sigobj.Name + "(QToolBar*)";
+ del = Delegate.CreateDelegate (typeof (del_QToolBar), slotobj, "SlotBridge_QToolBar");
+ slotobj.WrapperPtr = csharp_connect_QToolBar (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(QWidget)":
+ realsignal = sigobj.Name + "(QWidget*)";
+ del = Delegate.CreateDelegate (typeof (del_QWidget), slotobj, "SlotBridge_QWidget");
+ slotobj.WrapperPtr = csharp_connect_QWidget (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(int,QIconViewItem)":
+ realsignal = sigobj.Name + "(int,QIconViewItem*)";
+ del = Delegate.CreateDelegate (typeof (del_intQIconViewItem), slotobj, "SlotBridge_intQIconViewItem");
+ slotobj.WrapperPtr = csharp_connect_intQIconViewItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(int,QListBoxItem)":
+ realsignal = sigobj.Name + "(int,QListBoxItem*)";
+ del = Delegate.CreateDelegate (typeof (del_intQListBoxItem), slotobj, "SlotBridge_intQListBoxItem");
+ slotobj.WrapperPtr = csharp_connect_intQListBoxItem (sender.RawObject, SIGNAL (realsignal), receiver.RawObject, del);
+ break;
+ case "(int,bool)":
+ del = Delegate.CreateDelegate (typeof (del_intbool), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_intbool (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(int,int)":
+ del = Delegate.CreateDelegate (typeof (del_intint), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_intint (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ case "(int,int,int)":
+ del = Delegate.CreateDelegate (typeof (del_intintint), receiver, slotobj.Name);
+ slotobj.WrapperPtr = csharp_connect_intintint (sender.RawObject, SIGNAL (signal), receiver.RawObject, del);
+ break;
+ default:
+ throw new ArgumentException ("Unsupported method prototype for C++ signal -> C# slot connection: " + slotobj.Args);
+ }
+
+ if (slotobj.WrapperPtr == IntPtr.Zero)
+ return false;
+
+ slotobj.Callback = del;
+
+ sigobj.Slots.Add(slotobj);
+ return true;
+ }
+ // ...a C++ slot. C++ slots are C# methods, so we should never get here.
+ else {
+ throw new ArgumentException(receiver+" has no slot '"+slot+"'");
+ // return qt_QObject_connect1(sender.RawObject, SIGNAL(signal), receiver.RawObject, SLOT(slot));
+ }
+ }
+ }
+
+ private static bool ConnectSignalToSignal(QObject sender, string signal, QObject receiver, string target)
+ {
+ if (traceConnects)
+ ErrMsg ("ConnectSignalToSlot: ({0}) {1}, {2}, ({3}) {4}, {5}", sender.RawObject, sender, signal,
+ receiver.RawObject, receiver, target);
+
+ // Connect C# signal to...
+ if (sender.CsSignalMap.Contains(signal)) {
+ QtSignal sigobj = sender.CsSignalMap[signal];
+
+ // ...a C# signal
+ if (receiver.CsSignalMap.Contains(target)) {
+ QtSignal targetobj = receiver.CsSignalMap[target];
+
+ if (sigobj.Signals.Contains(targetobj))
+ return false;
+
+ sigobj.Signals.Add(targetobj);
+ return true;
+ }
+ // ...a C++ signal
+ else
+ throw new NotImplementedException("C# signal <-> C++ signal connections not supported yet");
+ }
+ // Connect C++ signal to...
+ else {
+ // ...a C# signal
+ if (receiver.CsSignalMap.Contains(target)) {
+ QtSignal targetobj = receiver.CsSignalMap[target];
+ string args = targetobj.Args;
+ string mangle = MangleArgs(args);
+
+ // HACK Wrap target signal in a slot and connect the slot to the sender.
+ return Connect(sender, SIGNAL(signal), targetobj, SLOT("Emit_"+mangle+args));
+ }
+ // ...a C++ signal
+ else
+ return qt_QObject_connect1(sender.RawObject, SIGNAL(signal), receiver.RawObject, SIGNAL(target));
+ }
+ }
+
+ internal static bool Disconnect(QObject sender, string signal, QObject receiver, string slot)
+ {
+ if (signal == null && receiver == null && slot == null)
+ return DisconnectAll(sender);
+ else if (receiver == null && slot == null)
+ return DisconnectSignal(sender, NormalizeParam(signal));
+ else if (signal == null && slot == null)
+ return DisconnectReceiver(sender, receiver);
+ else if (slot == null)
+ return DisconnectSignalFromReceiver(sender, NormalizeParam(signal), receiver);
+ else if (IsSlot(signal))
+ throw new ArgumentException ("Expected a signal where a slot was found.");
+ else if (IsSignal(slot))
+ return DisconnectSignalFromSignal(sender, NormalizeParam(signal), receiver, NormalizeParam(slot));
+ else
+ return DisconnectSignalFromSlot(sender, NormalizeParam(signal), receiver, NormalizeParam(slot));
+ }
+
+ private static bool DisconnectSignalFromSlot(QObject sender, string signal, QObject receiver, string slot)
+ {
+ if (traceConnects)
+ ErrMsg ("DisconnectSignalFromSlot: ({0}) {1}, {2}, ({3}) {4}, {5}", sender.RawObject, sender, signal,
+ receiver.RawObject, receiver, slot);
+
+ QtSignal sigobj;
+ QtSlot slotobj = new QtSlot(receiver, slot);
+
+ // Disconnect C# signal from...
+ if (sender.CsSignalMap.Contains(signal)) {
+ sigobj = sender.CsSignalMap[signal];
+
+ // ...a C# slot
+ if (slotobj.IsCSharpSlot) {
+ if (!sigobj.Slots.Contains(slotobj))
+ return false;
+
+ sigobj.Slots.Remove(slotobj);
+ return true;
+ }
+ // ...a C++ slot
+ else {
+ // C++ slots are C# methods, so we should never get here.
+ throw new ArgumentException(receiver+" has no slot '"+slot+"'");
+ }
+ }
+ // Disconnect C++ signal from...
+ else {
+ // ...a C# slot
+ if (slotobj.IsCSharpSlot) {
+ string id = MakeSigId(sender, signal);
+ if (!sender.CppSignalMap.Contains(id))
+ return false;
+
+ sigobj = sender.CppSignalMap[id];
+ bool found = false;
+ foreach (QtSlot sobj in sigobj.Slots) {
+ if (slotobj.Equals(sobj)) {
+ found = true;
+ qt_del_QObject(sobj.WrapperPtr);
+ sigobj.Slots.Remove(sobj);
+ break;
+ }
+ }
+
+ if (sigobj.Slots.Count == 0)
+ sender.CppSignalMap.Remove(id);
+
+ return found;
+ }
+ // ...a C++ slot. C++ slots are C# methods, so we should never get here.
+ else {
+ throw new ArgumentException(receiver+" has no slot '"+slot+"'");
+ // return qt_QObject_disconnect2(sender.RawObject, SIGNAL(signal), receiver.RawObject, SLOT(slot));
+ }
+ }
+ }
+
+ private static bool DisconnectSignalFromSignal(QObject sender, string signal, QObject receiver, string target)
+ {
+ if (traceConnects)
+ ErrMsg ("DisconnectSignalFromSignal: ({0}) {1}, {2}, ({3}) {4}, {5}", sender.RawObject, sender, signal,
+ receiver.RawObject, receiver, target);
+
+ QtSignal sigobj;
+
+ // Disconnect C# signal from...
+ if (sender.CsSignalMap.Contains(signal)) {
+ sigobj = sender.CsSignalMap[signal];
+
+ // ...a C# signal
+ if (receiver.CsSignalMap.Contains(target)) {
+ QtSignal targetobj = receiver.CsSignalMap[target];
+ if (!sigobj.Signals.Contains(targetobj))
+ return false;
+
+ sigobj.Signals.Remove(targetobj);
+ return true;
+ }
+ // ...a C++ signal
+ else {
+ throw new NotImplementedException("C# signal <-> C++ signal (dis)connections not supported yet");
+ }
+ }
+ // Disconnect C++ signal from...
+ else {
+ sigobj = new QtSignal(sender, signal);
+
+ // ...a C# signal
+ if (receiver.CsSignalMap.Contains(target)) {
+ QtSignal targetobj = receiver.CsSignalMap[target];
+ string args = "(" + target.Split(new char[] {'('})[1];
+ return Disconnect(sender, SIGNAL(signal), targetobj, SLOT("emit_"+args));
+ }
+ // ...a C++ signal
+ else {
+ return qt_QObject_disconnect2(sender.RawObject, SIGNAL(signal), receiver.RawObject, SLOT(target));
+ }
+ }
+ }
+
+ private static bool DisconnectAll(QObject sender)
+ {
+ if (traceConnects)
+ ErrMsg ("DisconnectAll: ({0}) {1}", sender.RawObject, sender);
+
+ IDictionaryEnumerator cse = sender.CsSignalMap.GetEnumerator();
+ IDictionaryEnumerator cppe = sender.CppSignalMap.GetEnumerator();
+
+ ArrayList signals = new ArrayList ();
+
+ foreach (IDictionaryEnumerator de in new IDictionaryEnumerator[] { cse, cppe })
+ while (de.MoveNext())
+ signals.Add (de.Value);
+
+ foreach (QtSignal signal in signals)
+ foreach (QtSlot slot in new ArrayList (signal.Slots))
+ Disconnect (sender, SIGNAL (signal.Signal), slot.Receiver, SLOT (slot.Slot));
+
+ return true;
+ }
+
+ private static bool DisconnectReceiver(QObject sender, QObject receiver)
+ {
+ if (traceConnects)
+ ErrMsg ("DisconnectReceiver: ({0}) {1}, ({2}) {3}", sender.RawObject, sender, receiver.RawObject, receiver);
+
+ IDictionaryEnumerator cse = sender.CsSignalMap.GetEnumerator();
+ IDictionaryEnumerator cppe = sender.CppSignalMap.GetEnumerator();
+
+ ArrayList signals = new ArrayList ();
+
+ foreach (IDictionaryEnumerator de in new IDictionaryEnumerator[] { cse, cppe })
+ while (de.MoveNext ())
+ signals.Add (de.Value);
+
+ foreach (QtSignal signal in signals)
+ foreach (QtSlot slot in new ArrayList (signal.Slots))
+ Disconnect (signal.Sender, SIGNAL (signal.Name), receiver, SLOT (slot.Name));
+
+ return true;
+ }
+
+ private static bool DisconnectSignal(QObject sender, string signal)
+ {
+ if (traceConnects)
+ ErrMsg ("DisconnectSignal: ({0}) {1}, {2}", sender.RawObject, sender, signal);
+
+ foreach (QtSignalMap map in new QtSignalMap[] { sender.CsSignalMap, sender.CppSignalMap }) {
+ QtSignal sig = map[signal];
+ if (sig != null) {
+ foreach (QtSlot slot in new ArrayList (sig.Slots))
+ Disconnect (sender, SIGNAL(signal), slot.Receiver, SLOT(slot.Slot));
+ }
+ }
+
+ return true;
+ }
+
+ private static bool DisconnectSignalFromReceiver (QObject sender, string signal, QObject receiver)
+ {
+ if (traceConnects)
+ ErrMsg ("DisconnectSignalFromReceiver: ({0}) {1}, {2}, ({3}), {4}", sender.RawObject, sender,
+ signal, receiver.RawObject, receiver);
+
+ foreach (QtSignalMap map in new QtSignalMap[] { sender.CsSignalMap, sender.CppSignalMap }) {
+ QtSignal sig = map[signal];
+ if (sig != null) {
+ foreach (QtSlot slot in new ArrayList (sig.Slots))
+ if (slot.Receiver == receiver)
+ Disconnect (sender, signal, receiver, SLOT (slot.Name));
+ }
+ }
+
+ return true;
+ }
+
+ private static string MangleArgs(string args)
+ {
+ // FIXME Char.Equals and Char.CompareTo don't seem to work on Mono.
+ string result = args.Replace ("(", "");
+ result = result.Replace (")", "");
+ result = result.Replace (" ", "");
+ result = result.Replace ("unsigned ", "u");
+ result = result.Replace ("byte", "char");
+ return result.Replace (",", "");
+
+ /*
+ char[] evict = {'(', ')', ',', ' '};
+ char[] result = new char[args.Length];
+ int newlen = 0;
+
+ foreach (char c in args.ToCharArray()) {
+ foreach (char cx in evict) {
+ if (c.Equals(cx)) continue;
+ }
+ result[newlen] = c;
+ newlen++;
+ }
+
+ return new String(result);
+ */
+ }
+
+ private static string MakeSigId(QObject sender, string signal)
+ {
+ return sender.RawObject.ToString()+signal;
+ }
+
+ internal static string NormalizeParam(string param)
+ {
+ string ret = param;
+ if (param.StartsWith("1") || param.StartsWith("2"))
+ ret = param.Substring(1);
+ return ret;
+
+ }
+
+ private static bool IsSignal(string name)
+ {
+ return name.StartsWith("2");
+ }
+
+ private static bool IsSlot(string name)
+ {
+ return name.StartsWith("1");
+ }
+
+ public void DumpConnections()
+ {
+ ErrMsg ("{0}::{1} Signal Information:", sender, signal);
+
+ ErrMsg ("-------- Slot Connections --------");
+ if (Slots.Count == 0)
+ ErrMsg ("--> No slot connections.");
+ else {
+ foreach (QtSlot slot in slots) {
+ ErrMsg ("--> ({0}) {1}::{2}", slot.Receiver.RawObject, slot.Receiver, slot.Slot);
+ }
+ }
+
+ ErrMsg ("------- Signal Connections -------");
+ if (Signals.Count == 0)
+ ErrMsg ("--> No signal connections.");
+ else {
+ foreach (QtSignal sig in signals) {
+ ErrMsg ("--> ({0}) {1}::{2}", sig.Sender.RawObject, sig.Sender, sig.Signal);
+ }
+ }
+ }
+
+ public void Emit(object[] args)
+ {
+ foreach (QtSlot slot in slots)
+ slot.Invoke(args);
+
+ foreach (QtSignal signal in signals) {
+ signal.Emit(args);
+ }
+ }
+
+ public void Emit_void ()
+ {
+ Emit (new object[0]);
+ }
+
+ public void Emit_bool (bool value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_short (short value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_int (int value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_long (long value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_float (float value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_double (double value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QDockWindow (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QDropEvent (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QDropEventQListViewItem (IntPtr value0, IntPtr value1)
+ {
+ Emit (new object[] { value0, value1 });
+ }
+
+ public void Emit_QIconViewItem (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QListBoxItem (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QListViewItem (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QListViewItemQListViewItem (IntPtr value0, IntPtr value1)
+ {
+ Emit (new object[] { value0, value1 });
+ }
+
+ public void Emit_QListViewItemQListViewItemQListViewItem (IntPtr value0, IntPtr value1, IntPtr value2)
+ {
+ Emit (new object[] { value0, value1, value2 });
+ }
+
+ public void Emit_QNetworkOperation (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QObject (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QToolBar (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_QWidget (IntPtr value0)
+ {
+ Emit (new object[] { value0 });
+ }
+
+ public void Emit_intQIconViewItem (int value0, IntPtr value1)
+ {
+ Emit (new object[] { value0, value1 });
+ }
+
+ public void Emit_intQListBoxItem (int value0, IntPtr value1)
+ {
+ Emit (new object[] { value0, value1 });
+ }
+
+ public void Emit_intbool (int value0, bool value1)
+ {
+ Emit (new object[] { value0, value1 });
+ }
+
+ public void Emit_intint (int value0, int value1)
+ {
+ Emit (new object[] { value0, value1 });
+ }
+
+ public void Emit_intintint (int value0, int value1, int value2)
+ {
+ Emit (new object[] { value0, value1, value2 });
+ }
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_connect1 (IntPtr sender, string signal, IntPtr receiver, string member);
+
+ [DllImport("libqtc", CharSet=CharSet.Ansi)]
+ private static extern bool qt_QObject_disconnect2 (IntPtr sender, string signal, IntPtr receiver, string member);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_void (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_bool (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_short (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_int (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_long (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_float (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_double (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QString (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QDockWindow (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QDropEvent (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QDropEventQListViewItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QIconViewItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QListBoxItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QListViewItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QListViewItemQListViewItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QListViewItemQListViewItemQListViewItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QNetworkOperation (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QObject (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QToolBar (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_QWidget (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_intQIconViewItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_intQListBoxItem (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_intbool (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_intint (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern IntPtr csharp_connect_intintint (IntPtr sender, string signal, IntPtr receiver, Delegate cb);
+
+ public delegate void del_void ();
+ public delegate void del_bool (bool value0);
+ public delegate void del_short (short value0);
+ public delegate void del_int (int value0);
+ public delegate void del_long (long value0);
+ public delegate void del_float (float value0);
+ public delegate void del_double (double value0);
+ public delegate void del_QString (IntPtr value0);
+ public delegate void del_QDockWindow (IntPtr value0);
+ public delegate void del_QDropEvent (IntPtr value0);
+ public delegate void del_QDropEventQListViewItem (IntPtr value0, IntPtr value1);
+ public delegate void del_QIconViewItem (IntPtr value0);
+ public delegate void del_QListBoxItem (IntPtr value0);
+ public delegate void del_QListViewItem (IntPtr value0);
+ public delegate void del_QListViewItemQListViewItem (IntPtr value0, IntPtr value1);
+ public delegate void del_QListViewItemQListViewItemQListViewItem (IntPtr value0, IntPtr value1, IntPtr value2);
+ public delegate void del_QNetworkOperation (IntPtr value0);
+ public delegate void del_QObject (IntPtr value0);
+ public delegate void del_QToolBar (IntPtr value0);
+ public delegate void del_QWidget (IntPtr value0);
+ public delegate void del_intQIconViewItem (int value0, IntPtr value1);
+ public delegate void del_intQListBoxItem (int value0, IntPtr value1);
+ public delegate void del_intbool (int value0, bool value1);
+ public delegate void del_intint (int value0, int value1);
+ public delegate void del_intintint (int value0, int value1, int value2);
+ }
+}
diff --git a/qtsharp/src/bindings/static/QtSignalMap.cs b/qtsharp/src/bindings/static/QtSignalMap.cs
new file mode 100644
index 00000000..38ab5ac3
--- /dev/null
+++ b/qtsharp/src/bindings/static/QtSignalMap.cs
@@ -0,0 +1,99 @@
+// QtSignalMap.cs - Hashtable wrapper for prettier code.
+//
+// Copyright (C) 2002 Nick Zigarovich (nick@chemlab.org)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// NOTES
+// o By inheriting from QObject, we can use the child tracking features to
+// ensure that instances of signal maps are deleted by their parents when
+// the parent Dispose()es.
+//
+// FIXME
+// o Override Dispose() and make sure everything gets cleaned up on deletion.
+
+namespace Qt {
+ using System;
+ using System.Collections;
+ using Qt;
+
+ internal class QtSignalMap: QtSupport {
+ private Hashtable signalMap;
+ private string name;
+
+ public string Name {
+ get { return name; }
+ }
+
+ public QtSignalMap (QObject parent): this (parent, "QtSignalMap") {}
+
+ public QtSignalMap (QObject parent, string name): base (QNull.Instance)
+ {
+ this.name = name;
+ signalMap = new Hashtable ();
+ }
+
+ internal override void Delete () {}
+
+ public void Add (QtSignal signal)
+ {
+ signalMap[signal.Identifier] = signal;
+ }
+
+ public QtSignal Remove (string name)
+ {
+ QtSignal ret = signalMap[name] as QtSignal;
+ signalMap.Remove (name);
+ return ret;
+ }
+
+ public bool Contains (string name)
+ {
+ return signalMap.ContainsKey (name);
+ }
+
+ public QtSignal this[string idx] {
+ get {
+ if (signalMap.ContainsKey (idx))
+ return signalMap[idx] as QtSignal;
+ else
+ return null;
+ }
+
+ set { signalMap[idx] = value; }
+ }
+
+ public IDictionaryEnumerator GetEnumerator ()
+ {
+ return signalMap.GetEnumerator ();
+ }
+
+ public void DumpMap()
+ {
+ if (signalMap.Count == 0) {
+ ErrMsg ("** {0}: No signals to dump.", name);
+ ErrMsg ("");
+ }
+ else {
+ IDictionaryEnumerator ide = signalMap.GetEnumerator();
+
+ while (ide.MoveNext ()) {
+ (ide.Value as QtSignal).DumpConnections ();
+ ErrMsg ("");
+ }
+ }
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QtSlot.cs b/qtsharp/src/bindings/static/QtSlot.cs
new file mode 100644
index 00000000..6bf14da8
--- /dev/null
+++ b/qtsharp/src/bindings/static/QtSlot.cs
@@ -0,0 +1,284 @@
+// QtSlot.cs - Represents C# slot connections
+//
+// Copyright (C) 2002 Nick Zigarovich (nick@chemlab.org)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+namespace Qt {
+ using System;
+ using System.Reflection;
+ using System.Text;
+
+ internal class QtSlot {
+ protected QObject receiver;
+ protected string slot;
+ private string name;
+ private string args;
+ protected MethodInfo slotInfo;
+ private IntPtr wrapperPtr;
+ private Delegate callback;
+
+ public QObject Receiver {
+ get { return receiver; }
+ }
+
+ public string Slot {
+ get { return slot; }
+ }
+
+ public MethodInfo Info {
+ get { return slotInfo; }
+ }
+
+ public string Identifier {
+ get { return receiver.RawObject.ToString()+slot; }
+ }
+
+ public string Name {
+ get { return name; }
+ }
+
+ public string Args {
+ get { return args; }
+ }
+
+ public string NormalizedArgs {
+ get { return NormalizeSlotArgs(args); }
+ }
+
+ public IntPtr WrapperPtr {
+ get { return wrapperPtr; }
+ set { wrapperPtr = value; }
+ }
+
+ public Delegate Callback {
+ get { return callback; }
+ set { callback = value; }
+ }
+
+ public bool IsCSharpSlot {
+ get { return slotInfo != null; }
+ }
+
+ public QtSlot() {}
+
+ public QtSlot(QObject receiver, string slot)
+ {
+ this.receiver = receiver;
+ this.slot = slot;
+ string[] slotsplit = slot.Split(new char[] {'('});
+
+ try {
+ name = slotsplit[0];
+ args = "("+slotsplit[1];
+ }
+ catch (IndexOutOfRangeException) {
+ throw new ArgumentException ("Invalid slot format: " + slot);
+ }
+
+ slotInfo = LookupSlot(receiver, name, NormalizedArgs);
+ wrapperPtr = IntPtr.Zero;
+ callback = null;
+ }
+
+ public void SlotBridge_QString (IntPtr value0)
+ {
+ QString csvalue0 = QtSupport.LookupObject (value0, typeof (QString)) as QString;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QDockWindow (IntPtr value0)
+ {
+ QDockWindow csvalue0 = QtSupport.LookupObject (value0, typeof (QDockWindow)) as QDockWindow;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QDropEvent (IntPtr value0)
+ {
+ QDropEvent csvalue0 = QtSupport.LookupObject (value0, typeof (QDropEvent)) as QDropEvent;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QDropEventQListViewItem (IntPtr value0, IntPtr value1)
+ {
+ QDropEvent csvalue0 = QtSupport.LookupObject (value0, typeof (QDropEvent)) as QDropEvent;
+ QListViewItem csvalue1 = QtSupport.LookupObject (value1, typeof (QListViewItem)) as QListViewItem;
+
+ Invoke (new object[] {csvalue0, csvalue1});
+ }
+
+ public void SlotBridge_QIconViewItem (IntPtr value0)
+ {
+ QIconViewItem csvalue0 = QtSupport.LookupObject (value0, typeof (QIconViewItem)) as QIconViewItem;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QListBoxItem (IntPtr value0)
+ {
+ QListBoxItem csvalue0 = QtSupport.LookupObject (value0, typeof (QListBoxItem)) as QListBoxItem;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QListViewItem (IntPtr value0)
+ {
+ QListViewItem csvalue0 = QtSupport.LookupObject (value0, typeof (QListViewItem)) as QListViewItem;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QListViewItemQListViewItem (IntPtr value0, IntPtr value1)
+ {
+ QListViewItem csvalue0 = QtSupport.LookupObject (value0, typeof (QListViewItem)) as QListViewItem;
+ QListViewItem csvalue1 = QtSupport.LookupObject (value1, typeof (QListViewItem)) as QListViewItem;
+
+ Invoke (new object[] {csvalue0, csvalue1});
+ }
+
+ public void SlotBridge_QListViewItemQListViewItemQListViewItem (IntPtr value0, IntPtr value1, IntPtr value2)
+ {
+ QListViewItem csvalue0 = QtSupport.LookupObject (value0, typeof (QListViewItem)) as QListViewItem;
+ QListViewItem csvalue1 = QtSupport.LookupObject (value1, typeof (QListViewItem)) as QListViewItem;
+ QListViewItem csvalue2 = QtSupport.LookupObject (value2, typeof (QListViewItem)) as QListViewItem;
+
+ Invoke (new object[] {csvalue0, csvalue1, csvalue2});
+ }
+
+ public void SlotBridge_QNetworkOperation (IntPtr value0)
+ {
+ QNetworkOperation csvalue0 = QtSupport.LookupObject (value0, typeof (QNetworkOperation)) as QNetworkOperation;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QObject (IntPtr value0)
+ {
+ QObject csvalue0 = QtSupport.LookupObject (value0, typeof (QObject)) as QObject;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QToolBar (IntPtr value0)
+ {
+ QToolBar csvalue0 = QtSupport.LookupObject (value0, typeof (QToolBar)) as QToolBar;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_QWidget (IntPtr value0)
+ {
+ QWidget csvalue0 = QtSupport.LookupObject (value0, typeof (QWidget)) as QWidget;
+
+ Invoke (new object[] {csvalue0});
+ }
+
+ public void SlotBridge_intQIconViewItem (int value0, IntPtr value1)
+ {
+ QIconViewItem csvalue1 = QtSupport.LookupObject (value1, typeof (QIconViewItem)) as QIconViewItem;
+
+ Invoke (new object[] {value0, csvalue1});
+ }
+
+ public void SlotBridge_intQListBoxItem (int value0, IntPtr value1)
+ {
+ QListBoxItem csvalue1 = QtSupport.LookupObject (value1, typeof (QListBoxItem)) as QListBoxItem;
+
+ Invoke (new object[] {value0, csvalue1});
+ }
+
+ public void Invoke(object[] args)
+ {
+ if (slotInfo != null) {
+ slotInfo.Invoke(receiver, args);
+ }
+ }
+
+ private static MethodInfo LookupSlot(QObject receiver, string name, string args)
+ {
+ MethodInfo ret = null;
+
+ foreach (MethodInfo info in receiver.GetType().GetMethods(
+ BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance ))
+ {
+ string infoargs = "(" + ShortArgs (info.ToString().Split(new char[] {'('})[1].Replace(" ", "")) + ")";
+ string nargs = args.Replace ("string", "String"); // FIXME
+
+ if (nargs.CompareTo(infoargs) == 0 &&
+ name.CompareTo(info.Name) == 0)
+ {
+ ret = info;
+ break;
+ }
+ }
+
+ return ret;
+ }
+
+ private static string ShortArgs (string args)
+ {
+ StringBuilder builder = new StringBuilder ();
+ string [] s = args.TrimEnd (')').Split (',');
+ foreach (string st in s) {
+ string [] str = st.Trim (' ').Split ('.');
+ string stri = str [str.Length -1];
+ builder.Append (stri+", ");
+ }
+ return builder.ToString ().TrimEnd (',', ' ');
+ }
+
+ private static string NormalizeSlotArgs(string methodargs)
+ {
+ string[] args = methodargs.Replace("(", "").Replace(")", "").Split(new char[] {','});
+ StringBuilder sb = new StringBuilder();
+ sb.Append("(");
+ int count = 0;
+
+ // FIXME Handle unsigned, bool, and byte cases. Would lookups in a hashtable be faster?
+ foreach (string arg in args) {
+ if (count > 0) sb.Append(",");
+
+ if (arg == "short")
+ sb.Append("Int16");
+ else if (arg == "int")
+ sb.Append("Int32");
+ else if (arg == "long")
+ sb.Append("Int64");
+ else if (arg == "float")
+ sb.Append("Single");
+ else if (arg == "double")
+ sb.Append("Double");
+ else if (arg == "char")
+ sb.Append("Char");
+ else
+ sb.Append(arg);
+
+ count++;
+ }
+
+ sb.Append(")");
+ return sb.ToString();
+ }
+
+ // For ArrayList storage.
+ public override bool Equals(object obj)
+ {
+ return ((QtSlot)obj).Identifier == Identifier;
+ }
+ }
+}
diff --git a/qtsharp/src/bindings/static/QtSupport.cs b/qtsharp/src/bindings/static/QtSupport.cs
new file mode 100644
index 00000000..eee74728
--- /dev/null
+++ b/qtsharp/src/bindings/static/QtSupport.cs
@@ -0,0 +1,750 @@
+// QtSupport.cs - QtSupport c-sharp support file
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Collections;
+ using System.Reflection;
+ using System.Text.RegularExpressions;
+ using System.Runtime.InteropServices;
+
+ public class QtSupport: IDisposable {
+
+ private static Hashtable QtObjects;
+ private static int cleanCount;
+ private static int cleanLimit;
+
+ private static QtEventHandler qtEventHandler;
+
+ // Runtime flags, set by QApplication.ParseArguments
+ internal static bool enableDebug;
+ internal static bool disableTracking;
+ internal static bool traceObjects;
+ internal static bool traceChildren;
+
+ static QtSupport() {
+ //QtObjects = Hashtable.Synchronized (new Hashtable ());
+ QtObjects = new Hashtable();
+
+ cleanCount = 0;
+ cleanLimit = 750;
+
+ enableDebug = false;
+ disableTracking = false;
+ traceObjects = false;
+ traceChildren = false;
+ }
+
+ internal protected IntPtr rawObject;
+ internal protected bool disposed;
+ internal bool deleted;
+ protected QtSupport qparent;
+ protected ArrayList qchildren;
+
+ internal IntPtr RawObject {
+ get { return rawObject; }
+ }
+
+ public bool Disposed {
+ get { return disposed; }
+ }
+
+ public QtSupport QParent {
+ get { return qparent; }
+ }
+
+ public ArrayList QChildren {
+ get { return qchildren; }
+ }
+
+ // A dummy constructor for inherited classes
+ internal QtSupport (QNull dummy) {
+ disposed = false;
+ deleted = false;
+ qchildren = new ArrayList ();
+ }
+
+ public void Dispose ()
+ {
+ GC.SuppressFinalize (this);
+ Dispose (true);
+ }
+
+ protected virtual void Dispose (bool disposeManaged)
+ {
+ if (disposed)
+ return;
+
+ if (rawObject == IntPtr.Zero)
+ deleted = true;
+
+ if (disposeManaged) {
+ disposed = true;
+
+ UnregisterObject (this);
+
+ if (qparent != null && ! qparent.Disposed)
+ qparent.RemoveChild (this);
+
+ foreach (QtSupport qts in qchildren)
+ qts.Dispose ();
+ }
+
+ /*
+ DbgMsg ("({0}) {1}: {2} managed. {3} native instance.",
+ deleted ? IntPtr.Zero : rawObject,
+ this,
+ disposeManaged ? "Disposing" : "Not disposing",
+ deleted ? "Not deleting" : "Deleting");
+ */
+
+ qparent = null;
+ qchildren = null;
+
+ Delete ();
+ }
+
+ internal virtual void Delete ()
+ {
+ WarnMsg ("({0}) {1}: QtSupport.Dispose() running", rawObject, this);
+ deleted = true;
+ }
+
+ /************************** General Utility Methods *********************************/
+
+ public static void QAssert (bool value)
+ {
+ if (!value) throw new ApplicationException ("Assertion failed");
+ }
+
+ public static void QAssert (bool value, string message)
+ {
+ if (!value) throw new ApplicationException ("Assertion failed: " + message);
+ }
+
+ internal bool IsQObject ()
+ {
+ return GetType ().IsSubclassOf (typeof (QObject));
+ }
+
+ internal static void WarnMsg (string format, params object[] arg)
+ {
+ if (enableDebug)
+ Console.Error.WriteLine ("Qt# Warning: " + format, arg);
+ }
+
+ internal static void DbgMsg (string format, params object[] arg)
+ {
+ if (enableDebug) Console.WriteLine (format, arg);
+ }
+
+ internal static void ErrMsg (string format, params object[] arg)
+ {
+ Console.Error.WriteLine (format, arg);
+ }
+
+ internal static void Msg (string format, params object[] arg)
+ {
+ Console.WriteLine (format, arg);
+ }
+
+ public static string SIGNAL (string signal)
+ {
+ return "2"+
+ Regex.Replace (signal, @"\s*\(\s*\)", "()");
+
+
+ }
+
+ public static string SLOT (string slot)
+ {
+ return "1" +
+ Regex.Replace (slot, @"\s*\(\s*\)", "()");
+ }
+
+ /************************** Object Tracking/Boxing and Disposal *********************************/
+
+ internal static void RegisterObject (QtSupport o)
+ {
+ if (disableTracking) return;
+
+ if (o.RawObject == IntPtr.Zero) {
+ WarnMsg ("Asked to register object with null pointer: {0}", o);
+ return;
+ }
+
+ string replacing = String.Empty;
+ WeakReference wref;
+
+ if (QtObjects.ContainsKey (o.RawObject))
+ {
+ wref = QtObjects[o.RawObject] as WeakReference;
+ QAssert (! wref.IsAlive,
+ "New object "+o+" has same RawObject as "+(QtSupport)wref.Target+"! Please report this error!");
+ replacing = "(replacing)";
+ QtObjects.Remove (o.RawObject);
+ }
+
+ if (traceObjects)
+ ErrMsg ("Object Registered: {0} ({1}) {2}", o, o.RawObject, replacing);
+
+ QtObjects[o.RawObject] = new WeakReference (o);
+
+ if (cleanCount > cleanLimit) {
+ cleanCount = 0;
+ IDictionaryEnumerator de = QtObjects.GetEnumerator ();
+ ArrayList obituaries = new ArrayList ();
+
+ while (de.MoveNext ()) {
+ wref = de.Value as WeakReference;
+ if (!wref.IsAlive) obituaries.Add (de.Key);
+ }
+
+ if (traceObjects)
+ ErrMsg ("RegisterObject: Removing {0} of {1} references from QtObjects", obituaries.Count, QtObjects.Count);
+
+ foreach (IntPtr p in obituaries)
+ QtObjects.Remove (p);
+ }
+ else
+ cleanCount++;
+ }
+
+ internal static void UnregisterObject (QtSupport o)
+ {
+ if (disableTracking) return;
+ if (traceObjects) ErrMsg ("Object Unregistered: {0} ({1})", o, o.RawObject);
+
+ if (o.RawObject == IntPtr.Zero) {
+ WarnMsg ("Asked to unregister object with null pointer: {0}", o);
+ return;
+ }
+
+ QtObjects.Remove (o.RawObject);
+ }
+
+ internal static QtSupport LookupObject (IntPtr ptr)
+ {
+ if (disableTracking) return null;
+
+ if (ptr == IntPtr.Zero) {
+ WarnMsg ("Asked to lookup null pointer");
+ return null;
+ }
+
+ QtSupport ret = null;
+
+ if (QtObjects.ContainsKey (ptr)) {
+ WeakReference wref = QtObjects[ptr] as WeakReference;
+ if (wref.IsAlive)
+ ret = wref.Target as QtSupport;
+ else
+ QtObjects.Remove (ptr);
+ }
+
+ return ret;
+ }
+
+ internal static QtSupport LookupObject (IntPtr ptr, Type type)
+ {
+ if (ptr == IntPtr.Zero) {
+ WarnMsg ("Asked to lookup null pointer of type {0}", type);
+ return null;
+ }
+
+ if (! (type.IsSubclassOf (typeof(QtSupport)) || type == typeof (QtSupport)) )
+ throw new ArgumentException ("Type '" +type+ "' is not related to QtSupport.");
+
+ QtSupport qtsObj = LookupObject (ptr);
+
+ if (qtsObj == null) {
+ //DbgMsg (type+" ("+ptr+"): Boxing foreign object");
+ qtsObj = (QtSupport)Activator.CreateInstance (
+ type,
+ BindingFlags.NonPublic | BindingFlags.Instance,
+ null,
+ new object[] {ptr},
+ null);
+
+ // FIXME Must handle cases where qtsObj is a QObject root
+ // or child. Should we box the entire object tree in
+ // C#? Also, RegisterObject will only track this object
+ // if it is a root node. Child nodes are assumed to be
+ // referenced by their parents. Must ponder and seek
+ // opinions.
+ }
+
+ return qtsObj;
+ }
+
+ internal virtual void AddChild (QtSupport o) {
+ // FIXME: Faster way to do this? O(n), where n == Count
+ if (!qchildren.Contains(o)) {
+ qchildren.Add(o);
+ if (traceChildren)
+ ErrMsg ("({0}) {1}::AddChild: ({2}) {3}", rawObject, this, o.RawObject, o);
+ }
+ }
+
+ internal virtual void RemoveChild (QtSupport o) {
+ // FIXME: Faster way to do this? O(n), where n == Count
+ if (qchildren.Contains(o)) {
+ qchildren.Remove(o);
+ if (traceChildren)
+ ErrMsg ("({0}) {1}::RemoveChild: ({2}) {3}", rawObject, this, o.RawObject, o);
+ }
+ }
+
+ /************************** The Event Handler ******************************************/
+
+ private delegate void QtEventHandler (IntPtr instance, string eventname, IntPtr eventinstance, string eventclass);
+
+ private static QEventList eventList = new QEventList ();
+
+ [DllImport("libqtsharp", CharSet=CharSet.Ansi)]
+ private static extern void qtsharp_QObject_registerEventDelegate
+ ([MarshalAs (UnmanagedType.FunctionPtr)] Delegate qtdelegate);
+
+ internal static void RegisterEventDelegate ()
+ {
+ qtEventHandler = new QtEventHandler (DispatchEvent);
+ qtsharp_QObject_registerEventDelegate (qtEventHandler);
+ }
+
+ internal static QEventList EventList {
+ get { return eventList; }
+ }
+
+ private static void DispatchEvent (IntPtr instance, string eventname, IntPtr eventinstance, string eventclass)
+ {
+ ArrayList array;
+ QObject obj;
+ QEvent ev;
+ Type evtype = Type.GetType ("Qt."+eventclass+",Qt");
+
+ if ((obj = (QObject)LookupObject (instance)) == null) return;
+
+ try
+ {
+ if ((ev = (QEvent)LookupObject (eventinstance)) == null) {
+ object[] args = new object[] { eventinstance };
+ BindingFlags bflags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public;
+ ev = Activator.CreateInstance (evtype, bflags, null, args, null) as QEvent;
+ }
+
+ // Notify global event handlers first.
+ if ((array = EventList.QEventHandlers (eventclass)) != null) {
+ foreach (Delegate del in array) {
+ QEventArgs evargs = new QEventArgs (eventname, ev);
+ del.DynamicInvoke (new object[] { obj, evargs });
+ }
+ }
+
+ // Notify local event handlers second.
+ if ((array = EventList.QEventHandlers (eventname)) != null) {
+ foreach (Delegate del in array) {
+ if (ReferenceEquals (del.Target, obj))
+ del.DynamicInvoke (new object[] { ev });
+ }
+ }
+ }
+ catch (TargetInvocationException e) {
+ throw e.InnerException;
+ }
+
+ ev.deleted = true; // Qt deletes events for us
+ ev.Dispose ();
+ }
+
+ // Global events.
+ public static event QChildHandler childHandler {
+ add { EventList.Add ("QChildEvent", value); }
+ remove { EventList.Remove ("QChildEvent", value); }
+ }
+ public static event QDragEnterHandler dragEnterHandler {
+ add { EventList.Add ("QDragEnterEvent", value); }
+ remove { EventList.Remove ("QDragEnterEvent", value); }
+ }
+ public static event QDropHandler dropHandler {
+ add { EventList.Add ("QDropEvent", value); }
+ remove { EventList.Remove ("QDropEvent", value); }
+ }
+ public static event QIMHandler imHandler {
+ add { EventList.Add ("QIMEvent", value); }
+ remove { EventList.Remove ("QIMEvent", value); }
+ }
+ public static event QPaintHandler paintHandler {
+ add { EventList.Add ("QPaintEvent", value); }
+ remove { EventList.Remove ("QPaintEvent", value); }
+ }
+ public static event QTimerHandler timerHandler {
+ add { EventList.Add ("QTimerEvent", value); }
+ remove { EventList.Remove ("QTimerEvent", value); }
+ }
+ public static event QCloseHandler closeHandler {
+ add { EventList.Add ("QCloseEvent", value); }
+ remove { EventList.Remove ("QCloseEvent", value); }
+ }
+ public static event QDragLeaveHandler dragLeaveHandler {
+ add { EventList.Add ("QDragLeaveEvent", value); }
+ remove { EventList.Remove ("QDragLeaveEvent", value); }
+ }
+ public static event QEventHandler eventHandler {
+ add { EventList.Add ("QEventEvent", value); }
+ remove { EventList.Remove ("QEventEvent", value); }
+ }
+ public static event QKeyHandler keyHandler {
+ add { EventList.Add ("QKeyEvent", value); }
+ remove { EventList.Remove ("QKeyEvent", value); }
+ }
+ public static event QResizeHandler resizeHandler {
+ add { EventList.Add ("QResizeEvent", value); }
+ remove { EventList.Remove ("QResizeEvent", value); }
+ }
+ public static event QWheelHandler wheelHandler {
+ add { EventList.Add ("QWheelEvent", value); }
+ remove { EventList.Remove ("QWheelEvent", value); }
+ }
+ public static event QContextMenuHandler contextMenuHandler {
+ add { EventList.Add ("QContextMenuEvent", value); }
+ remove { EventList.Remove ("QContextMenuEvent", value); }
+ }
+ public static event QDragMoveHandler dragMoveHandler {
+ add { EventList.Add ("QDragMoveEvent", value); }
+ remove { EventList.Remove ("QDragMoveEvent", value); }
+ }
+ public static event QFocusHandler focusHandler {
+ add { EventList.Add ("QFocusEvent", value); }
+ remove { EventList.Remove ("QFocusEvent", value); }
+ }
+ public static event QMouseHandler mouseHandler {
+ add { EventList.Add ("QMouseEvent", value); }
+ remove { EventList.Remove ("QMouseEvent", value); }
+ }
+ public static event QShowHandler showHandler {
+ add { EventList.Add ("QShowEvent", value); }
+ remove { EventList.Remove ("QShowEvent", value); }
+ }
+ public static event QCustomHandler customHandler {
+ add { EventList.Add ("QCustomEvent", value); }
+ remove { EventList.Remove ("QCustomEvent", value); }
+ }
+ public static event QDragResponseHandler dragResponseHandler {
+ add { EventList.Add ("QDragResponseEvent", value); }
+ remove { EventList.Remove ("QDragResponseEvent", value); }
+ }
+ public static event QHideHandler hideHandler {
+ add { EventList.Add ("QHideEvent", value); }
+ remove { EventList.Remove ("QHideEvent", value); }
+ }
+ public static event QMoveHandler moveHandler {
+ add { EventList.Add ("QMoveEvent", value); }
+ remove { EventList.Remove ("QMoveEvent", value); }
+ }
+ public static event QTabletHandler tabletHandler {
+ add { EventList.Add ("QTabletEvent", value); }
+ remove { EventList.Remove ("QTabletEvent", value); }
+ }
+
+ // Local events.
+ protected static event ChildEvent childEvent {
+ add { EventList.Add ("childEvent", value); }
+ remove { EventList.Remove ("childEvent", value); }
+ }
+ protected static event CloseEvent closeEvent {
+ add { EventList.Add ("closeEvent", value); }
+ remove { EventList.Remove ("closeEvent", value); }
+ }
+ protected static event ContentsContextMenuEvent contentsContextMenuEvent {
+ add { EventList.Add ("contentsContextMenuEvent", value); }
+ remove { EventList.Remove ("contentsContextMenuEvent", value); }
+ }
+ protected static event ContentsDragEnterEvent contentsDragEnterEvent {
+ add { EventList.Add ("contentsDragEnterEvent", value); }
+ remove { EventList.Remove ("contentsDragEnterEvent", value); }
+ }
+ protected static event ContentsDragLeaveEvent contentsDragLeaveEvent {
+ add { EventList.Add ("contentsDragLeaveEvent", value); }
+ remove { EventList.Remove ("contentsDragLeaveEvent", value); }
+ }
+ protected static event ContentsDragMoveEvent contentsDragMoveEvent {
+ add { EventList.Add ("contentsDragMoveEvent", value); }
+ remove { EventList.Remove ("contentsDragMoveEvent", value); }
+ }
+ protected static event ContentsDropEvent contentsDropEvent {
+ add { EventList.Add ("contentsDropEvent", value); }
+ remove { EventList.Remove ("contentsDropEvent", value); }
+ }
+ protected static event ContentsMouseDoubleClickEvent contentsMouseDoubleClickEvent {
+ add { EventList.Add ("contentsMouseDoubleClickEvent", value); }
+ remove { EventList.Remove ("contentsMouseDoubleClickEvent", value); }
+ }
+ protected static event ContentsMouseMoveEvent contentsMouseMoveEvent {
+ add { EventList.Add ("contentsMouseMoveEvent", value); }
+ remove { EventList.Remove ("contentsMouseMoveEvent", value); }
+ }
+ protected static event ContentsMousePressEvent contentsMousePressEvent {
+ add { EventList.Add ("contentsMousePressEvent", value); }
+ remove { EventList.Remove ("contentsMousePressEvent", value); }
+ }
+ protected static event ContentsMouseReleaseEvent contentsMouseReleaseEvent {
+ add { EventList.Add ("contentsMouseReleaseEvent", value); }
+ remove { EventList.Remove ("contentsMouseReleaseEvent", value); }
+ }
+ protected static event ContentsWheelEvent contentsWheelEvent {
+ add { EventList.Add ("contentsWheelEvent", value); }
+ remove { EventList.Remove ("contentsWheelEvent", value); }
+ }
+ protected static event ContextMenuEvent contextMenuEvent {
+ add { EventList.Add ("contextMenuEvent", value); }
+ remove { EventList.Remove ("contextMenuEvent", value); }
+ }
+ protected static event CustomEvent customEvent {
+ add { EventList.Add ("customEvent", value); }
+ remove { EventList.Remove ("customEvent", value); }
+ }
+ protected static event DragEnterEvent dragEnterEvent {
+ add { EventList.Add ("dragEnterEvent", value); }
+ remove { EventList.Remove ("dragEnterEvent", value); }
+ }
+ protected static event DragLeaveEvent dragLeaveEvent {
+ add { EventList.Add ("dragLeaveEvent", value); }
+ remove { EventList.Remove ("dragLeaveEvent", value); }
+ }
+ protected static event DragMoveEvent dragMoveEvent {
+ add { EventList.Add ("dragMoveEvent", value); }
+ remove { EventList.Remove ("dragMoveEvent", value); }
+ }
+ protected static event DropEvent dropEvent {
+ add { EventList.Add ("dropEvent", value); }
+ remove { EventList.Remove ("dropEvent", value); }
+ }
+ protected static event EnterEvent enterEvent {
+ add { EventList.Add ("enterEvent", value); }
+ remove { EventList.Remove ("enterEvent", value); }
+ }
+ protected static event FocusInEvent focusInEvent {
+ add { EventList.Add ("focusInEvent", value); }
+ remove { EventList.Remove ("focusInEvent", value); }
+ }
+ protected static event FocusOutEvent focusOutEvent {
+ add { EventList.Add ("focusOutEvent", value); }
+ remove { EventList.Remove ("focusOutEvent", value); }
+ }
+ protected static event HideEvent hideEvent {
+ add { EventList.Add ("hideEvent", value); }
+ remove { EventList.Remove ("hideEvent", value); }
+ }
+ protected static event IMComposeEvent imComposeEvent {
+ add { EventList.Add ("imComposeEvent", value); }
+ remove { EventList.Remove ("imComposeEvent", value); }
+ }
+ protected static event IMEndEvent imEndEvent {
+ add { EventList.Add ("imEndEvent", value); }
+ remove { EventList.Remove ("imEndEvent", value); }
+ }
+ protected static event IMStartEvent imStartEvent {
+ add { EventList.Add ("imStartEvent", value); }
+ remove { EventList.Remove ("imStartEvent", value); }
+ }
+ protected static event KeyPressEvent keyPressEvent {
+ add { EventList.Add ("keyPressEvent", value); }
+ remove { EventList.Remove ("keyPressEvent", value); }
+ }
+ protected static event KeyReleaseEvent keyReleaseEvent {
+ add { EventList.Add ("keyReleaseEvent", value); }
+ remove { EventList.Remove ("keyReleaseEvent", value); }
+ }
+ protected static event LeaveEvent leaveEvent {
+ add { EventList.Add ("leaveEvent", value); }
+ remove { EventList.Remove ("leaveEvent", value); }
+ }
+ protected static event MouseDoubleClickEvent mouseDoubleClickEvent {
+ add { EventList.Add ("mouseDoubleClickEvent", value); }
+ remove { EventList.Remove ("mouseDoubleClickEvent", value); }
+ }
+ protected static event MouseMoveEvent mouseMoveEvent {
+ add { EventList.Add ("mouseMoveEvent", value); }
+ remove { EventList.Remove ("mouseMoveEvent", value); }
+ }
+ protected static event MousePressEvent mousePressEvent {
+ add { EventList.Add ("mousePressEvent", value); }
+ remove { EventList.Remove ("mousePressEvent", value); }
+ }
+ protected static event MouseReleaseEvent mouseReleaseEvent {
+ add { EventList.Add ("mouseReleaseEvent", value); }
+ remove { EventList.Remove ("mouseReleaseEvent", value); }
+ }
+ protected static event MoveEvent moveEvent {
+ add { EventList.Add ("moveEvent", value); }
+ remove { EventList.Remove ("moveEvent", value); }
+ }
+ protected static event PaintEvent paintEvent {
+ add { EventList.Add ("paintEvent", value); }
+ remove { EventList.Remove ("paintEvent", value); }
+ }
+ protected static event ResizeEvent resizeEvent {
+ add { EventList.Add ("resizeEvent", value); }
+ remove { EventList.Remove ("resizeEvent", value); }
+ }
+ protected static event ShowEvent showEvent {
+ add { EventList.Add ("showEvent", value); }
+ remove { EventList.Remove ("showEvent", value); }
+ }
+ protected static event TabletEvent tabletEvent {
+ add { EventList.Add ("tabletEvent", value); }
+ remove { EventList.Remove ("tabletEvent", value); }
+ }
+ protected static event TimerEvent timerEvent {
+ add { EventList.Add ("timerEvent", value); }
+ remove { EventList.Remove ("timerEvent", value); }
+ }
+ protected static event ViewportContextMenuEvent viewportContextMenuEvent {
+ add { EventList.Add ("viewportContextMenuEvent", value); }
+ remove { EventList.Remove ("viewportContextMenuEvent", value); }
+ }
+ protected static event ViewportDragEnterEvent viewportDragEnterEvent {
+ add { EventList.Add ("viewportDragEnterEvent", value); }
+ remove { EventList.Remove ("viewportDragEnterEvent", value); }
+ }
+ protected static event ViewportDragLeaveEvent viewportDragLeaveEvent {
+ add { EventList.Add ("viewportDragLeaveEvent", value); }
+ remove { EventList.Remove ("viewportDragLeaveEvent", value); }
+ }
+ protected static event ViewportDragMoveEvent viewportDragMoveEvent {
+ add { EventList.Add ("viewportDragMoveEvent", value); }
+ remove { EventList.Remove ("viewportDragMoveEvent", value); }
+ }
+ protected static event ViewportDropEvent viewportDropEvent {
+ add { EventList.Add ("viewportDropEvent", value); }
+ remove { EventList.Remove ("viewportDropEvent", value); }
+ }
+ protected static event ViewportMouseDoubleClickEvent viewportMouseDoubleClickEvent {
+ add { EventList.Add ("viewportMouseDoubleClickEvent", value); }
+ remove { EventList.Remove ("viewportMouseDoubleClickEvent", value); }
+ }
+ protected static event ViewportMouseMoveEvent viewportMouseMoveEvent {
+ add { EventList.Add ("viewportMouseMoveEvent", value); }
+ remove { EventList.Remove ("viewportMouseMoveEvent", value); }
+ }
+ protected static event ViewportMousePressEvent viewportMousePressEvent {
+ add { EventList.Add ("viewportMousePressEvent", value); }
+ remove { EventList.Remove ("viewportMousePressEvent", value); }
+ }
+ protected static event ViewportMouseReleaseEvent viewportMouseReleaseEvent {
+ add { EventList.Add ("viewportMouseReleaseEvent", value); }
+ remove { EventList.Remove ("viewportMouseReleaseEvent", value); }
+ }
+ protected static event ViewportPaintEvent viewportPaintEvent {
+ add { EventList.Add ("viewportPaintEvent", value); }
+ remove { EventList.Remove ("viewportPaintEvent", value); }
+ }
+ protected static event ViewportResizeEvent viewportResizeEvent {
+ add { EventList.Add ("viewportResizeEvent", value); }
+ remove { EventList.Remove ("viewportResizeEvent", value); }
+ }
+ protected static event ViewportWheelEvent viewportWheelEvent {
+ add { EventList.Add ("viewportWheelEvent", value); }
+ remove { EventList.Remove ("viewportWheelEvent", value); }
+ }
+ protected static event WheelEvent wheelEvent {
+ add { EventList.Add ("wheelEvent", value); }
+ remove { EventList.Remove ("wheelEvent", value); }
+ }
+
+ // The local event delegates.
+ protected delegate void ChildEvent (QChildEvent e);
+ protected delegate void CloseEvent (QCloseEvent e);
+ protected delegate void ContentsContextMenuEvent (QContextMenuEvent e);
+ protected delegate void ContentsDragEnterEvent (QDragEnterEvent e);
+ protected delegate void ContentsDragLeaveEvent (QDragLeaveEvent e);
+ protected delegate void ContentsDragMoveEvent (QDragMoveEvent e);
+ protected delegate void ContentsDropEvent (QDropEvent e);
+ protected delegate void ContentsMouseDoubleClickEvent (QMouseEvent e);
+ protected delegate void ContentsMouseMoveEvent (QMouseEvent e);
+ protected delegate void ContentsMousePressEvent (QMouseEvent e);
+ protected delegate void ContentsMouseReleaseEvent (QMouseEvent e);
+ protected delegate void ContentsWheelEvent (QWheelEvent e);
+ protected delegate void ContextMenuEvent (QContextMenuEvent e);
+ protected delegate void CustomEvent (QCustomEvent e);
+ protected delegate void DragEnterEvent (QDragEnterEvent e);
+ protected delegate void DragLeaveEvent (QDragLeaveEvent e);
+ protected delegate void DragMoveEvent (QDragMoveEvent e);
+ protected delegate void DropEvent (QDropEvent e);
+ protected delegate void EnterEvent (QEvent e);
+ protected delegate void FocusInEvent (QFocusEvent e);
+ protected delegate void FocusOutEvent (QFocusEvent e);
+ protected delegate void HideEvent (QHideEvent e);
+ protected delegate void IMComposeEvent (QIMEvent e);
+ protected delegate void IMEndEvent (QIMEvent e);
+ protected delegate void IMStartEvent (QIMEvent e);
+ protected delegate void KeyPressEvent (QKeyEvent e);
+ protected delegate void KeyReleaseEvent (QKeyEvent e);
+ protected delegate void LeaveEvent (QEvent e);
+ protected delegate void MouseDoubleClickEvent (QMouseEvent e);
+ protected delegate void MouseMoveEvent (QMouseEvent e);
+ protected delegate void MousePressEvent (QMouseEvent e);
+ protected delegate void MouseReleaseEvent (QMouseEvent e);
+ protected delegate void MoveEvent (QMoveEvent e);
+ protected delegate void PaintEvent (QPaintEvent e);
+ protected delegate void ResizeEvent (QResizeEvent e);
+ protected delegate void ShowEvent (QShowEvent e);
+ protected delegate void TabletEvent (QTabletEvent e);
+ protected delegate void TimerEvent (QTimerEvent e);
+ protected delegate void ViewportContextMenuEvent (QContextMenuEvent e);
+ protected delegate void ViewportDragEnterEvent (QDragEnterEvent e);
+ protected delegate void ViewportDragLeaveEvent (QDragLeaveEvent e);
+ protected delegate void ViewportDragMoveEvent (QDragMoveEvent e);
+ protected delegate void ViewportDropEvent (QDropEvent e);
+ protected delegate void ViewportMouseDoubleClickEvent (QMouseEvent e);
+ protected delegate void ViewportMouseMoveEvent (QMouseEvent e);
+ protected delegate void ViewportMousePressEvent (QMouseEvent e);
+ protected delegate void ViewportMouseReleaseEvent (QMouseEvent e);
+ protected delegate void ViewportPaintEvent (QPaintEvent e);
+ protected delegate void ViewportResizeEvent (QResizeEvent e);
+ protected delegate void ViewportWheelEvent (QWheelEvent e);
+ protected delegate void WheelEvent (QWheelEvent e);
+ }
+
+
+ // The global event delegates.
+ public delegate void QChildHandler (QObject sender, QEventArgs e);
+ public delegate void QDragEnterHandler (QObject sender, QEventArgs e);
+ public delegate void QDropHandler (QObject sender, QEventArgs e);
+ public delegate void QIMHandler (QObject sender, QEventArgs e);
+ public delegate void QPaintHandler (QObject sender, QEventArgs e);
+ public delegate void QTimerHandler (QObject sender, QEventArgs e);
+ public delegate void QCloseHandler (QObject sender, QEventArgs e);
+ public delegate void QDragLeaveHandler (QObject sender, QEventArgs e);
+ public delegate void QEventHandler (QObject sender, QEventArgs e);
+ public delegate void QKeyHandler (QObject sender, QEventArgs e);
+ public delegate void QResizeHandler (QObject sender, QEventArgs e);
+ public delegate void QWheelHandler (QObject sender, QEventArgs e);
+ public delegate void QContextMenuHandler (QObject sender, QEventArgs e);
+ public delegate void QDragMoveHandler (QObject sender, QEventArgs e);
+ public delegate void QFocusHandler (QObject sender, QEventArgs e);
+ public delegate void QMouseHandler (QObject sender, QEventArgs e);
+ public delegate void QShowHandler (QObject sender, QEventArgs e);
+ public delegate void QCustomHandler (QObject sender, QEventArgs e);
+ public delegate void QDragResponseHandler (QObject sender, QEventArgs e);
+ public delegate void QHideHandler (QObject sender, QEventArgs e);
+ public delegate void QMoveHandler (QObject sender, QEventArgs e);
+ public delegate void QTabletHandler (QObject sender, QEventArgs e);
+}
diff --git a/qtsharp/src/bindings/static/RasterOp.cs b/qtsharp/src/bindings/static/RasterOp.cs
new file mode 100644
index 00000000..ed94088d
--- /dev/null
+++ b/qtsharp/src/bindings/static/RasterOp.cs
@@ -0,0 +1,48 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum RasterOp {
+ CopyROP = 0,
+ OrROP = 1,
+ XorROP = 2,
+ NotAndROP = 3,
+ EraseROP = NotAndROP,
+ NotCopyROP = 5,
+ NotOrROP = 6,
+ NotXorROP = 7,
+ AndROP = 8,
+ NotEraseROP = AndROP,
+ NotROP = 10,
+ ClearROP = 11,
+ SetROP = 12,
+ NopROP = 13,
+ AndNotROP = 14,
+ OrNotROP = 15,
+ NandROP = 16,
+ NorROP = 17,
+ LastROP = NorROP
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/StringComparisonMode.cs b/qtsharp/src/bindings/static/StringComparisonMode.cs
new file mode 100644
index 00000000..833025e0
--- /dev/null
+++ b/qtsharp/src/bindings/static/StringComparisonMode.cs
@@ -0,0 +1,34 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum StringComparisonMode {
+ CaseSensitive = 1,
+ BeginsWith = 2,
+ EndsWith = 4,
+ Contains = 8,
+ ExactMatch = 16
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/TextFlags.cs b/qtsharp/src/bindings/static/TextFlags.cs
new file mode 100644
index 00000000..96904f7d
--- /dev/null
+++ b/qtsharp/src/bindings/static/TextFlags.cs
@@ -0,0 +1,37 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum TextFlags {
+ SingleLine = 128,
+ DontClip = 256,
+ ExpandTabs = 512,
+ ShowPrefix = 1024,
+ WordBreak = 2048,
+ BreakAnywhere = 4096,
+ DontPrint = 8192,
+ NoAccel = 16384
+ }
+}
diff --git a/qtsharp/src/bindings/static/TextFormat.cs b/qtsharp/src/bindings/static/TextFormat.cs
new file mode 100644
index 00000000..06365f3e
--- /dev/null
+++ b/qtsharp/src/bindings/static/TextFormat.cs
@@ -0,0 +1,32 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum TextFormat {
+ PlainText = 0,
+ RichText = 1,
+ AutoText = 2
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/UIEffect.cs b/qtsharp/src/bindings/static/UIEffect.cs
new file mode 100644
index 00000000..15913e09
--- /dev/null
+++ b/qtsharp/src/bindings/static/UIEffect.cs
@@ -0,0 +1,35 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum UIEffect {
+ UI_General = 0,
+ UI_AnimateMenu = 1,
+ UI_FadeMenu = 2,
+ UI_AnimateCombo = 3,
+ UI_AnimateTooltip = 4,
+ UI_FadeTooltip = 5
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/WidgetFlags.cs b/qtsharp/src/bindings/static/WidgetFlags.cs
new file mode 100644
index 00000000..fde21e59
--- /dev/null
+++ b/qtsharp/src/bindings/static/WidgetFlags.cs
@@ -0,0 +1,66 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum WidgetFlags {
+ WWinOwnDC = 0,
+ WType_TopLevel = 1,
+ WType_Dialog = 2,
+ WType_Popup = 4,
+ WType_Desktop = 8,
+ WType_Mask = 15,
+ WStyle_Customize = 16,
+ WStyle_NormalBorder = 32,
+ WStyle_DialogBorder = 64,
+ WStyle_NoBorder = 8192,
+ WStyle_Title = 128,
+ WStyle_SysMenu = 256,
+ WStyle_Minimize = 512,
+ WStyle_Maximize = 1024,
+ WStyle_MinMax = WStyle_Minimize|WStyle_Maximize,
+ WStyle_Tool = 2048,
+ WStyle_StaysOnTop = 4096,
+ WStyle_ContextHelp = 16384,
+ WStyle_Reserved = 32768,
+ WStyle_Mask = 65520,
+ WDestructiveClose = 65536,
+ WPaintDesktop = 131072,
+ WPaintUnclipped = 262144,
+ WPaintClever = 524288,
+ WResizeNoErase = 1048576,
+ WMouseNoMask = 2097152,
+ WStaticContents = 4194304,
+ WRepaintNoErase = 8388608,
+ WX11BypassWM = 16777216,
+ WGroupLeader = 33554432,
+ WShowModal = 67108864,
+ WNoMousePropagation = 134217728,
+ WSubWindow = 268435456,
+ WNorthWestGravity = WStaticContents,
+ WType_Modal = WType_Dialog|WShowModal,
+ WStyle_Dialog = WType_Dialog,
+ WStyle_NoBorderEx = WStyle_NoBorder
+ }
+}
diff --git a/qtsharp/src/bindings/static/WidgetState.cs b/qtsharp/src/bindings/static/WidgetState.cs
new file mode 100644
index 00000000..8afc9024
--- /dev/null
+++ b/qtsharp/src/bindings/static/WidgetState.cs
@@ -0,0 +1,53 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum WidgetState {
+ WState_Created = 1,
+ WState_Disabled = 2,
+ WState_Visible = 4,
+ WState_ForceHide = 8,
+ WState_OwnCursor = 16,
+ WState_MouseTracking = 32,
+ WState_CompressKeys = 64,
+ WState_BlockUpdates = 128,
+ WState_InPaintEvent = 256,
+ WState_Reparented = 512,
+ WState_ConfigPending = 1024,
+ WState_Resized = 2048,
+ WState_AutoMask = 4096,
+ WState_Polished = 8192,
+ WState_DND = 16384,
+ WState_Reserved0 = 32768,
+ WState_Reserved1 = 65536,
+ WState_Reserved2 = 131072,
+ WState_Reserved3 = 262144,
+ WState_Maximized = 524288,
+ WState_Minimized = 1048576,
+ WState_ForceDisabled = 2097152,
+ WState_Exposed = 4194304,
+ WState_HasMouse = 8388608
+ }
+} \ No newline at end of file
diff --git a/qtsharp/src/bindings/static/WindowsVersion.cs b/qtsharp/src/bindings/static/WindowsVersion.cs
new file mode 100644
index 00000000..da81ea4c
--- /dev/null
+++ b/qtsharp/src/bindings/static/WindowsVersion.cs
@@ -0,0 +1,38 @@
+// QApplication.cs - A Qt to C# binding.
+//
+// Copyright (C) 2002 Adam Treat (manyoso@yahoo.com)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// Generated File. Do Not Modify.
+
+namespace Qt {
+
+ using Qt;
+ using System;
+ using System.Runtime.InteropServices;
+
+ public enum WindowsVersion {
+ WV_32s = 1,
+ WV_95 = 2,
+ WV_98 = 3,
+ WV_Me = 4,
+ WV_DOS_based = 15,
+ WV_NT = 16,
+ WV_2000 = 32,
+ WV_XP = 48,
+ WV_NT_based = 240
+ }
+} \ No newline at end of file