2000-09-10 16:30:16 +00: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
|
|
|
|
|
2001-12-02 01:54:38 +00:00
|
|
|
#if wxUSE_TIPWINDOW
|
2000-09-10 16:30:16 +00:00
|
|
|
|
2001-11-30 23:02:27 +00:00
|
|
|
#if wxUSE_POPUPWIN
|
2001-12-02 01:54:38 +00:00
|
|
|
#include "wx/popupwin.h"
|
|
|
|
#else
|
|
|
|
#include "wx/frame.h"
|
|
|
|
#endif
|
2001-12-01 03:18:24 +00:00
|
|
|
|
2000-09-10 16:30:16 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxTipWindow
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2001-12-02 01:54:38 +00:00
|
|
|
#if wxUSE_POPUPWIN
|
2001-11-30 23:02:27 +00:00
|
|
|
class WXDLLEXPORT wxTipWindow : public wxPopupTransientWindow
|
2001-12-02 01:54:38 +00:00
|
|
|
#else
|
|
|
|
class WXDLLEXPORT wxTipWindow : public wxFrame
|
|
|
|
#endif
|
2000-09-10 16:30:16 +00:00
|
|
|
{
|
2001-12-02 01:54:38 +00:00
|
|
|
friend class wxTipWindowView;
|
2000-09-10 16:30:16 +00:00
|
|
|
public:
|
2001-02-22 17:29:51 +00:00
|
|
|
// Supply windowPtr for it to null the given address
|
|
|
|
// when the window has closed.
|
2000-09-10 16:30:16 +00:00
|
|
|
wxTipWindow(wxWindow *parent,
|
|
|
|
const wxString& text,
|
2001-02-22 17:29:51 +00:00
|
|
|
wxCoord maxLength = 100, wxTipWindow** windowPtr = NULL);
|
|
|
|
~wxTipWindow();
|
|
|
|
|
|
|
|
void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; }
|
2000-09-10 16:30:16 +00:00
|
|
|
|
2001-11-30 23:02:27 +00:00
|
|
|
void Close();
|
|
|
|
|
2000-09-10 16:30:16 +00:00
|
|
|
protected:
|
|
|
|
// event handlers
|
|
|
|
void OnMouseClick(wxMouseEvent& event);
|
2001-12-02 01:54:38 +00:00
|
|
|
#if !wxUSE_POPUPWIN
|
|
|
|
void OnActivate(wxActivateEvent& event);
|
|
|
|
void OnKillFocus(wxFocusEvent& event);
|
|
|
|
#endif
|
2000-09-10 16:30:16 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxArrayString m_textLines;
|
|
|
|
wxCoord m_heightLine;
|
2001-02-22 17:29:51 +00:00
|
|
|
wxTipWindow** m_windowPtr;
|
2000-09-10 16:30:16 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2001-12-02 01:54:38 +00:00
|
|
|
#endif // wxUSE_TIPWINDOW
|
2000-09-10 16:30:16 +00:00
|
|
|
#endif // _WX_TIPWIN_H_
|