/***************************************************************************
                            QBoxLayout.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <qlayout.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <qtjava/QBoxLayout.h>

class QBoxLayoutJBridge : public QBoxLayout
{
public:
	QBoxLayoutJBridge(QWidget* parent, Direction arg1, int border, int spacing, const char* name) : QBoxLayout(parent, arg1, border, spacing, name) {}
	QBoxLayoutJBridge(QLayout* parentLayout, Direction arg1, int spacing, const char* name) : QBoxLayout(parentLayout, arg1, spacing, name) {}
	QBoxLayoutJBridge(Direction arg1, int spacing, const char* name) : QBoxLayout(arg1, spacing, name) {}
	~QBoxLayoutJBridge() {QtSupport::qtKeyDeleted(this);}
	void protected_insertItem(int index, QLayoutItem* arg1) {
		QBoxLayout::insertItem(index, arg1);
		return;
	}
	void childEvent(QChildEvent* e) {
		if (! QtSupport::eventDelegate(this, "childEvent", e, "org.kde.qt.QChildEvent")) {
			QLayout::childEvent(e);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "customEvent", arg1, "org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "timerEvent", arg1, "org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_newQBoxLayout__Lorg_kde_qt_QWidget_2IIILjava_lang_String_2(JNIEnv *env, jobject obj, jobject parent, jint arg1, jint border, jint spacing, jstring name)
{
static QCString * _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QBoxLayoutJBridge((QWidget*) QtSupport::getQt(env, parent), (QBoxLayout::Direction) arg1, (int) border, (int) spacing, (char*) QtSupport::toCharString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_newQBoxLayout__Lorg_kde_qt_QWidget_2I(JNIEnv *env, jobject obj, jobject parent, jint arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QBoxLayoutJBridge((QWidget*) QtSupport::getQt(env, parent), (QBoxLayout::Direction) arg1, 0, -1, 0));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_newQBoxLayout__Lorg_kde_qt_QLayout_2IILjava_lang_String_2(JNIEnv *env, jobject obj, jobject parentLayout, jint arg1, jint spacing, jstring name)
{
static QCString * _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QBoxLayoutJBridge((QLayout*) QtSupport::getQt(env, parentLayout), (QBoxLayout::Direction) arg1, (int) spacing, (char*) QtSupport::toCharString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_newQBoxLayout__Lorg_kde_qt_QLayout_2I(JNIEnv *env, jobject obj, jobject parentLayout, jint arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QBoxLayoutJBridge((QLayout*) QtSupport::getQt(env, parentLayout), (QBoxLayout::Direction) arg1, -1, 0));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_newQBoxLayout__IILjava_lang_String_2(JNIEnv *env, jobject obj, jint arg1, jint spacing, jstring name)
{
static QCString * _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QBoxLayoutJBridge((QBoxLayout::Direction) arg1, (int) spacing, (char*) QtSupport::toCharString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_newQBoxLayout__I(JNIEnv *env, jobject obj, jint arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QBoxLayoutJBridge((QBoxLayout::Direction) arg1, -1, 0));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_finalize(JNIEnv *env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj) && ((QBoxLayout*)QtSupport::getQt(env, obj))->parent() == (QObject *) 0) {
		delete (QBoxLayout*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addItem(JNIEnv *env, jobject obj, jobject arg1)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addItem((QLayoutItem*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QBoxLayout_direction(JNIEnv *env, jobject obj)
{
	return (jint) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->direction();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_setDirection(JNIEnv *env, jobject obj, jint arg1)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->setDirection((QBoxLayout::Direction) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addSpacing(JNIEnv *env, jobject obj, jint size)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addSpacing((int) size);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addStretch__I(JNIEnv *env, jobject obj, jint stretch)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addStretch((int) stretch);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addStretch__(JNIEnv *env, jobject obj)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addStretch(0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addWidget__Lorg_kde_qt_QWidget_2II(JNIEnv *env, jobject obj, jobject arg1, jint stretch, jint alignment)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addWidget((QWidget*) QtSupport::getQt(env, arg1), (int) stretch, (int) alignment);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addWidget__Lorg_kde_qt_QWidget_2(JNIEnv *env, jobject obj, jobject arg1)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addWidget((QWidget*) QtSupport::getQt(env, arg1), 0, 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addLayout__Lorg_kde_qt_QLayout_2I(JNIEnv *env, jobject obj, jobject layout, jint stretch)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addLayout((QLayout*) QtSupport::getQt(env, layout), (int) stretch);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addLayout__Lorg_kde_qt_QLayout_2(JNIEnv *env, jobject obj, jobject layout)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addLayout((QLayout*) QtSupport::getQt(env, layout), 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_addStrut(JNIEnv *env, jobject obj, jint arg1)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->addStrut((int) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertSpacing(JNIEnv *env, jobject obj, jint index, jint size)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertSpacing((int) index, (int) size);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertStretch__II(JNIEnv *env, jobject obj, jint index, jint stretch)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertStretch((int) index, (int) stretch);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertStretch__I(JNIEnv *env, jobject obj, jint index)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertStretch((int) index, 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertWidget__ILorg_kde_qt_QWidget_2II(JNIEnv *env, jobject obj, jint index, jobject widget, jint stretch, jint alignment)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertWidget((int) index, (QWidget*) QtSupport::getQt(env, widget), (int) stretch, (int) alignment);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertWidget__ILorg_kde_qt_QWidget_2(JNIEnv *env, jobject obj, jint index, jobject widget)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertWidget((int) index, (QWidget*) QtSupport::getQt(env, widget), 0, 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertLayout__ILorg_kde_qt_QLayout_2I(JNIEnv *env, jobject obj, jint index, jobject layout, jint stretch)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertLayout((int) index, (QLayout*) QtSupport::getQt(env, layout), (int) stretch);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertLayout__ILorg_kde_qt_QLayout_2(JNIEnv *env, jobject obj, jint index, jobject layout)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->insertLayout((int) index, (QLayout*) QtSupport::getQt(env, layout), 0);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QBoxLayout_setStretchFactor__Lorg_kde_qt_QWidget_2I(JNIEnv *env, jobject obj, jobject arg1, jint stretch)
{
	return (jboolean) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->setStretchFactor((QWidget*) QtSupport::getQt(env, arg1), (int) stretch);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QBoxLayout_setStretchFactor__Lorg_kde_qt_QLayout_2I(JNIEnv *env, jobject obj, jobject l, jint stretch)
{
	return (jboolean) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->setStretchFactor((QLayout*) QtSupport::getQt(env, l), (int) stretch);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QBoxLayout_sizeHint(JNIEnv *env, jobject obj)
{
	QSize _s= ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->sizeHint();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QSize(_s.width(),_s.height()), "org.kde.qt.QSize", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QBoxLayout_minimumSize(JNIEnv *env, jobject obj)
{
	QSize _s= ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->minimumSize();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QSize(_s.width(),_s.height()), "org.kde.qt.QSize", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QBoxLayout_maximumSize(JNIEnv *env, jobject obj)
{
	QSize _s= ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->maximumSize();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QSize(_s.width(),_s.height()), "org.kde.qt.QSize", TRUE);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QBoxLayout_hasHeightForWidth(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->hasHeightForWidth();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QBoxLayout_heightForWidth(JNIEnv *env, jobject obj, jint arg1)
{
	return (jint) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->heightForWidth((int) arg1);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QBoxLayout_expanding(JNIEnv *env, jobject obj)
{
	return (jint) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->expanding();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_invalidate(JNIEnv *env, jobject obj)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->invalidate();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QBoxLayout_iterator(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QLayoutIterator (((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->iterator()), "org.kde.qt.QLayoutIterator", TRUE);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_setGeometry(JNIEnv *env, jobject obj, jobject arg1)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->setGeometry((QRect&) *(QRect *) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QBoxLayout_findWidget(JNIEnv *env, jobject obj, jobject w)
{
	return (jint) ((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->findWidget((QWidget*) QtSupport::getQt(env, w));
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QBoxLayout_insertItem(JNIEnv *env, jobject obj, jint index, jobject arg1)
{
	((QBoxLayoutJBridge*) QtSupport::getQt(env, obj))->protected_insertItem((int) index, (QLayoutItem*) QtSupport::getQt(env, arg1));
	return;
}

