Implement wxToolTip::SetDelay() for wxOSX
Set the "NSInitialToolTipDelay" object in NSUserDefaults. Closes #17322.
This commit is contained in:
parent
13783d8733
commit
c5659b19b4
@ -199,3 +199,4 @@ wxOSX/Cocoa:
|
|||||||
- Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn).
|
- Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn).
|
||||||
- Don't leave wxSlider labels shown when the slider itself is hidden.
|
- Don't leave wxSlider labels shown when the slider itself is hidden.
|
||||||
- Don't generate wxEVT_TEXT_ENTER for controls without wxTE_PROCESS_ENTER.
|
- Don't generate wxEVT_TEXT_ENTER for controls without wxTE_PROCESS_ENTER.
|
||||||
|
- Implement wxToolTip::SetDelay() (David Vanderson).
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Set the delay after which the tooltip appears.
|
Set the delay after which the tooltip appears.
|
||||||
|
|
||||||
@note May not be supported on all platforms (eg. wxCocoa).
|
@note May not be supported on all platforms.
|
||||||
*/
|
*/
|
||||||
static void SetDelay(long msecs);
|
static void SetDelay(long msecs);
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
#include "wx/geometry.h"
|
#include "wx/geometry.h"
|
||||||
#include "wx/osx/uma.h"
|
#include "wx/osx/uma.h"
|
||||||
|
|
||||||
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
|
#include <Appkit/Appkit.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// FYI a link to help with implementing: http://www.cocoadev.com/index.pl?LittleYellowBox
|
// FYI a link to help with implementing: http://www.cocoadev.com/index.pl?LittleYellowBox
|
||||||
|
|
||||||
|
|
||||||
@ -59,8 +63,12 @@ void wxToolTip::Enable( bool WXUNUSED(flag) )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolTip::SetDelay( long WXUNUSED(msecs) )
|
void wxToolTip::SetDelay( long msecs )
|
||||||
{
|
{
|
||||||
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject: [NSNumber numberWithInt: msecs]
|
||||||
|
forKey: @"NSInitialToolTipDelay"];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolTip::SetAutoPop( long WXUNUSED(msecs) )
|
void wxToolTip::SetAutoPop( long WXUNUSED(msecs) )
|
||||||
|
Loading…
Reference in New Issue
Block a user