/***************************************************************************
                            qt_QFontMetrics.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QFontMetrics.h"
}

#include <qfontmetrics.h>

class QFontMetricsBridge : public QFontMetrics
{
public:
	QFontMetricsBridge(const QFont& arg1) : QFontMetrics(arg1) {}
	QFontMetricsBridge(const QFontMetrics& arg1) : QFontMetrics(arg1) {}
	~QFontMetricsBridge() {}
};

qt_QFontMetrics * qt_new_QFontMetrics(qt_QFont * arg1){
	return (qt_QFontMetrics *) new QFontMetricsBridge((QFont&)* (QFont*)arg1);
}
qt_QFontMetrics * qt_new_QFontMetrics1(qt_QFontMetrics * arg1){
	return (qt_QFontMetrics *) new QFontMetricsBridge((QFontMetrics&)* (QFontMetrics*)arg1);
}
void qt_del_QFontMetrics( qt_QFontMetrics* p ){
	delete (QFontMetricsBridge*) p;
}
int qt_QFontMetrics_ascent( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->ascent();
}
int qt_QFontMetrics_descent( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->descent();
}
int qt_QFontMetrics_height( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->height();
}
int qt_QFontMetrics_leading( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->leading();
}
int qt_QFontMetrics_lineSpacing( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->lineSpacing();
}
int qt_QFontMetrics_minLeftBearing( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->minLeftBearing();
}
int qt_QFontMetrics_minRightBearing( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->minRightBearing();
}
int qt_QFontMetrics_maxWidth( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->maxWidth();
}
int qt_QFontMetrics_inFont( qt_QFontMetrics* instPointer,qt_QChar* arg1){
	return (int) ((QFontMetricsBridge*)instPointer)->inFont((QChar)* (QChar*)arg1);
}
int qt_QFontMetrics_leftBearing( qt_QFontMetrics* instPointer,qt_QChar* arg1){
	return (int) ((QFontMetricsBridge*)instPointer)->leftBearing((QChar)* (QChar*)arg1);
}
int qt_QFontMetrics_rightBearing( qt_QFontMetrics* instPointer,qt_QChar* arg1){
	return (int) ((QFontMetricsBridge*)instPointer)->rightBearing((QChar)* (QChar*)arg1);
}
int qt_QFontMetrics_width( qt_QFontMetrics* instPointer,qt_QString * arg1, int len){
	return (int) ((QFontMetricsBridge*)instPointer)->width((QString&)* (QString*)arg1, (int)len);
}
int qt_QFontMetrics_width1( qt_QFontMetrics* instPointer,qt_QChar* arg1){
	return (int) ((QFontMetricsBridge*)instPointer)->width((QChar)* (QChar*)arg1);
}
int qt_QFontMetrics_width2( qt_QFontMetrics* instPointer,char c){
	return (int) ((QFontMetricsBridge*)instPointer)->width((char)c);
}
int qt_QFontMetrics_charWidth( qt_QFontMetrics* instPointer,qt_QString * str, int pos){
	return (int) ((QFontMetricsBridge*)instPointer)->charWidth((QString&)* (QString*)str, (int)pos);
}
qt_QRect* qt_QFontMetrics_boundingRect( qt_QFontMetrics* instPointer,qt_QString * arg1, int len){
	QRect _r= ((QFontMetricsBridge*)instPointer)->boundingRect((QString&)* (QString*)arg1, (int)len);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
qt_QRect* qt_QFontMetrics_boundingRect1( qt_QFontMetrics* instPointer,qt_QChar* arg1){
	QRect _r= ((QFontMetricsBridge*)instPointer)->boundingRect((QChar)* (QChar*)arg1);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
//qt_QRect* qt_QFontMetrics_boundingRect2( qt_QFontMetrics* instPointer,int x, int y, int w, int h, int flags, qt_QString * str, int len, int tabstops, int* tabarray, qt_QTextParag** intern){
//	QRect _r= ((QFontMetricsBridge*)instPointer)->boundingRect((int)x, (int)y, (int)w, (int)h, (int)flags, (QString&)* (QString*)str, (int)len, (int)tabstops, (int*)tabarray, (QTextParag**)intern);
//	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
//}
//qt_QSize * qt_QFontMetrics_size( qt_QFontMetrics* instPointer,int flags, qt_QString * str, int len, int tabstops, int* tabarray, qt_QTextParag** intern){
//	QSize _s= ((QFontMetricsBridge*)instPointer)->size((int)flags, (QString&)* (QString*)str, (int)len, (int)tabstops, (int*)tabarray, (QTextParag**)intern);
//	return (qt_QSize *)new QSize(_s.width(),_s.height());
//}
int qt_QFontMetrics_underlinePos( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->underlinePos();
}
int qt_QFontMetrics_strikeOutPos( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->strikeOutPos();
}
int qt_QFontMetrics_lineWidth( qt_QFontMetrics* instPointer){
	return (int) ((QFontMetricsBridge*)instPointer)->lineWidth();
}
