/***************************************************************************
                            kde_KPopupFrame.h -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#ifndef KDE_KPOPUPFRAME
#define KDE_KPOPUPFRAME

#include <qtc/qtc_types.h>

#include <kdec/kde_types.h>

/**

 Frame with popup menu behaviour.

 @author Tim Gilman, Mirko Boehm

 @version $Id: kde_KPopupFrame.h,v 1.3 2002/02/21 00:43:12 rdale Exp $

 @short 
 Frame with popup menu behaviour.
*/

/**  The contructor. Creates a dialog without buttons. 
*/
kde_KPopupFrame * kde_new_KPopupFrame(qt_QWidget * parent, char* name);

/**  Set the main widget. You cannot set the main widget from the constructor,
      since it must be a child of the frame itselfes.
      Be careful: the size is set to the main widgets size. It is up to you to
      set the main widgets correct size before setting it as the main
      widget. 
*/
void kde_KPopupFrame_setMainWidget(kde_KPopupFrame* instPointer,qt_QWidget * m);

/**  The resize event. Simply resizes the main widget to the whole
      widgets client size. 
*/

/**  Open the popup window at position pos. 
*/
void kde_KPopupFrame_popup(kde_KPopupFrame* instPointer,qt_QPoint* pos);

/**  Execute the popup window. 
*/
int kde_KPopupFrame_exec(kde_KPopupFrame* instPointer,qt_QPoint* p);

/**  Dito. 
*/
int kde_KPopupFrame_exec1(kde_KPopupFrame* instPointer,int x, int y);

/**  Close the popup window. This is called from the main widget, usually.
      r is the result returned from exec(). 
*/
void kde_KPopupFrame_close(kde_KPopupFrame* instPointer,int r);

/**  Catch key press events. 
*/

#endif
