2000-09-10 12:30:16 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/tipwin.h
|
|
|
|
// Purpose: wxTipWindow is a window like the one typically used for
|
|
|
|
// showing the tooltips
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 10.09.00
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
|
|
|
// Licence: wxWindows license
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_TIPWIN_H_
|
|
|
|
#define _WX_TIPWIN_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "tipwin.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/frame.h"
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxTipWindow
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxTipWindow : public wxFrame
|
|
|
|
{
|
2001-02-22 12:29:51 -05:00
|
|
|
friend class wxTipWindowView;
|
2000-09-10 12:30:16 -04:00
|
|
|
public:
|
2001-02-22 12:29:51 -05:00
|
|
|
// Supply windowPtr for it to null the given address
|
|
|
|
// when the window has closed.
|
2000-09-10 12:30:16 -04:00
|
|
|
wxTipWindow(wxWindow *parent,
|
|
|
|
const wxString& text,
|
2001-02-22 12:29:51 -05:00
|
|
|
wxCoord maxLength = 100, wxTipWindow** windowPtr = NULL);
|
|
|
|
~wxTipWindow();
|
|
|
|
|
|
|
|
void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; }
|
2000-09-10 12:30:16 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// event handlers
|
|
|
|
void OnMouseClick(wxMouseEvent& event);
|
2000-09-11 08:37:44 -04:00
|
|
|
void OnActivate(wxActivateEvent& event);
|
|
|
|
void OnKillFocus(wxFocusEvent& event);
|
2000-09-10 12:30:16 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxArrayString m_textLines;
|
|
|
|
wxCoord m_heightLine;
|
2001-02-22 12:29:51 -05:00
|
|
|
wxTipWindow** m_windowPtr;
|
2000-09-10 12:30:16 -04:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_TIPWIN_H_
|