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

import org.trinitydesktop.qt.TQt;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQObject;
import org.trinitydesktop.qt.TQPixmap;
import org.trinitydesktop.qt.TQSize;
import org.trinitydesktop.qt.TQGrid;
import org.trinitydesktop.qt.TQShowEvent;
import org.trinitydesktop.qt.TQEvent;
import org.trinitydesktop.qt.TQWidget;
import org.trinitydesktop.qt.TQVBox;
import org.trinitydesktop.qt.TQFrame;
import org.trinitydesktop.qt.TQHBox;
import org.trinitydesktop.qt.TQWidget;

/**

 Provides a number of ready to use layouts (faces). It is used
 as an internal widget in KDialogBase, but can also used as a
 widget of its own.
 This class provides KJanusWidget.TreeList, KJanusWidget.IconList,
 KJanusWidget.Tabbed, KJanusWidget.Plain and KJanusWidget.Swallow layouts.
 For all modes it is important that you specify the TQWidget.minimumSize()
 on the page, plain widget or the swallowed widget. If you use a TQLayout
 on the page, plain widget or the swallowed widget this will be taken care
 of automatically. The size is used when the KJanusWidget determines its
 own minimum size. You get the minimum size by using the
 minimumSizeHint() or sizeHint() methods.
 Pages that have been added in TreeList, IconList or Tabbed mode can be
 removed by simply deleting the page. However, it would be preferable to use
 the TQObject.deleteLater() function on the page as the main event loop
 may have optimized UI update events of the page by scheduling them for later.
 See {@link KJanusWidgetSignals} for signals emitted by KJanusWidget
		@author Espen Sand (espen@kde.org)

		@short Easy to use widget with many layouts.

*/
public class KJanusWidget extends TQWidget  {
	protected KJanusWidget(Class dummy){super((Class) null);}
	public static final int TreeList = 0;
	public static final int Tabbed = 1;
	public static final int Plain = 2;
	public static final int Swallow = 3;
	public static final int IconList = 4;

