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

import org.trinitydesktop.qt.Qt;
import org.trinitydesktop.qt.TQHideEvent;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQCloseEvent;
import org.trinitydesktop.qt.TQPopupMenu;
import org.trinitydesktop.qt.TQPixmap;
import org.trinitydesktop.qt.TQPoint;
import org.trinitydesktop.qt.TQContextMenuEvent;
import org.trinitydesktop.qt.TQMouseEvent;
import org.trinitydesktop.qt.TQKeyEvent;
import org.trinitydesktop.qt.TQWidget;
import org.trinitydesktop.qt.TQPopupMenu;

/**

 TDEPopupMenu is a class for menus with standard title items and keyboard
 accessibility for popups with many options and/or varying options. It acts
 identically to TQPopupMenu, with the addition of insertTitle(),
 changeTitle(), setKeyboardShortcutsEnabled() and
 setKeyboardShortcutsExecute() methods.
 The titles support a text string, an icon, plus user defined gradients,
 colors, and background pixmaps.
 The keyboard search algorithm is incremental with additional underlining
 for user feedback.
 See {@link TDEPopupMenuSignals} for signals emitted by TDEPopupMenu
		@author Hamish Rodda <rodda@kde.org>

		@short A menu with title items.

*/
public class TDEPopupMenu extends TQPopupMenu  {
	protected TDEPopupMenu(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**
		 Constructs a TDEPopupMenu.
		     		@short    Constructs a TDEPopupMenu.
	*/
	public TDEPopupMenu(TQWidget parent, String name) {
		super((Class) null);
		newTDEPopupMenu(parent,name);
	}
	private native void newTDEPopupMenu(TQWidget parent, String name);
	public TDEPopupMenu(TQWidget parent) {
		super((Class) null);
		newTDEPopupMenu(parent);
	}
	private native void newTDEPopupMenu(TQWidget parent);
	public TDEPopupMenu() {
		super((Class) null);
		newTDEPopupMenu();
	}
	private native void newTDEPopupMenu();
	/**
		 Inserts a title item with no icon.
		     		@short    Inserts a title item with no icon.
	*/
	public native int insertTitle(String text, int id, int index);
	public native int insertTitle(String text, int id);
	public native int insertTitle(String text);
	/**
		 Inserts a title item with the given icon and title.
		     		@short    Inserts a title item with the given icon and title.
	*/
	public native int insertTitle(TQPixmap icon, String text, int id, int index);
	public native int insertTitle(TQPixmap icon, String text, int id);
	public native int insertTitle(TQPixmap icon, String text);
	/**
		 Changes the title of the item at the specified id. If a icon was
		 previously set it is cleared.
		     		@short    Changes the title of the item at the specified id.
	*/
	public native void changeTitle(int id, String text);
	/**
		 Changes the title and icon of the title item at the specified id.
		     		@short    Changes the title and icon of the title item at the specified id.
	*/
	public native void changeTitle(int id, TQPixmap icon, String text);
	/**
		 Returns the title of the title item at the specified id. The default
		 id of -1 is for backwards compatibility only, you should always specify
		 the id.
		     		@short    Returns the title of the title item at the specified id.
	*/
	public native String title(int id);
	public native String title();
	/**
		 Returns the icon of the title item at the specified id.
		     		@short    Returns the icon of the title item at the specified id.
	*/
	public native TQPixmap titlePixmap(int id);
	/**
		 Enables keyboard navigation by searching for the entered key sequence.
		 Also underlines the currently selected item, providing feedback on the search.
			 Defaults to off.
			 WARNING: calls to text() of currently keyboard-selected items will
		 contain additional ampersand characters.
			 WARNING: though pre-existing keyboard shortcuts will not interfere with the
		 operation of this feature, they may be confusing to the user as the existing
		 shortcuts will not work.
				@short    Enables keyboard navigation by searching for the entered key sequence.
	*/
	public native void setKeyboardShortcutsEnabled(boolean enable);
	/**
		 Enables execution of the menu item once it is uniquely specified.
		 Defaults to off.
				@short    Enables execution of the menu item once it is uniquely specified.
	*/
	public native void setKeyboardShortcutsExecute(boolean enable);
	/**
		 Returns the context menu associated with this menu
				@short    Returns the context menu associated with this menu
	*/
	public native TQPopupMenu contextMenu();
	/**
		 Hides the context menu if shown
				@short    Hides the context menu if shown
	*/
	public native void hideContextMenu();
	/**
		 Reimplemented for internal purposes
				@short    Reimplemented for internal purposes
	*/
	public native void activateItemAt(int index);
	/**
		 Return the state of the mouse button and keyboard modifiers
		 when the last menuitem was activated.
				@short    Return the state of the mouse button and keyboard modifiers  when the last menuitem was activated.
	*/
	public native int state();
	/**
		 Returns the TDEPopupMenu associated with the current context menu
				@short    Returns the TDEPopupMenu associated with the current context menu
	*/
	public static native TDEPopupMenu contextMenuFocus();
	/**
		 returns the ID of the menuitem associated with the current context menu
				@short    returns the ID of the menuitem associated with the current context menu
	*/
	public static native int contextMenuFocusItem();
	protected native void closeEvent(TQCloseEvent arg1);
	protected native void keyPressEvent(TQKeyEvent e);
	protected native void mouseReleaseEvent(TQMouseEvent e);
	protected native void mousePressEvent(TQMouseEvent e);
	protected native boolean focusNextPrevChild(boolean next);
	protected native void contextMenuEvent(TQContextMenuEvent e);
	protected native void hideEvent(TQHideEvent arg1);
	protected native String underlineText(String text, int length);
	protected native void resetKeyboardVars(boolean noMatches);
	protected native void resetKeyboardVars();
	protected native void itemHighlighted(int whichItem);
	protected native void showCtxMenu(TQPoint pos);
	protected native void ctxMenuHiding();
	protected native void ctxMenuHideShowingMenu();
	/** 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();
}
