From e1a0e352b6ead69ed6f55476272ace842fbbdf74 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 5 Dec 2011 21:06:26 -0600 Subject: Rename java files to TQ --- qtsharp/src/bindings/static/IQMenuData.cs | 115 --- qtsharp/src/bindings/static/ITQMenuData.cs | 115 +++ qtsharp/src/bindings/static/QApplication.cs | 1031 -------------------- qtsharp/src/bindings/static/QByteArray.cs | 84 -- qtsharp/src/bindings/static/QCallBack.cs | 37 - qtsharp/src/bindings/static/QEventArgs.cs | 42 - qtsharp/src/bindings/static/QEventList.cs | 55 -- qtsharp/src/bindings/static/QGL.cs | 49 - qtsharp/src/bindings/static/QMenuBar.cs | 815 ---------------- qtsharp/src/bindings/static/QMenuData.cs | 719 -------------- qtsharp/src/bindings/static/QNull.cs | 35 - qtsharp/src/bindings/static/QObject.cs | 609 ------------ qtsharp/src/bindings/static/QPopupMenu.cs | 830 ---------------- qtsharp/src/bindings/static/QString.cs | 1340 -------------------------- qtsharp/src/bindings/static/QStyle.cs | 595 ------------ qtsharp/src/bindings/static/QToolButton.cs | 290 ------ qtsharp/src/bindings/static/QWidgetStack.cs | 173 ---- qtsharp/src/bindings/static/TQApplication.cs | 1031 ++++++++++++++++++++ qtsharp/src/bindings/static/TQByteArray.cs | 84 ++ qtsharp/src/bindings/static/TQCallBack.cs | 37 + qtsharp/src/bindings/static/TQEventArgs.cs | 42 + qtsharp/src/bindings/static/TQEventList.cs | 55 ++ qtsharp/src/bindings/static/TQGL.cs | 49 + qtsharp/src/bindings/static/TQMenuBar.cs | 815 ++++++++++++++++ qtsharp/src/bindings/static/TQMenuData.cs | 719 ++++++++++++++ qtsharp/src/bindings/static/TQNull.cs | 35 + qtsharp/src/bindings/static/TQObject.cs | 609 ++++++++++++ qtsharp/src/bindings/static/TQPopupMenu.cs | 830 ++++++++++++++++ qtsharp/src/bindings/static/TQString.cs | 1340 ++++++++++++++++++++++++++ qtsharp/src/bindings/static/TQStyle.cs | 595 ++++++++++++ qtsharp/src/bindings/static/TQToolButton.cs | 290 ++++++ qtsharp/src/bindings/static/TQWidgetStack.cs | 173 ++++ qtsharp/src/generator/QAncestor.cs | 26 - qtsharp/src/generator/QCtor.cs | 47 - qtsharp/src/generator/QDCtor.cs | 57 -- qtsharp/src/generator/QEnum.cs | 63 -- qtsharp/src/generator/QItem.cs | 44 - qtsharp/src/generator/QMember.cs | 116 --- qtsharp/src/generator/QMethod.cs | 54 -- qtsharp/src/generator/QParam.cs | 54 -- qtsharp/src/generator/QType.cs | 126 --- qtsharp/src/generator/QTypeMap.cs | 477 --------- qtsharp/src/generator/TQAncestor.cs | 26 + qtsharp/src/generator/TQCtor.cs | 47 + qtsharp/src/generator/TQDCtor.cs | 57 ++ qtsharp/src/generator/TQEnum.cs | 63 ++ qtsharp/src/generator/TQItem.cs | 44 + qtsharp/src/generator/TQMember.cs | 116 +++ qtsharp/src/generator/TQMethod.cs | 54 ++ qtsharp/src/generator/TQParam.cs | 54 ++ qtsharp/src/generator/TQType.cs | 126 +++ qtsharp/src/generator/TQTypeMap.cs | 477 +++++++++ 52 files changed, 7883 insertions(+), 7883 deletions(-) delete mode 100644 qtsharp/src/bindings/static/IQMenuData.cs create mode 100644 qtsharp/src/bindings/static/ITQMenuData.cs delete mode 100644 qtsharp/src/bindings/static/QApplication.cs delete mode 100644 qtsharp/src/bindings/static/QByteArray.cs delete mode 100644 qtsharp/src/bindings/static/QCallBack.cs delete mode 100644 qtsharp/src/bindings/static/QEventArgs.cs delete mode 100644 qtsharp/src/bindings/static/QEventList.cs delete mode 100644 qtsharp/src/bindings/static/QGL.cs delete mode 100644 qtsharp/src/bindings/static/QMenuBar.cs delete mode 100644 qtsharp/src/bindings/static/QMenuData.cs delete mode 100644 qtsharp/src/bindings/static/QNull.cs delete mode 100644 qtsharp/src/bindings/static/QObject.cs delete mode 100644 qtsharp/src/bindings/static/QPopupMenu.cs delete mode 100644 qtsharp/src/bindings/static/QString.cs delete mode 100644 qtsharp/src/bindings/static/QStyle.cs delete mode 100644 qtsharp/src/bindings/static/QToolButton.cs delete mode 100644 qtsharp/src/bindings/static/QWidgetStack.cs create mode 100644 qtsharp/src/bindings/static/TQApplication.cs create mode 100644 qtsharp/src/bindings/static/TQByteArray.cs create mode 100644 qtsharp/src/bindings/static/TQCallBack.cs create mode 100644 qtsharp/src/bindings/static/TQEventArgs.cs create mode 100644 qtsharp/src/bindings/static/TQEventList.cs create mode 100644 qtsharp/src/bindings/static/TQGL.cs create mode 100644 qtsharp/src/bindings/static/TQMenuBar.cs create mode 100644 qtsharp/src/bindings/static/TQMenuData.cs create mode 100644 qtsharp/src/bindings/static/TQNull.cs create mode 100644 qtsharp/src/bindings/static/TQObject.cs create mode 100644 qtsharp/src/bindings/static/TQPopupMenu.cs create mode 100644 qtsharp/src/bindings/static/TQString.cs create mode 100644 qtsharp/src/bindings/static/TQStyle.cs create mode 100644 qtsharp/src/bindings/static/TQToolButton.cs create mode 100644 qtsharp/src/bindings/static/TQWidgetStack.cs delete mode 100644 qtsharp/src/generator/QAncestor.cs delete mode 100644 qtsharp/src/generator/QCtor.cs delete mode 100644 qtsharp/src/generator/QDCtor.cs delete mode 100644 qtsharp/src/generator/QEnum.cs delete mode 100644 qtsharp/src/generator/QItem.cs delete mode 100644 qtsharp/src/generator/QMember.cs delete mode 100644 qtsharp/src/generator/QMethod.cs delete mode 100644 qtsharp/src/generator/QParam.cs delete mode 100644 qtsharp/src/generator/QType.cs delete mode 100644 qtsharp/src/generator/QTypeMap.cs create mode 100644 qtsharp/src/generator/TQAncestor.cs create mode 100644 qtsharp/src/generator/TQCtor.cs create mode 100644 qtsharp/src/generator/TQDCtor.cs create mode 100644 qtsharp/src/generator/TQEnum.cs create mode 100644 qtsharp/src/generator/TQItem.cs create mode 100644 qtsharp/src/generator/TQMember.cs create mode 100644 qtsharp/src/generator/TQMethod.cs create mode 100644 qtsharp/src/generator/TQParam.cs create mode 100644 qtsharp/src/generator/TQType.cs create mode 100644 qtsharp/src/generator/TQTypeMap.cs (limited to 'qtsharp/src') diff --git a/qtsharp/src/bindings/static/IQMenuData.cs b/qtsharp/src/bindings/static/IQMenuData.cs deleted file mode 100644 index 92df1941..00000000 --- a/qtsharp/src/bindings/static/IQMenuData.cs +++ /dev/null @@ -1,115 +0,0 @@ -// TQMenuData.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 ITQMenuData { - Hashtable MenuConnections { get; } - uint Count (); - int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); - int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); - int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); - int InsertItem (string text, int identifier, int index); - int InsertItem (TQIconSet icon, string text, int identifier, int index); - int InsertItem (string text, TQPopupMenu popup, int identifier, int index); - int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index); - int InsertItem (TQPixmap pixmap, int identifier, int index); - int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier, int index); - int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier, int index); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier, int index); - int InsertItem (TQWidget widget, int identifier, int index); - int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier, int index); - int InsertItem (TQCustomMenuItem custom, int identifier, int index); - int InsertSeparator (int index); - void RemoveItem (int identifier); - void RemoveItemAt (int index); - void Clear (); - TQKeySequence Accel (int identifier); - void SetAccel (TQKeySequence key, int identifier); - TQIconSet IconSet (int identifier); - string Text (int identifier); - TQPixmap Pixmap (int identifier); - void SetWhatsThis (int identifier, string arg1); - string WhatsThis (int identifier); - void ChangeItem (int identifier, string text); - void ChangeItem (int identifier, TQPixmap pixmap); - void ChangeItem (int identifier, TQIconSet icon, string text); - void ChangeItem (int identifier, TQIconSet icon, TQPixmap pixmap); - void ChangeItem (string text, int identifier); - void ChangeItem (TQPixmap pixmap, int identifier); - void ChangeItem (TQIconSet 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, TQObject receiver, string member); - bool DisconnectItem (int identifier, TQObject receiver, string member); - bool SetItemParameter (int identifier, int param); - int ItemParameter (int identifier); - TQMenuItem FindItem (int identifier); - TQMenuItem FindItem (int identifier, TQMenuData parent); - TQMenuItem FindPopup (TQPopupMenu arg1, int[] index); - int InsertItem (string text, TQObject receiver, string member); - int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel); - int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier); - int InsertItem (TQIconSet icon, string text, TQObject receiver, string member); - int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel); - int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier); - int InsertItem (TQPixmap pixmap, TQObject receiver, string member); - int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel); - int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier); - int InsertItem (string text); - int InsertItem (string text, int identifier); - int InsertItem (TQIconSet icon, string text); - int InsertItem (TQIconSet icon, string text, int identifier); - int InsertItem (string text, TQPopupMenu popup); - int InsertItem (string text, TQPopupMenu popup, int identifier); - int InsertItem (TQIconSet icon, string text, TQPopupMenu popup); - int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier); - int InsertItem (TQPixmap pixmap); - int InsertItem (TQPixmap pixmap, int identifier); - int InsertItem (TQIconSet icon, TQPixmap pixmap); - int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier); - int InsertItem (TQPixmap pixmap, TQPopupMenu popup); - int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup); - int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier); - int InsertItem (TQWidget widget); - int InsertItem (TQWidget widget, int identifier); - int InsertItem (TQIconSet icon, TQCustomMenuItem custom); - int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier); - int InsertItem (TQCustomMenuItem custom); - int InsertItem (TQCustomMenuItem custom, int identifier); - int InsertSeparator (); - TQMenuItem FindPopup (TQPopupMenu arg1); - //IntPtr TQMenuData (); - } -} diff --git a/qtsharp/src/bindings/static/ITQMenuData.cs b/qtsharp/src/bindings/static/ITQMenuData.cs new file mode 100644 index 00000000..92df1941 --- /dev/null +++ b/qtsharp/src/bindings/static/ITQMenuData.cs @@ -0,0 +1,115 @@ +// TQMenuData.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 ITQMenuData { + Hashtable MenuConnections { get; } + uint Count (); + int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); + int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); + int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index); + int InsertItem (string text, int identifier, int index); + int InsertItem (TQIconSet icon, string text, int identifier, int index); + int InsertItem (string text, TQPopupMenu popup, int identifier, int index); + int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index); + int InsertItem (TQPixmap pixmap, int identifier, int index); + int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier, int index); + int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier, int index); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier, int index); + int InsertItem (TQWidget widget, int identifier, int index); + int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier, int index); + int InsertItem (TQCustomMenuItem custom, int identifier, int index); + int InsertSeparator (int index); + void RemoveItem (int identifier); + void RemoveItemAt (int index); + void Clear (); + TQKeySequence Accel (int identifier); + void SetAccel (TQKeySequence key, int identifier); + TQIconSet IconSet (int identifier); + string Text (int identifier); + TQPixmap Pixmap (int identifier); + void SetWhatsThis (int identifier, string arg1); + string WhatsThis (int identifier); + void ChangeItem (int identifier, string text); + void ChangeItem (int identifier, TQPixmap pixmap); + void ChangeItem (int identifier, TQIconSet icon, string text); + void ChangeItem (int identifier, TQIconSet icon, TQPixmap pixmap); + void ChangeItem (string text, int identifier); + void ChangeItem (TQPixmap pixmap, int identifier); + void ChangeItem (TQIconSet 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, TQObject receiver, string member); + bool DisconnectItem (int identifier, TQObject receiver, string member); + bool SetItemParameter (int identifier, int param); + int ItemParameter (int identifier); + TQMenuItem FindItem (int identifier); + TQMenuItem FindItem (int identifier, TQMenuData parent); + TQMenuItem FindPopup (TQPopupMenu arg1, int[] index); + int InsertItem (string text, TQObject receiver, string member); + int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel); + int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier); + int InsertItem (TQIconSet icon, string text, TQObject receiver, string member); + int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel); + int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier); + int InsertItem (TQPixmap pixmap, TQObject receiver, string member); + int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel); + int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier); + int InsertItem (string text); + int InsertItem (string text, int identifier); + int InsertItem (TQIconSet icon, string text); + int InsertItem (TQIconSet icon, string text, int identifier); + int InsertItem (string text, TQPopupMenu popup); + int InsertItem (string text, TQPopupMenu popup, int identifier); + int InsertItem (TQIconSet icon, string text, TQPopupMenu popup); + int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier); + int InsertItem (TQPixmap pixmap); + int InsertItem (TQPixmap pixmap, int identifier); + int InsertItem (TQIconSet icon, TQPixmap pixmap); + int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier); + int InsertItem (TQPixmap pixmap, TQPopupMenu popup); + int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup); + int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier); + int InsertItem (TQWidget widget); + int InsertItem (TQWidget widget, int identifier); + int InsertItem (TQIconSet icon, TQCustomMenuItem custom); + int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier); + int InsertItem (TQCustomMenuItem custom); + int InsertItem (TQCustomMenuItem custom, int identifier); + int InsertSeparator (); + TQMenuItem FindPopup (TQPopupMenu arg1); + //IntPtr TQMenuData (); + } +} diff --git a/qtsharp/src/bindings/static/QApplication.cs b/qtsharp/src/bindings/static/QApplication.cs deleted file mode 100644 index 5b78ab9e..00000000 --- a/qtsharp/src/bindings/static/QApplication.cs +++ /dev/null @@ -1,1031 +0,0 @@ -// TQApplication.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 TQApplication : TQObject, 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 TQApplication (string[] argv) : this (TQNull.Instance) - { - TQObject.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 TQApplication (string[] argv, bool GUIenabled) : this (TQNull.Instance) - { - TQObject.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 TQApplication (string[] argv, Type arg1) : this (TQNull.Instance) - { - TQObject.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 TQApplication (IntPtr dpy, uint visual, uint cmap) : this (TQNull.Instance) - { - TQObject.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 TQApplication (IntPtr dpy, string[] argv, uint visual, uint cmap) : this (TQNull.Instance) - { - TQObject.qApp = this; - qparent = null; - argv = ParseArguments (argv); - rawObject = qt_new_QApplication4 (dpy, argv.Length, argv, visual, cmap); - RegisterObject (this); - RegisterEventDelegate (); - } - - public TQApplication (IntPtr dpy) : this (dpy, (uint) 0) {} - - public TQApplication (IntPtr dpy, uint visual) : this (dpy, visual, (uint) 0) {} - - public TQApplication (IntPtr dpy, string[] argv) : this (dpy, argv, (uint) 0) {} - - public TQApplication (IntPtr dpy, string[] argv, uint visual) : this (dpy, argv, visual, (uint) 0) {} - - internal TQApplication () : this (TQNull.Instance) {} - - internal TQApplication (TQNull dummy) : base (TQNull.Instance) {} - - ~TQApplication () - { - 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 TQWidget MainWidget () - { - return (TQWidget)LookupObject (qt_QApplication_mainWidget (rawObject), typeof(TQWidget)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_setMainWidget (IntPtr raw, IntPtr arg1); - public void SetMainWidget (TQWidget 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 (TQWidget arg1) - { - qt_QApplication_polish (rawObject, arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_focusWidget (IntPtr raw); - public TQWidget FocusWidget () - { - return (TQWidget)LookupObject (qt_QApplication_focusWidget (rawObject), typeof(TQWidget)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_activeWindow (IntPtr raw); - public TQWidget ActiveWindow () - { - return (TQWidget)LookupObject (qt_QApplication_activeWindow (rawObject), typeof(TQWidget)); - } - - [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 (TQObject arg1, TQEvent 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 (TQTextCodec arg1) - { - qt_QApplication_setDefaultCodec (rawObject, arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_defaultCodec (IntPtr raw); - public TQTextCodec DefaultCodec () - { - return (TQTextCodec)LookupObject (qt_QApplication_defaultCodec (rawObject), typeof(TQTextCodec)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_installTranslator (IntPtr raw, IntPtr arg1); - public void InstallTranslator (TQTranslator 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 (TQTranslator 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) - { - TQString qstr = new TQString (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 (TQWidget 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 (TQWidget 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 () - { - TQString qstr = new TQString (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 (TQSessionManager 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 (TQSessionManager 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, TQUuid 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 TQUuid ApplicationId () - { - return (TQUuid)LookupObject (qt_QApplication_applicationId (rawObject), typeof(TQUuid)); - } - - [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 TQStyle Style () - { - return (TQStyle)LookupObject (qt_QApplication_style (), typeof(TQStyle)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_setStyle (IntPtr arg1); - public static void SetStyle (TQStyle arg1) - { - qt_QApplication_setStyle (arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_setStyle1 (IntPtr arg1); - public static TQStyle SetStyle (string arg1) - { - return (TQStyle)LookupObject (qt_QApplication_setStyle1 (new TQString (arg1).RawObject), typeof(TQStyle)); - } - - [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 (TQApplication.ColorMode arg1); - public static void SetColorMode (TQApplication.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 TQCursor OverrideCursor () - { - return (TQCursor)LookupObject (qt_QApplication_overrideCursor (), typeof(TQCursor)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_setOverrideCursor (IntPtr arg1, bool replace); - public static void SetOverrideCursor (TQCursor 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 TQPalette Palette (TQWidget arg1) - { - return (TQPalette)LookupObject (qt_QApplication_palette (arg1.RawObject), typeof(TQPalette)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_setPalette (IntPtr arg1, bool informWidgets, string className); - public static void SetPalette (TQPalette 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 TQFont Font (TQWidget arg1) - { - return (TQFont)LookupObject (qt_QApplication_font (arg1.RawObject), typeof(TQFont)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_setFont (IntPtr arg1, bool informWidgets, string className); - public static void SetFont (TQFont 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 TQFontMetrics FontMetrics () - { - return (TQFontMetrics)LookupObject (qt_QApplication_fontMetrics (), typeof(TQFontMetrics)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_allWidgets (); - public static TQWidgetList AllWidgets () - { - return (TQWidgetList)LookupObject (qt_QApplication_allWidgets (), typeof(TQWidgetList)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_topLevelWidgets (); - public static TQWidgetList TopLevelWidgets () - { - return (TQWidgetList)LookupObject (qt_QApplication_topLevelWidgets (), typeof(TQWidgetList)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_desktop (); - public static TQDesktopWidget Desktop () - { - return (TQDesktopWidget)LookupObject (qt_QApplication_desktop (), typeof(TQDesktopWidget)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_activePopupWidget (); - public static TQWidget ActivePopupWidget () - { - return (TQWidget)LookupObject (qt_QApplication_activePopupWidget (), typeof(TQWidget)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_activeModalWidget (); - public static TQWidget ActiveModalWidget () - { - return (TQWidget)LookupObject (qt_QApplication_activeModalWidget (), typeof(TQWidget)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_clipboard (); - public static TQClipboard Clipboard () - { - return (TQClipboard)LookupObject (qt_QApplication_clipboard (), typeof(TQClipboard)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_widgetAt (int x, int y, bool child); - public static TQWidget WidgetAt (int x, int y, bool child) - { - return (TQWidget)LookupObject (qt_QApplication_widgetAt (x, y, child), typeof(TQWidget)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_widgetAt1 (IntPtr arg1, bool child); - public static TQWidget WidgetAt (TQPoint arg1, bool child) - { - return (TQWidget)LookupObject (qt_QApplication_widgetAt1 (arg1.RawObject, child), typeof(TQWidget)); - } - - [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 (TQObject 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 (TQObject 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 (TQColor c) - { - qt_QApplication_setWinStyleHighlightColor (c.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_winStyleHighlightColor (); - public static TQColor WinStyleHighlightColor () - { - return (TQColor)LookupObject (qt_QApplication_winStyleHighlightColor (), typeof(TQColor)); - } - - [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 (TQSize arg1) - { - qt_QApplication_setGlobalStrut (arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_globalStrut (); - public static TQSize GlobalStrut () - { - return (TQSize)LookupObject (qt_QApplication_globalStrut (), typeof(TQSize)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_setLibraryPaths (IntPtr arg1); - public static void SetLibraryPaths (TQStringList arg1) - { - qt_QApplication_setLibraryPaths (arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QApplication_libraryPaths (); - public static TQStringList LibraryPaths () - { - return (TQStringList)LookupObject (qt_QApplication_libraryPaths (), typeof(TQStringList)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QApplication_addLibraryPath (IntPtr arg1); - public static void AddLibraryPath (string arg1) - { - qt_QApplication_addLibraryPath (new TQString (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 TQString (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 TQUuid ()); - } - - public static void SetOverrideCursor (TQCursor arg1) - { - SetOverrideCursor(arg1, false); - } - - public static TQPalette Palette () - { - return Palette(new TQWidget ()); - } - - public static void SetPalette (TQPalette arg1) - { - SetPalette(arg1, false); - } - - public static void SetPalette (TQPalette arg1, bool informWidgets) - { - SetPalette(arg1, informWidgets, ""); - } - - public static TQFont Font () - { - return Font(new TQWidget ()); - } - - public static void SetFont (TQFont arg1) - { - SetFont(arg1, false); - } - - public static void SetFont (TQFont arg1, bool informWidgets) - { - SetFont(arg1, informWidgets, ""); - } - - public static TQWidget WidgetAt (int x, int y) - { - return WidgetAt(x, y, false); - } - - public static TQWidget WidgetAt (TQPoint 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 deleted file mode 100644 index 6fb2f1e7..00000000 --- a/qtsharp/src/bindings/static/QByteArray.cs +++ /dev/null @@ -1,84 +0,0 @@ -// TQByteArray.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 TQByteArray : TQMemArray, IDisposable { - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QByteArray (); - public TQByteArray () : this (TQNull.Instance) - { - rawObject = qt_new_QByteArray (); - RegisterObject (this); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QByteArray1 (int size); - public TQByteArray (int size) : this (TQNull.Instance) - { - rawObject = qt_new_QByteArray1 (size); - RegisterObject (this); - } - - internal TQByteArray (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQByteArray (TQNull dummy) : base (TQNull.Instance) {} - - ~TQByteArray () - { - 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 TQByteArray (byte[] bArray) - { - TQByteArray qbArray = new TQByteArray (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 deleted file mode 100644 index 44740752..00000000 --- a/qtsharp/src/bindings/static/QCallBack.cs +++ /dev/null @@ -1,37 +0,0 @@ -// TQCallBack.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 TQCallBack { - - public Object receiver; - public MethodInfo info; - - public TQCallBack (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 deleted file mode 100644 index 784f03b6..00000000 --- a/qtsharp/src/bindings/static/QEventArgs.cs +++ /dev/null @@ -1,42 +0,0 @@ -// TQEventArgs.cs - TQEventArgs 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 TQEventArgs : EventArgs { - private TQEvent qevent; - private string name; - - public TQEvent Event { - get { return qevent; } - } - - public string Name { - get { return name; } - } - - public TQEventArgs(string n, TQEvent 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 deleted file mode 100644 index eb2d9d0d..00000000 --- a/qtsharp/src/bindings/static/QEventList.cs +++ /dev/null @@ -1,55 +0,0 @@ -// 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 TQEventList - { - private Hashtable events; - - internal TQEventList () - { - 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 TQEventHandlers (String name) - { - return (ArrayList)events [name]; - } - } -} diff --git a/qtsharp/src/bindings/static/QGL.cs b/qtsharp/src/bindings/static/QGL.cs deleted file mode 100644 index 6a994fb0..00000000 --- a/qtsharp/src/bindings/static/QGL.cs +++ /dev/null @@ -1,49 +0,0 @@ -// TQGL.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 TQGL { - - 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 deleted file mode 100644 index 56d2bc8f..00000000 --- a/qtsharp/src/bindings/static/QMenuBar.cs +++ /dev/null @@ -1,815 +0,0 @@ -// TQMenuBar.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 TQMenuBar : TQFrame, ITQMenuData, 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 TQMenuBar (TQWidget parent, string name) : this (TQNull.Instance) - { - qparent = parent; - if (qparent == null) parent = new TQWidget (IntPtr.Zero); - rawObject = qt_new_QMenuBar (parent.RawObject, name); - if (qparent == null) RegisterObject (this); - else qparent.AddChild (this); - } - - public TQMenuBar () : this (new TQWidget ()) {} - - public TQMenuBar (TQWidget parent) : this (parent, "") {} - - internal TQMenuBar (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQMenuBar (TQNull dummy) : base (TQNull.Instance) - { - menuConnections = new Hashtable(); - } - - ~TQMenuBar () - { - 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 (TQObject arg1, TQEvent 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 TQMenuBar.Separator qt_QMenuBar_separator (IntPtr raw); - public TQMenuBar.Separator TheSeparator () - { - return qt_QMenuBar_separator (rawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuBar_setSeparator (IntPtr raw, TQMenuBar.Separator when); - public void SetSeparator (TQMenuBar.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 TQSize SizeHint () - { - return (TQSize)LookupObject (qt_QMenuBar_sizeHint (rawObject), typeof(TQSize)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuBar_minimumSize (IntPtr raw); - public TQSize MinimumSize () - { - return (TQSize)LookupObject (qt_QMenuBar_minimumSize (rawObject), typeof(TQSize)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuBar_minimumSizeHint (IntPtr raw); - public TQSize MinimumSizeHint () - { - return (TQSize)LookupObject (qt_QMenuBar_minimumSizeHint (rawObject), typeof(TQSize)); - } - - [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 (TQPainter 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 (TQFont 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 (TQStyle 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 (TQPoint 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 TQRect ItemRect (int item) - { - return (TQRect)LookupObject (qt_QMenuBar_itemRect (rawObject, item), typeof(TQRect)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuBar_QMenuData (IntPtr raw); - public IntPtr TQMenuData () - { - 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, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (text, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (icon, text, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (pixmap, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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, TQObject receiver, string member) - { - return Qt.TQMenuData.ConnectItem (this, TQMenuData (), identifier, receiver, member); - - } - - public bool DisconnectItem (int identifier, TQObject receiver, string member) - { - return Qt.TQMenuData.DisconnectItem (this, TQMenuData (), 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 (TQMenuData ()); - } - - [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 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, int identifier, int index) - { - return qt_QMenuData_insertItem5 (TQMenuData (), icon.RawObject, new TQString (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, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem6 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem7 (TQMenuData (), icon.RawObject, new TQString (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 (TQPixmap pixmap, int identifier, int index) - { - return qt_QMenuData_insertItem8 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, int identifier, int index) - { - return qt_QMenuData_insertItem9 (TQMenuData (), 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 (TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem10 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem11 (TQMenuData (), 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 (TQWidget widget, int identifier, int index) - { - return qt_QMenuData_insertItem12 (TQMenuData (), 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 (TQIconSet icon, TQCustomMenuItem custom, int identifier, int index) - { - return qt_QMenuData_insertItem13 (TQMenuData (), 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 (TQCustomMenuItem custom, int identifier, int index) - { - return qt_QMenuData_insertItem14 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), index); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_clear (IntPtr raw); - public void Clear () - { - qt_QMenuData_clear (TQMenuData ()); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier); - public TQKeySequence Accel (int identifier) - { - return (TQKeySequence)LookupObject (qt_QMenuData_accel (TQMenuData (), identifier), typeof(TQKeySequence)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier); - public void SetAccel (TQKeySequence key, int identifier) - { - qt_QMenuData_setAccel (TQMenuData (), key.RawObject, identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier); - public TQIconSet IconSet (int identifier) - { - return (TQIconSet)LookupObject (qt_QMenuData_iconSet (TQMenuData (), identifier), typeof(TQIconSet)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier); - public string Text (int identifier) - { - TQString qstr = new TQString (qt_QMenuData_text (TQMenuData (), 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 TQPixmap Pixmap (int identifier) - { - return (TQPixmap)LookupObject (qt_QMenuData_pixmap (TQMenuData (), identifier), typeof(TQPixmap)); - } - - [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 (TQMenuData (), identifier, new TQString (arg1).RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier); - public string WhatsThis (int identifier) - { - TQString qstr = new TQString (qt_QMenuData_whatsThis (TQMenuData (), 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 (TQMenuData (), identifier, new TQString (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, TQPixmap pixmap) - { - qt_QMenuData_changeItem1 (TQMenuData (), 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, TQIconSet icon, string text) - { - qt_QMenuData_changeItem2 (TQMenuData (), identifier, icon.RawObject, new TQString (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, TQIconSet icon, TQPixmap pixmap) - { - qt_QMenuData_changeItem3 (TQMenuData (), 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 (TQMenuData (), new TQString (text).RawObject, identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier); - public void ChangeItem (TQPixmap pixmap, int identifier) - { - qt_QMenuData_changeItem5 (TQMenuData (), 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 (TQIconSet icon, string text, int identifier) - { - qt_QMenuData_changeItem6 (TQMenuData (), icon.RawObject, new TQString (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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier); - public TQMenuItem FindItem (int identifier) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findItem (TQMenuData (), identifier), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent); - public TQMenuItem FindItem (int identifier, TQMenuData parent) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findItem1 (TQMenuData (), identifier, parent.RawObject), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index); - public TQMenuItem FindPopup (TQPopupMenu arg1, int[] index) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findPopup (TQMenuData (), arg1.RawObject, index), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1); - protected void MenuInsPopup (TQPopupMenu arg1) - { - qt_QMenuData_menuInsPopup (TQMenuData (), arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1); - protected void MenuDelPopup (TQPopupMenu arg1) - { - qt_QMenuData_menuDelPopup (TQMenuData (), arg1.RawObject); - } - - public int InsertItem (string text, TQObject receiver, string member) - { - return InsertItem(text, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(text, receiver, member, accel, (int) -1); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(text, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member) - { - return InsertItem(icon, text, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(icon, text, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member) - { - return InsertItem(pixmap, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(pixmap, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member) - { - return InsertItem(icon, pixmap, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(icon, pixmap, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 (TQIconSet icon, string text) - { - return InsertItem(icon, text, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, int identifier) - { - return InsertItem(icon, text, identifier, (int) -1); - } - - public int InsertItem (string text, TQPopupMenu popup) - { - return InsertItem(text, popup, (int) -1); - } - - public int InsertItem (string text, TQPopupMenu popup, int identifier) - { - return InsertItem(text, popup, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup) - { - return InsertItem(icon, text, popup, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier) - { - return InsertItem(icon, text, popup, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap) - { - return InsertItem(pixmap, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, int identifier) - { - return InsertItem(pixmap, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap) - { - return InsertItem(icon, pixmap, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier) - { - return InsertItem(icon, pixmap, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQPopupMenu popup) - { - return InsertItem(pixmap, popup, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier) - { - return InsertItem(pixmap, popup, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup) - { - return InsertItem(icon, pixmap, popup, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier) - { - return InsertItem(icon, pixmap, popup, identifier, (int) -1); - } - - public int InsertItem (TQWidget widget) - { - return InsertItem(widget, (int) -1); - } - - public int InsertItem (TQWidget widget, int identifier) - { - return InsertItem(widget, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQCustomMenuItem custom) - { - return InsertItem(icon, custom, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier) - { - return InsertItem(icon, custom, identifier, (int) -1); - } - - public int InsertItem (TQCustomMenuItem custom) - { - return InsertItem(custom, (int) -1); - } - - public int InsertItem (TQCustomMenuItem custom, int identifier) - { - return InsertItem(custom, identifier, (int) -1); - } - - public int InsertSeparator () - { - return InsertSeparator((int) -1); - } - - public TQMenuItem FindPopup (TQPopupMenu arg1) - { - return FindPopup(arg1, new int[]{0}); - } - } -} diff --git a/qtsharp/src/bindings/static/QMenuData.cs b/qtsharp/src/bindings/static/QMenuData.cs deleted file mode 100644 index ade3b8c4..00000000 --- a/qtsharp/src/bindings/static/QMenuData.cs +++ /dev/null @@ -1,719 +0,0 @@ -// TQMenuData.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 TQMenu* and TQPopupMenu 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 TQMenuData : QtSupport, ITQMenuData, IDisposable { - - private Hashtable menuConnections; - - public Hashtable MenuConnections { - get { return menuConnections; } - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QMenuData (); - public TQMenuData () : this (TQNull.Instance) - { - rawObject = qt_new_QMenuData (); - RegisterObject (this); - } - - internal TQMenuData (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQMenuData (TQNull dummy) : base (TQNull.Instance) - { - menuConnections = new Hashtable(); - } - - ~TQMenuData () - { - 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 ITQMenuData 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 (ITQMenuData menu, IntPtr menudata, int id, TQObject 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 (ITQMenuData menu, IntPtr menudata, int id, TQObject 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 TQObject'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 TQMenuData implements ITQMenuData... - - 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 TQString (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 (TQIconSet icon, string text, int identifier, int index) - { - return qt_QMenuData_insertItem5 (rawObject, icon.RawObject, new TQString (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, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem6 (rawObject, new TQString (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 (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem7 (rawObject, icon.RawObject, new TQString (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 (TQPixmap 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 (TQIconSet icon, TQPixmap 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 (TQPixmap pixmap, TQPopupMenu 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 (TQIconSet icon, TQPixmap pixmap, TQPopupMenu 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 (TQWidget 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 (TQIconSet icon, TQCustomMenuItem 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 (TQCustomMenuItem 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 TQKeySequence Accel (int identifier) - { - return (TQKeySequence)LookupObject (qt_QMenuData_accel (rawObject, identifier), typeof(TQKeySequence)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier); - public void SetAccel (TQKeySequence 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 TQIconSet IconSet (int identifier) - { - return (TQIconSet)LookupObject (qt_QMenuData_iconSet (rawObject, identifier), typeof(TQIconSet)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier); - public string Text (int identifier) - { - TQString qstr = new TQString (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 TQPixmap Pixmap (int identifier) - { - return (TQPixmap)LookupObject (qt_QMenuData_pixmap (rawObject, identifier), typeof(TQPixmap)); - } - - [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 TQString (arg1).RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier); - public string WhatsThis (int identifier) - { - TQString qstr = new TQString (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 TQString (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, TQPixmap 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, TQIconSet icon, string text) - { - qt_QMenuData_changeItem2 (rawObject, identifier, icon.RawObject, new TQString (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, TQIconSet icon, TQPixmap 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 TQString (text).RawObject, identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier); - public void ChangeItem (TQPixmap 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 (TQIconSet icon, string text, int identifier) - { - qt_QMenuData_changeItem6 (rawObject, icon.RawObject, new TQString (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, TQObject receiver, string slot) - { - return ConnectItem (this, this.RawObject, identifier, receiver, slot); - } - - public bool DisconnectItem (int identifier, TQObject receiver, string slot) - { - return DisconnectItem (this, this.RawObject, identifier, receiver, slot); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (text, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (icon, text, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (pixmap, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 TQMenuItem FindItem (int identifier) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findItem (rawObject, identifier), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent); - public TQMenuItem FindItem (int identifier, TQMenuData parent) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findItem1 (rawObject, identifier, parent.RawObject), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index); - public TQMenuItem FindPopup (TQPopupMenu arg1, int[] index) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findPopup (rawObject, arg1.RawObject, index), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1); - protected void MenuInsPopup (TQPopupMenu 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 (TQPopupMenu arg1) - { - qt_QMenuData_menuDelPopup (rawObject, arg1.RawObject); - } - - public int InsertItem (string text, TQObject receiver, string member) - { - return InsertItem(text, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(text, receiver, member, accel, (int) -1); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(text, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member) - { - return InsertItem(icon, text, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(icon, text, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member) - { - return InsertItem(pixmap, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(pixmap, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member) - { - return InsertItem(icon, pixmap, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(icon, pixmap, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 (TQIconSet icon, string text) - { - return InsertItem(icon, text, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, int identifier) - { - return InsertItem(icon, text, identifier, (int) -1); - } - - public int InsertItem (string text, TQPopupMenu popup) - { - return InsertItem(text, popup, (int) -1); - } - - public int InsertItem (string text, TQPopupMenu popup, int identifier) - { - return InsertItem(text, popup, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup) - { - return InsertItem(icon, text, popup, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier) - { - return InsertItem(icon, text, popup, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap) - { - return InsertItem(pixmap, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, int identifier) - { - return InsertItem(pixmap, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap) - { - return InsertItem(icon, pixmap, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier) - { - return InsertItem(icon, pixmap, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQPopupMenu popup) - { - return InsertItem(pixmap, popup, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier) - { - return InsertItem(pixmap, popup, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup) - { - return InsertItem(icon, pixmap, popup, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier) - { - return InsertItem(icon, pixmap, popup, identifier, (int) -1); - } - - public int InsertItem (TQWidget widget) - { - return InsertItem(widget, (int) -1); - } - - public int InsertItem (TQWidget widget, int identifier) - { - return InsertItem(widget, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQCustomMenuItem custom) - { - return InsertItem(icon, custom, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier) - { - return InsertItem(icon, custom, identifier, (int) -1); - } - - public int InsertItem (TQCustomMenuItem custom) - { - return InsertItem(custom, (int) -1); - } - - public int InsertItem (TQCustomMenuItem custom, int identifier) - { - return InsertItem(custom, identifier, (int) -1); - } - - public int InsertSeparator () - { - return InsertSeparator((int) -1); - } - - public TQMenuItem FindPopup (TQPopupMenu 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 deleted file mode 100644 index 95ede04b..00000000 --- a/qtsharp/src/bindings/static/QNull.cs +++ /dev/null @@ -1,35 +0,0 @@ -// TQNull.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 TQNull { - - private static readonly TQNull instance = new TQNull (null); - - private TQNull (Object dummy) {} - - internal static TQNull Instance { - get {return instance;} - } - } -} diff --git a/qtsharp/src/bindings/static/QObject.cs b/qtsharp/src/bindings/static/QObject.cs deleted file mode 100644 index 2df22d50..00000000 --- a/qtsharp/src/bindings/static/QObject.cs +++ /dev/null @@ -1,609 +0,0 @@ -// TQObject.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(TQObject)")] - public class TQObject : QtSupport, IDisposable { - - // Hold an instance of the TQApplication object - private static TQApplication qapp; - private QtSignalMap csSignalMap; - private QtSignalMap cppSignalMap; - - public static TQApplication 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 TQObject (TQObject parent, string name) : this (TQNull.Instance) - { - qparent = parent; - - if (qparent == null) - parent = new TQWidget (IntPtr.Zero); - else - qparent.AddChild (this); - - rawObject = qt_new_QObject (parent.RawObject, name); - RegisterObject (this); - } - - public TQObject (TQObject parent) : this (parent, "") {} - - internal TQObject () : this (TQNull.Instance) {} - - internal TQObject (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject (this); - } - - internal TQObject (TQNull dummy) : base (TQNull.Instance) - { - InitSignals (); - } - - // FIXME This ctor used only by QtSignal - internal TQObject (NoSignalInit dummy) : base (TQNull.Instance) - { - rawObject = qt_new_QObject (IntPtr.Zero, ""); - RegisterObject (this); - } - - ~TQObject () - { - 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 TQObject QtCast() - { - string QtType = this.ClassName(); - Type newType = Type.GetType( "Qt." + QtType ); - object[] paramArray = { this.RawObject }; - return (TQObject) Activator.CreateInstance( newType, paramArray ); - } - - public static bool Connect(TQObject sender, string signal, TQObject receiver, string slot) - { - return QtSignal.Connect(sender, signal, receiver, slot); - } - - public bool Connect (TQObject sender, string signal, string member) - { - return Connect (sender, signal, this, member); - } - - public static bool Disconnect(TQObject sender, string signal, TQObject receiver, string slot) - { - return QtSignal.Disconnect(sender, signal, receiver, slot); - } - - public bool Disconnect () - { - return Disconnect (this, null, null, null); - } - - public bool Disconnect (string signal, TQObject receiver, string member) - { - return Disconnect(this, signal, receiver, member); - } - - public bool Disconnect (TQObject 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) - { - TQString qstr = new TQString (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) - { - TQString qstr = new TQString (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 TQMetaObject MetaObject () - { - return (TQMetaObject)LookupObject (qt_QObject_metaObject (rawObject), typeof(TQMetaObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern bool qt_QObject_event (IntPtr raw, IntPtr arg1); - public bool Q_event (TQEvent 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 (TQObject arg1, TQEvent 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 TQObject Child (string objName, string inheritsClass, bool recursiveSearch) - { - return (TQObject)LookupObject (qt_QObject_child (rawObject, objName, inheritsClass, recursiveSearch), typeof(TQObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QObject_children (IntPtr raw); - public TQObjectList Children () - { - return (TQObjectList)LookupObject (qt_QObject_children (rawObject), typeof(TQObjectList)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QObject_queryList (IntPtr raw, string inheritsClass, string objName, bool regexpMatch, bool recursiveSearch); - public TQObjectList QueryList (string inheritsClass, string objName, bool regexpMatch, bool recursiveSearch) - { - return (TQObjectList)LookupObject (qt_QObject_queryList (rawObject, inheritsClass, objName, regexpMatch, recursiveSearch), typeof(TQObjectList)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QObject_insertChild (IntPtr raw, IntPtr arg1); - public void InsertChild (TQObject 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 (TQObject 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 (TQObject 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 (TQObject 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, TQVariant 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 TQVariant Property (string name) - { - return (TQVariant)LookupObject (qt_QObject_property (rawObject, name), typeof(TQVariant)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QObject_parent (IntPtr raw); - public TQObject Parent () - { - return (TQObject)LookupObject (qt_QObject_parent (rawObject), typeof(TQObject)); - } - - [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 TQObjectList ObjectTrees () - { - return (TQObjectList)LookupObject (qt_QObject_objectTrees (), typeof(TQObjectList)); - } - - /*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 (TQObject sender, int signal_index, TQObject 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 (TQEvent 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 TQConnectionList Receivers (string signal) - { - return (TQConnectionList)LookupObject (qt_QObject_receivers (rawObject, signal), typeof(TQConnectionList)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QObject_receivers1 (IntPtr raw, int signal); - protected TQConnectionList Receivers (int signal) - { - return (TQConnectionList)LookupObject (qt_QObject_receivers1 (rawObject, signal), typeof(TQConnectionList)); - } - - [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 TQString (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 (TQConnectionList 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 TQObject Sender () - { - return (TQObject)LookupObject (qt_QObject_sender (rawObject), typeof(TQObject)); - } - - [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, TQObject 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 TQCString NormalizeSignalSlot (string signalSlot) - { - return (TQCString)LookupObject (qt_QObject_normalizeSignalSlot (signalSlot), typeof(TQCString)); - } - */ - - public TQObject Child (string objName) - { - return Child(objName, null); - } - - public TQObject Child (string objName, string inheritsClass) - { - return Child(objName, inheritsClass, true); - } - - public TQObjectList QueryList () - { - return QueryList(""); - } - - public TQObjectList QueryList (string inheritsClass) - { - return QueryList(inheritsClass, ""); - } - - public TQObjectList QueryList (string inheritsClass, string objName) - { - return QueryList(inheritsClass, objName, true); - } - - public TQObjectList 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 deleted file mode 100644 index 4ded6a7f..00000000 --- a/qtsharp/src/bindings/static/QPopupMenu.cs +++ /dev/null @@ -1,830 +0,0 @@ -// TQPopupMenu.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 TQPopupMenu : TQFrame, ITQMenuData, 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 TQPopupMenu (TQWidget parent, string name) : this (TQNull.Instance) - { - qparent = parent; - if (qparent == null) parent = new TQWidget (IntPtr.Zero); - rawObject = qt_new_QPopupMenu (parent.RawObject, name); - if (qparent == null) RegisterObject (this); - else qparent.AddChild (this); - } - - public TQPopupMenu () : this (new TQWidget ()) {} - - public TQPopupMenu (TQWidget parent) : this (parent, "") {} - - internal TQPopupMenu (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQPopupMenu (TQNull dummy) : base (TQNull.Instance) - { - menuConnections = new Hashtable(); - } - - ~TQPopupMenu () - { - 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 (TQPoint 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 (TQFont 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 (TQPoint 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 TQSize SizeHint () - { - return (TQSize)LookupObject (qt_QPopupMenu_sizeHint (rawObject), typeof(TQSize)); - } - - [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 (TQPoint 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 TQRect ItemGeometry (int index) - { - return (TQRect)LookupObject (qt_QPopupMenu_itemGeometry (rawObject, index), typeof(TQRect)); - } - - [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 (TQMenuItem 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 (TQPainter p, int tab, TQMenuItem 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 (TQPainter 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 (TQStyle 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 (TQPoint arg1, bool ignoreSeparator) - { - return qt_QPopupMenu_itemAtPos (rawObject, arg1.RawObject, ignoreSeparator); - } - - public void Popup (TQPoint pos) - { - Popup(pos, (int) 0); - } - - public int Exec (TQPoint 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 (TQPoint arg1) - { - return ItemAtPos(arg1, true); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QPopupMenu_QMenuData (IntPtr raw); - public IntPtr TQMenuData () - { - return qt_QPopupMenu_QMenuData (rawObject); - } - - // Begin interface methods. - - - //********************* A temporary hack to divert connections to CSharpConnect *****************// - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (text, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (icon, text, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) - { - int id = InsertItem (pixmap, identifier, index); - SetAccel (accel, id); - ConnectItem (id, receiver, member); - return id; - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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, TQObject receiver, string member) - { - return Qt.TQMenuData.ConnectItem (this, TQMenuData (), identifier, receiver, member); - } - - public bool DisconnectItem (int identifier, TQObject receiver, string member) - { - return Qt.TQMenuData.DisconnectItem (this, TQMenuData (), 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 (TQMenuData ()); - } - - [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 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, int identifier, int index) - { - return qt_QMenuData_insertItem5 (TQMenuData (), icon.RawObject, new TQString (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, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem6 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem7 (TQMenuData (), icon.RawObject, new TQString (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 (TQPixmap pixmap, int identifier, int index) - { - return qt_QMenuData_insertItem8 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, int identifier, int index) - { - return qt_QMenuData_insertItem9 (TQMenuData (), 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 (TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem10 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) - { - return qt_QMenuData_insertItem11 (TQMenuData (), 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 (TQWidget widget, int identifier, int index) - { - return qt_QMenuData_insertItem12 (TQMenuData (), 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 (TQIconSet icon, TQCustomMenuItem custom, int identifier, int index) - { - return qt_QMenuData_insertItem13 (TQMenuData (), 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 (TQCustomMenuItem custom, int identifier, int index) - { - return qt_QMenuData_insertItem14 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), index); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_clear (IntPtr raw); - public void Clear () - { - qt_QMenuData_clear (TQMenuData ()); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier); - public TQKeySequence Accel (int identifier) - { - return (TQKeySequence)LookupObject (qt_QMenuData_accel (TQMenuData (), identifier), typeof(TQKeySequence)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier); - public void SetAccel (TQKeySequence key, int identifier) - { - qt_QMenuData_setAccel (TQMenuData (), key.RawObject, identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier); - public TQIconSet IconSet (int identifier) - { - return (TQIconSet)LookupObject (qt_QMenuData_iconSet (TQMenuData (), identifier), typeof(TQIconSet)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier); - public string Text (int identifier) - { - TQString qstr = new TQString (qt_QMenuData_text (TQMenuData (), 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 TQPixmap Pixmap (int identifier) - { - return (TQPixmap)LookupObject (qt_QMenuData_pixmap (TQMenuData (), identifier), typeof(TQPixmap)); - } - - [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 (TQMenuData (), identifier, new TQString (arg1).RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier); - public string WhatsThis (int identifier) - { - TQString qstr = new TQString (qt_QMenuData_whatsThis (TQMenuData (), 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 (TQMenuData (), identifier, new TQString (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, TQPixmap pixmap) - { - qt_QMenuData_changeItem1 (TQMenuData (), 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, TQIconSet icon, string text) - { - qt_QMenuData_changeItem2 (TQMenuData (), identifier, icon.RawObject, new TQString (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, TQIconSet icon, TQPixmap pixmap) - { - qt_QMenuData_changeItem3 (TQMenuData (), 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 (TQMenuData (), new TQString (text).RawObject, identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier); - public void ChangeItem (TQPixmap pixmap, int identifier) - { - qt_QMenuData_changeItem5 (TQMenuData (), 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 (TQIconSet icon, string text, int identifier) - { - qt_QMenuData_changeItem6 (TQMenuData (), icon.RawObject, new TQString (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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), identifier); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier); - public TQMenuItem FindItem (int identifier) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findItem (TQMenuData (), identifier), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent); - public TQMenuItem FindItem (int identifier, TQMenuData parent) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findItem1 (TQMenuData (), identifier, parent.RawObject), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index); - public TQMenuItem FindPopup (TQPopupMenu arg1, int[] index) - { - return (TQMenuItem)LookupObject (qt_QMenuData_findPopup (TQMenuData (), arg1.RawObject, index), typeof(TQMenuItem)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1); - protected void MenuInsPopup (TQPopupMenu arg1) - { - qt_QMenuData_menuInsPopup (TQMenuData (), arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1); - protected void MenuDelPopup (TQPopupMenu arg1) - { - qt_QMenuData_menuDelPopup (TQMenuData (), arg1.RawObject); - } - - public int InsertItem (string text, TQObject receiver, string member) - { - return InsertItem(text, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(text, receiver, member, accel, (int) -1); - } - - public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(text, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member) - { - return InsertItem(icon, text, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(icon, text, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member) - { - return InsertItem(pixmap, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(pixmap, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier) - { - return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member) - { - return InsertItem(icon, pixmap, receiver, member, new TQKeySequence ()); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) - { - return InsertItem(icon, pixmap, receiver, member, accel, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 (TQIconSet icon, string text) - { - return InsertItem(icon, text, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, int identifier) - { - return InsertItem(icon, text, identifier, (int) -1); - } - - public int InsertItem (string text, TQPopupMenu popup) - { - return InsertItem(text, popup, (int) -1); - } - - public int InsertItem (string text, TQPopupMenu popup, int identifier) - { - return InsertItem(text, popup, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup) - { - return InsertItem(icon, text, popup, (int) -1); - } - - public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier) - { - return InsertItem(icon, text, popup, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap) - { - return InsertItem(pixmap, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, int identifier) - { - return InsertItem(pixmap, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap) - { - return InsertItem(icon, pixmap, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier) - { - return InsertItem(icon, pixmap, identifier, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQPopupMenu popup) - { - return InsertItem(pixmap, popup, (int) -1); - } - - public int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier) - { - return InsertItem(pixmap, popup, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup) - { - return InsertItem(icon, pixmap, popup, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier) - { - return InsertItem(icon, pixmap, popup, identifier, (int) -1); - } - - public int InsertItem (TQWidget widget) - { - return InsertItem(widget, (int) -1); - } - - public int InsertItem (TQWidget widget, int identifier) - { - return InsertItem(widget, identifier, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQCustomMenuItem custom) - { - return InsertItem(icon, custom, (int) -1); - } - - public int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier) - { - return InsertItem(icon, custom, identifier, (int) -1); - } - - public int InsertItem (TQCustomMenuItem custom) - { - return InsertItem(custom, (int) -1); - } - - public int InsertItem (TQCustomMenuItem custom, int identifier) - { - return InsertItem(custom, identifier, (int) -1); - } - - public int InsertSeparator () - { - return InsertSeparator((int) -1); - } - - public TQMenuItem FindPopup (TQPopupMenu arg1) - { - return FindPopup(arg1, new int[]{0}); - } - } -} diff --git a/qtsharp/src/bindings/static/QString.cs b/qtsharp/src/bindings/static/QString.cs deleted file mode 100644 index cd3ba3c0..00000000 --- a/qtsharp/src/bindings/static/QString.cs +++ /dev/null @@ -1,1340 +0,0 @@ -// TQString.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 TQString : 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 TQString Null = new TQString (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 TQString () : this (TQNull.Instance) - { - rawObject = qt_new_QString (); - } - - // TODO: Make sure there is a TQChar constructor that - // handles unicode conversion - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QString1 (IntPtr arg1); - public TQString (TQChar arg1) : this (TQNull.Instance) - { - rawObject = qt_new_QString1 (arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QString2 (IntPtr arg1); - public TQString (TQString arg1) : this (TQNull.Instance) - { - rawObject = qt_new_QString2 (arg1.RawObject); - } - - // TODO: Verify that this works. We have weak support for - // TQByteArray - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QString3 (IntPtr arg1); - public TQString (TQByteArray arg1) : this (TQNull.Instance) - { - rawObject = qt_new_QString3 (arg1.RawObject); - } - - // TODO: This signature is wrong. The C++ version is - // takes a pointer to a sequence of TQChars, not a single - // TQChar - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QString4 (IntPtr unicode, uint length); - public TQString (TQChar unicode, uint length) : this (TQNull.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 TQString( string s ): this( TQNull.Instance ) - { - rawObject = qt_new_QString (); - rawObject = qt_QString_setUnicodeCodes( - rawObject, s, (uint) s.Length ); - } - - internal TQString (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - - } - - internal TQString (TQNull dummy) : base (TQNull.Instance) {} - - - [DllImport("libqtc")] - private static extern void qt_del_QString (IntPtr str); - ~TQString () - { - 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 ( TQString 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 TQString ( string s ) - { - return new TQString(s); - } - - public override string ToString () - { - return (string) this; - } - - public static TQString operator + ( TQString a, TQString b ) - { - TQString result = new TQString (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 TQString Fill (TQChar c, int len) - { - return new TQString (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 TQString Arg (long a, int fieldwidth, int Q_base) - { - return new TQString (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 TQString Arg (ulong a, int fieldwidth, int Q_base) - { - return new TQString (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 TQString Arg (int a, int fieldwidth, int Q_base) - { - return new TQString (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 TQString Arg (uint a, int fieldwidth, int Q_base) - { - return new TQString (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 TQString Arg (short a, int fieldwidth, int Q_base) - { - return new TQString (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 TQString Arg (ushort a, int fieldwidth, int Q_base) - { - return new TQString (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 TQString Arg (char a, int fieldwidth) - { - return new TQString (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 TQString Arg (TQChar a, int fieldwidth) - { - return new TQString (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 TQString Arg (TQString a, int fieldwidth) - { - return new TQString (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 TQString Arg (double a, int fieldwidth, char fmt, int prec) - { - return new TQString (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 (TQChar 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 (TQString 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 (TQRegExp 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 (TQChar 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 (TQString 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 (TQRegExp 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 (TQChar 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 (TQString 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 (TQRegExp arg1) - { - return qt_QString_contains4 (rawObject, arg1.RawObject); - } - - // TODO: This is wrong. sep should be a TQChar* in C++ terms - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_section (IntPtr raw, IntPtr sep, int start, int end, TQString.SectionFlags SectionFlags); - public TQString Section (TQChar sep, int start, int end, TQString.SectionFlags SectionFlags) - { - return new TQString (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, TQString.SectionFlags SectionFlags); - public TQString Section (char sep, int start, int end, TQString.SectionFlags SectionFlags) - { - return new TQString (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, TQString.SectionFlags SectionFlags); - public TQString Section (string in_sep, int start, int end, TQString.SectionFlags SectionFlags) - { - return new TQString (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, TQString.SectionFlags SectionFlags); - public TQString Section (TQString in_sep, int start, int end, TQString.SectionFlags SectionFlags) - { - return new TQString (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, TQString.SectionFlags SectionFlags); - public TQString Section (TQRegExp reg, int start, int end, TQString.SectionFlags SectionFlags) - { - return new TQString (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 TQString Left (uint len) - { - return new TQString (qt_QString_left (rawObject, len)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_right (IntPtr raw, uint len); - public TQString Right (uint len) - { - return new TQString (qt_QString_right (rawObject, len)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_mid (IntPtr raw, uint index, uint len); - public TQString Mid (uint index, uint len) - { - return new TQString (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 TQString LeftJustify (uint width, TQChar fill, bool trunc) - { - return new TQString (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 TQString RightJustify (uint width, TQChar fill, bool trunc) - { - return new TQString (qt_QString_rightJustify (rawObject, width, fill.RawObject, trunc)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_lower (IntPtr raw); - public TQString Lower () - { - return new TQString (qt_QString_lower (rawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_upper (IntPtr raw); - public TQString Upper () - { - return new TQString (qt_QString_upper (rawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_stripWhiteSpace (IntPtr raw); - public TQString StripWhiteSpace () - { - return new TQString (qt_QString_stripWhiteSpace (rawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_simplifyWhiteSpace (IntPtr raw); - public TQString SimplifyWhiteSpace () - { - return new TQString (qt_QString_simplifyWhiteSpace (rawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_insert (IntPtr raw, uint index, IntPtr arg1); - public TQString Insert (uint index, TQString arg1) - { - return new TQString (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 TQString Insert (uint index, TQChar arg1, uint len) - { - return new TQString (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 TQString Insert (uint index, TQChar arg1) - { - return new TQString (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 TQString Insert (uint index, char c) - { - return new TQString (qt_QString_insert3 (rawObject, index, c)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_append (IntPtr raw, char arg1); - public TQString Append (char arg1) - { - return new TQString (qt_QString_append (rawObject, arg1)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_append1 (IntPtr raw, IntPtr arg1); - public TQString Append (TQChar arg1) - { - return new TQString (qt_QString_append1 (rawObject, arg1.RawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_append2 (IntPtr raw, IntPtr arg1); - public TQString Append (TQString arg1) - { - return new TQString (qt_QString_append2 (rawObject, arg1.RawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_prepend (IntPtr raw, char arg1); - public TQString Prepend (char arg1) - { - return new TQString (qt_QString_prepend (rawObject, arg1)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_prepend1 (IntPtr raw, IntPtr arg1); - public TQString Prepend (TQChar arg1) - { - return new TQString (qt_QString_prepend1 (rawObject, arg1.RawObject)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_prepend2 (IntPtr raw, IntPtr arg1); - public TQString Prepend (TQString arg1) - { - return new TQString (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 TQString Remove (uint index, uint len) - { - return new TQString (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 TQString Replace (uint index, uint len, TQString arg1) - { - return new TQString (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 TQString Replace (uint index, uint len, TQChar arg1, uint clen) - { - return new TQString (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 TQString Replace (TQRegExp arg1, TQString arg2) - { - return new TQString (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 TQString SetNum (short arg1, int Q_base) - { - return new TQString (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 TQString SetNum (ushort arg1, int Q_base) - { - return new TQString (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 TQString SetNum (int arg1, int Q_base) - { - return new TQString (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 TQString SetNum (uint arg1, int Q_base) - { - return new TQString (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 TQString SetNum (long arg1, int Q_base) - { - return new TQString (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 TQString SetNum (ulong arg1, int Q_base) - { - return new TQString (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 TQString SetNum (float arg1, char f, int prec) - { - return new TQString (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 TQString SetNum (double arg1, char f, int prec) - { - return new TQString (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, TQChar c) - { - qt_QString_setExpand (rawObject, index, c.RawObject); - } - - // TODO: The TQChar functions need to get fixed - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_at (IntPtr raw, uint i); - public TQChar At (uint i) - { - return LookupObject (qt_QString_at (rawObject, i), typeof (TQChar)) as TQChar; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_constref (IntPtr raw, uint i); - public TQChar Constref (uint i) - { - return LookupObject (qt_QString_constref (rawObject, i), typeof (TQChar)) as TQChar; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_ref (IntPtr raw, uint i); - public TQChar Q_ref (uint i) - { - return LookupObject (qt_QString_ref (rawObject, i), typeof (TQChar)) as TQChar; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_unicode (IntPtr raw); - public TQChar Unicode () - { - return LookupObject (qt_QString_unicode (rawObject), typeof (TQChar)) as TQChar; - } - - [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 TQCString Utf8 () - { - return LookupObject (qt_QString_utf8 (rawObject), typeof (TQCString)) as TQCString; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_local8Bit (IntPtr raw); - public TQCString Local8Bit () - { - return LookupObject (qt_QString_local8Bit (rawObject), typeof (TQCString)) as TQCString; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_setUnicode (IntPtr raw, IntPtr unicode, uint len); - public TQString SetUnicode (TQChar unicode, uint len) - { - return new TQString (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 TQString SetLatin1 (string arg1, int len) - { - return new TQString (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 (TQString 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 (TQString 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 (TQString 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 (TQString 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 TQString Number (long arg1, int Q_base) - { - return new TQString (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 TQString Number (ulong arg1, int Q_base) - { - return new TQString (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 TQString Number (int arg1, int Q_base) - { - return new TQString (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 TQString Number (uint arg1, int Q_base) - { - return new TQString (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 TQString Number (double arg1, char f, int prec) - { - return new TQString (qt_QString_number4 (arg1, f, prec)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_fromLatin1 (string arg1, int len); - public static TQString FromLatin1 (string arg1, int len) - { - return new TQString (qt_QString_fromLatin1 (arg1, len)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_fromUtf8 (TQString arg1, int len); - public static TQString FromUtf8 (string arg1, int len) - { - return new TQString (qt_QString_fromUtf8 (arg1, len)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QString_fromLocal8Bit (TQString arg1, int len); - public static TQString FromLocal8Bit (string arg1, int len) - { - return new TQString (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 (TQString s1, TQString 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 (TQString s1, TQString s2) - { - return qt_QString_localeAwareCompare1 (s1.RawObject, s2.RawObject); - } - - public TQString Fill (TQChar c) - { - return Fill(c, (int) -1); - } - - public TQString Arg (long a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (long a, int fieldwidth) - { - return Arg(a, fieldwidth, (int) 10); - } - - public TQString Arg (ulong a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (ulong a, int fieldwidth) - { - return Arg(a, fieldwidth, (int) 10); - } - - public TQString Arg (int a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (int a, int fieldwidth) - { - return Arg(a, fieldwidth, (int) 10); - } - - public TQString Arg (uint a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (uint a, int fieldwidth) - { - return Arg(a, fieldwidth, (int) 10); - } - - public TQString Arg (short a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (short a, int fieldwidth) - { - return Arg(a, fieldwidth, (int) 10); - } - - public TQString Arg (ushort a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (ushort a, int fieldwidth) - { - return Arg(a, fieldwidth, (int) 10); - } - - public TQString Arg (char a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (TQChar a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (TQString a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (double a) - { - return Arg(a, (int) 0); - } - - public TQString Arg (double a, int fieldwidth) - { - return Arg(a, fieldwidth, (char) 'g'); - } - - public TQString Arg (double a, int fieldwidth, char fmt) - { - return Arg(a, fieldwidth, fmt, (int) -1); - } - - public int Find (TQChar c) - { - return Find(c, (int) 0); - } - - public int Find (TQChar 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 (TQString str) - { - return Find(str, (int) 0); - } - - public int Find (TQString str, int index) - { - return Find(str, index, true); - } - - public int Find (TQRegExp arg1) - { - return Find(arg1, (int) 0); - } - - public int Find (string str) - { - return Find(str, (int) 0); - } - - public int FindRev (TQChar c) - { - return FindRev(c, (int) -1); - } - - public int FindRev (TQChar 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 (TQString str) - { - return FindRev(str, (int) -1); - } - - public int FindRev (TQString str, int index) - { - return FindRev(str, index, true); - } - - public int FindRev (TQRegExp arg1) - { - return FindRev(arg1, (int) -1); - } - - public int FindRev (string str) - { - return FindRev(str, (int) -1); - } - - public int Contains (TQChar c) - { - return Contains(c, true); - } - - public int Contains (char c) - { - return Contains(c, true); - } - - public int Contains (TQString str) - { - return Contains(str, true); - } - - public int Contains (string str) - { - return Contains(str, true); - } - - public TQString Section (TQChar sep, int start) - { - return Section(sep, start, (int) 1); - } - - public TQString Section (TQChar sep, int start, int end) - { - return Section(sep, start, end, TQString.SectionFlags.SectionDefault); - } - - public TQString Section (char sep, int start) - { - return Section(sep, start, (int) 1); - } - - public TQString Section (char sep, int start, int end) - { - return Section(sep, start, end, TQString.SectionFlags.SectionDefault); - } - - public TQString Section (TQString in_sep, int start) - { - return Section(in_sep, start, (int) 1); - } - - public TQString Section (TQString in_sep, int start, int end) - { - return Section(in_sep, start, end, TQString.SectionFlags.SectionDefault); - } - - public TQString Section (string in_sep, int start) - { - return Section(in_sep, start, (int) 1); - } - - public TQString Section (string in_sep, int start, int end) - { - return Section(in_sep, start, end, TQString.SectionFlags.SectionDefault); - } - - public TQString Section (TQRegExp reg, int start) - { - return Section(reg, start, (int) 1); - } - - public TQString Section (TQRegExp reg, int start, int end) - { - return Section(reg, start, end, TQString.SectionFlags.SectionDefault); - } - - public TQString Mid (uint index) - { - return Mid(index, (uint) 1); - } - - public TQString LeftJustify (uint width) - { - return LeftJustify(width, new TQChar ()); - } - - public TQString LeftJustify (uint width, TQChar fill) - { - return LeftJustify(width, fill, false); - } - - public TQString RightJustify (uint width) - { - return RightJustify(width, new TQChar ()); - } - - public TQString RightJustify (uint width, TQChar 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 TQString SetNum (short arg1) - { - return SetNum(arg1, (int) 10); - } - - public TQString SetNum (ushort arg1) - { - return SetNum(arg1, (int) 10); - } - - public TQString SetNum (int arg1) - { - return SetNum(arg1, (int) 10); - } - - public TQString SetNum (uint arg1) - { - return SetNum(arg1, (int) 10); - } - - public TQString SetNum (long arg1) - { - return SetNum(arg1, (int) 10); - } - - public TQString SetNum (ulong arg1) - { - return SetNum(arg1, (int) 10); - } - - public TQString SetNum (float arg1) - { - return SetNum(arg1, (char) 'g'); - } - - public TQString SetNum (float arg1, char f) - { - return SetNum(arg1, f, (int) 6); - } - - public TQString SetNum (double arg1) - { - return SetNum(arg1, (char) 'g'); - } - - public TQString SetNum (double arg1, char f) - { - return SetNum(arg1, f, (int) 6); - } - - public TQString SetLatin1 (TQString arg1) - { - return SetLatin1(arg1, (int) -1); - } - - public static TQString Number (long arg1) - { - return Number(arg1, (int) 10); - } - - public static TQString Number (ulong arg1) - { - return Number(arg1, (int) 10); - } - - public static TQString Number (int arg1) - { - return Number(arg1, (int) 10); - } - - public static TQString Number (uint arg1) - { - return Number(arg1, (int) 10); - } - - public static TQString Number (double arg1) - { - return Number(arg1, (char) 'g'); - } - - public static TQString Number (double arg1, char f) - { - return Number(arg1, f, (int) 6); - } - - public static TQString FromLatin1 (TQString arg1) - { - return FromLatin1(arg1, (int) -1); - } - - public static TQString FromUtf8 (TQString arg1) - { - return FromUtf8(arg1, (int) -1); - } - - public static TQString FromLocal8Bit (TQString arg1) - { - return FromLocal8Bit(arg1, (int) -1); - } - } -} diff --git a/qtsharp/src/bindings/static/QStyle.cs b/qtsharp/src/bindings/static/QStyle.cs deleted file mode 100644 index 859b1efe..00000000 --- a/qtsharp/src/bindings/static/QStyle.cs +++ /dev/null @@ -1,595 +0,0 @@ -// TQStyle.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 TQStyle : TQObject, 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 TQStyle () : this (TQNull.Instance) {} - - internal TQStyle (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQStyle (TQNull dummy) : base (TQNull.Instance) {} - - ~TQStyle () - { - 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 (TQWidget 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 (TQWidget 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 (TQApplication 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 (TQApplication 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 (TQPalette 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 (TQPopupMenu 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 TQRect itemRect (TQPainter p, TQRect r, int flags, bool enabled, TQPixmap pixmap, string text, int len) - { - return (TQRect)LookupObject (qt_QStyle_itemRect (rawObject, p.RawObject, r.RawObject, flags, enabled, pixmap.RawObject, new TQString (text).RawObject, len), typeof(TQRect)); - } - - [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 (TQPainter p, TQRect r, int flags, TQColorGroup g, bool enabled, TQPixmap pixmap, string text, int len, TQColor penColor) - { - qt_QStyle_drawItem (rawObject, p.RawObject, r.RawObject, flags, g.RawObject, enabled, pixmap.RawObject, new TQString (text).RawObject, len, penColor.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QStyle_drawPrimitive (IntPtr raw, TQStyle.PrimitiveElement pe, IntPtr p, IntPtr r, IntPtr cg, TQStyle.StyleFlags flags, IntPtr arg1); - public void drawPrimitive (TQStyle.PrimitiveElement pe, TQPainter p, TQRect r, TQColorGroup cg, TQStyle.StyleFlags flags, TQStyleOption 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, TQStyle.ControlElement element, IntPtr p, IntPtr widget, IntPtr r, IntPtr cg, TQStyle.StyleFlags how, IntPtr arg1); - public void drawControl (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyleOption 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, TQStyle.ControlElement element, IntPtr p, IntPtr widget, IntPtr r, IntPtr arg1); - public void drawControlMask (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQStyleOption 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, TQStyle.SubRect r, IntPtr widget); - public TQRect subRect (TQStyle.SubRect r, TQWidget widget) - { - return (TQRect)LookupObject (qt_QStyle_subRect (rawObject, r, widget.RawObject), typeof(TQRect)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QStyle_drawComplexControl (IntPtr raw, TQStyle.ComplexControl control, IntPtr p, IntPtr widget, IntPtr r, IntPtr cg, TQStyle.StyleFlags how, TQStyle.SubControl sub, TQStyle.SubControl subActive, IntPtr arg1); - public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyle.SubControl sub, TQStyle.SubControl subActive, TQStyleOption 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, TQStyle.ComplexControl control, IntPtr p, IntPtr widget, IntPtr r, IntPtr arg1); - public void drawComplexControlMask (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQStyleOption 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, TQStyle.ComplexControl control, IntPtr widget, TQStyle.SubControl sc, IntPtr arg1); - public TQRect querySubControlMetrics (TQStyle.ComplexControl control, TQWidget widget, TQStyle.SubControl sc, TQStyleOption arg1) - { - return (TQRect)LookupObject (qt_QStyle_querySubControlMetrics (rawObject, control, widget.RawObject, sc, arg1.RawObject), typeof(TQRect)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern TQStyle.SubControl qt_QStyle_querySubControl (IntPtr raw, TQStyle.ComplexControl control, IntPtr widget, IntPtr pos, IntPtr arg1); - public TQStyle.SubControl querySubControl (TQStyle.ComplexControl control, TQWidget widget, TQPoint pos, TQStyleOption 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, TQStyle.PixelMetric metric, IntPtr widget); - public int pixelMetric (TQStyle.PixelMetric metric, TQWidget widget) - { - return qt_QStyle_pixelMetric (rawObject, metric, widget.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QStyle_sizeFromContents (IntPtr raw, TQStyle.ContentsType contents, IntPtr widget, IntPtr contentsSize, IntPtr arg1); - public TQSize sizeFromContents (TQStyle.ContentsType contents, TQWidget widget, TQSize contentsSize, TQStyleOption arg1) - { - return (TQSize)LookupObject (qt_QStyle_sizeFromContents (rawObject, contents, widget.RawObject, contentsSize.RawObject, arg1.RawObject), typeof(TQSize)); - } - - [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, TQWidget widget, TQStyleOption 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, TQStyle.StylePixmap stylepixmap, IntPtr widget, IntPtr arg1); - public TQPixmap stylePixmap (TQStyle.StylePixmap stylepixmap, TQWidget widget, TQStyleOption arg1) - { - return (TQPixmap)LookupObject (qt_QStyle_stylePixmap (rawObject, stylepixmap, widget.RawObject, arg1.RawObject), typeof(TQPixmap)); - } - - [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 (TQWidget 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 TQSize scrollBarExtent () - { - return (TQSize)LookupObject (qt_QStyle_scrollBarExtent (rawObject), typeof(TQSize)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QStyle_visualRect (IntPtr logical, IntPtr w); - public static TQRect visualRect (TQRect logical, TQWidget w) - { - return (TQRect)LookupObject (qt_QStyle_visualRect (logical.RawObject, w.RawObject), typeof(TQRect)); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QStyle_visualRect1 (IntPtr logical, IntPtr bounding); - public static TQRect visualRect (TQRect logical, TQRect bounding) - { - return (TQRect)LookupObject (qt_QStyle_visualRect1 (logical.RawObject, bounding.RawObject), typeof(TQRect)); - } - - public TQRect itemRect (TQPainter p, TQRect r, int flags, bool enabled, TQPixmap pixmap, string text) - { - return itemRect(p, r, flags, enabled, pixmap, text, (int) -1); - } - - public void drawItem (TQPainter p, TQRect r, int flags, TQColorGroup g, bool enabled, TQPixmap pixmap, string text) - { - drawItem(p, r, flags, g, enabled, pixmap, text, (int) -1); - } - - public void drawItem (TQPainter p, TQRect r, int flags, TQColorGroup g, bool enabled, TQPixmap pixmap, string text, int len) - { - drawItem(p, r, flags, g, enabled, pixmap, text, len, new TQColor ()); - } - - public void drawPrimitive (TQStyle.PrimitiveElement pe, TQPainter p, TQRect r, TQColorGroup cg) - { - drawPrimitive(pe, p, r, cg, TQStyle.StyleFlags.Style_Default); - } - - public void drawPrimitive (TQStyle.PrimitiveElement pe, TQPainter p, TQRect r, TQColorGroup cg, TQStyle.StyleFlags flags) - { - drawPrimitive(pe, p, r, cg, flags, new TQStyleOption ()); - } - - public void drawControl (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg) - { - drawControl(element, p, widget, r, cg, TQStyle.StyleFlags.Style_Default); - } - - public void drawControl (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how) - { - drawControl(element, p, widget, r, cg, how, new TQStyleOption ()); - } - - public void drawControlMask (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r) - { - drawControlMask(element, p, widget, r, new TQStyleOption ()); - } - - public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg) - { - drawComplexControl(control, p, widget, r, cg, TQStyle.StyleFlags.Style_Default); - } - - public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how) - { - drawComplexControl(control, p, widget, r, cg, how, TQStyle.SubControl.SC_All); - } - - public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyle.SubControl sub) - { - drawComplexControl(control, p, widget, r, cg, how, sub, TQStyle.SubControl.SC_None); - } - - public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyle.SubControl sub, TQStyle.SubControl subActive) - { - drawComplexControl(control, p, widget, r, cg, how, sub, subActive, new TQStyleOption ()); - } - - public void drawComplexControlMask (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r) - { - drawComplexControlMask(control, p, widget, r, new TQStyleOption ()); - } - - public TQRect querySubControlMetrics (TQStyle.ComplexControl control, TQWidget widget, TQStyle.SubControl sc) - { - return querySubControlMetrics(control, widget, sc, new TQStyleOption ()); - } - - public TQStyle.SubControl querySubControl (TQStyle.ComplexControl control, TQWidget widget, TQPoint pos) - { - return querySubControl(control, widget, pos, new TQStyleOption ()); - } - - public int pixelMetric (TQStyle.PixelMetric metric) - { - return pixelMetric(metric, new TQWidget ()); - } - - public TQSize sizeFromContents (TQStyle.ContentsType contents, TQWidget widget, TQSize contentsSize) - { - return sizeFromContents(contents, widget, contentsSize, new TQStyleOption ()); - } - - public int styleHint (StyleHint stylehint) - { - return styleHint(stylehint, new TQWidget ()); - } - - public int styleHint (StyleHint stylehint, TQWidget widget) - { - return styleHint(stylehint, widget, new TQStyleOption ()); - } - - public int styleHint (StyleHint stylehint, TQWidget widget, TQStyleOption arg1) - { - return styleHint(stylehint, widget, arg1, (IntPtr) 0); - } - - public TQPixmap stylePixmap (TQStyle.StylePixmap stylepixmap) - { - return stylePixmap(stylepixmap, new TQWidget ()); - } - - public TQPixmap stylePixmap (TQStyle.StylePixmap stylepixmap, TQWidget widget) - { - return stylePixmap(stylepixmap, widget, new TQStyleOption ()); - } - - // Begin interface methods. - - } -} diff --git a/qtsharp/src/bindings/static/QToolButton.cs b/qtsharp/src/bindings/static/QToolButton.cs deleted file mode 100644 index 596f6369..00000000 --- a/qtsharp/src/bindings/static/QToolButton.cs +++ /dev/null @@ -1,290 +0,0 @@ -// TQToolButton.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 TQToolButton : TQButton, IDisposable { - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QToolButton (IntPtr parent, string name); - public TQToolButton (TQWidget parent, string name) : this (TQNull.Instance) - { - rawObject = qt_new_QToolButton (parent != null ? parent.RawObject : IntPtr.Zero, name); - - if ((qparent = parent) != null) - qparent.AddChild (this); - - RegisterObject (this); - Connect (this, TQT_SIGNAL ("destroyed ()"), TQT_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 TQToolButton (TQIconSet iconSet, TQString textLabel, TQString groupText, TQObject receiver, string slot, TQToolBar parent, string name) : this (TQNull.Instance) - { - rawObject = qt_new_QToolButton1 (iconSet.RawObject, textLabel.RawObject, groupText.RawObject, IntPtr.Zero, null, parent != null ? parent.RawObject : IntPtr.Zero, name); - Connect( this, TQT_SIGNAL("clicked()"), receiver, slot ); - - - if ((qparent = parent) != null) - qparent.AddChild (this); - - RegisterObject (this); - Connect (this, TQT_SIGNAL ("destroyed ()"), TQT_SLOT ("NativeDestroyed ()")); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QToolButton2 (Qt.ArrowType type, IntPtr parent, string name); - public TQToolButton (Qt.ArrowType type, TQWidget parent, string name) : this (TQNull.Instance) - { - rawObject = qt_new_QToolButton2 (type, parent != null ? parent.RawObject : IntPtr.Zero, name); - - if ((qparent = parent) != null) - qparent.AddChild (this); - - RegisterObject (this); - Connect (this, TQT_SIGNAL ("destroyed ()"), TQT_SLOT ("NativeDestroyed ()")); - } - - public TQToolButton (TQWidget parent) : this (parent, "") {} - - internal TQToolButton () : this (TQNull.Instance) {} - - internal TQToolButton (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQToolButton (TQNull dummy) : base (TQNull.Instance) {} - - ~TQToolButton () - { - 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 (TQString 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 (TQString 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 (TQIconSet 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 (TQIconSet 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 TQIconSet IconSet (bool on) - { - if (disposed) - throw new ObjectDisposedException (this+": Attempted use of disposed object"); - - return LookupObject (qt_QToolButton_iconSet (rawObject, on), typeof (TQIconSet)) as TQIconSet; - } - - [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 (TQPainter 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 (TQObject o, TQEvent 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 (TQPalette 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 deleted file mode 100644 index 04de573f..00000000 --- a/qtsharp/src/bindings/static/QWidgetStack.cs +++ /dev/null @@ -1,173 +0,0 @@ -// TQWidgetStack.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 TQWidgetStack : TQFrame, IDisposable { - - private ArrayList widgets; - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_new_QWidgetStack (IntPtr parent, string name); - public TQWidgetStack (TQWidget parent, string name) : this (TQNull.Instance) - { - if ((qparent = parent) != null) - qparent.AddChild (this); - rawObject = qt_new_QWidgetStack (parent != null ? parent.RawObject : IntPtr.Zero, name); - RegisterObject (this); - } - - public TQWidgetStack () : this (new TQWidget ()) {} - - public TQWidgetStack (TQWidget parent) : this (parent, "") {} - - internal TQWidgetStack (IntPtr ptr) : this (TQNull.Instance) - { - rawObject = ptr; - RegisterObject(this); - } - - internal TQWidgetStack (TQNull dummy) : base (TQNull.Instance) - { - widgets = new ArrayList (); - } - - ~TQWidgetStack () - { - 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 (TQWidget 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 (TQWidget 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 TQSize SizeHint () - { - return LookupObject (qt_QWidgetStack_sizeHint (RawObject), typeof(TQSize)) as TQSize; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QWidgetStack_minimumSizeHint (IntPtr raw); - public TQSize MinimumSizeHint () - { - return LookupObject (qt_QWidgetStack_minimumSizeHint (RawObject), typeof(TQSize)) as TQSize; - } - - [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 TQWidget Widget (int arg1) - { - return LookupObject (qt_QWidgetStack_widget (RawObject, arg1), typeof(TQWidget)) as TQWidget; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern int qt_QWidgetStack_id (IntPtr raw, IntPtr arg1); - public int Id (TQWidget arg1) - { - return qt_QWidgetStack_id (RawObject, arg1.RawObject); - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern IntPtr qt_QWidgetStack_visibleWidget (IntPtr raw); - public TQWidget VisibleWidget () - { - return LookupObject (qt_QWidgetStack_visibleWidget (RawObject), typeof(TQWidget)) as TQWidget; - } - - [DllImport("libqtc", CharSet=CharSet.Ansi)] - private static extern void qt_QWidgetStack_setFrameRect (IntPtr raw, IntPtr arg1); - public void SetFrameRect (TQRect 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 (TQWidget 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 (TQWidget arg1) - { - return AddWidget(arg1, (int) -1); - } - - // Begin interface methods. - - } -} diff --git a/qtsharp/src/bindings/static/TQApplication.cs b/qtsharp/src/bindings/static/TQApplication.cs new file mode 100644 index 00000000..5b78ab9e --- /dev/null +++ b/qtsharp/src/bindings/static/TQApplication.cs @@ -0,0 +1,1031 @@ +// TQApplication.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 TQApplication : TQObject, 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 TQApplication (string[] argv) : this (TQNull.Instance) + { + TQObject.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 TQApplication (string[] argv, bool GUIenabled) : this (TQNull.Instance) + { + TQObject.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 TQApplication (string[] argv, Type arg1) : this (TQNull.Instance) + { + TQObject.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 TQApplication (IntPtr dpy, uint visual, uint cmap) : this (TQNull.Instance) + { + TQObject.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 TQApplication (IntPtr dpy, string[] argv, uint visual, uint cmap) : this (TQNull.Instance) + { + TQObject.qApp = this; + qparent = null; + argv = ParseArguments (argv); + rawObject = qt_new_QApplication4 (dpy, argv.Length, argv, visual, cmap); + RegisterObject (this); + RegisterEventDelegate (); + } + + public TQApplication (IntPtr dpy) : this (dpy, (uint) 0) {} + + public TQApplication (IntPtr dpy, uint visual) : this (dpy, visual, (uint) 0) {} + + public TQApplication (IntPtr dpy, string[] argv) : this (dpy, argv, (uint) 0) {} + + public TQApplication (IntPtr dpy, string[] argv, uint visual) : this (dpy, argv, visual, (uint) 0) {} + + internal TQApplication () : this (TQNull.Instance) {} + + internal TQApplication (TQNull dummy) : base (TQNull.Instance) {} + + ~TQApplication () + { + 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 TQWidget MainWidget () + { + return (TQWidget)LookupObject (qt_QApplication_mainWidget (rawObject), typeof(TQWidget)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_setMainWidget (IntPtr raw, IntPtr arg1); + public void SetMainWidget (TQWidget 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 (TQWidget arg1) + { + qt_QApplication_polish (rawObject, arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_focusWidget (IntPtr raw); + public TQWidget FocusWidget () + { + return (TQWidget)LookupObject (qt_QApplication_focusWidget (rawObject), typeof(TQWidget)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_activeWindow (IntPtr raw); + public TQWidget ActiveWindow () + { + return (TQWidget)LookupObject (qt_QApplication_activeWindow (rawObject), typeof(TQWidget)); + } + + [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 (TQObject arg1, TQEvent 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 (TQTextCodec arg1) + { + qt_QApplication_setDefaultCodec (rawObject, arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_defaultCodec (IntPtr raw); + public TQTextCodec DefaultCodec () + { + return (TQTextCodec)LookupObject (qt_QApplication_defaultCodec (rawObject), typeof(TQTextCodec)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_installTranslator (IntPtr raw, IntPtr arg1); + public void InstallTranslator (TQTranslator 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 (TQTranslator 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) + { + TQString qstr = new TQString (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 (TQWidget 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 (TQWidget 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 () + { + TQString qstr = new TQString (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 (TQSessionManager 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 (TQSessionManager 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, TQUuid 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 TQUuid ApplicationId () + { + return (TQUuid)LookupObject (qt_QApplication_applicationId (rawObject), typeof(TQUuid)); + } + + [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 TQStyle Style () + { + return (TQStyle)LookupObject (qt_QApplication_style (), typeof(TQStyle)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_setStyle (IntPtr arg1); + public static void SetStyle (TQStyle arg1) + { + qt_QApplication_setStyle (arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_setStyle1 (IntPtr arg1); + public static TQStyle SetStyle (string arg1) + { + return (TQStyle)LookupObject (qt_QApplication_setStyle1 (new TQString (arg1).RawObject), typeof(TQStyle)); + } + + [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 (TQApplication.ColorMode arg1); + public static void SetColorMode (TQApplication.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 TQCursor OverrideCursor () + { + return (TQCursor)LookupObject (qt_QApplication_overrideCursor (), typeof(TQCursor)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_setOverrideCursor (IntPtr arg1, bool replace); + public static void SetOverrideCursor (TQCursor 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 TQPalette Palette (TQWidget arg1) + { + return (TQPalette)LookupObject (qt_QApplication_palette (arg1.RawObject), typeof(TQPalette)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_setPalette (IntPtr arg1, bool informWidgets, string className); + public static void SetPalette (TQPalette 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 TQFont Font (TQWidget arg1) + { + return (TQFont)LookupObject (qt_QApplication_font (arg1.RawObject), typeof(TQFont)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_setFont (IntPtr arg1, bool informWidgets, string className); + public static void SetFont (TQFont 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 TQFontMetrics FontMetrics () + { + return (TQFontMetrics)LookupObject (qt_QApplication_fontMetrics (), typeof(TQFontMetrics)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_allWidgets (); + public static TQWidgetList AllWidgets () + { + return (TQWidgetList)LookupObject (qt_QApplication_allWidgets (), typeof(TQWidgetList)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_topLevelWidgets (); + public static TQWidgetList TopLevelWidgets () + { + return (TQWidgetList)LookupObject (qt_QApplication_topLevelWidgets (), typeof(TQWidgetList)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_desktop (); + public static TQDesktopWidget Desktop () + { + return (TQDesktopWidget)LookupObject (qt_QApplication_desktop (), typeof(TQDesktopWidget)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_activePopupWidget (); + public static TQWidget ActivePopupWidget () + { + return (TQWidget)LookupObject (qt_QApplication_activePopupWidget (), typeof(TQWidget)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_activeModalWidget (); + public static TQWidget ActiveModalWidget () + { + return (TQWidget)LookupObject (qt_QApplication_activeModalWidget (), typeof(TQWidget)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_clipboard (); + public static TQClipboard Clipboard () + { + return (TQClipboard)LookupObject (qt_QApplication_clipboard (), typeof(TQClipboard)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_widgetAt (int x, int y, bool child); + public static TQWidget WidgetAt (int x, int y, bool child) + { + return (TQWidget)LookupObject (qt_QApplication_widgetAt (x, y, child), typeof(TQWidget)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_widgetAt1 (IntPtr arg1, bool child); + public static TQWidget WidgetAt (TQPoint arg1, bool child) + { + return (TQWidget)LookupObject (qt_QApplication_widgetAt1 (arg1.RawObject, child), typeof(TQWidget)); + } + + [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 (TQObject 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 (TQObject 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 (TQColor c) + { + qt_QApplication_setWinStyleHighlightColor (c.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_winStyleHighlightColor (); + public static TQColor WinStyleHighlightColor () + { + return (TQColor)LookupObject (qt_QApplication_winStyleHighlightColor (), typeof(TQColor)); + } + + [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 (TQSize arg1) + { + qt_QApplication_setGlobalStrut (arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_globalStrut (); + public static TQSize GlobalStrut () + { + return (TQSize)LookupObject (qt_QApplication_globalStrut (), typeof(TQSize)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_setLibraryPaths (IntPtr arg1); + public static void SetLibraryPaths (TQStringList arg1) + { + qt_QApplication_setLibraryPaths (arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QApplication_libraryPaths (); + public static TQStringList LibraryPaths () + { + return (TQStringList)LookupObject (qt_QApplication_libraryPaths (), typeof(TQStringList)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QApplication_addLibraryPath (IntPtr arg1); + public static void AddLibraryPath (string arg1) + { + qt_QApplication_addLibraryPath (new TQString (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 TQString (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 TQUuid ()); + } + + public static void SetOverrideCursor (TQCursor arg1) + { + SetOverrideCursor(arg1, false); + } + + public static TQPalette Palette () + { + return Palette(new TQWidget ()); + } + + public static void SetPalette (TQPalette arg1) + { + SetPalette(arg1, false); + } + + public static void SetPalette (TQPalette arg1, bool informWidgets) + { + SetPalette(arg1, informWidgets, ""); + } + + public static TQFont Font () + { + return Font(new TQWidget ()); + } + + public static void SetFont (TQFont arg1) + { + SetFont(arg1, false); + } + + public static void SetFont (TQFont arg1, bool informWidgets) + { + SetFont(arg1, informWidgets, ""); + } + + public static TQWidget WidgetAt (int x, int y) + { + return WidgetAt(x, y, false); + } + + public static TQWidget WidgetAt (TQPoint 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/TQByteArray.cs b/qtsharp/src/bindings/static/TQByteArray.cs new file mode 100644 index 00000000..6fb2f1e7 --- /dev/null +++ b/qtsharp/src/bindings/static/TQByteArray.cs @@ -0,0 +1,84 @@ +// TQByteArray.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 TQByteArray : TQMemArray, IDisposable { + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QByteArray (); + public TQByteArray () : this (TQNull.Instance) + { + rawObject = qt_new_QByteArray (); + RegisterObject (this); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QByteArray1 (int size); + public TQByteArray (int size) : this (TQNull.Instance) + { + rawObject = qt_new_QByteArray1 (size); + RegisterObject (this); + } + + internal TQByteArray (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQByteArray (TQNull dummy) : base (TQNull.Instance) {} + + ~TQByteArray () + { + 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 TQByteArray (byte[] bArray) + { + TQByteArray qbArray = new TQByteArray (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/TQCallBack.cs b/qtsharp/src/bindings/static/TQCallBack.cs new file mode 100644 index 00000000..44740752 --- /dev/null +++ b/qtsharp/src/bindings/static/TQCallBack.cs @@ -0,0 +1,37 @@ +// TQCallBack.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 TQCallBack { + + public Object receiver; + public MethodInfo info; + + public TQCallBack (Object receiver, MethodInfo info) + { + this.receiver = receiver; + this.info = info; + } + } +} diff --git a/qtsharp/src/bindings/static/TQEventArgs.cs b/qtsharp/src/bindings/static/TQEventArgs.cs new file mode 100644 index 00000000..784f03b6 --- /dev/null +++ b/qtsharp/src/bindings/static/TQEventArgs.cs @@ -0,0 +1,42 @@ +// TQEventArgs.cs - TQEventArgs 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 TQEventArgs : EventArgs { + private TQEvent qevent; + private string name; + + public TQEvent Event { + get { return qevent; } + } + + public string Name { + get { return name; } + } + + public TQEventArgs(string n, TQEvent e) { + qevent = e; + name = n; + } + } +} \ No newline at end of file diff --git a/qtsharp/src/bindings/static/TQEventList.cs b/qtsharp/src/bindings/static/TQEventList.cs new file mode 100644 index 00000000..eb2d9d0d --- /dev/null +++ b/qtsharp/src/bindings/static/TQEventList.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 TQEventList + { + private Hashtable events; + + internal TQEventList () + { + 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 TQEventHandlers (String name) + { + return (ArrayList)events [name]; + } + } +} diff --git a/qtsharp/src/bindings/static/TQGL.cs b/qtsharp/src/bindings/static/TQGL.cs new file mode 100644 index 00000000..6a994fb0 --- /dev/null +++ b/qtsharp/src/bindings/static/TQGL.cs @@ -0,0 +1,49 @@ +// TQGL.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 TQGL { + + 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/TQMenuBar.cs b/qtsharp/src/bindings/static/TQMenuBar.cs new file mode 100644 index 00000000..56d2bc8f --- /dev/null +++ b/qtsharp/src/bindings/static/TQMenuBar.cs @@ -0,0 +1,815 @@ +// TQMenuBar.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 TQMenuBar : TQFrame, ITQMenuData, 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 TQMenuBar (TQWidget parent, string name) : this (TQNull.Instance) + { + qparent = parent; + if (qparent == null) parent = new TQWidget (IntPtr.Zero); + rawObject = qt_new_QMenuBar (parent.RawObject, name); + if (qparent == null) RegisterObject (this); + else qparent.AddChild (this); + } + + public TQMenuBar () : this (new TQWidget ()) {} + + public TQMenuBar (TQWidget parent) : this (parent, "") {} + + internal TQMenuBar (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQMenuBar (TQNull dummy) : base (TQNull.Instance) + { + menuConnections = new Hashtable(); + } + + ~TQMenuBar () + { + 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 (TQObject arg1, TQEvent 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 TQMenuBar.Separator qt_QMenuBar_separator (IntPtr raw); + public TQMenuBar.Separator TheSeparator () + { + return qt_QMenuBar_separator (rawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuBar_setSeparator (IntPtr raw, TQMenuBar.Separator when); + public void SetSeparator (TQMenuBar.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 TQSize SizeHint () + { + return (TQSize)LookupObject (qt_QMenuBar_sizeHint (rawObject), typeof(TQSize)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuBar_minimumSize (IntPtr raw); + public TQSize MinimumSize () + { + return (TQSize)LookupObject (qt_QMenuBar_minimumSize (rawObject), typeof(TQSize)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuBar_minimumSizeHint (IntPtr raw); + public TQSize MinimumSizeHint () + { + return (TQSize)LookupObject (qt_QMenuBar_minimumSizeHint (rawObject), typeof(TQSize)); + } + + [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 (TQPainter 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 (TQFont 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 (TQStyle 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 (TQPoint 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 TQRect ItemRect (int item) + { + return (TQRect)LookupObject (qt_QMenuBar_itemRect (rawObject, item), typeof(TQRect)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuBar_QMenuData (IntPtr raw); + public IntPtr TQMenuData () + { + 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, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (text, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (icon, text, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (pixmap, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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, TQObject receiver, string member) + { + return Qt.TQMenuData.ConnectItem (this, TQMenuData (), identifier, receiver, member); + + } + + public bool DisconnectItem (int identifier, TQObject receiver, string member) + { + return Qt.TQMenuData.DisconnectItem (this, TQMenuData (), 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 (TQMenuData ()); + } + + [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 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, int identifier, int index) + { + return qt_QMenuData_insertItem5 (TQMenuData (), icon.RawObject, new TQString (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, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem6 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem7 (TQMenuData (), icon.RawObject, new TQString (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 (TQPixmap pixmap, int identifier, int index) + { + return qt_QMenuData_insertItem8 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, int identifier, int index) + { + return qt_QMenuData_insertItem9 (TQMenuData (), 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 (TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem10 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem11 (TQMenuData (), 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 (TQWidget widget, int identifier, int index) + { + return qt_QMenuData_insertItem12 (TQMenuData (), 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 (TQIconSet icon, TQCustomMenuItem custom, int identifier, int index) + { + return qt_QMenuData_insertItem13 (TQMenuData (), 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 (TQCustomMenuItem custom, int identifier, int index) + { + return qt_QMenuData_insertItem14 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), index); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_clear (IntPtr raw); + public void Clear () + { + qt_QMenuData_clear (TQMenuData ()); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier); + public TQKeySequence Accel (int identifier) + { + return (TQKeySequence)LookupObject (qt_QMenuData_accel (TQMenuData (), identifier), typeof(TQKeySequence)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier); + public void SetAccel (TQKeySequence key, int identifier) + { + qt_QMenuData_setAccel (TQMenuData (), key.RawObject, identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier); + public TQIconSet IconSet (int identifier) + { + return (TQIconSet)LookupObject (qt_QMenuData_iconSet (TQMenuData (), identifier), typeof(TQIconSet)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier); + public string Text (int identifier) + { + TQString qstr = new TQString (qt_QMenuData_text (TQMenuData (), 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 TQPixmap Pixmap (int identifier) + { + return (TQPixmap)LookupObject (qt_QMenuData_pixmap (TQMenuData (), identifier), typeof(TQPixmap)); + } + + [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 (TQMenuData (), identifier, new TQString (arg1).RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier); + public string WhatsThis (int identifier) + { + TQString qstr = new TQString (qt_QMenuData_whatsThis (TQMenuData (), 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 (TQMenuData (), identifier, new TQString (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, TQPixmap pixmap) + { + qt_QMenuData_changeItem1 (TQMenuData (), 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, TQIconSet icon, string text) + { + qt_QMenuData_changeItem2 (TQMenuData (), identifier, icon.RawObject, new TQString (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, TQIconSet icon, TQPixmap pixmap) + { + qt_QMenuData_changeItem3 (TQMenuData (), 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 (TQMenuData (), new TQString (text).RawObject, identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier); + public void ChangeItem (TQPixmap pixmap, int identifier) + { + qt_QMenuData_changeItem5 (TQMenuData (), 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 (TQIconSet icon, string text, int identifier) + { + qt_QMenuData_changeItem6 (TQMenuData (), icon.RawObject, new TQString (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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier); + public TQMenuItem FindItem (int identifier) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findItem (TQMenuData (), identifier), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent); + public TQMenuItem FindItem (int identifier, TQMenuData parent) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findItem1 (TQMenuData (), identifier, parent.RawObject), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index); + public TQMenuItem FindPopup (TQPopupMenu arg1, int[] index) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findPopup (TQMenuData (), arg1.RawObject, index), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1); + protected void MenuInsPopup (TQPopupMenu arg1) + { + qt_QMenuData_menuInsPopup (TQMenuData (), arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1); + protected void MenuDelPopup (TQPopupMenu arg1) + { + qt_QMenuData_menuDelPopup (TQMenuData (), arg1.RawObject); + } + + public int InsertItem (string text, TQObject receiver, string member) + { + return InsertItem(text, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(text, receiver, member, accel, (int) -1); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(text, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member) + { + return InsertItem(icon, text, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(icon, text, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member) + { + return InsertItem(pixmap, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(pixmap, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member) + { + return InsertItem(icon, pixmap, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(icon, pixmap, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 (TQIconSet icon, string text) + { + return InsertItem(icon, text, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, int identifier) + { + return InsertItem(icon, text, identifier, (int) -1); + } + + public int InsertItem (string text, TQPopupMenu popup) + { + return InsertItem(text, popup, (int) -1); + } + + public int InsertItem (string text, TQPopupMenu popup, int identifier) + { + return InsertItem(text, popup, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup) + { + return InsertItem(icon, text, popup, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier) + { + return InsertItem(icon, text, popup, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap) + { + return InsertItem(pixmap, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, int identifier) + { + return InsertItem(pixmap, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap) + { + return InsertItem(icon, pixmap, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier) + { + return InsertItem(icon, pixmap, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQPopupMenu popup) + { + return InsertItem(pixmap, popup, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier) + { + return InsertItem(pixmap, popup, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup) + { + return InsertItem(icon, pixmap, popup, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier) + { + return InsertItem(icon, pixmap, popup, identifier, (int) -1); + } + + public int InsertItem (TQWidget widget) + { + return InsertItem(widget, (int) -1); + } + + public int InsertItem (TQWidget widget, int identifier) + { + return InsertItem(widget, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQCustomMenuItem custom) + { + return InsertItem(icon, custom, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier) + { + return InsertItem(icon, custom, identifier, (int) -1); + } + + public int InsertItem (TQCustomMenuItem custom) + { + return InsertItem(custom, (int) -1); + } + + public int InsertItem (TQCustomMenuItem custom, int identifier) + { + return InsertItem(custom, identifier, (int) -1); + } + + public int InsertSeparator () + { + return InsertSeparator((int) -1); + } + + public TQMenuItem FindPopup (TQPopupMenu arg1) + { + return FindPopup(arg1, new int[]{0}); + } + } +} diff --git a/qtsharp/src/bindings/static/TQMenuData.cs b/qtsharp/src/bindings/static/TQMenuData.cs new file mode 100644 index 00000000..ade3b8c4 --- /dev/null +++ b/qtsharp/src/bindings/static/TQMenuData.cs @@ -0,0 +1,719 @@ +// TQMenuData.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 TQMenu* and TQPopupMenu 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 TQMenuData : QtSupport, ITQMenuData, IDisposable { + + private Hashtable menuConnections; + + public Hashtable MenuConnections { + get { return menuConnections; } + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QMenuData (); + public TQMenuData () : this (TQNull.Instance) + { + rawObject = qt_new_QMenuData (); + RegisterObject (this); + } + + internal TQMenuData (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQMenuData (TQNull dummy) : base (TQNull.Instance) + { + menuConnections = new Hashtable(); + } + + ~TQMenuData () + { + 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 ITQMenuData 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 (ITQMenuData menu, IntPtr menudata, int id, TQObject 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 (ITQMenuData menu, IntPtr menudata, int id, TQObject 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 TQObject'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 TQMenuData implements ITQMenuData... + + 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 TQString (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 (TQIconSet icon, string text, int identifier, int index) + { + return qt_QMenuData_insertItem5 (rawObject, icon.RawObject, new TQString (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, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem6 (rawObject, new TQString (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 (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem7 (rawObject, icon.RawObject, new TQString (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 (TQPixmap 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 (TQIconSet icon, TQPixmap 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 (TQPixmap pixmap, TQPopupMenu 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 (TQIconSet icon, TQPixmap pixmap, TQPopupMenu 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 (TQWidget 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 (TQIconSet icon, TQCustomMenuItem 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 (TQCustomMenuItem 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 TQKeySequence Accel (int identifier) + { + return (TQKeySequence)LookupObject (qt_QMenuData_accel (rawObject, identifier), typeof(TQKeySequence)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier); + public void SetAccel (TQKeySequence 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 TQIconSet IconSet (int identifier) + { + return (TQIconSet)LookupObject (qt_QMenuData_iconSet (rawObject, identifier), typeof(TQIconSet)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier); + public string Text (int identifier) + { + TQString qstr = new TQString (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 TQPixmap Pixmap (int identifier) + { + return (TQPixmap)LookupObject (qt_QMenuData_pixmap (rawObject, identifier), typeof(TQPixmap)); + } + + [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 TQString (arg1).RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier); + public string WhatsThis (int identifier) + { + TQString qstr = new TQString (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 TQString (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, TQPixmap 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, TQIconSet icon, string text) + { + qt_QMenuData_changeItem2 (rawObject, identifier, icon.RawObject, new TQString (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, TQIconSet icon, TQPixmap 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 TQString (text).RawObject, identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier); + public void ChangeItem (TQPixmap 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 (TQIconSet icon, string text, int identifier) + { + qt_QMenuData_changeItem6 (rawObject, icon.RawObject, new TQString (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, TQObject receiver, string slot) + { + return ConnectItem (this, this.RawObject, identifier, receiver, slot); + } + + public bool DisconnectItem (int identifier, TQObject receiver, string slot) + { + return DisconnectItem (this, this.RawObject, identifier, receiver, slot); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (text, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (icon, text, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (pixmap, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 TQMenuItem FindItem (int identifier) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findItem (rawObject, identifier), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent); + public TQMenuItem FindItem (int identifier, TQMenuData parent) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findItem1 (rawObject, identifier, parent.RawObject), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index); + public TQMenuItem FindPopup (TQPopupMenu arg1, int[] index) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findPopup (rawObject, arg1.RawObject, index), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1); + protected void MenuInsPopup (TQPopupMenu 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 (TQPopupMenu arg1) + { + qt_QMenuData_menuDelPopup (rawObject, arg1.RawObject); + } + + public int InsertItem (string text, TQObject receiver, string member) + { + return InsertItem(text, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(text, receiver, member, accel, (int) -1); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(text, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member) + { + return InsertItem(icon, text, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(icon, text, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member) + { + return InsertItem(pixmap, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(pixmap, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member) + { + return InsertItem(icon, pixmap, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(icon, pixmap, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 (TQIconSet icon, string text) + { + return InsertItem(icon, text, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, int identifier) + { + return InsertItem(icon, text, identifier, (int) -1); + } + + public int InsertItem (string text, TQPopupMenu popup) + { + return InsertItem(text, popup, (int) -1); + } + + public int InsertItem (string text, TQPopupMenu popup, int identifier) + { + return InsertItem(text, popup, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup) + { + return InsertItem(icon, text, popup, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier) + { + return InsertItem(icon, text, popup, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap) + { + return InsertItem(pixmap, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, int identifier) + { + return InsertItem(pixmap, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap) + { + return InsertItem(icon, pixmap, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier) + { + return InsertItem(icon, pixmap, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQPopupMenu popup) + { + return InsertItem(pixmap, popup, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier) + { + return InsertItem(pixmap, popup, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup) + { + return InsertItem(icon, pixmap, popup, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier) + { + return InsertItem(icon, pixmap, popup, identifier, (int) -1); + } + + public int InsertItem (TQWidget widget) + { + return InsertItem(widget, (int) -1); + } + + public int InsertItem (TQWidget widget, int identifier) + { + return InsertItem(widget, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQCustomMenuItem custom) + { + return InsertItem(icon, custom, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier) + { + return InsertItem(icon, custom, identifier, (int) -1); + } + + public int InsertItem (TQCustomMenuItem custom) + { + return InsertItem(custom, (int) -1); + } + + public int InsertItem (TQCustomMenuItem custom, int identifier) + { + return InsertItem(custom, identifier, (int) -1); + } + + public int InsertSeparator () + { + return InsertSeparator((int) -1); + } + + public TQMenuItem FindPopup (TQPopupMenu 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/TQNull.cs b/qtsharp/src/bindings/static/TQNull.cs new file mode 100644 index 00000000..95ede04b --- /dev/null +++ b/qtsharp/src/bindings/static/TQNull.cs @@ -0,0 +1,35 @@ +// TQNull.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 TQNull { + + private static readonly TQNull instance = new TQNull (null); + + private TQNull (Object dummy) {} + + internal static TQNull Instance { + get {return instance;} + } + } +} diff --git a/qtsharp/src/bindings/static/TQObject.cs b/qtsharp/src/bindings/static/TQObject.cs new file mode 100644 index 00000000..2df22d50 --- /dev/null +++ b/qtsharp/src/bindings/static/TQObject.cs @@ -0,0 +1,609 @@ +// TQObject.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(TQObject)")] + public class TQObject : QtSupport, IDisposable { + + // Hold an instance of the TQApplication object + private static TQApplication qapp; + private QtSignalMap csSignalMap; + private QtSignalMap cppSignalMap; + + public static TQApplication 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 TQObject (TQObject parent, string name) : this (TQNull.Instance) + { + qparent = parent; + + if (qparent == null) + parent = new TQWidget (IntPtr.Zero); + else + qparent.AddChild (this); + + rawObject = qt_new_QObject (parent.RawObject, name); + RegisterObject (this); + } + + public TQObject (TQObject parent) : this (parent, "") {} + + internal TQObject () : this (TQNull.Instance) {} + + internal TQObject (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject (this); + } + + internal TQObject (TQNull dummy) : base (TQNull.Instance) + { + InitSignals (); + } + + // FIXME This ctor used only by QtSignal + internal TQObject (NoSignalInit dummy) : base (TQNull.Instance) + { + rawObject = qt_new_QObject (IntPtr.Zero, ""); + RegisterObject (this); + } + + ~TQObject () + { + 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 TQObject QtCast() + { + string QtType = this.ClassName(); + Type newType = Type.GetType( "Qt." + QtType ); + object[] paramArray = { this.RawObject }; + return (TQObject) Activator.CreateInstance( newType, paramArray ); + } + + public static bool Connect(TQObject sender, string signal, TQObject receiver, string slot) + { + return QtSignal.Connect(sender, signal, receiver, slot); + } + + public bool Connect (TQObject sender, string signal, string member) + { + return Connect (sender, signal, this, member); + } + + public static bool Disconnect(TQObject sender, string signal, TQObject receiver, string slot) + { + return QtSignal.Disconnect(sender, signal, receiver, slot); + } + + public bool Disconnect () + { + return Disconnect (this, null, null, null); + } + + public bool Disconnect (string signal, TQObject receiver, string member) + { + return Disconnect(this, signal, receiver, member); + } + + public bool Disconnect (TQObject 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) + { + TQString qstr = new TQString (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) + { + TQString qstr = new TQString (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 TQMetaObject MetaObject () + { + return (TQMetaObject)LookupObject (qt_QObject_metaObject (rawObject), typeof(TQMetaObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern bool qt_QObject_event (IntPtr raw, IntPtr arg1); + public bool Q_event (TQEvent 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 (TQObject arg1, TQEvent 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 TQObject Child (string objName, string inheritsClass, bool recursiveSearch) + { + return (TQObject)LookupObject (qt_QObject_child (rawObject, objName, inheritsClass, recursiveSearch), typeof(TQObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QObject_children (IntPtr raw); + public TQObjectList Children () + { + return (TQObjectList)LookupObject (qt_QObject_children (rawObject), typeof(TQObjectList)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QObject_queryList (IntPtr raw, string inheritsClass, string objName, bool regexpMatch, bool recursiveSearch); + public TQObjectList QueryList (string inheritsClass, string objName, bool regexpMatch, bool recursiveSearch) + { + return (TQObjectList)LookupObject (qt_QObject_queryList (rawObject, inheritsClass, objName, regexpMatch, recursiveSearch), typeof(TQObjectList)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QObject_insertChild (IntPtr raw, IntPtr arg1); + public void InsertChild (TQObject 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 (TQObject 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 (TQObject 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 (TQObject 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, TQVariant 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 TQVariant Property (string name) + { + return (TQVariant)LookupObject (qt_QObject_property (rawObject, name), typeof(TQVariant)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QObject_parent (IntPtr raw); + public TQObject Parent () + { + return (TQObject)LookupObject (qt_QObject_parent (rawObject), typeof(TQObject)); + } + + [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 TQObjectList ObjectTrees () + { + return (TQObjectList)LookupObject (qt_QObject_objectTrees (), typeof(TQObjectList)); + } + + /*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 (TQObject sender, int signal_index, TQObject 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 (TQEvent 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 TQConnectionList Receivers (string signal) + { + return (TQConnectionList)LookupObject (qt_QObject_receivers (rawObject, signal), typeof(TQConnectionList)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QObject_receivers1 (IntPtr raw, int signal); + protected TQConnectionList Receivers (int signal) + { + return (TQConnectionList)LookupObject (qt_QObject_receivers1 (rawObject, signal), typeof(TQConnectionList)); + } + + [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 TQString (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 (TQConnectionList 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 TQObject Sender () + { + return (TQObject)LookupObject (qt_QObject_sender (rawObject), typeof(TQObject)); + } + + [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, TQObject 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 TQCString NormalizeSignalSlot (string signalSlot) + { + return (TQCString)LookupObject (qt_QObject_normalizeSignalSlot (signalSlot), typeof(TQCString)); + } + */ + + public TQObject Child (string objName) + { + return Child(objName, null); + } + + public TQObject Child (string objName, string inheritsClass) + { + return Child(objName, inheritsClass, true); + } + + public TQObjectList QueryList () + { + return QueryList(""); + } + + public TQObjectList QueryList (string inheritsClass) + { + return QueryList(inheritsClass, ""); + } + + public TQObjectList QueryList (string inheritsClass, string objName) + { + return QueryList(inheritsClass, objName, true); + } + + public TQObjectList 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/TQPopupMenu.cs b/qtsharp/src/bindings/static/TQPopupMenu.cs new file mode 100644 index 00000000..4ded6a7f --- /dev/null +++ b/qtsharp/src/bindings/static/TQPopupMenu.cs @@ -0,0 +1,830 @@ +// TQPopupMenu.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 TQPopupMenu : TQFrame, ITQMenuData, 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 TQPopupMenu (TQWidget parent, string name) : this (TQNull.Instance) + { + qparent = parent; + if (qparent == null) parent = new TQWidget (IntPtr.Zero); + rawObject = qt_new_QPopupMenu (parent.RawObject, name); + if (qparent == null) RegisterObject (this); + else qparent.AddChild (this); + } + + public TQPopupMenu () : this (new TQWidget ()) {} + + public TQPopupMenu (TQWidget parent) : this (parent, "") {} + + internal TQPopupMenu (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQPopupMenu (TQNull dummy) : base (TQNull.Instance) + { + menuConnections = new Hashtable(); + } + + ~TQPopupMenu () + { + 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 (TQPoint 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 (TQFont 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 (TQPoint 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 TQSize SizeHint () + { + return (TQSize)LookupObject (qt_QPopupMenu_sizeHint (rawObject), typeof(TQSize)); + } + + [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 (TQPoint 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 TQRect ItemGeometry (int index) + { + return (TQRect)LookupObject (qt_QPopupMenu_itemGeometry (rawObject, index), typeof(TQRect)); + } + + [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 (TQMenuItem 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 (TQPainter p, int tab, TQMenuItem 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 (TQPainter 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 (TQStyle 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 (TQPoint arg1, bool ignoreSeparator) + { + return qt_QPopupMenu_itemAtPos (rawObject, arg1.RawObject, ignoreSeparator); + } + + public void Popup (TQPoint pos) + { + Popup(pos, (int) 0); + } + + public int Exec (TQPoint 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 (TQPoint arg1) + { + return ItemAtPos(arg1, true); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QPopupMenu_QMenuData (IntPtr raw); + public IntPtr TQMenuData () + { + return qt_QPopupMenu_QMenuData (rawObject); + } + + // Begin interface methods. + + + //********************* A temporary hack to divert connections to CSharpConnect *****************// + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (text, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (icon, text, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier, int index) + { + int id = InsertItem (pixmap, identifier, index); + SetAccel (accel, id); + ConnectItem (id, receiver, member); + return id; + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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, TQObject receiver, string member) + { + return Qt.TQMenuData.ConnectItem (this, TQMenuData (), identifier, receiver, member); + } + + public bool DisconnectItem (int identifier, TQObject receiver, string member) + { + return Qt.TQMenuData.DisconnectItem (this, TQMenuData (), 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 (TQMenuData ()); + } + + [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 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, int identifier, int index) + { + return qt_QMenuData_insertItem5 (TQMenuData (), icon.RawObject, new TQString (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, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem6 (TQMenuData (), new TQString (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 (TQIconSet icon, string text, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem7 (TQMenuData (), icon.RawObject, new TQString (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 (TQPixmap pixmap, int identifier, int index) + { + return qt_QMenuData_insertItem8 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, int identifier, int index) + { + return qt_QMenuData_insertItem9 (TQMenuData (), 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 (TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem10 (TQMenuData (), 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 (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier, int index) + { + return qt_QMenuData_insertItem11 (TQMenuData (), 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 (TQWidget widget, int identifier, int index) + { + return qt_QMenuData_insertItem12 (TQMenuData (), 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 (TQIconSet icon, TQCustomMenuItem custom, int identifier, int index) + { + return qt_QMenuData_insertItem13 (TQMenuData (), 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 (TQCustomMenuItem custom, int identifier, int index) + { + return qt_QMenuData_insertItem14 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), index); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_clear (IntPtr raw); + public void Clear () + { + qt_QMenuData_clear (TQMenuData ()); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_accel (IntPtr raw, int identifier); + public TQKeySequence Accel (int identifier) + { + return (TQKeySequence)LookupObject (qt_QMenuData_accel (TQMenuData (), identifier), typeof(TQKeySequence)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_setAccel (IntPtr raw, IntPtr key, int identifier); + public void SetAccel (TQKeySequence key, int identifier) + { + qt_QMenuData_setAccel (TQMenuData (), key.RawObject, identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_iconSet (IntPtr raw, int identifier); + public TQIconSet IconSet (int identifier) + { + return (TQIconSet)LookupObject (qt_QMenuData_iconSet (TQMenuData (), identifier), typeof(TQIconSet)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_text (IntPtr raw, int identifier); + public string Text (int identifier) + { + TQString qstr = new TQString (qt_QMenuData_text (TQMenuData (), 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 TQPixmap Pixmap (int identifier) + { + return (TQPixmap)LookupObject (qt_QMenuData_pixmap (TQMenuData (), identifier), typeof(TQPixmap)); + } + + [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 (TQMenuData (), identifier, new TQString (arg1).RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_whatsThis (IntPtr raw, int identifier); + public string WhatsThis (int identifier) + { + TQString qstr = new TQString (qt_QMenuData_whatsThis (TQMenuData (), 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 (TQMenuData (), identifier, new TQString (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, TQPixmap pixmap) + { + qt_QMenuData_changeItem1 (TQMenuData (), 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, TQIconSet icon, string text) + { + qt_QMenuData_changeItem2 (TQMenuData (), identifier, icon.RawObject, new TQString (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, TQIconSet icon, TQPixmap pixmap) + { + qt_QMenuData_changeItem3 (TQMenuData (), 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 (TQMenuData (), new TQString (text).RawObject, identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_changeItem5 (IntPtr raw, IntPtr pixmap, int identifier); + public void ChangeItem (TQPixmap pixmap, int identifier) + { + qt_QMenuData_changeItem5 (TQMenuData (), 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 (TQIconSet icon, string text, int identifier) + { + qt_QMenuData_changeItem6 (TQMenuData (), icon.RawObject, new TQString (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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), 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 (TQMenuData (), identifier); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findItem (IntPtr raw, int identifier); + public TQMenuItem FindItem (int identifier) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findItem (TQMenuData (), identifier), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findItem1 (IntPtr raw, int identifier, IntPtr parent); + public TQMenuItem FindItem (int identifier, TQMenuData parent) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findItem1 (TQMenuData (), identifier, parent.RawObject), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QMenuData_findPopup (IntPtr raw, IntPtr arg1, int[] index); + public TQMenuItem FindPopup (TQPopupMenu arg1, int[] index) + { + return (TQMenuItem)LookupObject (qt_QMenuData_findPopup (TQMenuData (), arg1.RawObject, index), typeof(TQMenuItem)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_menuInsPopup (IntPtr raw, IntPtr arg1); + protected void MenuInsPopup (TQPopupMenu arg1) + { + qt_QMenuData_menuInsPopup (TQMenuData (), arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QMenuData_menuDelPopup (IntPtr raw, IntPtr arg1); + protected void MenuDelPopup (TQPopupMenu arg1) + { + qt_QMenuData_menuDelPopup (TQMenuData (), arg1.RawObject); + } + + public int InsertItem (string text, TQObject receiver, string member) + { + return InsertItem(text, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(text, receiver, member, accel, (int) -1); + } + + public int InsertItem (string text, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(text, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member) + { + return InsertItem(icon, text, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(icon, text, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(icon, text, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member) + { + return InsertItem(pixmap, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(pixmap, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel, int identifier) + { + return InsertItem(pixmap, receiver, member, accel, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member) + { + return InsertItem(icon, pixmap, receiver, member, new TQKeySequence ()); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence accel) + { + return InsertItem(icon, pixmap, receiver, member, accel, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQObject receiver, string member, TQKeySequence 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 (TQIconSet icon, string text) + { + return InsertItem(icon, text, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, int identifier) + { + return InsertItem(icon, text, identifier, (int) -1); + } + + public int InsertItem (string text, TQPopupMenu popup) + { + return InsertItem(text, popup, (int) -1); + } + + public int InsertItem (string text, TQPopupMenu popup, int identifier) + { + return InsertItem(text, popup, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup) + { + return InsertItem(icon, text, popup, (int) -1); + } + + public int InsertItem (TQIconSet icon, string text, TQPopupMenu popup, int identifier) + { + return InsertItem(icon, text, popup, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap) + { + return InsertItem(pixmap, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, int identifier) + { + return InsertItem(pixmap, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap) + { + return InsertItem(icon, pixmap, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, int identifier) + { + return InsertItem(icon, pixmap, identifier, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQPopupMenu popup) + { + return InsertItem(pixmap, popup, (int) -1); + } + + public int InsertItem (TQPixmap pixmap, TQPopupMenu popup, int identifier) + { + return InsertItem(pixmap, popup, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup) + { + return InsertItem(icon, pixmap, popup, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQPixmap pixmap, TQPopupMenu popup, int identifier) + { + return InsertItem(icon, pixmap, popup, identifier, (int) -1); + } + + public int InsertItem (TQWidget widget) + { + return InsertItem(widget, (int) -1); + } + + public int InsertItem (TQWidget widget, int identifier) + { + return InsertItem(widget, identifier, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQCustomMenuItem custom) + { + return InsertItem(icon, custom, (int) -1); + } + + public int InsertItem (TQIconSet icon, TQCustomMenuItem custom, int identifier) + { + return InsertItem(icon, custom, identifier, (int) -1); + } + + public int InsertItem (TQCustomMenuItem custom) + { + return InsertItem(custom, (int) -1); + } + + public int InsertItem (TQCustomMenuItem custom, int identifier) + { + return InsertItem(custom, identifier, (int) -1); + } + + public int InsertSeparator () + { + return InsertSeparator((int) -1); + } + + public TQMenuItem FindPopup (TQPopupMenu arg1) + { + return FindPopup(arg1, new int[]{0}); + } + } +} diff --git a/qtsharp/src/bindings/static/TQString.cs b/qtsharp/src/bindings/static/TQString.cs new file mode 100644 index 00000000..cd3ba3c0 --- /dev/null +++ b/qtsharp/src/bindings/static/TQString.cs @@ -0,0 +1,1340 @@ +// TQString.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 TQString : 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 TQString Null = new TQString (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 TQString () : this (TQNull.Instance) + { + rawObject = qt_new_QString (); + } + + // TODO: Make sure there is a TQChar constructor that + // handles unicode conversion + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QString1 (IntPtr arg1); + public TQString (TQChar arg1) : this (TQNull.Instance) + { + rawObject = qt_new_QString1 (arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QString2 (IntPtr arg1); + public TQString (TQString arg1) : this (TQNull.Instance) + { + rawObject = qt_new_QString2 (arg1.RawObject); + } + + // TODO: Verify that this works. We have weak support for + // TQByteArray + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QString3 (IntPtr arg1); + public TQString (TQByteArray arg1) : this (TQNull.Instance) + { + rawObject = qt_new_QString3 (arg1.RawObject); + } + + // TODO: This signature is wrong. The C++ version is + // takes a pointer to a sequence of TQChars, not a single + // TQChar + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QString4 (IntPtr unicode, uint length); + public TQString (TQChar unicode, uint length) : this (TQNull.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 TQString( string s ): this( TQNull.Instance ) + { + rawObject = qt_new_QString (); + rawObject = qt_QString_setUnicodeCodes( + rawObject, s, (uint) s.Length ); + } + + internal TQString (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + + } + + internal TQString (TQNull dummy) : base (TQNull.Instance) {} + + + [DllImport("libqtc")] + private static extern void qt_del_QString (IntPtr str); + ~TQString () + { + 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 ( TQString 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 TQString ( string s ) + { + return new TQString(s); + } + + public override string ToString () + { + return (string) this; + } + + public static TQString operator + ( TQString a, TQString b ) + { + TQString result = new TQString (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 TQString Fill (TQChar c, int len) + { + return new TQString (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 TQString Arg (long a, int fieldwidth, int Q_base) + { + return new TQString (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 TQString Arg (ulong a, int fieldwidth, int Q_base) + { + return new TQString (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 TQString Arg (int a, int fieldwidth, int Q_base) + { + return new TQString (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 TQString Arg (uint a, int fieldwidth, int Q_base) + { + return new TQString (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 TQString Arg (short a, int fieldwidth, int Q_base) + { + return new TQString (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 TQString Arg (ushort a, int fieldwidth, int Q_base) + { + return new TQString (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 TQString Arg (char a, int fieldwidth) + { + return new TQString (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 TQString Arg (TQChar a, int fieldwidth) + { + return new TQString (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 TQString Arg (TQString a, int fieldwidth) + { + return new TQString (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 TQString Arg (double a, int fieldwidth, char fmt, int prec) + { + return new TQString (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 (TQChar 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 (TQString 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 (TQRegExp 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 (TQChar 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 (TQString 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 (TQRegExp 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 (TQChar 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 (TQString 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 (TQRegExp arg1) + { + return qt_QString_contains4 (rawObject, arg1.RawObject); + } + + // TODO: This is wrong. sep should be a TQChar* in C++ terms + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_section (IntPtr raw, IntPtr sep, int start, int end, TQString.SectionFlags SectionFlags); + public TQString Section (TQChar sep, int start, int end, TQString.SectionFlags SectionFlags) + { + return new TQString (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, TQString.SectionFlags SectionFlags); + public TQString Section (char sep, int start, int end, TQString.SectionFlags SectionFlags) + { + return new TQString (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, TQString.SectionFlags SectionFlags); + public TQString Section (string in_sep, int start, int end, TQString.SectionFlags SectionFlags) + { + return new TQString (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, TQString.SectionFlags SectionFlags); + public TQString Section (TQString in_sep, int start, int end, TQString.SectionFlags SectionFlags) + { + return new TQString (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, TQString.SectionFlags SectionFlags); + public TQString Section (TQRegExp reg, int start, int end, TQString.SectionFlags SectionFlags) + { + return new TQString (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 TQString Left (uint len) + { + return new TQString (qt_QString_left (rawObject, len)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_right (IntPtr raw, uint len); + public TQString Right (uint len) + { + return new TQString (qt_QString_right (rawObject, len)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_mid (IntPtr raw, uint index, uint len); + public TQString Mid (uint index, uint len) + { + return new TQString (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 TQString LeftJustify (uint width, TQChar fill, bool trunc) + { + return new TQString (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 TQString RightJustify (uint width, TQChar fill, bool trunc) + { + return new TQString (qt_QString_rightJustify (rawObject, width, fill.RawObject, trunc)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_lower (IntPtr raw); + public TQString Lower () + { + return new TQString (qt_QString_lower (rawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_upper (IntPtr raw); + public TQString Upper () + { + return new TQString (qt_QString_upper (rawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_stripWhiteSpace (IntPtr raw); + public TQString StripWhiteSpace () + { + return new TQString (qt_QString_stripWhiteSpace (rawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_simplifyWhiteSpace (IntPtr raw); + public TQString SimplifyWhiteSpace () + { + return new TQString (qt_QString_simplifyWhiteSpace (rawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_insert (IntPtr raw, uint index, IntPtr arg1); + public TQString Insert (uint index, TQString arg1) + { + return new TQString (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 TQString Insert (uint index, TQChar arg1, uint len) + { + return new TQString (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 TQString Insert (uint index, TQChar arg1) + { + return new TQString (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 TQString Insert (uint index, char c) + { + return new TQString (qt_QString_insert3 (rawObject, index, c)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_append (IntPtr raw, char arg1); + public TQString Append (char arg1) + { + return new TQString (qt_QString_append (rawObject, arg1)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_append1 (IntPtr raw, IntPtr arg1); + public TQString Append (TQChar arg1) + { + return new TQString (qt_QString_append1 (rawObject, arg1.RawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_append2 (IntPtr raw, IntPtr arg1); + public TQString Append (TQString arg1) + { + return new TQString (qt_QString_append2 (rawObject, arg1.RawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_prepend (IntPtr raw, char arg1); + public TQString Prepend (char arg1) + { + return new TQString (qt_QString_prepend (rawObject, arg1)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_prepend1 (IntPtr raw, IntPtr arg1); + public TQString Prepend (TQChar arg1) + { + return new TQString (qt_QString_prepend1 (rawObject, arg1.RawObject)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_prepend2 (IntPtr raw, IntPtr arg1); + public TQString Prepend (TQString arg1) + { + return new TQString (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 TQString Remove (uint index, uint len) + { + return new TQString (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 TQString Replace (uint index, uint len, TQString arg1) + { + return new TQString (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 TQString Replace (uint index, uint len, TQChar arg1, uint clen) + { + return new TQString (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 TQString Replace (TQRegExp arg1, TQString arg2) + { + return new TQString (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 TQString SetNum (short arg1, int Q_base) + { + return new TQString (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 TQString SetNum (ushort arg1, int Q_base) + { + return new TQString (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 TQString SetNum (int arg1, int Q_base) + { + return new TQString (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 TQString SetNum (uint arg1, int Q_base) + { + return new TQString (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 TQString SetNum (long arg1, int Q_base) + { + return new TQString (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 TQString SetNum (ulong arg1, int Q_base) + { + return new TQString (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 TQString SetNum (float arg1, char f, int prec) + { + return new TQString (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 TQString SetNum (double arg1, char f, int prec) + { + return new TQString (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, TQChar c) + { + qt_QString_setExpand (rawObject, index, c.RawObject); + } + + // TODO: The TQChar functions need to get fixed + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_at (IntPtr raw, uint i); + public TQChar At (uint i) + { + return LookupObject (qt_QString_at (rawObject, i), typeof (TQChar)) as TQChar; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_constref (IntPtr raw, uint i); + public TQChar Constref (uint i) + { + return LookupObject (qt_QString_constref (rawObject, i), typeof (TQChar)) as TQChar; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_ref (IntPtr raw, uint i); + public TQChar Q_ref (uint i) + { + return LookupObject (qt_QString_ref (rawObject, i), typeof (TQChar)) as TQChar; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_unicode (IntPtr raw); + public TQChar Unicode () + { + return LookupObject (qt_QString_unicode (rawObject), typeof (TQChar)) as TQChar; + } + + [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 TQCString Utf8 () + { + return LookupObject (qt_QString_utf8 (rawObject), typeof (TQCString)) as TQCString; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_local8Bit (IntPtr raw); + public TQCString Local8Bit () + { + return LookupObject (qt_QString_local8Bit (rawObject), typeof (TQCString)) as TQCString; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_setUnicode (IntPtr raw, IntPtr unicode, uint len); + public TQString SetUnicode (TQChar unicode, uint len) + { + return new TQString (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 TQString SetLatin1 (string arg1, int len) + { + return new TQString (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 (TQString 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 (TQString 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 (TQString 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 (TQString 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 TQString Number (long arg1, int Q_base) + { + return new TQString (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 TQString Number (ulong arg1, int Q_base) + { + return new TQString (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 TQString Number (int arg1, int Q_base) + { + return new TQString (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 TQString Number (uint arg1, int Q_base) + { + return new TQString (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 TQString Number (double arg1, char f, int prec) + { + return new TQString (qt_QString_number4 (arg1, f, prec)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_fromLatin1 (string arg1, int len); + public static TQString FromLatin1 (string arg1, int len) + { + return new TQString (qt_QString_fromLatin1 (arg1, len)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_fromUtf8 (TQString arg1, int len); + public static TQString FromUtf8 (string arg1, int len) + { + return new TQString (qt_QString_fromUtf8 (arg1, len)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QString_fromLocal8Bit (TQString arg1, int len); + public static TQString FromLocal8Bit (string arg1, int len) + { + return new TQString (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 (TQString s1, TQString 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 (TQString s1, TQString s2) + { + return qt_QString_localeAwareCompare1 (s1.RawObject, s2.RawObject); + } + + public TQString Fill (TQChar c) + { + return Fill(c, (int) -1); + } + + public TQString Arg (long a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (long a, int fieldwidth) + { + return Arg(a, fieldwidth, (int) 10); + } + + public TQString Arg (ulong a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (ulong a, int fieldwidth) + { + return Arg(a, fieldwidth, (int) 10); + } + + public TQString Arg (int a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (int a, int fieldwidth) + { + return Arg(a, fieldwidth, (int) 10); + } + + public TQString Arg (uint a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (uint a, int fieldwidth) + { + return Arg(a, fieldwidth, (int) 10); + } + + public TQString Arg (short a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (short a, int fieldwidth) + { + return Arg(a, fieldwidth, (int) 10); + } + + public TQString Arg (ushort a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (ushort a, int fieldwidth) + { + return Arg(a, fieldwidth, (int) 10); + } + + public TQString Arg (char a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (TQChar a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (TQString a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (double a) + { + return Arg(a, (int) 0); + } + + public TQString Arg (double a, int fieldwidth) + { + return Arg(a, fieldwidth, (char) 'g'); + } + + public TQString Arg (double a, int fieldwidth, char fmt) + { + return Arg(a, fieldwidth, fmt, (int) -1); + } + + public int Find (TQChar c) + { + return Find(c, (int) 0); + } + + public int Find (TQChar 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 (TQString str) + { + return Find(str, (int) 0); + } + + public int Find (TQString str, int index) + { + return Find(str, index, true); + } + + public int Find (TQRegExp arg1) + { + return Find(arg1, (int) 0); + } + + public int Find (string str) + { + return Find(str, (int) 0); + } + + public int FindRev (TQChar c) + { + return FindRev(c, (int) -1); + } + + public int FindRev (TQChar 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 (TQString str) + { + return FindRev(str, (int) -1); + } + + public int FindRev (TQString str, int index) + { + return FindRev(str, index, true); + } + + public int FindRev (TQRegExp arg1) + { + return FindRev(arg1, (int) -1); + } + + public int FindRev (string str) + { + return FindRev(str, (int) -1); + } + + public int Contains (TQChar c) + { + return Contains(c, true); + } + + public int Contains (char c) + { + return Contains(c, true); + } + + public int Contains (TQString str) + { + return Contains(str, true); + } + + public int Contains (string str) + { + return Contains(str, true); + } + + public TQString Section (TQChar sep, int start) + { + return Section(sep, start, (int) 1); + } + + public TQString Section (TQChar sep, int start, int end) + { + return Section(sep, start, end, TQString.SectionFlags.SectionDefault); + } + + public TQString Section (char sep, int start) + { + return Section(sep, start, (int) 1); + } + + public TQString Section (char sep, int start, int end) + { + return Section(sep, start, end, TQString.SectionFlags.SectionDefault); + } + + public TQString Section (TQString in_sep, int start) + { + return Section(in_sep, start, (int) 1); + } + + public TQString Section (TQString in_sep, int start, int end) + { + return Section(in_sep, start, end, TQString.SectionFlags.SectionDefault); + } + + public TQString Section (string in_sep, int start) + { + return Section(in_sep, start, (int) 1); + } + + public TQString Section (string in_sep, int start, int end) + { + return Section(in_sep, start, end, TQString.SectionFlags.SectionDefault); + } + + public TQString Section (TQRegExp reg, int start) + { + return Section(reg, start, (int) 1); + } + + public TQString Section (TQRegExp reg, int start, int end) + { + return Section(reg, start, end, TQString.SectionFlags.SectionDefault); + } + + public TQString Mid (uint index) + { + return Mid(index, (uint) 1); + } + + public TQString LeftJustify (uint width) + { + return LeftJustify(width, new TQChar ()); + } + + public TQString LeftJustify (uint width, TQChar fill) + { + return LeftJustify(width, fill, false); + } + + public TQString RightJustify (uint width) + { + return RightJustify(width, new TQChar ()); + } + + public TQString RightJustify (uint width, TQChar 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 TQString SetNum (short arg1) + { + return SetNum(arg1, (int) 10); + } + + public TQString SetNum (ushort arg1) + { + return SetNum(arg1, (int) 10); + } + + public TQString SetNum (int arg1) + { + return SetNum(arg1, (int) 10); + } + + public TQString SetNum (uint arg1) + { + return SetNum(arg1, (int) 10); + } + + public TQString SetNum (long arg1) + { + return SetNum(arg1, (int) 10); + } + + public TQString SetNum (ulong arg1) + { + return SetNum(arg1, (int) 10); + } + + public TQString SetNum (float arg1) + { + return SetNum(arg1, (char) 'g'); + } + + public TQString SetNum (float arg1, char f) + { + return SetNum(arg1, f, (int) 6); + } + + public TQString SetNum (double arg1) + { + return SetNum(arg1, (char) 'g'); + } + + public TQString SetNum (double arg1, char f) + { + return SetNum(arg1, f, (int) 6); + } + + public TQString SetLatin1 (TQString arg1) + { + return SetLatin1(arg1, (int) -1); + } + + public static TQString Number (long arg1) + { + return Number(arg1, (int) 10); + } + + public static TQString Number (ulong arg1) + { + return Number(arg1, (int) 10); + } + + public static TQString Number (int arg1) + { + return Number(arg1, (int) 10); + } + + public static TQString Number (uint arg1) + { + return Number(arg1, (int) 10); + } + + public static TQString Number (double arg1) + { + return Number(arg1, (char) 'g'); + } + + public static TQString Number (double arg1, char f) + { + return Number(arg1, f, (int) 6); + } + + public static TQString FromLatin1 (TQString arg1) + { + return FromLatin1(arg1, (int) -1); + } + + public static TQString FromUtf8 (TQString arg1) + { + return FromUtf8(arg1, (int) -1); + } + + public static TQString FromLocal8Bit (TQString arg1) + { + return FromLocal8Bit(arg1, (int) -1); + } + } +} diff --git a/qtsharp/src/bindings/static/TQStyle.cs b/qtsharp/src/bindings/static/TQStyle.cs new file mode 100644 index 00000000..859b1efe --- /dev/null +++ b/qtsharp/src/bindings/static/TQStyle.cs @@ -0,0 +1,595 @@ +// TQStyle.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 TQStyle : TQObject, 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 TQStyle () : this (TQNull.Instance) {} + + internal TQStyle (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQStyle (TQNull dummy) : base (TQNull.Instance) {} + + ~TQStyle () + { + 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 (TQWidget 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 (TQWidget 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 (TQApplication 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 (TQApplication 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 (TQPalette 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 (TQPopupMenu 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 TQRect itemRect (TQPainter p, TQRect r, int flags, bool enabled, TQPixmap pixmap, string text, int len) + { + return (TQRect)LookupObject (qt_QStyle_itemRect (rawObject, p.RawObject, r.RawObject, flags, enabled, pixmap.RawObject, new TQString (text).RawObject, len), typeof(TQRect)); + } + + [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 (TQPainter p, TQRect r, int flags, TQColorGroup g, bool enabled, TQPixmap pixmap, string text, int len, TQColor penColor) + { + qt_QStyle_drawItem (rawObject, p.RawObject, r.RawObject, flags, g.RawObject, enabled, pixmap.RawObject, new TQString (text).RawObject, len, penColor.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QStyle_drawPrimitive (IntPtr raw, TQStyle.PrimitiveElement pe, IntPtr p, IntPtr r, IntPtr cg, TQStyle.StyleFlags flags, IntPtr arg1); + public void drawPrimitive (TQStyle.PrimitiveElement pe, TQPainter p, TQRect r, TQColorGroup cg, TQStyle.StyleFlags flags, TQStyleOption 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, TQStyle.ControlElement element, IntPtr p, IntPtr widget, IntPtr r, IntPtr cg, TQStyle.StyleFlags how, IntPtr arg1); + public void drawControl (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyleOption 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, TQStyle.ControlElement element, IntPtr p, IntPtr widget, IntPtr r, IntPtr arg1); + public void drawControlMask (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQStyleOption 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, TQStyle.SubRect r, IntPtr widget); + public TQRect subRect (TQStyle.SubRect r, TQWidget widget) + { + return (TQRect)LookupObject (qt_QStyle_subRect (rawObject, r, widget.RawObject), typeof(TQRect)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QStyle_drawComplexControl (IntPtr raw, TQStyle.ComplexControl control, IntPtr p, IntPtr widget, IntPtr r, IntPtr cg, TQStyle.StyleFlags how, TQStyle.SubControl sub, TQStyle.SubControl subActive, IntPtr arg1); + public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyle.SubControl sub, TQStyle.SubControl subActive, TQStyleOption 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, TQStyle.ComplexControl control, IntPtr p, IntPtr widget, IntPtr r, IntPtr arg1); + public void drawComplexControlMask (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQStyleOption 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, TQStyle.ComplexControl control, IntPtr widget, TQStyle.SubControl sc, IntPtr arg1); + public TQRect querySubControlMetrics (TQStyle.ComplexControl control, TQWidget widget, TQStyle.SubControl sc, TQStyleOption arg1) + { + return (TQRect)LookupObject (qt_QStyle_querySubControlMetrics (rawObject, control, widget.RawObject, sc, arg1.RawObject), typeof(TQRect)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern TQStyle.SubControl qt_QStyle_querySubControl (IntPtr raw, TQStyle.ComplexControl control, IntPtr widget, IntPtr pos, IntPtr arg1); + public TQStyle.SubControl querySubControl (TQStyle.ComplexControl control, TQWidget widget, TQPoint pos, TQStyleOption 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, TQStyle.PixelMetric metric, IntPtr widget); + public int pixelMetric (TQStyle.PixelMetric metric, TQWidget widget) + { + return qt_QStyle_pixelMetric (rawObject, metric, widget.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QStyle_sizeFromContents (IntPtr raw, TQStyle.ContentsType contents, IntPtr widget, IntPtr contentsSize, IntPtr arg1); + public TQSize sizeFromContents (TQStyle.ContentsType contents, TQWidget widget, TQSize contentsSize, TQStyleOption arg1) + { + return (TQSize)LookupObject (qt_QStyle_sizeFromContents (rawObject, contents, widget.RawObject, contentsSize.RawObject, arg1.RawObject), typeof(TQSize)); + } + + [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, TQWidget widget, TQStyleOption 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, TQStyle.StylePixmap stylepixmap, IntPtr widget, IntPtr arg1); + public TQPixmap stylePixmap (TQStyle.StylePixmap stylepixmap, TQWidget widget, TQStyleOption arg1) + { + return (TQPixmap)LookupObject (qt_QStyle_stylePixmap (rawObject, stylepixmap, widget.RawObject, arg1.RawObject), typeof(TQPixmap)); + } + + [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 (TQWidget 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 TQSize scrollBarExtent () + { + return (TQSize)LookupObject (qt_QStyle_scrollBarExtent (rawObject), typeof(TQSize)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QStyle_visualRect (IntPtr logical, IntPtr w); + public static TQRect visualRect (TQRect logical, TQWidget w) + { + return (TQRect)LookupObject (qt_QStyle_visualRect (logical.RawObject, w.RawObject), typeof(TQRect)); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QStyle_visualRect1 (IntPtr logical, IntPtr bounding); + public static TQRect visualRect (TQRect logical, TQRect bounding) + { + return (TQRect)LookupObject (qt_QStyle_visualRect1 (logical.RawObject, bounding.RawObject), typeof(TQRect)); + } + + public TQRect itemRect (TQPainter p, TQRect r, int flags, bool enabled, TQPixmap pixmap, string text) + { + return itemRect(p, r, flags, enabled, pixmap, text, (int) -1); + } + + public void drawItem (TQPainter p, TQRect r, int flags, TQColorGroup g, bool enabled, TQPixmap pixmap, string text) + { + drawItem(p, r, flags, g, enabled, pixmap, text, (int) -1); + } + + public void drawItem (TQPainter p, TQRect r, int flags, TQColorGroup g, bool enabled, TQPixmap pixmap, string text, int len) + { + drawItem(p, r, flags, g, enabled, pixmap, text, len, new TQColor ()); + } + + public void drawPrimitive (TQStyle.PrimitiveElement pe, TQPainter p, TQRect r, TQColorGroup cg) + { + drawPrimitive(pe, p, r, cg, TQStyle.StyleFlags.Style_Default); + } + + public void drawPrimitive (TQStyle.PrimitiveElement pe, TQPainter p, TQRect r, TQColorGroup cg, TQStyle.StyleFlags flags) + { + drawPrimitive(pe, p, r, cg, flags, new TQStyleOption ()); + } + + public void drawControl (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg) + { + drawControl(element, p, widget, r, cg, TQStyle.StyleFlags.Style_Default); + } + + public void drawControl (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how) + { + drawControl(element, p, widget, r, cg, how, new TQStyleOption ()); + } + + public void drawControlMask (TQStyle.ControlElement element, TQPainter p, TQWidget widget, TQRect r) + { + drawControlMask(element, p, widget, r, new TQStyleOption ()); + } + + public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg) + { + drawComplexControl(control, p, widget, r, cg, TQStyle.StyleFlags.Style_Default); + } + + public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how) + { + drawComplexControl(control, p, widget, r, cg, how, TQStyle.SubControl.SC_All); + } + + public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyle.SubControl sub) + { + drawComplexControl(control, p, widget, r, cg, how, sub, TQStyle.SubControl.SC_None); + } + + public void drawComplexControl (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r, TQColorGroup cg, TQStyle.StyleFlags how, TQStyle.SubControl sub, TQStyle.SubControl subActive) + { + drawComplexControl(control, p, widget, r, cg, how, sub, subActive, new TQStyleOption ()); + } + + public void drawComplexControlMask (TQStyle.ComplexControl control, TQPainter p, TQWidget widget, TQRect r) + { + drawComplexControlMask(control, p, widget, r, new TQStyleOption ()); + } + + public TQRect querySubControlMetrics (TQStyle.ComplexControl control, TQWidget widget, TQStyle.SubControl sc) + { + return querySubControlMetrics(control, widget, sc, new TQStyleOption ()); + } + + public TQStyle.SubControl querySubControl (TQStyle.ComplexControl control, TQWidget widget, TQPoint pos) + { + return querySubControl(control, widget, pos, new TQStyleOption ()); + } + + public int pixelMetric (TQStyle.PixelMetric metric) + { + return pixelMetric(metric, new TQWidget ()); + } + + public TQSize sizeFromContents (TQStyle.ContentsType contents, TQWidget widget, TQSize contentsSize) + { + return sizeFromContents(contents, widget, contentsSize, new TQStyleOption ()); + } + + public int styleHint (StyleHint stylehint) + { + return styleHint(stylehint, new TQWidget ()); + } + + public int styleHint (StyleHint stylehint, TQWidget widget) + { + return styleHint(stylehint, widget, new TQStyleOption ()); + } + + public int styleHint (StyleHint stylehint, TQWidget widget, TQStyleOption arg1) + { + return styleHint(stylehint, widget, arg1, (IntPtr) 0); + } + + public TQPixmap stylePixmap (TQStyle.StylePixmap stylepixmap) + { + return stylePixmap(stylepixmap, new TQWidget ()); + } + + public TQPixmap stylePixmap (TQStyle.StylePixmap stylepixmap, TQWidget widget) + { + return stylePixmap(stylepixmap, widget, new TQStyleOption ()); + } + + // Begin interface methods. + + } +} diff --git a/qtsharp/src/bindings/static/TQToolButton.cs b/qtsharp/src/bindings/static/TQToolButton.cs new file mode 100644 index 00000000..596f6369 --- /dev/null +++ b/qtsharp/src/bindings/static/TQToolButton.cs @@ -0,0 +1,290 @@ +// TQToolButton.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 TQToolButton : TQButton, IDisposable { + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QToolButton (IntPtr parent, string name); + public TQToolButton (TQWidget parent, string name) : this (TQNull.Instance) + { + rawObject = qt_new_QToolButton (parent != null ? parent.RawObject : IntPtr.Zero, name); + + if ((qparent = parent) != null) + qparent.AddChild (this); + + RegisterObject (this); + Connect (this, TQT_SIGNAL ("destroyed ()"), TQT_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 TQToolButton (TQIconSet iconSet, TQString textLabel, TQString groupText, TQObject receiver, string slot, TQToolBar parent, string name) : this (TQNull.Instance) + { + rawObject = qt_new_QToolButton1 (iconSet.RawObject, textLabel.RawObject, groupText.RawObject, IntPtr.Zero, null, parent != null ? parent.RawObject : IntPtr.Zero, name); + Connect( this, TQT_SIGNAL("clicked()"), receiver, slot ); + + + if ((qparent = parent) != null) + qparent.AddChild (this); + + RegisterObject (this); + Connect (this, TQT_SIGNAL ("destroyed ()"), TQT_SLOT ("NativeDestroyed ()")); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QToolButton2 (Qt.ArrowType type, IntPtr parent, string name); + public TQToolButton (Qt.ArrowType type, TQWidget parent, string name) : this (TQNull.Instance) + { + rawObject = qt_new_QToolButton2 (type, parent != null ? parent.RawObject : IntPtr.Zero, name); + + if ((qparent = parent) != null) + qparent.AddChild (this); + + RegisterObject (this); + Connect (this, TQT_SIGNAL ("destroyed ()"), TQT_SLOT ("NativeDestroyed ()")); + } + + public TQToolButton (TQWidget parent) : this (parent, "") {} + + internal TQToolButton () : this (TQNull.Instance) {} + + internal TQToolButton (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQToolButton (TQNull dummy) : base (TQNull.Instance) {} + + ~TQToolButton () + { + 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 (TQString 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 (TQString 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 (TQIconSet 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 (TQIconSet 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 TQIconSet IconSet (bool on) + { + if (disposed) + throw new ObjectDisposedException (this+": Attempted use of disposed object"); + + return LookupObject (qt_QToolButton_iconSet (rawObject, on), typeof (TQIconSet)) as TQIconSet; + } + + [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 (TQPainter 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 (TQObject o, TQEvent 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 (TQPalette 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/TQWidgetStack.cs b/qtsharp/src/bindings/static/TQWidgetStack.cs new file mode 100644 index 00000000..04de573f --- /dev/null +++ b/qtsharp/src/bindings/static/TQWidgetStack.cs @@ -0,0 +1,173 @@ +// TQWidgetStack.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 TQWidgetStack : TQFrame, IDisposable { + + private ArrayList widgets; + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_new_QWidgetStack (IntPtr parent, string name); + public TQWidgetStack (TQWidget parent, string name) : this (TQNull.Instance) + { + if ((qparent = parent) != null) + qparent.AddChild (this); + rawObject = qt_new_QWidgetStack (parent != null ? parent.RawObject : IntPtr.Zero, name); + RegisterObject (this); + } + + public TQWidgetStack () : this (new TQWidget ()) {} + + public TQWidgetStack (TQWidget parent) : this (parent, "") {} + + internal TQWidgetStack (IntPtr ptr) : this (TQNull.Instance) + { + rawObject = ptr; + RegisterObject(this); + } + + internal TQWidgetStack (TQNull dummy) : base (TQNull.Instance) + { + widgets = new ArrayList (); + } + + ~TQWidgetStack () + { + 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 (TQWidget 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 (TQWidget 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 TQSize SizeHint () + { + return LookupObject (qt_QWidgetStack_sizeHint (RawObject), typeof(TQSize)) as TQSize; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QWidgetStack_minimumSizeHint (IntPtr raw); + public TQSize MinimumSizeHint () + { + return LookupObject (qt_QWidgetStack_minimumSizeHint (RawObject), typeof(TQSize)) as TQSize; + } + + [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 TQWidget Widget (int arg1) + { + return LookupObject (qt_QWidgetStack_widget (RawObject, arg1), typeof(TQWidget)) as TQWidget; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern int qt_QWidgetStack_id (IntPtr raw, IntPtr arg1); + public int Id (TQWidget arg1) + { + return qt_QWidgetStack_id (RawObject, arg1.RawObject); + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern IntPtr qt_QWidgetStack_visibleWidget (IntPtr raw); + public TQWidget VisibleWidget () + { + return LookupObject (qt_QWidgetStack_visibleWidget (RawObject), typeof(TQWidget)) as TQWidget; + } + + [DllImport("libqtc", CharSet=CharSet.Ansi)] + private static extern void qt_QWidgetStack_setFrameRect (IntPtr raw, IntPtr arg1); + public void SetFrameRect (TQRect 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 (TQWidget 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 (TQWidget arg1) + { + return AddWidget(arg1, (int) -1); + } + + // Begin interface methods. + + } +} diff --git a/qtsharp/src/generator/QAncestor.cs b/qtsharp/src/generator/QAncestor.cs deleted file mode 100644 index bb35051b..00000000 --- a/qtsharp/src/generator/QAncestor.cs +++ /dev/null @@ -1,26 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; - -namespace QtCSharp { - - public class TQAncestor : TQType { - - } -} diff --git a/qtsharp/src/generator/QCtor.cs b/qtsharp/src/generator/QCtor.cs deleted file mode 100644 index 8a7ec439..00000000 --- a/qtsharp/src/generator/QCtor.cs +++ /dev/null @@ -1,47 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; -using System.Collections; - -namespace QtCSharp { - - public class TQCtor : TQMember{ - - bool dummy, parent, inherited; - - public bool Dummy - { - get {return dummy;} - set {dummy = value;} - } - - public bool Parent - { - get {return parent;} - set {parent = value;} - } - - public bool Inherited - { - get {return inherited;} - set {inherited = value;} - } - } -} diff --git a/qtsharp/src/generator/QDCtor.cs b/qtsharp/src/generator/QDCtor.cs deleted file mode 100644 index de70a51e..00000000 --- a/qtsharp/src/generator/QDCtor.cs +++ /dev/null @@ -1,57 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; -using System.Collections; - -namespace QtCSharp { - - public class TQDCtor { - - string name, access; - ArrayList qparams; - - public TQDCtor() - { - qparams = new ArrayList(); - } - - public void AddTQParam(TQParam qparam) - { - qparams.Add(qparam); - } - - public string Name - { - get {return name;} - set {name = value;} - } - - public string Access - { - get {return access;} - set {access = value;} - } - - public ArrayList TQParams - { - get {return qparams;} - } - } -} diff --git a/qtsharp/src/generator/QEnum.cs b/qtsharp/src/generator/QEnum.cs deleted file mode 100644 index f2304b02..00000000 --- a/qtsharp/src/generator/QEnum.cs +++ /dev/null @@ -1,63 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; -using System.Collections; - -namespace QtCSharp { - - public class TQEnum { - - string name, access, type; - ArrayList qitems; - - public TQEnum() - { - qitems = new ArrayList(); - } - - public void AddTQItem(TQItem qitem) - { - qitems.Add(qitem); - } - - public string Name - { - get {return name;} - set {name = value;} - } - - public string Access - { - get {return access;} - set {access = value;} - } - - public string Type - { - get {return type;} - set {type = value;} - } - - public ArrayList TQItems - { - get {return qitems;} - } - } -} diff --git a/qtsharp/src/generator/QItem.cs b/qtsharp/src/generator/QItem.cs deleted file mode 100644 index a678de4d..00000000 --- a/qtsharp/src/generator/QItem.cs +++ /dev/null @@ -1,44 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; - -namespace QtCSharp { - - public class TQItem { - - string name, qvalue; - - public TQItem() - { - } - - public string Name - { - get {return name;} - set {name = value;} - } - - public string Value - { - get {return qvalue;} - set {qvalue = value;} - } - } -} diff --git a/qtsharp/src/generator/QMember.cs b/qtsharp/src/generator/QMember.cs deleted file mode 100644 index 6fb7b14b..00000000 --- a/qtsharp/src/generator/QMember.cs +++ /dev/null @@ -1,116 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -using System.IO; -using System.Collections; - -namespace QtCSharp { - - public class TQMember { - - string name, access, id; - bool overload, throttle, boxer; - ArrayList pinvokeparams, pinvokecallparams, csharpparams, overloadparams; - - public TQMember() - { - pinvokeparams = new ArrayList(); - pinvokecallparams = new ArrayList(); - csharpparams = new ArrayList(); - overloadparams = new ArrayList(); - } - - - public void AddPinvokeParam(TQParam pinvokeparam) - { - pinvokeparams.Add(pinvokeparam); - } - - public void AddPinvokeCallParam(TQParam pinvokecallparam) - { - pinvokecallparams.Add(pinvokecallparam); - } - - public void AddCSharpParam(TQParam csharpparam) - { - csharpparams.Add(csharpparam); - } - - public void AddOverloadParam(TQParam overloadparam) - { - overloadparams.Add(overloadparam); - } - - public string Name - { - get {return name;} - set {name = value;} - } - - public string Access - { - get {return access;} - set {access = value;} - } - - public bool Overload - { - get {return overload;} - set {overload = value;} - } - - public string Id - { - get {return id;} - set {id = value;} - } - - public bool Throttle - { - get {return throttle;} - set {throttle = value;} - } - - public bool Boxer - { - get {return boxer;} - set {boxer = value;} - } - - public ArrayList PinvokeParams - { - get {return pinvokeparams;} - } - - public ArrayList PinvokeCallParams - { - get {return pinvokecallparams;} - } - - public ArrayList CSharpParams - { - get {return csharpparams;} - } - - public ArrayList OverloadParams - { - get {return overloadparams;} - } - } -} diff --git a/qtsharp/src/generator/QMethod.cs b/qtsharp/src/generator/QMethod.cs deleted file mode 100644 index 085935c4..00000000 --- a/qtsharp/src/generator/QMethod.cs +++ /dev/null @@ -1,54 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; -using System.Collections; - -namespace QtCSharp { - - public class TQMethod : TQMember { - - bool qstringreturn; - string returntype, pinvokereturn, pascalname; - - public string Return - { - get {return returntype;} - set {returntype = value;} - } - - public string PinvokeReturn - { - get {return pinvokereturn;} - set {pinvokereturn = value;} - } - - public bool TQStringReturn - { - get {return qstringreturn;} - set {qstringreturn = value;} - } - - public string PascalName - { - get {return pascalname;} - set {pascalname = value;} - } - } -} diff --git a/qtsharp/src/generator/QParam.cs b/qtsharp/src/generator/QParam.cs deleted file mode 100644 index 7cf27183..00000000 --- a/qtsharp/src/generator/QParam.cs +++ /dev/null @@ -1,54 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; - -namespace QtCSharp { - - public class TQParam: ICloneable { - - string type, name, defaultvalue; - - public TQParam() - {} - - public object Clone() - { - return MemberwiseClone(); - } - - public string Type - { - get {return type;} - set {type = value;} - } - - public string Name - { - get {return name;} - set {name = value;} - } - - public string Default - { - get {return defaultvalue;} - set {defaultvalue = value;} - } - } -} diff --git a/qtsharp/src/generator/QType.cs b/qtsharp/src/generator/QType.cs deleted file mode 100644 index dd358025..00000000 --- a/qtsharp/src/generator/QType.cs +++ /dev/null @@ -1,126 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -//using System.IO; -using System.Collections; - -namespace QtCSharp { - - public class TQType { - - string name, access, iname; - bool isInterface, isConverted, isTQObject; - ArrayList qancestors, qenums, qctors, qdctors, qmethods; - - public TQType () - { - qancestors = new ArrayList (); - qenums = new ArrayList (); - qctors = new ArrayList (); - qdctors = new ArrayList (); - qmethods = new ArrayList (); - } - - public void AddTQAncestor (TQAncestor qancestor) - { - qancestors.Add (qancestor); - } - - public void AddTQEnum (TQEnum qenum) - { - qenums.Add (qenum); - } - - public void AddTQCtor (TQCtor qctor) - { - qctors.Add (qctor); - } - - public void AddTQDCtor (TQDCtor qdctor) - { - qdctors.Add (qdctor); - } - - public void AddTQMethod (TQMethod qmethod) - { - qmethods.Add (qmethod); - } - - public string Name - { - get {return name;} - set {name = value;} - } - - public string Access - { - get {return access;} - set {access = value;} - } - - public bool IsInterface - { - get {return isInterface;} - set {isInterface = value;} - } - - public bool IsConverted - { - get {return isConverted;} - set {isConverted = value;} - } - - public bool IsTQObject { - get { return isTQObject; } - set { isTQObject = value; } - } - - public string IName - { - get {return iname;} - set {iname = value;} - } - - public ArrayList TQAncestors - { - get {return qancestors;} - } - - public ArrayList TQEnums - { - get {return qenums;} - } - - public ArrayList TQCtors - { - get {return qctors;} - } - - public ArrayList TQDCtors - { - get {return qdctors;} - } - - public ArrayList TQMethods - { - get {return qmethods;} - set {qmethods = value;} - } - } -} diff --git a/qtsharp/src/generator/QTypeMap.cs b/qtsharp/src/generator/QTypeMap.cs deleted file mode 100644 index 1c277c48..00000000 --- a/qtsharp/src/generator/QTypeMap.cs +++ /dev/null @@ -1,477 +0,0 @@ -// A Qt to C# binding generator. -// -// 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. - -using System; -using System.Collections; - -namespace QtCSharp { - - public class TQTypeMap { - - Hashtable arraymap, mastermap, pinvoketypes, pinvokecalltypes, csharptypes, overloadtypes, reserved, interfaces; - - public TQTypeMap () - { - arraymap = new Hashtable (); - arraymap.Add ("void*", "int[]"); - arraymap.Add ("void *", "int[]"); - arraymap.Add ("int*", "int[]"); - arraymap.Add ("int *", "int[]"); - arraymap.Add ("double*", "double[]"); - arraymap.Add ("double *", "double[]"); - arraymap.Add ("short*", "short[]"); - arraymap.Add ("short *", "short[]"); - arraymap.Add ("char**", "string[]"); - arraymap.Add ("char **", "string[]"); - arraymap.Add ("char*", "string"); - arraymap.Add ("uchar**", "string[]"); - arraymap.Add ("uchar **", "string[]"); - - mastermap = new Hashtable (); - mastermap.Add ("void", "void"); - // mastermap.Add ("TQByteArray", "byte[]"); - mastermap.Add ("TQBitArray", "byte[]"); - mastermap.Add ("uchar", "string"); - mastermap.Add ("unsigned int", "uint"); - mastermap.Add ("unsigned short", "ushort"); - mastermap.Add ("unsigned long", "ulong"); - mastermap.Add ("unsigned char", "string"); - mastermap.Add ("HANDLE", "uint"); - mastermap.Add ("HBITMAP", "uint"); - mastermap.Add ("HCURSOR", "uint"); - mastermap.Add ("HDC", "uint"); - mastermap.Add ("HFONT", "uint"); - mastermap.Add ("HPALETTE", "uint"); - mastermap.Add ("HRGN", "uint"); - mastermap.Add ("Display", "IntPtr"); - mastermap.Add ("Q_REFCOUNT bool", "bool"); - mastermap.Add ("EventRef", "IntPtr"); - mastermap.Add ("MSG", "IntPtr"); - mastermap.Add ("XEvent", "IntPtr"); - mastermap.Add ("TQWSEvent", "IntPtr"); - mastermap.Add ("GDHandle", "IntPtr"); - mastermap.Add ("TQRgb", "int"); - mastermap.Add ("TQWSDecoration", "IntPtr"); - mastermap.Add ("TQTextParag", "IntPtr"); - mastermap.Add ("Qt.HANDLE", "IntPtr"); - mastermap.Add ("TQUObject", "IntPtr"); - mastermap.Add ("TQGfx", "IntPtr"); - mastermap.Add ("TQRESULT", "long"); - mastermap.Add ("TQUnknownInterface", "IntPtr"); - mastermap.Add ("TQPtrCollection.Item", "int"); - mastermap.Add ("type", "IntPtr"); - mastermap.Add ("array_data", "IntPtr"); - mastermap.Add ("bitarr_data", "IntPtr"); - mastermap.Add ("Offset", "int"); - mastermap.Add ("Q_INT16", "short"); - mastermap.Add ("Q_INT32", "int"); - mastermap.Add ("Q_INT8", "char"); - mastermap.Add ("Q_LONG", "long"); - mastermap.Add ("Q_PACKED", "uint"); - mastermap.Add ("Q_UINT16", "ushort"); - mastermap.Add ("Q_UINT32", "uint"); - mastermap.Add ("Q_UINT8", "char"); - mastermap.Add ("Q_ULONG", "long"); - mastermap.Add ("TQStyleHintReturn", "IntPtr"); - mastermap.Add ("TQFileInfoList", "IntPtr"); - mastermap.Add ("TQDomNodePrivate", "IntPtr"); - mastermap.Add ("GUID", "System.Guid"); - mastermap.Add ("FILE", "string"); - mastermap.Add ("EncoderFn", "int"); - mastermap.Add ("DecoderFn", "int"); - mastermap.Add ("TQDiskFont", "IntPtr"); - mastermap.Add ("pointer", "IntPtr"); - mastermap.Add ("T", "IntPtr"); - mastermap.Add ("T1", "IntPtr"); - mastermap.Add ("T2", "IntPtr"); - mastermap.Add ("Iterator", "IntPtr"); - mastermap.Add ("iterator", "IntPtr"); - mastermap.Add ("_iterator", "IntPtr"); - mastermap.Add ("reference", "IntPtr"); - mastermap.Add ("_reference", "IntPtr"); - mastermap.Add ("ConstIterator", "int"); - mastermap.Add ("TQWSDisplay", "IntPtr"); - mastermap.Add ("CGContextRef", "IntPtr"); - mastermap.Add ("WId", "uint"); - mastermap.Add ("TQWidgetMapper", "IntPtr"); - mastermap.Add ("size_type", "int"); - mastermap.Add ("Item", "IntPtr"); - mastermap.Add ("image_io_handler", "int"); - mastermap.Add ("TQCOORD", "short"); - mastermap.Add ("key_type", "IntPtr"); - mastermap.Add ("K", "IntPtr"); - mastermap.Add ("NodePtr", "int"); - mastermap.Add ("TQTextFormat", "IntPtr"); - mastermap.Add ("TQTextDocument", "IntPtr"); - mastermap.Add ("TQTextCursor", "IntPtr"); - mastermap.Add ("_NPStream", "IntPtr"); - mastermap.Add ("PID", "long"); - mastermap.Add ("Region", "int"); - mastermap.Add ("RgnHandle", "IntPtr"); - mastermap.Add ("TQRemoteInterface", "IntPtr"); - mastermap.Add ("mode_t", "int"); - mastermap.Add ("TQSqlFieldInfo", "IntPtr"); - mastermap.Add ("TQSqlRecordInfo", "IntPtr"); - mastermap.Add ("TQSqlRecordPrivate", "IntPtr"); - mastermap.Add ("TQTSMFI", "int"); - mastermap.Add ("Widget", "TQWidget"); - mastermap.Add ("WidgetClass", "int"); - mastermap.Add ("ArgList", "int"); - mastermap.Add ("Cardinal", "int"); - mastermap.Add ("XrmOptionDescRec", "IntPtr"); - mastermap.Add ("size_t", "int"); - mastermap.Add ("ULONG_MAX", "UInt64.MaxValue"); - - // Enums - mastermap.Add ("Event", "TQAccessible.Event"); - mastermap.Add ("Role", "TQAccessible.Role"); - mastermap.Add ("NavDirection", "TQAccessible.NavDirection"); - mastermap.Add ("Text", "TQAccessible.Text"); - mastermap.Add ("ColorSpec", "TQApplication.ColorSpec"); - mastermap.Add ("ToggleState", "TQButton.ToggleState"); - mastermap.Add ("RttiValues", "TQCanvasItem.RttiValues"); - mastermap.Add ("FrameAnimationType", "TQCanvasSprite.FrameAnimationType"); - mastermap.Add ("Category", "TQChar.Category"); - mastermap.Add ("Decomposition", "TQChar.Decomposition"); - mastermap.Add ("Joining", "TQChar.Joining"); - mastermap.Add ("CombiningClass", "TQChar.CombiningClass"); - mastermap.Add ("Spec", "TQColor.Spec"); - mastermap.Add ("ColorRole", "TQColorGroup.ColorRole"); - mastermap.Add ("Boundary", "TQDataBrowser.Boundary"); - mastermap.Add ("ByteOrder", "TQDataStream.ByteOrder"); - mastermap.Add ("Refresh", "TQDataTable.Refresh"); - mastermap.Add ("Order", "TQDateEdit.Order"); - mastermap.Add ("DialogCode", "TQDialog.DialogCode"); - mastermap.Add ("FilterSpec", "TQDir.FilterSpec"); - mastermap.Add ("SortSpec", "TQDir.SortSpec"); - mastermap.Add ("RecordType", "TQDns.RecordType"); - mastermap.Add ("HandlePosition", "TQDockArea.HandlePosition"); - mastermap.Add ("Place", "TQDockWindow.Place"); - mastermap.Add ("CloseMode", "TQDockWindow.CloseMode"); - mastermap.Add ("NodeType", "TQDomNode.NodeType"); - mastermap.Add ("DragMode", "TQDragObject.DragMode"); - mastermap.Add ("Action", "TQDropEvent.Action"); - mastermap.Add ("ViewMode", "TQFileDialog.ViewMode"); - mastermap.Add ("PreviewMode", "TQFileDialog.PreviewMode"); - mastermap.Add ("PermissionSpec", "TQFileInfo.PermissionSpec"); - mastermap.Add ("StyleStrategy", "TQFont.StyleStrategy"); - mastermap.Add ("Weight", "TQFont.Weight"); - mastermap.Add ("Script", "TQFont.Script"); - mastermap.Add ("Shadow", "TQFrame.Shadow"); - mastermap.Add ("FormatOption", "TQGL.FormatOption"); - mastermap.Add ("Corner", "TQGridLayout.Corner"); - mastermap.Add ("Size", "TQIconSet.Size"); - mastermap.Add ("Arrangement", "TQIconView.Arrangement"); - mastermap.Add ("ItemTextPos", "TQIconView.ItemTextPos"); - mastermap.Add ("Endian", "TQImage.Endian"); - mastermap.Add ("ScaleMode", "TQImage.ScaleMode"); - mastermap.Add ("PaintDeviceFlags", "TQInternal.PaintDeviceFlags"); - mastermap.Add ("Rules", "TQJpUnicodeConv.Rules"); - mastermap.Add ("SegmentStyle", "TQLCDNumber.SegmentStyle"); - mastermap.Add ("LayoutMode", "TQListBox.LayoutMode"); - mastermap.Add ("WidthMode", "TQListView.WidthMode"); - mastermap.Add ("RenameAction", "TQListView.RenameAction"); - mastermap.Add ("DockWindows", "TQMainWindow.DockWindows"); - mastermap.Add ("Color", "TQMapNodeBase.Color"); - mastermap.Add ("Separator", "TQMenuBar.Separator"); - mastermap.Add ("Icon", "TQMessageBox.Icon"); - mastermap.Add ("Access", "TQMetaData.Access"); - mastermap.Add ("Flags", "TQMetaProperty.Flags"); - mastermap.Add ("Status", "TQMovie.Status"); - mastermap.Add ("InstanceMode", "TQNPInstance.InstanceMode"); - mastermap.Add ("StreamMode", "TQNPInstance.StreamMode"); - mastermap.Add ("Operation", "TQNetworkProtocol.Operation"); - mastermap.Add ("ConnectionState", "TQNetworkProtocol.ConnectionState"); - mastermap.Add ("DisposalMethod", "TQPNGImageWriter.DisposalMethod"); - mastermap.Add ("PDevCmd", "TQPaintDevice.PDevCmd"); - mastermap.Add ("CoordinateMode", "TQPainter.CoordinateMode"); - mastermap.Add ("TextDirection", "TQPainter.TextDirection"); - mastermap.Add ("ColorGroup", "TQPalette.ColorGroup"); - mastermap.Add ("Optimization", "TQPixmap.Optimization"); - mastermap.Add ("Edge", "TQPolygonScanner.Edge"); - mastermap.Add ("PrinterMode", "TQPrinter.PrinterMode"); - mastermap.Add ("PageSize", "TQPrinter.PageSize"); - mastermap.Add ("PageOrder", "TQPrinter.PageOrder"); - mastermap.Add ("PaperSource", "TQPrinter.PaperSource"); - mastermap.Add ("Communication", "TQProcess.Communication"); - mastermap.Add ("RegionType", "TQRegion.RegionType"); - mastermap.Add ("ResizePolicy", "TQScrollView.ResizePolicy"); - mastermap.Add ("ScrollBarMode", "TQScrollView.ScrollBarMode"); - mastermap.Add ("RestartHint", "TQSessionManager.RestartHint"); - mastermap.Add ("System", "TQSettings.System"); - mastermap.Add ("SizeType", "TQSizePolicy.SizeType"); - mastermap.Add ("ExpandData", "TQSizePolicy.ExpandData"); - mastermap.Add ("TickSetting", "TQSlider.TickSetting"); - mastermap.Add ("Op", "TQSql.Op"); - mastermap.Add ("Location", "TQSql.Location"); - mastermap.Add ("Confirm", "TQSql.Confirm"); - mastermap.Add ("DriverFeature", "TQSqlDriver.DriverFeature"); - mastermap.Add ("SectionFlags", "TQString.SectionFlags"); - mastermap.Add ("PrimitiveElement", "TQStyle.PrimitiveElement"); - mastermap.Add ("StyleFlags", "TQStyle.StyleFlags"); - mastermap.Add ("SFlags", "TQStyle.StyleFlags"); - mastermap.Add ("ControlElement", "TQStyle.ControlElement"); - mastermap.Add ("SubRect", "TQStyle.SubRect"); - mastermap.Add ("ComplexControl", "TQStyle.ComplexControl"); - mastermap.Add ("SubControl", "TQStyle.SubControl"); - mastermap.Add ("SCFlags", "TQStyle.SubControl"); - mastermap.Add ("PixelMetric", "TQStyle.PixelMetric"); - mastermap.Add ("ContentsType", "TQStyle.ContentsType"); - mastermap.Add ("StylePixmap", "TQStyle.StylePixmap"); - mastermap.Add ("StyleOptionDefault", "TQStyleOption.StyleOptionDefault"); - mastermap.Add ("AdditionalStyleValues", "TQStyleSheetItem.AdditionalStyleValues"); - mastermap.Add ("DisplayMode", "TQStyleSheetItem.DisplayMode"); - mastermap.Add ("WhiteSpaceMode", "TQStyleSheetItem.WhiteSpaceMode"); - mastermap.Add ("Margin", "TQStyleSheetItem.Margin"); - mastermap.Add ("ListStyle", "TQStyleSheetItem.ListStyle"); - mastermap.Add ("FocusStyle", "TQTable.FocusStyle"); - mastermap.Add ("EditMode", "TQTable.EditMode"); - mastermap.Add ("EditType", "TQTableItem.EditType"); - mastermap.Add ("TabletDevice", "TQTabletEvent.TabletDevice"); - mastermap.Add ("KeyboardAction", "TQTextEdit.KeyboardAction"); - mastermap.Add ("CursorAction", "TQTextEdit.CursorAction"); - mastermap.Add ("SaveMode", "TQTranslator.SaveMode"); - mastermap.Add ("Prefix", "TQTranslatorMessage.Prefix"); - mastermap.Add ("FocusPolicy", "TQWidget.FocusPolicy"); - mastermap.Add ("BackgroundOrigin", "TQWidget.BackgroundOrigin"); - mastermap.Add ("ButtonState", "Qt.ButtonState"); - mastermap.Add ("AlignmentFlags", "Qt.AlignmentFlags"); - mastermap.Add ("TextFlags", "Qt.TextFlags"); - mastermap.Add ("WidgetState", "Qt.WidgetState"); - mastermap.Add ("WState", "Qt.WidgetState"); - mastermap.Add ("WidgetFlags", "Qt.WidgetFlags"); - mastermap.Add ("WFlags", "Qt.WidgetFlags"); - mastermap.Add ("ImageConversionFlags", "Qt.ImageConversionFlags"); - mastermap.Add ("BGMode", "Qt.BGMode"); - mastermap.Add ("PaintUnit", "Qt.PaintUnit"); - mastermap.Add ("GUIStyle", "Qt.GUIStyle"); - mastermap.Add ("Modifier", "Qt.Modifier"); - mastermap.Add ("Key", "Qt.Key"); - mastermap.Add ("ArrowType", "Qt.ArrowType"); - mastermap.Add ("RasterOp", "Qt.RasterOp"); - mastermap.Add ("PenStyle", "Qt.PenStyle"); - mastermap.Add ("PenCapStyle", "Qt.PenCapStyle"); - mastermap.Add ("PenJoinStyle", "Qt.PenJoinStyle"); - mastermap.Add ("BrushStyle", "Qt.BrushStyle"); - mastermap.Add ("WindowsVersion", "Qt.WindowsVersion"); - mastermap.Add ("UIEffect", "Qt.UIEffect"); - mastermap.Add ("CursorShape", "Qt.CursorShape"); - mastermap.Add ("TextFormat", "Qt.TextFormat"); - mastermap.Add ("Dock", "Qt.Dock"); - mastermap.Add ("DateFormat", "Qt.DateFormat"); - mastermap.Add ("BackgroundMode", "Qt.BackgroundMode"); - mastermap.Add ("StringComparisonMode", "Qt.StringComparisonMode"); - mastermap.Add ("ComparisonFlags", "Qt.StringComparisonMode"); - - // We need to make sure all params use the interfaces, ie ITQPaintDevice - /*mastermap.Add ("TQAccessibleFactoryInterface", "ITQAccessibleFactory"); - mastermap.Add ("TQAccessibleInterface", "ITQAccessible");*/ - mastermap.Add ("TQPaintDevice", "ITQPaintDevice"); - /*mastermap.Add ("TQMenuData", "ITQMenuData"); - mastermap.Add ("TQRangeControl", "ITQRangeControl"); - mastermap.Add ("TQMimeSource", "ITQMimeSource"); - mastermap.Add ("TQLayoutItem", "ITQLayoutItem"); - mastermap.Add ("TQUrl", "ITQUrl"); - mastermap.Add ("TQIODevice", "ITQIODevice"); - mastermap.Add ("TQXmlContentHandler", "ITQXmlContentHandler"); - mastermap.Add ("TQXmlErrorHandler", "ITQXmlErrorHandler"); - mastermap.Add ("TQXmlDTDHandler", "ITQXmlDTDHandler"); - mastermap.Add ("TQXmlEntityResolver", "ITQXmlEntityResolver"); - //mastermap.Add ("TQXmlLexicalHandler", "ITQXmlLexicalHandler"); - mastermap.Add ("TQXmlDeclHandler", "ITQXmlDeclHandler"); - mastermap.Add ("QwAbsSpriteFieldView", "IQwAbsSpriteFieldView"); - mastermap.Add ("TQSqlQuery", "ITQSqlQuery"); - mastermap.Add ("TQFeatureListInterface", "ITQFeatureList"); - mastermap.Add ("TQUnknownInterface", "ITQUnknown"); - mastermap.Add ("TQShared", "ITQShared");*/ - - // Key Duplication - //mastermap.Add ("Direction", "TQBoxLayout.Direction"); - //mastermap.Add ("Direction", "TQChar.Direction"); - //mastermap.Add ("Reason", "TQContextMenuEvent.Reason"); - //mastermap.Add ("Reason", "TQFocusEvent.Reason"); - //mastermap.Add ("Reason", "TQNPInstance.Reason"); - //mastermap.Add ("Mode", "TQFileDialog.Mode"); - //mastermap.Add ("Mode", "TQIconSet.Mode"); - //mastermap.Add ("Mode", "TQLCDNumber.Mode"); - //mastermap.Add ("Mode", "TQSqlCursor.Mode"); - //mastermap.Add ("Shape", "TQFrame.Shape"); - //mastermap.Add ("Shape", "TQTabBar.Shape"); - //mastermap.Add ("KeyType", "TQGCache.KeyType"); - //mastermap.Add ("KeyType", "TQGDict.KeyType"); - //mastermap.Add ("State", "TQAccessible.State"); - //mastermap.Add ("State", "TQNetworkProtocol.State"); - //mastermap.Add ("State", "TQSocket.State"); - //mastermap.Add ("State", "TQValidator.State"); - //mastermap.Add ("ResizeMode", "TQIconView.ResizeMode"); - //mastermap.Add ("ResizeMode", "TQLayout.ResizeMode"); - //mastermap.Add ("ResizeMode", "TQListView.ResizeMode"); - //mastermap.Add ("ResizeMode", "TQListView.ResizeMode"); - //mastermap.Add ("EchoMode", "TQLineEdit.EchoMode"); - //mastermap.Add ("EchoMode", "QtMultiLineEdit.EchoMode"); - //mastermap.Add ("ColorMode", "TQApplication.ColorMode"); - //mastermap.Add ("ColorMode", "TQPrinter.ColorMode"); - //mastermap.Add ("ColorMode", "TQPixmap.ColorMode"); - //mastermap.Add ("SelectionMode", "TQIconView.SelectionMode"); - //mastermap.Add ("SelectionMode", "TQListBox.SelectionMode"); - //mastermap.Add ("SelectionMode", "TQListView.SelectionMode"); - //mastermap.Add ("SelectionMode", "TQTable.SelectionMode"); - //mastermap.Add ("Error", "TQSocket.Error"); - //mastermap.Add ("Error", "TQSocketDevice.Error"); - //mastermap.Add ("Error", "TQNetworkProtocol.Error"); - //mastermap.Add ("ButtonSymbols", "TQSpinBox.ButtonSymbols"); - //mastermap.Add ("ButtonSymbols", "TQSpinWidget.ButtonSymbols"); - //mastermap.Add ("StyleHint", "TQStyle.StyleHint"); - //mastermap.Add ("StyleHint", "TQFont.StyleHint"); - //mastermap.Add ("Encoding", "TQApplication.Encoding"); - //mastermap.Add ("Encoding", "TQTextStream.Encoding"); - //mastermap.Add ("VerticalAlignment", "TQTextEdit.VerticalAlignment"); - //mastermap.Add ("VerticalAlignment", "TQStyleSheetItem.VerticalAlignment"); - //mastermap.Add ("Orientation", "TQPrinter.Orientation"); - //mastermap.Add ("Orientation", "Qt.Orientation"); - //mastermap.Add ("WrapPolicy", "TQTextEdit.WrapPolicy"); - //mastermap.Add ("WrapPolicy", "QtMultiLineEdit.WrapPolicy"); - //mastermap.Add ("WordWrap", "TQTextEdit.WordWrap"); - //mastermap.Add ("WordWrap", "QtMultiLineEdit.WordWrap"); - - // These are here in case we need to override the mastermap - pinvoketypes = new Hashtable (); - pinvokecalltypes = new Hashtable (); - csharptypes = new Hashtable (); - overloadtypes = new Hashtable (); - - // These are reserved keywords. - reserved = new Hashtable (); - reserved.Add ("lock", "Q_lock"); - reserved.Add ("object", "Q_object"); - reserved.Add ("ref", "Q_ref"); - reserved.Add ("base", "Q_base"); - reserved.Add ("string", "Q_string"); - reserved.Add ("const", "Q_const"); - reserved.Add ("event", "Q_event"); - - // The allowed interfaces - interfaces = new Hashtable (); - interfaces.Add ("TQAccessibleFactoryInterface", "ITQAccessibleFactory"); - interfaces.Add ("TQAccessibleInterface", "ITQAccessible"); - interfaces.Add ("TQPaintDevice", "ITQPaintDevice"); - interfaces.Add ("TQMenuData", "ITQMenuData"); - interfaces.Add ("TQRangeControl", "ITQRangeControl"); - interfaces.Add ("TQMimeSource", "ITQMimeSource"); - interfaces.Add ("TQLayoutItem", "ITQLayoutItem"); - interfaces.Add ("TQUrl", "ITQUrl"); - interfaces.Add ("TQIODevice", "ITQIODevice"); - interfaces.Add ("TQXmlContentHandler", "ITQXmlContentHandler"); - interfaces.Add ("TQXmlErrorHandler", "ITQXmlErrorHandler"); - interfaces.Add ("TQXmlDTDHandler", "ITQXmlDTDHandler"); - interfaces.Add ("TQXmlEntityResolver", "ITQXmlEntityResolver"); - //interfaces.Add ("TQXmlLexicalHandler", "ITQXmlLexicalHandler"); - interfaces.Add ("TQXmlDeclHandler", "ITQXmlDeclHandler"); - interfaces.Add ("QwAbsSpriteFieldView", "IQwAbsSpriteFieldView"); - interfaces.Add ("TQSqlQuery", "ITQSqlQuery"); - interfaces.Add ("TQFeatureListInterface", "ITQFeatureList"); - interfaces.Add ("TQUnknownInterface", "ITQUnknown"); - interfaces.Add ("TQShared", "ITQShared"); - } - - public string PinvokeType (string str) - { - if ((string)mastermap[str] != null) - if((string)pinvoketypes[(string)mastermap[str]] != null) - return (string)pinvoketypes[(string)mastermap[str]]; - else - return (string)mastermap[str]; - else if ((string)pinvoketypes[str] != null) - return (string)pinvoketypes[str]; - else - return str; - } - - public string PinvokeCallType (string str) - { - - if ((string)mastermap[str] != null) - if((string)pinvokecalltypes[(string)mastermap[str]] != null) - return (string)pinvokecalltypes[(string)mastermap[str]]; - else - return (string)mastermap[str]; - else if ((string)pinvokecalltypes[str] != null) - return (string)pinvokecalltypes[str]; - else - return str; - } - - public string CSharpType (string str) - { - if ((string)mastermap[str] != null) - if((string)csharptypes[(string)mastermap[str]] != null) - return (string)csharptypes[(string)mastermap[str]]; - else - return (string)mastermap[str]; - else if ((string)csharptypes[str] != null) - return (string)csharptypes[str]; - else - return str; - } - - public string OverloadType (string str) - { - if ((string)mastermap[str] != null) - if((string)overloadtypes[(string)mastermap[str]] != null) - return (string)overloadtypes[(string)mastermap[str]]; - else - return (string)mastermap[str]; - else if ((string)overloadtypes[str] != null) - return (string)overloadtypes[str]; - else - return str; - } - - public string ArrayType (string str) - { - if ((string)arraymap[str] != null) - return (string)arraymap[str]; - else - return str; - } - - public string ReservedType (string str) - { - if ((string)reserved[str] != null) - return (string)reserved[str]; - else - return str; - } - - public string ReturnType (string str) - { - if ((string)reserved[str] != null) - return (string)reserved[str]; - else - return str; - } - - public string InterfaceType (string str) - { - if ((string)interfaces[str] != null) - return (string)interfaces[str]; - else - return str; - } - } -} diff --git a/qtsharp/src/generator/TQAncestor.cs b/qtsharp/src/generator/TQAncestor.cs new file mode 100644 index 00000000..bb35051b --- /dev/null +++ b/qtsharp/src/generator/TQAncestor.cs @@ -0,0 +1,26 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; + +namespace QtCSharp { + + public class TQAncestor : TQType { + + } +} diff --git a/qtsharp/src/generator/TQCtor.cs b/qtsharp/src/generator/TQCtor.cs new file mode 100644 index 00000000..8a7ec439 --- /dev/null +++ b/qtsharp/src/generator/TQCtor.cs @@ -0,0 +1,47 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; +using System.Collections; + +namespace QtCSharp { + + public class TQCtor : TQMember{ + + bool dummy, parent, inherited; + + public bool Dummy + { + get {return dummy;} + set {dummy = value;} + } + + public bool Parent + { + get {return parent;} + set {parent = value;} + } + + public bool Inherited + { + get {return inherited;} + set {inherited = value;} + } + } +} diff --git a/qtsharp/src/generator/TQDCtor.cs b/qtsharp/src/generator/TQDCtor.cs new file mode 100644 index 00000000..de70a51e --- /dev/null +++ b/qtsharp/src/generator/TQDCtor.cs @@ -0,0 +1,57 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; +using System.Collections; + +namespace QtCSharp { + + public class TQDCtor { + + string name, access; + ArrayList qparams; + + public TQDCtor() + { + qparams = new ArrayList(); + } + + public void AddTQParam(TQParam qparam) + { + qparams.Add(qparam); + } + + public string Name + { + get {return name;} + set {name = value;} + } + + public string Access + { + get {return access;} + set {access = value;} + } + + public ArrayList TQParams + { + get {return qparams;} + } + } +} diff --git a/qtsharp/src/generator/TQEnum.cs b/qtsharp/src/generator/TQEnum.cs new file mode 100644 index 00000000..f2304b02 --- /dev/null +++ b/qtsharp/src/generator/TQEnum.cs @@ -0,0 +1,63 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; +using System.Collections; + +namespace QtCSharp { + + public class TQEnum { + + string name, access, type; + ArrayList qitems; + + public TQEnum() + { + qitems = new ArrayList(); + } + + public void AddTQItem(TQItem qitem) + { + qitems.Add(qitem); + } + + public string Name + { + get {return name;} + set {name = value;} + } + + public string Access + { + get {return access;} + set {access = value;} + } + + public string Type + { + get {return type;} + set {type = value;} + } + + public ArrayList TQItems + { + get {return qitems;} + } + } +} diff --git a/qtsharp/src/generator/TQItem.cs b/qtsharp/src/generator/TQItem.cs new file mode 100644 index 00000000..a678de4d --- /dev/null +++ b/qtsharp/src/generator/TQItem.cs @@ -0,0 +1,44 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; + +namespace QtCSharp { + + public class TQItem { + + string name, qvalue; + + public TQItem() + { + } + + public string Name + { + get {return name;} + set {name = value;} + } + + public string Value + { + get {return qvalue;} + set {qvalue = value;} + } + } +} diff --git a/qtsharp/src/generator/TQMember.cs b/qtsharp/src/generator/TQMember.cs new file mode 100644 index 00000000..6fb7b14b --- /dev/null +++ b/qtsharp/src/generator/TQMember.cs @@ -0,0 +1,116 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +using System.IO; +using System.Collections; + +namespace QtCSharp { + + public class TQMember { + + string name, access, id; + bool overload, throttle, boxer; + ArrayList pinvokeparams, pinvokecallparams, csharpparams, overloadparams; + + public TQMember() + { + pinvokeparams = new ArrayList(); + pinvokecallparams = new ArrayList(); + csharpparams = new ArrayList(); + overloadparams = new ArrayList(); + } + + + public void AddPinvokeParam(TQParam pinvokeparam) + { + pinvokeparams.Add(pinvokeparam); + } + + public void AddPinvokeCallParam(TQParam pinvokecallparam) + { + pinvokecallparams.Add(pinvokecallparam); + } + + public void AddCSharpParam(TQParam csharpparam) + { + csharpparams.Add(csharpparam); + } + + public void AddOverloadParam(TQParam overloadparam) + { + overloadparams.Add(overloadparam); + } + + public string Name + { + get {return name;} + set {name = value;} + } + + public string Access + { + get {return access;} + set {access = value;} + } + + public bool Overload + { + get {return overload;} + set {overload = value;} + } + + public string Id + { + get {return id;} + set {id = value;} + } + + public bool Throttle + { + get {return throttle;} + set {throttle = value;} + } + + public bool Boxer + { + get {return boxer;} + set {boxer = value;} + } + + public ArrayList PinvokeParams + { + get {return pinvokeparams;} + } + + public ArrayList PinvokeCallParams + { + get {return pinvokecallparams;} + } + + public ArrayList CSharpParams + { + get {return csharpparams;} + } + + public ArrayList OverloadParams + { + get {return overloadparams;} + } + } +} diff --git a/qtsharp/src/generator/TQMethod.cs b/qtsharp/src/generator/TQMethod.cs new file mode 100644 index 00000000..085935c4 --- /dev/null +++ b/qtsharp/src/generator/TQMethod.cs @@ -0,0 +1,54 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; +using System.Collections; + +namespace QtCSharp { + + public class TQMethod : TQMember { + + bool qstringreturn; + string returntype, pinvokereturn, pascalname; + + public string Return + { + get {return returntype;} + set {returntype = value;} + } + + public string PinvokeReturn + { + get {return pinvokereturn;} + set {pinvokereturn = value;} + } + + public bool TQStringReturn + { + get {return qstringreturn;} + set {qstringreturn = value;} + } + + public string PascalName + { + get {return pascalname;} + set {pascalname = value;} + } + } +} diff --git a/qtsharp/src/generator/TQParam.cs b/qtsharp/src/generator/TQParam.cs new file mode 100644 index 00000000..7cf27183 --- /dev/null +++ b/qtsharp/src/generator/TQParam.cs @@ -0,0 +1,54 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; + +namespace QtCSharp { + + public class TQParam: ICloneable { + + string type, name, defaultvalue; + + public TQParam() + {} + + public object Clone() + { + return MemberwiseClone(); + } + + public string Type + { + get {return type;} + set {type = value;} + } + + public string Name + { + get {return name;} + set {name = value;} + } + + public string Default + { + get {return defaultvalue;} + set {defaultvalue = value;} + } + } +} diff --git a/qtsharp/src/generator/TQType.cs b/qtsharp/src/generator/TQType.cs new file mode 100644 index 00000000..dd358025 --- /dev/null +++ b/qtsharp/src/generator/TQType.cs @@ -0,0 +1,126 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +//using System.IO; +using System.Collections; + +namespace QtCSharp { + + public class TQType { + + string name, access, iname; + bool isInterface, isConverted, isTQObject; + ArrayList qancestors, qenums, qctors, qdctors, qmethods; + + public TQType () + { + qancestors = new ArrayList (); + qenums = new ArrayList (); + qctors = new ArrayList (); + qdctors = new ArrayList (); + qmethods = new ArrayList (); + } + + public void AddTQAncestor (TQAncestor qancestor) + { + qancestors.Add (qancestor); + } + + public void AddTQEnum (TQEnum qenum) + { + qenums.Add (qenum); + } + + public void AddTQCtor (TQCtor qctor) + { + qctors.Add (qctor); + } + + public void AddTQDCtor (TQDCtor qdctor) + { + qdctors.Add (qdctor); + } + + public void AddTQMethod (TQMethod qmethod) + { + qmethods.Add (qmethod); + } + + public string Name + { + get {return name;} + set {name = value;} + } + + public string Access + { + get {return access;} + set {access = value;} + } + + public bool IsInterface + { + get {return isInterface;} + set {isInterface = value;} + } + + public bool IsConverted + { + get {return isConverted;} + set {isConverted = value;} + } + + public bool IsTQObject { + get { return isTQObject; } + set { isTQObject = value; } + } + + public string IName + { + get {return iname;} + set {iname = value;} + } + + public ArrayList TQAncestors + { + get {return qancestors;} + } + + public ArrayList TQEnums + { + get {return qenums;} + } + + public ArrayList TQCtors + { + get {return qctors;} + } + + public ArrayList TQDCtors + { + get {return qdctors;} + } + + public ArrayList TQMethods + { + get {return qmethods;} + set {qmethods = value;} + } + } +} diff --git a/qtsharp/src/generator/TQTypeMap.cs b/qtsharp/src/generator/TQTypeMap.cs new file mode 100644 index 00000000..1c277c48 --- /dev/null +++ b/qtsharp/src/generator/TQTypeMap.cs @@ -0,0 +1,477 @@ +// A Qt to C# binding generator. +// +// 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. + +using System; +using System.Collections; + +namespace QtCSharp { + + public class TQTypeMap { + + Hashtable arraymap, mastermap, pinvoketypes, pinvokecalltypes, csharptypes, overloadtypes, reserved, interfaces; + + public TQTypeMap () + { + arraymap = new Hashtable (); + arraymap.Add ("void*", "int[]"); + arraymap.Add ("void *", "int[]"); + arraymap.Add ("int*", "int[]"); + arraymap.Add ("int *", "int[]"); + arraymap.Add ("double*", "double[]"); + arraymap.Add ("double *", "double[]"); + arraymap.Add ("short*", "short[]"); + arraymap.Add ("short *", "short[]"); + arraymap.Add ("char**", "string[]"); + arraymap.Add ("char **", "string[]"); + arraymap.Add ("char*", "string"); + arraymap.Add ("uchar**", "string[]"); + arraymap.Add ("uchar **", "string[]"); + + mastermap = new Hashtable (); + mastermap.Add ("void", "void"); + // mastermap.Add ("TQByteArray", "byte[]"); + mastermap.Add ("TQBitArray", "byte[]"); + mastermap.Add ("uchar", "string"); + mastermap.Add ("unsigned int", "uint"); + mastermap.Add ("unsigned short", "ushort"); + mastermap.Add ("unsigned long", "ulong"); + mastermap.Add ("unsigned char", "string"); + mastermap.Add ("HANDLE", "uint"); + mastermap.Add ("HBITMAP", "uint"); + mastermap.Add ("HCURSOR", "uint"); + mastermap.Add ("HDC", "uint"); + mastermap.Add ("HFONT", "uint"); + mastermap.Add ("HPALETTE", "uint"); + mastermap.Add ("HRGN", "uint"); + mastermap.Add ("Display", "IntPtr"); + mastermap.Add ("Q_REFCOUNT bool", "bool"); + mastermap.Add ("EventRef", "IntPtr"); + mastermap.Add ("MSG", "IntPtr"); + mastermap.Add ("XEvent", "IntPtr"); + mastermap.Add ("TQWSEvent", "IntPtr"); + mastermap.Add ("GDHandle", "IntPtr"); + mastermap.Add ("TQRgb", "int"); + mastermap.Add ("TQWSDecoration", "IntPtr"); + mastermap.Add ("TQTextParag", "IntPtr"); + mastermap.Add ("Qt.HANDLE", "IntPtr"); + mastermap.Add ("TQUObject", "IntPtr"); + mastermap.Add ("TQGfx", "IntPtr"); + mastermap.Add ("TQRESULT", "long"); + mastermap.Add ("TQUnknownInterface", "IntPtr"); + mastermap.Add ("TQPtrCollection.Item", "int"); + mastermap.Add ("type", "IntPtr"); + mastermap.Add ("array_data", "IntPtr"); + mastermap.Add ("bitarr_data", "IntPtr"); + mastermap.Add ("Offset", "int"); + mastermap.Add ("Q_INT16", "short"); + mastermap.Add ("Q_INT32", "int"); + mastermap.Add ("Q_INT8", "char"); + mastermap.Add ("Q_LONG", "long"); + mastermap.Add ("Q_PACKED", "uint"); + mastermap.Add ("Q_UINT16", "ushort"); + mastermap.Add ("Q_UINT32", "uint"); + mastermap.Add ("Q_UINT8", "char"); + mastermap.Add ("Q_ULONG", "long"); + mastermap.Add ("TQStyleHintReturn", "IntPtr"); + mastermap.Add ("TQFileInfoList", "IntPtr"); + mastermap.Add ("TQDomNodePrivate", "IntPtr"); + mastermap.Add ("GUID", "System.Guid"); + mastermap.Add ("FILE", "string"); + mastermap.Add ("EncoderFn", "int"); + mastermap.Add ("DecoderFn", "int"); + mastermap.Add ("TQDiskFont", "IntPtr"); + mastermap.Add ("pointer", "IntPtr"); + mastermap.Add ("T", "IntPtr"); + mastermap.Add ("T1", "IntPtr"); + mastermap.Add ("T2", "IntPtr"); + mastermap.Add ("Iterator", "IntPtr"); + mastermap.Add ("iterator", "IntPtr"); + mastermap.Add ("_iterator", "IntPtr"); + mastermap.Add ("reference", "IntPtr"); + mastermap.Add ("_reference", "IntPtr"); + mastermap.Add ("ConstIterator", "int"); + mastermap.Add ("TQWSDisplay", "IntPtr"); + mastermap.Add ("CGContextRef", "IntPtr"); + mastermap.Add ("WId", "uint"); + mastermap.Add ("TQWidgetMapper", "IntPtr"); + mastermap.Add ("size_type", "int"); + mastermap.Add ("Item", "IntPtr"); + mastermap.Add ("image_io_handler", "int"); + mastermap.Add ("TQCOORD", "short"); + mastermap.Add ("key_type", "IntPtr"); + mastermap.Add ("K", "IntPtr"); + mastermap.Add ("NodePtr", "int"); + mastermap.Add ("TQTextFormat", "IntPtr"); + mastermap.Add ("TQTextDocument", "IntPtr"); + mastermap.Add ("TQTextCursor", "IntPtr"); + mastermap.Add ("_NPStream", "IntPtr"); + mastermap.Add ("PID", "long"); + mastermap.Add ("Region", "int"); + mastermap.Add ("RgnHandle", "IntPtr"); + mastermap.Add ("TQRemoteInterface", "IntPtr"); + mastermap.Add ("mode_t", "int"); + mastermap.Add ("TQSqlFieldInfo", "IntPtr"); + mastermap.Add ("TQSqlRecordInfo", "IntPtr"); + mastermap.Add ("TQSqlRecordPrivate", "IntPtr"); + mastermap.Add ("TQTSMFI", "int"); + mastermap.Add ("Widget", "TQWidget"); + mastermap.Add ("WidgetClass", "int"); + mastermap.Add ("ArgList", "int"); + mastermap.Add ("Cardinal", "int"); + mastermap.Add ("XrmOptionDescRec", "IntPtr"); + mastermap.Add ("size_t", "int"); + mastermap.Add ("ULONG_MAX", "UInt64.MaxValue"); + + // Enums + mastermap.Add ("Event", "TQAccessible.Event"); + mastermap.Add ("Role", "TQAccessible.Role"); + mastermap.Add ("NavDirection", "TQAccessible.NavDirection"); + mastermap.Add ("Text", "TQAccessible.Text"); + mastermap.Add ("ColorSpec", "TQApplication.ColorSpec"); + mastermap.Add ("ToggleState", "TQButton.ToggleState"); + mastermap.Add ("RttiValues", "TQCanvasItem.RttiValues"); + mastermap.Add ("FrameAnimationType", "TQCanvasSprite.FrameAnimationType"); + mastermap.Add ("Category", "TQChar.Category"); + mastermap.Add ("Decomposition", "TQChar.Decomposition"); + mastermap.Add ("Joining", "TQChar.Joining"); + mastermap.Add ("CombiningClass", "TQChar.CombiningClass"); + mastermap.Add ("Spec", "TQColor.Spec"); + mastermap.Add ("ColorRole", "TQColorGroup.ColorRole"); + mastermap.Add ("Boundary", "TQDataBrowser.Boundary"); + mastermap.Add ("ByteOrder", "TQDataStream.ByteOrder"); + mastermap.Add ("Refresh", "TQDataTable.Refresh"); + mastermap.Add ("Order", "TQDateEdit.Order"); + mastermap.Add ("DialogCode", "TQDialog.DialogCode"); + mastermap.Add ("FilterSpec", "TQDir.FilterSpec"); + mastermap.Add ("SortSpec", "TQDir.SortSpec"); + mastermap.Add ("RecordType", "TQDns.RecordType"); + mastermap.Add ("HandlePosition", "TQDockArea.HandlePosition"); + mastermap.Add ("Place", "TQDockWindow.Place"); + mastermap.Add ("CloseMode", "TQDockWindow.CloseMode"); + mastermap.Add ("NodeType", "TQDomNode.NodeType"); + mastermap.Add ("DragMode", "TQDragObject.DragMode"); + mastermap.Add ("Action", "TQDropEvent.Action"); + mastermap.Add ("ViewMode", "TQFileDialog.ViewMode"); + mastermap.Add ("PreviewMode", "TQFileDialog.PreviewMode"); + mastermap.Add ("PermissionSpec", "TQFileInfo.PermissionSpec"); + mastermap.Add ("StyleStrategy", "TQFont.StyleStrategy"); + mastermap.Add ("Weight", "TQFont.Weight"); + mastermap.Add ("Script", "TQFont.Script"); + mastermap.Add ("Shadow", "TQFrame.Shadow"); + mastermap.Add ("FormatOption", "TQGL.FormatOption"); + mastermap.Add ("Corner", "TQGridLayout.Corner"); + mastermap.Add ("Size", "TQIconSet.Size"); + mastermap.Add ("Arrangement", "TQIconView.Arrangement"); + mastermap.Add ("ItemTextPos", "TQIconView.ItemTextPos"); + mastermap.Add ("Endian", "TQImage.Endian"); + mastermap.Add ("ScaleMode", "TQImage.ScaleMode"); + mastermap.Add ("PaintDeviceFlags", "TQInternal.PaintDeviceFlags"); + mastermap.Add ("Rules", "TQJpUnicodeConv.Rules"); + mastermap.Add ("SegmentStyle", "TQLCDNumber.SegmentStyle"); + mastermap.Add ("LayoutMode", "TQListBox.LayoutMode"); + mastermap.Add ("WidthMode", "TQListView.WidthMode"); + mastermap.Add ("RenameAction", "TQListView.RenameAction"); + mastermap.Add ("DockWindows", "TQMainWindow.DockWindows"); + mastermap.Add ("Color", "TQMapNodeBase.Color"); + mastermap.Add ("Separator", "TQMenuBar.Separator"); + mastermap.Add ("Icon", "TQMessageBox.Icon"); + mastermap.Add ("Access", "TQMetaData.Access"); + mastermap.Add ("Flags", "TQMetaProperty.Flags"); + mastermap.Add ("Status", "TQMovie.Status"); + mastermap.Add ("InstanceMode", "TQNPInstance.InstanceMode"); + mastermap.Add ("StreamMode", "TQNPInstance.StreamMode"); + mastermap.Add ("Operation", "TQNetworkProtocol.Operation"); + mastermap.Add ("ConnectionState", "TQNetworkProtocol.ConnectionState"); + mastermap.Add ("DisposalMethod", "TQPNGImageWriter.DisposalMethod"); + mastermap.Add ("PDevCmd", "TQPaintDevice.PDevCmd"); + mastermap.Add ("CoordinateMode", "TQPainter.CoordinateMode"); + mastermap.Add ("TextDirection", "TQPainter.TextDirection"); + mastermap.Add ("ColorGroup", "TQPalette.ColorGroup"); + mastermap.Add ("Optimization", "TQPixmap.Optimization"); + mastermap.Add ("Edge", "TQPolygonScanner.Edge"); + mastermap.Add ("PrinterMode", "TQPrinter.PrinterMode"); + mastermap.Add ("PageSize", "TQPrinter.PageSize"); + mastermap.Add ("PageOrder", "TQPrinter.PageOrder"); + mastermap.Add ("PaperSource", "TQPrinter.PaperSource"); + mastermap.Add ("Communication", "TQProcess.Communication"); + mastermap.Add ("RegionType", "TQRegion.RegionType"); + mastermap.Add ("ResizePolicy", "TQScrollView.ResizePolicy"); + mastermap.Add ("ScrollBarMode", "TQScrollView.ScrollBarMode"); + mastermap.Add ("RestartHint", "TQSessionManager.RestartHint"); + mastermap.Add ("System", "TQSettings.System"); + mastermap.Add ("SizeType", "TQSizePolicy.SizeType"); + mastermap.Add ("ExpandData", "TQSizePolicy.ExpandData"); + mastermap.Add ("TickSetting", "TQSlider.TickSetting"); + mastermap.Add ("Op", "TQSql.Op"); + mastermap.Add ("Location", "TQSql.Location"); + mastermap.Add ("Confirm", "TQSql.Confirm"); + mastermap.Add ("DriverFeature", "TQSqlDriver.DriverFeature"); + mastermap.Add ("SectionFlags", "TQString.SectionFlags"); + mastermap.Add ("PrimitiveElement", "TQStyle.PrimitiveElement"); + mastermap.Add ("StyleFlags", "TQStyle.StyleFlags"); + mastermap.Add ("SFlags", "TQStyle.StyleFlags"); + mastermap.Add ("ControlElement", "TQStyle.ControlElement"); + mastermap.Add ("SubRect", "TQStyle.SubRect"); + mastermap.Add ("ComplexControl", "TQStyle.ComplexControl"); + mastermap.Add ("SubControl", "TQStyle.SubControl"); + mastermap.Add ("SCFlags", "TQStyle.SubControl"); + mastermap.Add ("PixelMetric", "TQStyle.PixelMetric"); + mastermap.Add ("ContentsType", "TQStyle.ContentsType"); + mastermap.Add ("StylePixmap", "TQStyle.StylePixmap"); + mastermap.Add ("StyleOptionDefault", "TQStyleOption.StyleOptionDefault"); + mastermap.Add ("AdditionalStyleValues", "TQStyleSheetItem.AdditionalStyleValues"); + mastermap.Add ("DisplayMode", "TQStyleSheetItem.DisplayMode"); + mastermap.Add ("WhiteSpaceMode", "TQStyleSheetItem.WhiteSpaceMode"); + mastermap.Add ("Margin", "TQStyleSheetItem.Margin"); + mastermap.Add ("ListStyle", "TQStyleSheetItem.ListStyle"); + mastermap.Add ("FocusStyle", "TQTable.FocusStyle"); + mastermap.Add ("EditMode", "TQTable.EditMode"); + mastermap.Add ("EditType", "TQTableItem.EditType"); + mastermap.Add ("TabletDevice", "TQTabletEvent.TabletDevice"); + mastermap.Add ("KeyboardAction", "TQTextEdit.KeyboardAction"); + mastermap.Add ("CursorAction", "TQTextEdit.CursorAction"); + mastermap.Add ("SaveMode", "TQTranslator.SaveMode"); + mastermap.Add ("Prefix", "TQTranslatorMessage.Prefix"); + mastermap.Add ("FocusPolicy", "TQWidget.FocusPolicy"); + mastermap.Add ("BackgroundOrigin", "TQWidget.BackgroundOrigin"); + mastermap.Add ("ButtonState", "Qt.ButtonState"); + mastermap.Add ("AlignmentFlags", "Qt.AlignmentFlags"); + mastermap.Add ("TextFlags", "Qt.TextFlags"); + mastermap.Add ("WidgetState", "Qt.WidgetState"); + mastermap.Add ("WState", "Qt.WidgetState"); + mastermap.Add ("WidgetFlags", "Qt.WidgetFlags"); + mastermap.Add ("WFlags", "Qt.WidgetFlags"); + mastermap.Add ("ImageConversionFlags", "Qt.ImageConversionFlags"); + mastermap.Add ("BGMode", "Qt.BGMode"); + mastermap.Add ("PaintUnit", "Qt.PaintUnit"); + mastermap.Add ("GUIStyle", "Qt.GUIStyle"); + mastermap.Add ("Modifier", "Qt.Modifier"); + mastermap.Add ("Key", "Qt.Key"); + mastermap.Add ("ArrowType", "Qt.ArrowType"); + mastermap.Add ("RasterOp", "Qt.RasterOp"); + mastermap.Add ("PenStyle", "Qt.PenStyle"); + mastermap.Add ("PenCapStyle", "Qt.PenCapStyle"); + mastermap.Add ("PenJoinStyle", "Qt.PenJoinStyle"); + mastermap.Add ("BrushStyle", "Qt.BrushStyle"); + mastermap.Add ("WindowsVersion", "Qt.WindowsVersion"); + mastermap.Add ("UIEffect", "Qt.UIEffect"); + mastermap.Add ("CursorShape", "Qt.CursorShape"); + mastermap.Add ("TextFormat", "Qt.TextFormat"); + mastermap.Add ("Dock", "Qt.Dock"); + mastermap.Add ("DateFormat", "Qt.DateFormat"); + mastermap.Add ("BackgroundMode", "Qt.BackgroundMode"); + mastermap.Add ("StringComparisonMode", "Qt.StringComparisonMode"); + mastermap.Add ("ComparisonFlags", "Qt.StringComparisonMode"); + + // We need to make sure all params use the interfaces, ie ITQPaintDevice + /*mastermap.Add ("TQAccessibleFactoryInterface", "ITQAccessibleFactory"); + mastermap.Add ("TQAccessibleInterface", "ITQAccessible");*/ + mastermap.Add ("TQPaintDevice", "ITQPaintDevice"); + /*mastermap.Add ("TQMenuData", "ITQMenuData"); + mastermap.Add ("TQRangeControl", "ITQRangeControl"); + mastermap.Add ("TQMimeSource", "ITQMimeSource"); + mastermap.Add ("TQLayoutItem", "ITQLayoutItem"); + mastermap.Add ("TQUrl", "ITQUrl"); + mastermap.Add ("TQIODevice", "ITQIODevice"); + mastermap.Add ("TQXmlContentHandler", "ITQXmlContentHandler"); + mastermap.Add ("TQXmlErrorHandler", "ITQXmlErrorHandler"); + mastermap.Add ("TQXmlDTDHandler", "ITQXmlDTDHandler"); + mastermap.Add ("TQXmlEntityResolver", "ITQXmlEntityResolver"); + //mastermap.Add ("TQXmlLexicalHandler", "ITQXmlLexicalHandler"); + mastermap.Add ("TQXmlDeclHandler", "ITQXmlDeclHandler"); + mastermap.Add ("QwAbsSpriteFieldView", "IQwAbsSpriteFieldView"); + mastermap.Add ("TQSqlQuery", "ITQSqlQuery"); + mastermap.Add ("TQFeatureListInterface", "ITQFeatureList"); + mastermap.Add ("TQUnknownInterface", "ITQUnknown"); + mastermap.Add ("TQShared", "ITQShared");*/ + + // Key Duplication + //mastermap.Add ("Direction", "TQBoxLayout.Direction"); + //mastermap.Add ("Direction", "TQChar.Direction"); + //mastermap.Add ("Reason", "TQContextMenuEvent.Reason"); + //mastermap.Add ("Reason", "TQFocusEvent.Reason"); + //mastermap.Add ("Reason", "TQNPInstance.Reason"); + //mastermap.Add ("Mode", "TQFileDialog.Mode"); + //mastermap.Add ("Mode", "TQIconSet.Mode"); + //mastermap.Add ("Mode", "TQLCDNumber.Mode"); + //mastermap.Add ("Mode", "TQSqlCursor.Mode"); + //mastermap.Add ("Shape", "TQFrame.Shape"); + //mastermap.Add ("Shape", "TQTabBar.Shape"); + //mastermap.Add ("KeyType", "TQGCache.KeyType"); + //mastermap.Add ("KeyType", "TQGDict.KeyType"); + //mastermap.Add ("State", "TQAccessible.State"); + //mastermap.Add ("State", "TQNetworkProtocol.State"); + //mastermap.Add ("State", "TQSocket.State"); + //mastermap.Add ("State", "TQValidator.State"); + //mastermap.Add ("ResizeMode", "TQIconView.ResizeMode"); + //mastermap.Add ("ResizeMode", "TQLayout.ResizeMode"); + //mastermap.Add ("ResizeMode", "TQListView.ResizeMode"); + //mastermap.Add ("ResizeMode", "TQListView.ResizeMode"); + //mastermap.Add ("EchoMode", "TQLineEdit.EchoMode"); + //mastermap.Add ("EchoMode", "QtMultiLineEdit.EchoMode"); + //mastermap.Add ("ColorMode", "TQApplication.ColorMode"); + //mastermap.Add ("ColorMode", "TQPrinter.ColorMode"); + //mastermap.Add ("ColorMode", "TQPixmap.ColorMode"); + //mastermap.Add ("SelectionMode", "TQIconView.SelectionMode"); + //mastermap.Add ("SelectionMode", "TQListBox.SelectionMode"); + //mastermap.Add ("SelectionMode", "TQListView.SelectionMode"); + //mastermap.Add ("SelectionMode", "TQTable.SelectionMode"); + //mastermap.Add ("Error", "TQSocket.Error"); + //mastermap.Add ("Error", "TQSocketDevice.Error"); + //mastermap.Add ("Error", "TQNetworkProtocol.Error"); + //mastermap.Add ("ButtonSymbols", "TQSpinBox.ButtonSymbols"); + //mastermap.Add ("ButtonSymbols", "TQSpinWidget.ButtonSymbols"); + //mastermap.Add ("StyleHint", "TQStyle.StyleHint"); + //mastermap.Add ("StyleHint", "TQFont.StyleHint"); + //mastermap.Add ("Encoding", "TQApplication.Encoding"); + //mastermap.Add ("Encoding", "TQTextStream.Encoding"); + //mastermap.Add ("VerticalAlignment", "TQTextEdit.VerticalAlignment"); + //mastermap.Add ("VerticalAlignment", "TQStyleSheetItem.VerticalAlignment"); + //mastermap.Add ("Orientation", "TQPrinter.Orientation"); + //mastermap.Add ("Orientation", "Qt.Orientation"); + //mastermap.Add ("WrapPolicy", "TQTextEdit.WrapPolicy"); + //mastermap.Add ("WrapPolicy", "QtMultiLineEdit.WrapPolicy"); + //mastermap.Add ("WordWrap", "TQTextEdit.WordWrap"); + //mastermap.Add ("WordWrap", "QtMultiLineEdit.WordWrap"); + + // These are here in case we need to override the mastermap + pinvoketypes = new Hashtable (); + pinvokecalltypes = new Hashtable (); + csharptypes = new Hashtable (); + overloadtypes = new Hashtable (); + + // These are reserved keywords. + reserved = new Hashtable (); + reserved.Add ("lock", "Q_lock"); + reserved.Add ("object", "Q_object"); + reserved.Add ("ref", "Q_ref"); + reserved.Add ("base", "Q_base"); + reserved.Add ("string", "Q_string"); + reserved.Add ("const", "Q_const"); + reserved.Add ("event", "Q_event"); + + // The allowed interfaces + interfaces = new Hashtable (); + interfaces.Add ("TQAccessibleFactoryInterface", "ITQAccessibleFactory"); + interfaces.Add ("TQAccessibleInterface", "ITQAccessible"); + interfaces.Add ("TQPaintDevice", "ITQPaintDevice"); + interfaces.Add ("TQMenuData", "ITQMenuData"); + interfaces.Add ("TQRangeControl", "ITQRangeControl"); + interfaces.Add ("TQMimeSource", "ITQMimeSource"); + interfaces.Add ("TQLayoutItem", "ITQLayoutItem"); + interfaces.Add ("TQUrl", "ITQUrl"); + interfaces.Add ("TQIODevice", "ITQIODevice"); + interfaces.Add ("TQXmlContentHandler", "ITQXmlContentHandler"); + interfaces.Add ("TQXmlErrorHandler", "ITQXmlErrorHandler"); + interfaces.Add ("TQXmlDTDHandler", "ITQXmlDTDHandler"); + interfaces.Add ("TQXmlEntityResolver", "ITQXmlEntityResolver"); + //interfaces.Add ("TQXmlLexicalHandler", "ITQXmlLexicalHandler"); + interfaces.Add ("TQXmlDeclHandler", "ITQXmlDeclHandler"); + interfaces.Add ("QwAbsSpriteFieldView", "IQwAbsSpriteFieldView"); + interfaces.Add ("TQSqlQuery", "ITQSqlQuery"); + interfaces.Add ("TQFeatureListInterface", "ITQFeatureList"); + interfaces.Add ("TQUnknownInterface", "ITQUnknown"); + interfaces.Add ("TQShared", "ITQShared"); + } + + public string PinvokeType (string str) + { + if ((string)mastermap[str] != null) + if((string)pinvoketypes[(string)mastermap[str]] != null) + return (string)pinvoketypes[(string)mastermap[str]]; + else + return (string)mastermap[str]; + else if ((string)pinvoketypes[str] != null) + return (string)pinvoketypes[str]; + else + return str; + } + + public string PinvokeCallType (string str) + { + + if ((string)mastermap[str] != null) + if((string)pinvokecalltypes[(string)mastermap[str]] != null) + return (string)pinvokecalltypes[(string)mastermap[str]]; + else + return (string)mastermap[str]; + else if ((string)pinvokecalltypes[str] != null) + return (string)pinvokecalltypes[str]; + else + return str; + } + + public string CSharpType (string str) + { + if ((string)mastermap[str] != null) + if((string)csharptypes[(string)mastermap[str]] != null) + return (string)csharptypes[(string)mastermap[str]]; + else + return (string)mastermap[str]; + else if ((string)csharptypes[str] != null) + return (string)csharptypes[str]; + else + return str; + } + + public string OverloadType (string str) + { + if ((string)mastermap[str] != null) + if((string)overloadtypes[(string)mastermap[str]] != null) + return (string)overloadtypes[(string)mastermap[str]]; + else + return (string)mastermap[str]; + else if ((string)overloadtypes[str] != null) + return (string)overloadtypes[str]; + else + return str; + } + + public string ArrayType (string str) + { + if ((string)arraymap[str] != null) + return (string)arraymap[str]; + else + return str; + } + + public string ReservedType (string str) + { + if ((string)reserved[str] != null) + return (string)reserved[str]; + else + return str; + } + + public string ReturnType (string str) + { + if ((string)reserved[str] != null) + return (string)reserved[str]; + else + return str; + } + + public string InterfaceType (string str) + { + if ((string)interfaces[str] != null) + return (string)interfaces[str]; + else + return str; + } + } +} -- cgit v1.2.1