	public native TQMetaObject metaObject();
	public native String className();
	/**
		 Constructor where you specify the face.
			@param parent Parent of the widget.
			@param name Widget name.
			@param face The kind of dialog, Use TreeList, Tabbed, Plain or
		 Swallow.
		     		@short    Constructor where you specify the face.
	*/
	public KJanusWidget(TQWidget parent, String name, int face) {
		super((Class) null);
		newKJanusWidget(parent,name,face);
	}
	private native void newKJanusWidget(TQWidget parent, String name, int face);
	public KJanusWidget(TQWidget parent, String name) {
		super((Class) null);
		newKJanusWidget(parent,name);
	}
	private native void newKJanusWidget(TQWidget parent, String name);
	public KJanusWidget(TQWidget parent) {
		super((Class) null);
		newKJanusWidget(parent);
	}
	private native void newKJanusWidget(TQWidget parent);
	public KJanusWidget() {
		super((Class) null);
		newKJanusWidget();
	}
	private native void newKJanusWidget();
	/**
		 Raises the page which was added by addPage().
			@param index The index of the page you want to raise.
		     		@short    Raises the page which was added by addPage().
	*/
	public native boolean showPage(int index);
	/**
		 Returns the index of the page that are currently displayed.
				@return The index or -1 if the face is not Tabbed, TreeList or
         IconList.

		@short    Returns the index of the page that are currently displayed.
	*/
	public native int activePageIndex();
	/**
		 Use this to verify
		 that no memory allocation failed.
				@return true if the widget was properly created.

		@short    Use this to verify  that no memory allocation failed.
	*/
	public native boolean isValid();
	/**
		 Returns the face type.
				@return The face type.

		@short    Returns the face type.
	*/
	public native int face();
	/**
		 Returns the minimum size that must be made available for the widget
		 so that UIs can be displayed properly
				@return The minimum size.

		@short    Returns the minimum size that must be made available for the widget  so that UIs can be displayed properly
	*/
	public native TQSize minimumSizeHint();
	/**
		 Returns the recommended size for the widget in order to be displayed
		 properly.
				@return The recommended size.

		@short    Returns the recommended size for the widget in order to be displayed  properly.
	*/
	public native TQSize sizeHint();
	/**
		 Returns the empty widget that is available in Plain mode.
				@return The widget or 0 if the face in not Plain.

		@short    Returns the empty widget that is available in Plain mode.
	*/
	public native TQFrame plainPage();
	/**
		 Add a new page when the class is used in TreeList, IconList or Tabbed
		 mode. The returned widget is empty and you must add your widgets
		 as children to this widget. In most cases you must create a layout
		 manager and associate it with this widget as well.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
			@param item String used in the list or Tab item.
			@param header A longer string used in TreeList and IconList mode to
		        describe the contents of a page. If empty, the item string
		        will be used instead.
			@param pixmap Used in IconList mode or in TreeList mode. You should
		        prefer a pixmap with size 32x32 pixels.
				@return The empty page or 0 if the face is not TreeList, IconList or
         Tabbed.

		@short    Add a new page when the class is used in TreeList, IconList or Tabbed  mode.
	*/
	public native TQFrame addPage(String item, String header, TQPixmap pixmap);
	public native TQFrame addPage(String item, String header);
	public native TQFrame addPage(String item);
	/**
		 This is like addPage just above, with the difference that the first
		 element is a list of strings. These strings are used to form a path
		 of folders down to the given page. The initial elements are names
		 for the folders, while the last element is the name of the page.
		 Note: This does yet only work for the TreeList face. Later this may
		 be added for the IconList face too. In other faces than the
		 TreeList, all the strings except the last one is ignored.
		 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
				@short    This is like addPage just above, with the difference that the first  element is a list of strings.
	*/
	public native TQFrame addPage(String[] items, String header, TQPixmap pixmap);
	public native TQFrame addPage(String[] items, String header);
	public native TQFrame addPage(String[] items);
	/**
		 Add a new page when the class is used in TreeList, IconList or Tabbed
		 mode. The returned widget is empty and you must add your widgets
		 as children to this widget. The returned widget is a TQVBox
		 so it contains a TQVBoxLayout layout that lines up the child widgets
		 are vertically.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
			@param item String used in the list or Tab item.
			@param header A longer string used in TreeList and IconList mode to
		        describe the contents of a page. If empty, the item string
		        will be used instead.
			@param pixmap Used in IconList mode or in TreeList mode. You should
		        prefer a pixmap with size 32x32 pixels.
				@return The empty page or 0 if the face is not TreeList, IconList or
         Tabbed.
		@short    Add a new page when the class is used in TreeList, IconList or Tabbed  mode.
	*/
	public native TQVBox addVBoxPage(String item, String header, TQPixmap pixmap);
	public native TQVBox addVBoxPage(String item, String header);
	public native TQVBox addVBoxPage(String item);
	/**
		 This is like addVBoxPage just above, with the difference that the first
		 element is a list of strings. These strings are used to form a path
		 of folders down to the given page. The initial elements are names
		 for the folders, while the last element is the name of the page.
		 Note: This does yet only work for the TreeList face. Later this may
		 be added for the IconList face too. In other faces than the
		 TreeList, all the strings except the last one is ignored.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
				@short    This is like addVBoxPage just above, with the difference that the first  element is a list of strings.
	*/
	public native TQVBox addVBoxPage(String[] items, String header, TQPixmap pixmap);
	public native TQVBox addVBoxPage(String[] items, String header);
	public native TQVBox addVBoxPage(String[] items);
	/**
		 Add a new page when the class is used in TreeList, IconList or Tabbed
		 mode. The returned widget is empty and you must add your widgets
		 as children to this widget. The returned widget is a TQHBox
		 so it contains a TQHBoxLayout layout that lines up the child widgets
		 are horizontally.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
			@param itemName String used in the list or Tab item.
			@param header A longer string used in TreeList and IconList mode to
		        describe the contents of a page. If empty, the item string
		        will be used instead.
			@param pixmap Used in IconList mode or in TreeList mode. You should
		        prefer a pixmap with size 32x32 pixels.
				@return The empty page or 0 if the face is not TreeList, IconList or
         Tabbed.

		@short    Add a new page when the class is used in TreeList, IconList or Tabbed  mode.
	*/
	public native TQHBox addHBoxPage(String itemName, String header, TQPixmap pixmap);
	public native TQHBox addHBoxPage(String itemName, String header);
	public native TQHBox addHBoxPage(String itemName);
	/**
		 This is like addHBoxPage just above, with the difference that the first
		 element is a list of strings. These strings are used to form a path
		 of folders down to the given page. The initial elements are names
		 for the folders, while the last element is the name of the page.
		 Note: This does yet only work for the TreeList face. Later this may
		 be added for the IconList face too. In other faces than the
		 TreeList, all the strings except the last one is ignored.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
				@short    This is like addHBoxPage just above, with the difference that the first  element is a list of strings.
	*/
	public native TQHBox addHBoxPage(String[] items, String header, TQPixmap pixmap);
	public native TQHBox addHBoxPage(String[] items, String header);
	public native TQHBox addHBoxPage(String[] items);
	/**
		 Add a new page when the class is used in either TreeList or Tabbed
		 mode. The returned widget is empty and you must add your widgets
		 as children to this widget. The returned widget is a TQGrid
		 so it contains a TQGridLayout layout that places up the child widgets
		 in a grid.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
			@param n Specifies the number of columns if 'dir' is TQGrid.Horizontal
		          or the number of rows if 'dir' is TQGrid.Vertical.
			@param dir Can be TQGrid.Horizontal or TQGrid.Vertical.
			@param itemName String used in the list or Tab item.
			@param header A longer string used in TreeList and IconList mode to
		        describe the contents of a page. If empty, the item string
		        will be used instead.
			@param pixmap Used in IconList mode or in TreeList mode. You should
		        prefer a pixmap with size 32x32 pixels.
				@return The empty page or 0 if the face is not TreeList, IconList or
         Tabbed.

		@short    Add a new page when the class is used in either TreeList or Tabbed  mode.
	*/
	public native TQGrid addGridPage(int n, int dir, String itemName, String header, TQPixmap pixmap);
	public native TQGrid addGridPage(int n, int dir, String itemName, String header);
	public native TQGrid addGridPage(int n, int dir, String itemName);
	/**
		 This is like addGridPage just above, with the difference that the first
		 element is a list of strings. These strings are used to form a path
		 of folders down to the given page. The initial elements are names
		 for the folders, while the last element is the name of the page.
		 Note: This does yet only work for the TreeList face. Later this may
		 be added for the IconList face too. In other faces than the
		 TreeList, all the strings except the last one is ignored.
			 Deleting the returned frame will cause the listitem or tab to be
		 removed (you can re-add a page with the same name later.
				@short    This is like addGridPage just above, with the difference that the first  element is a list of strings.
	*/
	public native TQGrid addGridPage(int n, int dir, String[] items, String header, TQPixmap pixmap);
	public native TQGrid addGridPage(int n, int dir, String[] items, String header);
	public native TQGrid addGridPage(int n, int dir, String[] items);
	/**
			@param page The widget returned by addPage , addVBoxPage ,
		 addHBoxPage or addGridPage .
		     		@short Removes a page created with addPage, addVBoxPage,  addHBoxPage or addGridPage. If the page has already  been deleted or has already been removed, nothing happens. The widget  itself is not deleted.
	*/
	public native void removePage(TQWidget page);
	/**
		 Returns the index of a page created with addPage ,
		 addVBoxPage , addHBoxPage or addGridPage .
		 You can can compare this index with the value returned from
		 activePageIndex if you need to do some page specific actions
		 in your code.
			 The returned index will never change so you can safely use this
		 function once and save the value.
			@param widget The widget returned by addPage , addVBoxPage ,
		 addHBoxPage or addGridPage .
				@return The index or -1 if the face is not Tabbed, TreeList or
         IconList

		@short    Returns the index of a page created with addPage ,  addVBoxPage , addHBoxPage or addGridPage .
	*/
	public native int pageIndex(TQWidget widget);
	/**
		 Defines the widget to be swallowed.
			 This method can be used several
		 times. Only the latest defined widget will be shown.
			@param widget The widget to be swallowed. If 0, then an empty rectangle
		 is displayed.
		     		@short    Defines the widget to be swallowed.
	*/
	public native boolean setSwallowedWidget(TQWidget widget);
	/**
		 This function has only effect in TreeList mode.
			 Defines how the tree list is resized when the widget is resized
		 horizontally. By default the tree list keeps its width when the
		 widget becomes wider.
			@param state The resize mode. If false (default) the TreeList keeps
		              its current width when the widget becomes wider.
		     		@short    This function has only effect in TreeList mode.
	*/
	public native void setTreeListAutoResize(boolean state);
	/**
		 This function has only effect in TreeList mode.
			 This tells the widgets whether the icons given in the addPage,
		 addVBoxPage, addHBoxPage, or addGridPage methods should
		 be shown in the TreeList.
			 Note: This method must be called before calling any of the methods
		 which add icons to the page.
			@param state If true the icons are shown.
				@short    This function has only effect in TreeList mode.
	*/
	public native void setShowIconsInTreeList(boolean state);
	/**
		 This function has only effect in TreeList mode.
			 This tells the widgets whether the root should be decorated.
		 For details see TQListView.setRootIsDecorated
			@param state Root will be decorated if true.
				@short    This function has only effect in TreeList mode.
	*/
	public native void setRootIsDecorated(boolean state);
	/**
		 This function has only effect in TreeList mode.
			 This tells the TreeList to unfold the whole tree so that all entries
		 are visible.
			 If the list is empty when you call this method newly created entries
		 will not automatically be opened. If the <code>persist</code> flag is set opened
		 entries cannot be closed again, though.
			@param persist If true the tree always stays unfolded.
				@short    This function has only effect in TreeList mode.
	*/
	public native void unfoldTreeList(boolean persist);
	public native void unfoldTreeList();
	/**
		 Add a widget at the bottom of the TreeList/IconList.
			@param widget The widget to be added. It will be reparented into the
		                KJanusWidget, therefor it will be deleted with the
		                KJanusWidget, too. To be on the save side just don't keep
		                the pointer to this widget.
		     		@short    Add a widget at the bottom of the TreeList/IconList.
	*/
	public native void addWidgetBelowList(TQWidget widget);
	/**
		 Add a button at the bottom of the TreeList/IconList.
			@param text The text on the PushButton.
			@param recv The object that is to receive the signal when the button
		                 is clicked.
			@param slot The slot to connect to the clicked signal of the button.
				@short    Add a button at the bottom of the TreeList/IconList.
	*/
	public native void addButtonBelowList(String text, TQObject recv, String slot);
	/**
		 The same as the above function, but with a KGuiItem providing the text
		 and icon for the button at the bottom of the TreeList/IconList.
			@param guiitem The text and icon on the PushButton.
			@param recv The object that is to receive the signal when the button
		                 is clicked.
			@param slot The slot to connect to the clicked signal of the button.
				@short    The same as the above function, but with a KGuiItem providing the text  and icon for the button at the bottom of the TreeList/IconList.
	*/
	public native void addButtonBelowList(KGuiItem guiitem, TQObject recv, String slot);
	/**
		 This function has only effect in IconList mode.
			 Defines how the icon list widget is displayed. By default it is
		 the widgets in the pages that decide the minimum height
		 of the toplevel widget. A vertical scrollbar can be used in
		 the icon list area.
			@param state The visibility mode. If true, the minimum height is
		        adjusted so that every icon in the list is visible at the
		        same time. The vertical scrollbar will never be visible.
		     		@short    This function has only effect in IconList mode.
	*/
	public native void setIconListAllVisible(boolean state);
	/**
		 Sets the icon used in TreeList Mode for the given path.
			@param path The path for which this icon should be shown.
			@param pixmap The icon used.
				@short    Sets the icon used in TreeList Mode for the given path.
	*/
	public native void setFolderIcon(String[] path, TQPixmap pixmap);
	/**
		 Returns the title string associated with a page index in TreeList or IconList mode.
			@param index The index of the page or null if there is no such page.
				@short    Returns the title string associated with a page index in TreeList or IconList mode.
		@see #pageIndex
	*/
	public native String pageTitle(int index);
	/**
		 Returns the page widget associated with a page index or null if there is
		 no such page.
			@param index The index of the page.
				@short    Returns the page widget associated with a page index or null if there is  no such page.
		@see #pageIndex
	*/
	public native TQWidget pageWidget(int index);
	/**
		 Give the keyboard input focus to the widget.
		     		@short    Give the keyboard input focus to the widget.
	*/
	public native void setFocus();
	/**
		 Reimplemented to handle the splitter width when the the face
		 is TreeList
		     		@short    Reimplemented to handle the splitter width when the the face  is TreeList
	*/
	public native void showEvent(TQShowEvent arg1);
	/**
		 This function is used internally when in IconList mode. If you
		 reimplement this class a make your own event filter, make sure to
		 call this function from your filter.
			@param o Object that has received an event.
			@param e The event.
		     		@short    This function is used internally when in IconList mode.
	*/
	public native boolean eventFilter(TQObject o, TQEvent e);
	protected native boolean showPage(TQWidget w);
	protected native void addPageWidget(TQFrame page, String[] items, String header, TQPixmap pixmap);
	protected native void InsertTreeListItem(String[] items, TQPixmap pixmap, TQFrame page);
	protected native TQWidget FindParent();
	/** 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();
}
