//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;
import java.util.ArrayList;
import org.kde.qt.QWidget;
import org.kde.qt.QDomElement;

/**

 Abstract interface for a "GUI builder", used by the GUIFactory
 This interface is implemented by KMainWindow for the case where
 the toplevel widget is a KMainWindow. Other implementations may appear
 in the future (dialogs for instance)
 		@short    Abstract interface for a "GUI builder", used by the GUIFactory  This interface is implemented by KMainWindow for the case where  the toplevel widget is a KMainWindow.

*/
public class KXMLGUIBuilder implements QtSupport, KXMLGUIBuilderInterface {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KXMLGUIBuilder(Class dummy){}

	public KXMLGUIBuilder(QWidget widget) {
		newKXMLGUIBuilder(widget);
	}
	private native void newKXMLGUIBuilder(QWidget widget);
	public native KXMLGUIClientInterface builderClient();
	public native void setBuilderClient(KXMLGUIClientInterface client);
	public native KInstanceInterface builderInstance();
	public native void setBuilderInstance(KInstanceInterface instance);
	public native QWidget widget();
	public native ArrayList containerTags();
	/**	
		 Creates a container (menubar/menu/toolbar/statusbar/separator/...)
		 from an element in the XML file
			@param parent The parent for the container
			@param index The index where the container should be inserted
		              into the parent container/widget
			@param element The element from the DOM tree describing the
		                container (use it to access container specified
		                attributes or child elements)
			@param id The id to be used for this container
		   		@short    Creates a container (menubar/menu/toolbar/statusbar/separator/.
	*/
	public native QWidget createContainer(QWidget parent, int index, QDomElement element, int[] id);
	/**	
		 Removes the given (and previously via createContainer )
		 created container.
			   		@short    Removes the given (and previously via createContainer )  created container.
	*/
	public native void removeContainer(QWidget container, QWidget parent, QDomElement element, int id);
	public native ArrayList customTags();
	public native int createCustomElement(QWidget parent, int index, QDomElement element);
	public native void removeCustomElement(QWidget parent, int id);
	public native void finalizeGUI(KXMLGUIClientInterface client);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}
