//Auto-generated by kalyptus. DO NOT EDIT.
namespace Qyoto {
    using System;
    using System.Runtime.InteropServices;
    [SmokeClass("QFontMetrics")]
    public class QFontMetrics : Object, IDisposable {
        protected SmokeInvocation interceptor = null;
        private IntPtr smokeObject;
        protected QFontMetrics(Type dummy) {}
        protected void CreateProxy() {
            interceptor = new SmokeInvocation(typeof(QFontMetrics), this);
        }
        private static SmokeInvocation staticInterceptor = null;
        static QFontMetrics() {
            staticInterceptor = new SmokeInvocation(typeof(QFontMetrics), null);
        }
        public QFontMetrics(QFont arg1) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QFontMetrics#", "QFontMetrics(const QFont&)", typeof(void), typeof(QFont), arg1);
        }
        public QFontMetrics(QFont arg1, IQPaintDevice pd) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QFontMetrics##", "QFontMetrics(const QFont&, QPaintDevice*)", typeof(void), typeof(QFont), arg1, typeof(IQPaintDevice), pd);
        }
        public QFontMetrics(QFontMetrics arg1) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QFontMetrics#", "QFontMetrics(const QFontMetrics&)", typeof(void), typeof(QFontMetrics), arg1);
        }
        public int Ascent() {
            return (int) interceptor.Invoke("ascent", "ascent() const", typeof(int));
        }
        public int Descent() {
            return (int) interceptor.Invoke("descent", "descent() const", typeof(int));
        }
        public int Height() {
            return (int) interceptor.Invoke("height", "height() const", typeof(int));
        }
        public int Leading() {
            return (int) interceptor.Invoke("leading", "leading() const", typeof(int));
        }
        public int LineSpacing() {
            return (int) interceptor.Invoke("lineSpacing", "lineSpacing() const", typeof(int));
        }
        public int MinLeftBearing() {
            return (int) interceptor.Invoke("minLeftBearing", "minLeftBearing() const", typeof(int));
        }
        public int MinRightBearing() {
            return (int) interceptor.Invoke("minRightBearing", "minRightBearing() const", typeof(int));
        }
        public int MaxWidth() {
            return (int) interceptor.Invoke("maxWidth", "maxWidth() const", typeof(int));
        }
        public int XHeight() {
            return (int) interceptor.Invoke("xHeight", "xHeight() const", typeof(int));
        }
        public int AverageCharWidth() {
            return (int) interceptor.Invoke("averageCharWidth", "averageCharWidth() const", typeof(int));
        }
        public bool InFont(QChar arg1) {
            return (bool) interceptor.Invoke("inFont#", "inFont(QChar) const", typeof(bool), typeof(QChar), arg1);
        }
        public int LeftBearing(QChar arg1) {
            return (int) interceptor.Invoke("leftBearing#", "leftBearing(QChar) const", typeof(int), typeof(QChar), arg1);
        }
        public int RightBearing(QChar arg1) {
            return (int) interceptor.Invoke("rightBearing#", "rightBearing(QChar) const", typeof(int), typeof(QChar), arg1);
        }
        public int Width(string arg1, int len) {
            return (int) interceptor.Invoke("width$$", "width(const QString&, int) const", typeof(int), typeof(string), arg1, typeof(int), len);
        }
        public int Width(string arg1) {
            return (int) interceptor.Invoke("width$", "width(const QString&) const", typeof(int), typeof(string), arg1);
        }
        public int Width(QChar arg1) {
            return (int) interceptor.Invoke("width#", "width(QChar) const", typeof(int), typeof(QChar), arg1);
        }
        public int CharWidth(string str, int pos) {
            return (int) interceptor.Invoke("charWidth$$", "charWidth(const QString&, int) const", typeof(int), typeof(string), str, typeof(int), pos);
        }
        public QRect BoundingRect(QChar arg1) {
            return (QRect) interceptor.Invoke("boundingRect#", "boundingRect(QChar) const", typeof(QRect), typeof(QChar), arg1);
        }
        public QRect BoundingRect(string text) {
            return (QRect) interceptor.Invoke("boundingRect$", "boundingRect(const QString&) const", typeof(QRect), typeof(string), text);
        }
        public QRect BoundingRect(QRect r, int flags, string text, int tabstops, ref int tabarray) {
            StackItem[] stack = new StackItem[6];
#if DEBUG
            stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(r);
#else
            stack[1].s_class = (IntPtr) GCHandle.Alloc(r);
#endif
            stack[2].s_int = flags;
#if DEBUG
            stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(text);
#else
            stack[3].s_class = (IntPtr) GCHandle.Alloc(text);
#endif
            stack[4].s_int = tabstops;
            stack[5].s_int = tabarray;
            interceptor.Invoke("boundingRect#$$$$", "boundingRect(const QRect&, int, const QString&, int, int*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[1].s_class);
#else
            ((GCHandle) stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[3].s_class);
#else
            ((GCHandle) stack[3].s_class).SynchronizedFree();
#endif
            tabarray = stack[5].s_int;
            object returnValue = ((GCHandle) stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[0].s_class);
#else
            ((GCHandle) stack[0].s_class).SynchronizedFree();
#endif
            return (QRect) returnValue;
        }
        public QRect BoundingRect(QRect r, int flags, string text, int tabstops) {
            return (QRect) interceptor.Invoke("boundingRect#$$$", "boundingRect(const QRect&, int, const QString&, int) const", typeof(QRect), typeof(QRect), r, typeof(int), flags, typeof(string), text, typeof(int), tabstops);
        }
        public QRect BoundingRect(QRect r, int flags, string text) {
            return (QRect) interceptor.Invoke("boundingRect#$$", "boundingRect(const QRect&, int, const QString&) const", typeof(QRect), typeof(QRect), r, typeof(int), flags, typeof(string), text);
        }
        public QRect BoundingRect(int x, int y, int w, int h, int flags, string text, int tabstops, ref int tabarray) {
            StackItem[] stack = new StackItem[9];
            stack[1].s_int = x;
            stack[2].s_int = y;
            stack[3].s_int = w;
            stack[4].s_int = h;
            stack[5].s_int = flags;
#if DEBUG
            stack[6].s_class = (IntPtr) DebugGCHandle.Alloc(text);
#else
            stack[6].s_class = (IntPtr) GCHandle.Alloc(text);
#endif
            stack[7].s_int = tabstops;
            stack[8].s_int = tabarray;
            interceptor.Invoke("boundingRect$$$$$$$$", "boundingRect(int, int, int, int, int, const QString&, int, int*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[6].s_class);
#else
            ((GCHandle) stack[6].s_class).SynchronizedFree();
#endif
            tabarray = stack[8].s_int;
            object returnValue = ((GCHandle) stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[0].s_class);
#else
            ((GCHandle) stack[0].s_class).SynchronizedFree();
#endif
            return (QRect) returnValue;
        }
        public QRect BoundingRect(int x, int y, int w, int h, int flags, string text, int tabstops) {
            return (QRect) interceptor.Invoke("boundingRect$$$$$$$", "boundingRect(int, int, int, int, int, const QString&, int) const", typeof(QRect), typeof(int), x, typeof(int), y, typeof(int), w, typeof(int), h, typeof(int), flags, typeof(string), text, typeof(int), tabstops);
        }
        public QRect BoundingRect(int x, int y, int w, int h, int flags, string text) {
            return (QRect) interceptor.Invoke("boundingRect$$$$$$", "boundingRect(int, int, int, int, int, const QString&) const", typeof(QRect), typeof(int), x, typeof(int), y, typeof(int), w, typeof(int), h, typeof(int), flags, typeof(string), text);
        }
        public QSize Size(int flags, string str, int tabstops, ref int tabarray) {
            StackItem[] stack = new StackItem[5];
            stack[1].s_int = flags;
#if DEBUG
            stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(str);
#else
            stack[2].s_class = (IntPtr) GCHandle.Alloc(str);
#endif
            stack[3].s_int = tabstops;
            stack[4].s_int = tabarray;
            interceptor.Invoke("size$$$$", "size(int, const QString&, int, int*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[2].s_class);
#else
            ((GCHandle) stack[2].s_class).SynchronizedFree();
#endif
            tabarray = stack[4].s_int;
            object returnValue = ((GCHandle) stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle) stack[0].s_class);
#else
            ((GCHandle) stack[0].s_class).SynchronizedFree();
#endif
            return (QSize) returnValue;
        }
        public QSize Size(int flags, string str, int tabstops) {
            return (QSize) interceptor.Invoke("size$$$", "size(int, const QString&, int) const", typeof(QSize), typeof(int), flags, typeof(string), str, typeof(int), tabstops);
        }
        public QSize Size(int flags, string str) {
            return (QSize) interceptor.Invoke("size$$", "size(int, const QString&) const", typeof(QSize), typeof(int), flags, typeof(string), str);
        }
        public QRect TightBoundingRect(string text) {
            return (QRect) interceptor.Invoke("tightBoundingRect$", "tightBoundingRect(const QString&) const", typeof(QRect), typeof(string), text);
        }
        public string ElidedText(string text, Qt.TextElideMode mode, int width, int flags) {
            return (string) interceptor.Invoke("elidedText$$$$", "elidedText(const QString&, Qt::TextElideMode, int, int) const", typeof(string), typeof(string), text, typeof(Qt.TextElideMode), mode, typeof(int), width, typeof(int), flags);
        }
        public string ElidedText(string text, Qt.TextElideMode mode, int width) {
            return (string) interceptor.Invoke("elidedText$$$", "elidedText(const QString&, Qt::TextElideMode, int) const", typeof(string), typeof(string), text, typeof(Qt.TextElideMode), mode, typeof(int), width);
        }
        public int UnderlinePos() {
            return (int) interceptor.Invoke("underlinePos", "underlinePos() const", typeof(int));
        }
        public int OverlinePos() {
            return (int) interceptor.Invoke("overlinePos", "overlinePos() const", typeof(int));
        }
        public int StrikeOutPos() {
            return (int) interceptor.Invoke("strikeOutPos", "strikeOutPos() const", typeof(int));
        }
        public int LineWidth() {
            return (int) interceptor.Invoke("lineWidth", "lineWidth() const", typeof(int));
        }
        public override bool Equals(object o) {
            if (!(o is QFontMetrics)) { return false; }
            return this == (QFontMetrics) o;
        }
        public override int GetHashCode() {
            return interceptor.GetHashCode();
        }
        ~QFontMetrics() {
            interceptor.Invoke("~QFontMetrics", "~QFontMetrics()", typeof(void));
        }
        public void Dispose() {
            interceptor.Invoke("~QFontMetrics", "~QFontMetrics()", typeof(void));
        }
        public static bool operator==(QFontMetrics lhs, QFontMetrics other) {
            return (bool) staticInterceptor.Invoke("operator==#", "operator==(const QFontMetrics&)", typeof(bool), typeof(QFontMetrics), lhs, typeof(QFontMetrics), other);
        }
        public static bool operator!=(QFontMetrics lhs, QFontMetrics other) {
            return !(bool) staticInterceptor.Invoke("operator==#", "operator==(const QFontMetrics&)", typeof(bool), typeof(QFontMetrics), lhs, typeof(QFontMetrics), other);
        }
    }
}
