added wxToolTip::SetAutoPop() and SetReshow() (patch 1768804)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-08-15 12:57:36 +00:00
parent c267759c8f
commit becac1ef57
14 changed files with 92 additions and 2 deletions

View File

@@ -154,6 +154,7 @@ All (GUI):
- Show standard options in wxCmdLineParser usage message (Francesco Montorsi).
- Added wxRect::operator+ (union) and * (intersection) (bdonner).
- Added support for two auxiliary mouse buttons to wxMouseEvent (Chris Weiland).
- Added wxToolTip::SetAutoPop() and SetReshow() (Jan Knepper)
- Added wxTaskBarIcon::Destroy()
wxGTK:

View File

@@ -3,8 +3,10 @@
This class holds information about a tooltip associated with a window
(see \helpref{wxWindow::SetToolTip}{wxwindowsettooltip}).
The two static methods, \helpref{wxToolTip::Enable}{wxtooltipenable} and
\helpref{wxToolTip::SetDelay}{wxtooltipsetdelay} can be used to globally
The four static methods, \helpref{wxToolTip::Enable}{wxtooltipenable},
\helpref{wxToolTip::SetDelay}{wxtooltipsetdelay}
\helpref(wxToolTip::SetAutoPop)(wxtooltipsetautopop) and
\helpref(wxToolTip::SetReshow)(wxtooltipsetreshow) can be used to globally
alter tooltips behaviour.
\wxheading{Derived from}
@@ -39,6 +41,21 @@ Set the delay after which the tooltip appears.
May not be supported on all platforms (eg. wxCocoa).
\membersection{wxToolTip::SetAutoPop}\label{wxtooltipsetautopop}
\func{static void}{SetAutoPop}{\param{long }{msecs}}
Set the delay after which the tooltip disappears or how long a
tooltip remains visible.
May not be supported on all platforms (eg. wxCocoa, GTK, Palmos).
\membersection{wxToolTip::SetReshow}\label{wxtooltipsetreshow}
\func{static void}{SetReshow}{\param{long }{msecs}}
Set the delay between subsequent tooltips to appear.
May not be supported on all platforms (eg. wxCocoa, GTK, Palmos).
\membersection{wxToolTip::wxToolTip}\label{wxtooltipwxtooltip}
\func{}{wxToolTip}{\param{const wxString\& }{tip}}

View File

@@ -36,6 +36,10 @@ public:
static void Enable(bool flag);
// set the delay after which the tooltip appears
static void SetDelay(long milliseconds);
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long milliseconds);
// set the delay between subsequent tooltips to appear
static void SetReshow(long milliseconds);
private:
void SetWindow(wxWindow* window);

View File

@@ -33,6 +33,10 @@ public:
// globally change the tooltip parameters
static void Enable( bool flag );
static void SetDelay( long msecs );
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long msecs);
// set the delay between subsequent tooltips to appear
static void SetReshow(long msecs);
// get/set the tooltip text
void SetTip( const wxString &tip );

View File

@@ -31,6 +31,10 @@ public:
// globally change the tooltip parameters
static void Enable( bool flag );
static void SetDelay( long msecs );
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long msecs);
// set the delay between subsequent tooltips to appear
static void SetReshow(long msecs);
wxToolTip( const wxString &tip );

View File

@@ -36,6 +36,10 @@ public:
static void Enable(bool flag);
// set the delay after which the tooltip appears
static void SetDelay(long milliseconds);
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long milliseconds);
// set the delay between subsequent tooltips to appear
static void SetReshow(long milliseconds);
static void NotifyWindowDelete( WXHWND win ) ;
// implementation only from now on

View File

@@ -37,6 +37,10 @@ public:
static void Enable(bool flag);
// set the delay after which the tooltip appears
static void SetDelay(long milliseconds);
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long milliseconds);
// set the delay between subsequent tooltips to appear
static void SetReshow(long milliseconds);
// implementation only from now on
// -------------------------------

View File

@@ -33,6 +33,10 @@ public:
static void Enable(bool WXUNUSED(flag)) {}
// set the delay after which the tooltip appears
static void SetDelay(long WXUNUSED(milliseconds)) {}
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long WXUNUSED(milliseconds)) {}
// set the delay between subsequent tooltips to appear
static void SetReshow(long WXUNUSED(milliseconds)) {}
//
// Implementation

View File

@@ -33,6 +33,10 @@ public:
static void Enable(bool flag);
// set the delay after which the tooltip appears
static void SetDelay(long milliseconds);
// set the delay after which the tooltip disappears or how long the tooltip remains visible
static void SetAutoPop(long milliseconds);
// set the delay between subsequent tooltips to appear
static void SetReshow(long milliseconds);
// implementation only from now on
// -------------------------------

View File

@@ -95,4 +95,12 @@ void wxToolTip::SetDelay( long msecs )
gtk_tooltips_set_delay( gs_tooltips, (int)msecs );
}
void wxToolTip::SetAutoPop( long WXUNUSED(msecs) )
{
}
void wxToolTip::SetReshow( long WXUNUSED(msecs) )
{
}
#endif // wxUSE_TOOLTIPS

View File

@@ -79,4 +79,12 @@ void wxToolTip::SetDelay( long msecs )
gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
}
void wxToolTip::SetAutoPop( long WXUNUSED(msecs) )
{
}
void wxToolTip::SetReshow( long WXUNUSED(msecs) )
{
}
#endif

View File

@@ -146,6 +146,14 @@ void wxToolTip::SetDelay( long msecs )
s_ToolTipDelay = msecs ;
}
void wxToolTip::SetAutoPop( long WXUNUSED(msecs) )
{
}
void wxToolTip::SetReshow( long WXUNUSED(msecs) )
{
}
void wxToolTip::RelayEvent( wxWindow *win , wxMouseEvent &event )
{
if ( s_ShowToolTips )

View File

@@ -191,6 +191,18 @@ void wxToolTip::SetDelay(long milliseconds)
TTDT_INITIAL, milliseconds);
}
void wxToolTip::SetAutoPop(long milliseconds)
{
SendTooltipMessageToAll(ms_hwndTT, TTM_SETDELAYTIME,
TTDT_AUTOPOP, milliseconds);
}
void wxToolTip::SetReshow(long milliseconds)
{
SendTooltipMessageToAll(ms_hwndTT, TTM_SETDELAYTIME,
TTDT_RESHOW, milliseconds);
}
// ---------------------------------------------------------------------------
// implementation helpers
// ---------------------------------------------------------------------------

View File

@@ -99,6 +99,14 @@ void wxToolTip::SetDelay(long milliseconds)
{
}
void wxToolTip::SetAutoPop( long WXUNUSED(milliseconds) )
{
}
void wxToolTip::SetReshow( long WXUNUSED(milliseconds) )
{
}
// ---------------------------------------------------------------------------
// implementation helpers
// ---------------------------------------------------------------------------