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

import org.trinitydesktop.qt.TQt;
import org.trinitydesktop.qt.TQListBoxItem;
import org.trinitydesktop.qt.TQRect;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQObject;
import org.trinitydesktop.qt.TQSize;
import java.util.ArrayList;
import org.trinitydesktop.qt.TQEvent;
import org.trinitydesktop.qt.TQWidget;

/**

 A little utility class for "completion-widgets", like KLineEdit or
 KComboBox. TDECompletionBox is a listbox, displayed as a rectangle without
 any window decoration, usually directly under the lineedit or combobox.
 It is filled with all possible matches for a completion, so the user
 can select the one he wants.
 It is used when TDEGlobalSettings.Completion == CompletionPopup or CompletionPopupAuto.
 See {@link TDECompletionBoxSignals} for signals emitted by TDECompletionBox
		@author Carsten Pfeiffer <pfeiffer@kde.org>

		@short A helper widget for "completion-widgets" (KLineEdit, KComboBox)).

*/
public class TDECompletionBox extends TDEListBox  {
	protected TDECompletionBox(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**
		 Constructs a TDECompletionBox.
			 The parent widget is used to give the focus back when pressing the
		 up-button on the very first item.
		     		@short    Constructs a TDECompletionBox.
	*/
	public TDECompletionBox(TQWidget parent, String name) {
		super((Class) null);
		newTDECompletionBox(parent,name);
	}
	private native void newTDECompletionBox(TQWidget parent, String name);
	public TDECompletionBox(TQWidget parent) {
		super((Class) null);
		newTDECompletionBox(parent);
	}
	private native void newTDECompletionBox(TQWidget parent);
	public native TQSize sizeHint();
	/**
				@return true if selecting an item results in the emition of the selected signal.

		@short
	*/
	public native boolean activateOnSelect();
	/**
		 Returns a list of all items currently in the box.
		     		@short    Returns a list of all items currently in the box.
	*/
	public native ArrayList items();
	/**
		 Inserts <code>items</code> into the box. Does not clear the items before.
		 <code>index</code> determines at which position <code>items</code> will be inserted.
		 (defaults to appending them at the end)
		     		@short    Inserts <code>items</code> into the box.
	*/
	public native void insertItems(String[] items, int index);
	public native void insertItems(String[] items);
	/**
		 Clears the box and inserts <code>items.</code>
		     		@short    Clears the box and inserts <code>items.</code>
	*/
	public native void setItems(String[] items);
	/**
		 Adjusts the size of the box to fit the width of the parent given in the
		 constructor and pops it up at the most appropriate place, relative to
		 the parent.
			 Depending on the screensize and the position of the parent, this may
		 be a different place, however the default is to pop it up and the
		 lower left corner of the parent.
			 Make sure to hide() the box when appropriate.
		     		@short    Adjusts the size of the box to fit the width of the parent given in the  constructor and pops it up at the most appropriate place, relative to  the parent.
	*/
	public native void popup();
	/**
		 Makes this widget (when visible) capture Tab-key events to traverse the
		 items in the dropdown list.
			 Default off, as it conflicts with the usual behavior of Tab to traverse
		 widgets. It is useful for cases like Konqueror's Location Bar, though.
				@short    Makes this widget (when visible) capture Tab-key events to traverse the  items in the dropdown list.
		@see #isTabHandling
	*/
	public native void setTabHandling(boolean enable);
	/**
			 Default is false.
				@return true if this widget is handling Tab-key events to traverse the
 items in the dropdown list, otherwise false.

		@short
		@see #setTabHandling
	*/
	public native boolean isTabHandling();
	/**
		 Sets the text to be emitted if the user chooses not to
		 pick from the available matches.
			 If the canceled text is not set through this function, the
		 userCancelled signal will not be emitted.
			@param txt the text to be emitted if the user cancels this box
		     		@short    Sets the text to be emitted if the user chooses not to  pick from the available matches.
		@see #userCancelled(
		@see #const
	*/
	public native void setCancelledText(String txt);
	/**
				@return the text set via setCancelledText() or null.

		@short
	*/
	public native String cancelledText();
	/**
		 Set whether or not the selected signal should be emitted when an
		 item is selected. By default the selected signal is emitted.
			@param state false if the signal should not be emitted.
				@short    Set whether or not the selected signal should be emitted when an  item is selected.
	*/
	public native void setActivateOnSelect(boolean state);
	/**
		 Moves the selection one line down or select the first item if nothing is selected yet.
		     		@short    Moves the selection one line down or select the first item if nothing is selected yet.
	*/
	public native void down();
	/**
		 Moves the selection one line up or select the first item if nothing is selected yet.
		     		@short    Moves the selection one line up or select the first item if nothing is selected yet.
	*/
	public native void up();
	/**
		 Moves the selection one page down.
		     		@short    Moves the selection one page down.
	*/
	public native void pageDown();
	/**
		 Moves the selection one page up.
		     		@short    Moves the selection one page up.
	*/
	public native void pageUp();
	/**
		 Moves the selection up to the first item.
		     		@short    Moves the selection up to the first item.
	*/
	public native void home();
	/**
		 Moves the selection down to the last item.
		     		@short    Moves the selection down to the last item.
	*/
	public native void end();
	/**
		 Re-implemented for internal reasons.  API is unaffected.
		     		@short    Re-implemented for internal reasons.
	*/
	public native void show();
	/**
		 Re-implemented for internal reasons.  API is unaffected.
		     		@short    Re-implemented for internal reasons.
	*/
	public native void hide();
	/**
		 This calculates the size of the dropdown and the relative position of the top
		 left corner with respect to the parent widget. This matches the geometry and position
		 normally used by K/TQComboBox when used with one.
		     		@short    This calculates the size of the dropdown and the relative position of the top  left corner with respect to the parent widget.
	*/
	protected native TQRect calculateGeometry();
	/**
		 This properly sizes and positions the listbox.
		     		@short    This properly sizes and positions the listbox.
	*/
	protected native void sizeAndPosition();
	/**
		 Reimplemented from TDEListBox to get events from the viewport (to hide
		 this widget on mouse-click, Escape-presses, etc.
		     		@short    Reimplemented from TDEListBox to get events from the viewport (to hide  this widget on mouse-click, Escape-presses, etc.
	*/
	public native boolean eventFilter(TQObject arg1, TQEvent arg2);
	/**
		 Called when an item was activated. Emits
		 activated() with the item.
		     		@short    Called when an item was activated.
	*/
	protected native void slotActivated(TQListBoxItem arg1);
	/** 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();
}
