129caaddf1
grab the mouse, but instead deletes itself when it's deactivated or loses the focus. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// 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
|
|
{
|
|
public:
|
|
wxTipWindow(wxWindow *parent,
|
|
const wxString& text,
|
|
wxCoord maxLength = 100);
|
|
|
|
protected:
|
|
// event handlers
|
|
void OnPaint(wxPaintEvent& event);
|
|
void OnMouseClick(wxMouseEvent& event);
|
|
void OnActivate(wxActivateEvent& event);
|
|
void OnKillFocus(wxFocusEvent& event);
|
|
|
|
// calculate the client rect we need to display the text
|
|
void Adjust(const wxString& text, wxCoord maxLength);
|
|
|
|
private:
|
|
wxArrayString m_textLines;
|
|
wxCoord m_heightLine;
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
};
|
|
|
|
#endif // _WX_TIPWIN_H_
|