/*	XToolTip.h
 *
 *		This handles driving the tip window
 */

/**********************************************************************

  YAAF is Copyright 1997-1999 by William Woody.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions 
  are met:

  Redistributions of source code must retain the above copyright notice, 
  this list of conditions and the following disclaimer.

  Neither the name of the copyright holder or other contributors may
  be used to promote products derived from this software without
  specific written prior permission.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
  SOFTWARE.
  
  Contact:   woody@alumni.caltech.edu
  Web page:  http://www.pandawave.com/yaaf/

**********************************************************************/

#ifndef PandaWave_XTIPTOOL
#define PandaWave_XTIPTOOL

#include <XConfig.h>
#include <XView.h>
#include <XWindow.h>

/************************************************************************/
/*																		*/
/*	Tooltip View														*/
/*																		*/
/************************************************************************/

/*$	XGToolTipView
 *
 *		This is a simple tool tip view which is used for constructing
 *	the actual comment
 */

class XGToolTipView : public XGView {
	public:
								XGToolTipView(char *);
		virtual					~XGToolTipView();
		
		/*
		 *	Init support
		 */
		
		XPoint					GetPopSize(XGDraw &);
		
		/*
		 *	Events
		 */
		
		void					DoDrawView(XRect);
	private:
		char					fLabel[256];
};

/*$	XGToolTip
 *
 *		This is the tool tip object which manages putting up a tool
 *	tip help line that floats over the rest of the UI.
 */

class XGToolTip {
	public:
		static void				OpenTip(XGView *v, XPoint where, char *what);
		static void				CloseTip();
	private:
		static XGPopWindow		*gPopWindow;
		static XGToolTipView	*gPopView;
};

#endif
