implemented SetItemToolTip()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,6 +125,10 @@ public:
|
|||||||
wxList m_buttons;
|
wxList m_buttons;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
#if wxUSE_TOOLTIPS
|
||||||
|
virtual void DoSetItemToolTip(unsigned int n, wxToolTip *tooltip);
|
||||||
|
#endif
|
||||||
|
|
||||||
void DoApplyWidgetStyle(GtkRcStyle *style);
|
void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||||
|
|
||||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||||
|
@@ -21,6 +21,10 @@
|
|||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
|
||||||
|
#if wxUSE_TOOLTIPS
|
||||||
|
#include "wx/tooltip.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
|
||||||
@@ -558,16 +562,33 @@ void wxRadioBox::GTKWidgetDoSetMnemonic(GtkWidget* w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
void wxRadioBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
|
void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const wxChar *tip)
|
||||||
{
|
{
|
||||||
wxList::compatibility_iterator node = m_buttons.GetFirst();
|
// set this tooltip for all radiobuttons which don't have their own tips
|
||||||
while (node)
|
unsigned n = 0;
|
||||||
|
for ( wxList::compatibility_iterator node = m_buttons.GetFirst();
|
||||||
|
node;
|
||||||
|
node = node->GetNext(), n++ )
|
||||||
{
|
{
|
||||||
GtkWidget *widget = GTK_WIDGET( node->GetData() );
|
if ( !GetItemToolTip(n) )
|
||||||
gtk_tooltips_set_tip( tips, widget, wxConvCurrent->cWX2MB(tip), (gchar*) NULL );
|
{
|
||||||
node = node->GetNext();
|
wxToolTip::Apply(GTK_WIDGET(node->GetData()),
|
||||||
|
wxConvCurrent->cWX2MB(tip));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxRadioBox::DoSetItemToolTip(unsigned int n, wxToolTip *tooltip)
|
||||||
|
{
|
||||||
|
wxCharBuffer buf;
|
||||||
|
if ( !tooltip )
|
||||||
|
tooltip = GetToolTip();
|
||||||
|
if ( tooltip )
|
||||||
|
buf = wxGTK_CONV(tooltip->GetTip());
|
||||||
|
|
||||||
|
wxToolTip::Apply(GTK_WIDGET(m_buttons[n]), buf);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
||||||
|
Reference in New Issue
Block a user