GTK prefix for internal tooltip methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -85,7 +85,7 @@ public:
|
|||||||
GtkWidget *GetConnectWidget();
|
GtkWidget *GetConnectWidget();
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
void ApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
struct _GtkTreeView *m_treeview;
|
struct _GtkTreeView *m_treeview;
|
||||||
|
@@ -131,7 +131,7 @@ public:
|
|||||||
void GtkDisableEvents();
|
void GtkDisableEvents();
|
||||||
void GtkEnableEvents();
|
void GtkEnableEvents();
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
void ApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
wxRadioBoxButtonsInfoList m_buttonsInfo;
|
wxRadioBoxButtonsInfoList m_buttonsInfo;
|
||||||
|
@@ -46,15 +46,12 @@ public:
|
|||||||
bool IsOk() const { return m_window != NULL; }
|
bool IsOk() const { return m_window != NULL; }
|
||||||
|
|
||||||
|
|
||||||
// wxGTK-only from now on
|
// this forwards back to wxWindow::GTKApplyToolTip()
|
||||||
|
void GTKApply( wxWindow *win );
|
||||||
// this forwards back to wxWindow::ApplyToolTip()
|
|
||||||
void Apply( wxWindow *win );
|
|
||||||
|
|
||||||
// this just sets the given tooltip for the specified widget
|
// this just sets the given tooltip for the specified widget
|
||||||
//
|
// tip must be UTF-8 encoded
|
||||||
// tip must be already UTF-8 encoded
|
static void GTKApply(GtkWidget *w, const gchar *tip);
|
||||||
static void Apply(GtkWidget *w, const gchar *tip);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString m_text;
|
wxString m_text;
|
||||||
|
@@ -217,7 +217,7 @@ public:
|
|||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
// applies tooltip to the widget (tip must be UTF-8 encoded)
|
// applies tooltip to the widget (tip must be UTF-8 encoded)
|
||||||
virtual void ApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
virtual void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
// Called when a window should delay showing itself
|
// Called when a window should delay showing itself
|
||||||
|
@@ -920,7 +920,7 @@ int wxListBox::DoListHitTest(const wxPoint& point) const
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
void wxListBox::ApplyToolTip( GtkTooltips *tips, const gchar *tip )
|
void wxListBox::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip )
|
||||||
{
|
{
|
||||||
// RN: Is this needed anymore?
|
// RN: Is this needed anymore?
|
||||||
gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, NULL );
|
gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, NULL );
|
||||||
|
@@ -571,7 +571,7 @@ void wxRadioBox::GTKWidgetDoSetMnemonic(GtkWidget* w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip)
|
void wxRadioBox::GTKApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip)
|
||||||
{
|
{
|
||||||
// set this tooltip for all radiobuttons which don't have their own tips
|
// set this tooltip for all radiobuttons which don't have their own tips
|
||||||
unsigned n = 0;
|
unsigned n = 0;
|
||||||
@@ -581,7 +581,7 @@ void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip)
|
|||||||
{
|
{
|
||||||
if ( !GetItemToolTip(n) )
|
if ( !GetItemToolTip(n) )
|
||||||
{
|
{
|
||||||
wxToolTip::Apply(GTK_WIDGET(node->GetData()->button), tip);
|
wxToolTip::GTKApply(GTK_WIDGET(node->GetData()->button), tip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -594,7 +594,7 @@ void wxRadioBox::DoSetItemToolTip(unsigned int n, wxToolTip *tooltip)
|
|||||||
if ( tooltip )
|
if ( tooltip )
|
||||||
buf = wxGTK_CONV(tooltip->GetTip());
|
buf = wxGTK_CONV(tooltip->GetTip());
|
||||||
|
|
||||||
wxToolTip::Apply(GTK_WIDGET(m_buttonsInfo[n]->button), buf);
|
wxToolTip::GTKApply(GTK_WIDGET(m_buttonsInfo[n]->button), buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
@@ -41,10 +41,10 @@ wxToolTip::wxToolTip( const wxString &tip )
|
|||||||
void wxToolTip::SetTip( const wxString &tip )
|
void wxToolTip::SetTip( const wxString &tip )
|
||||||
{
|
{
|
||||||
m_text = tip;
|
m_text = tip;
|
||||||
Apply( m_window );
|
GTKApply( m_window );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolTip::Apply( wxWindow *win )
|
void wxToolTip::GTKApply( wxWindow *win )
|
||||||
{
|
{
|
||||||
if (!win)
|
if (!win)
|
||||||
return;
|
return;
|
||||||
@@ -55,13 +55,13 @@ void wxToolTip::Apply( wxWindow *win )
|
|||||||
m_window = win;
|
m_window = win;
|
||||||
|
|
||||||
if (m_text.empty())
|
if (m_text.empty())
|
||||||
m_window->ApplyToolTip( gs_tooltips, NULL );
|
m_window->GTKApplyToolTip( gs_tooltips, NULL );
|
||||||
else
|
else
|
||||||
m_window->ApplyToolTip( gs_tooltips, wxGTK_CONV_SYS(m_text) );
|
m_window->GTKApplyToolTip( gs_tooltips, wxGTK_CONV_SYS(m_text) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void wxToolTip::Apply(GtkWidget *w, const gchar *tip)
|
void wxToolTip::GTKApply(GtkWidget *w, const gchar *tip)
|
||||||
{
|
{
|
||||||
if ( !gs_tooltips )
|
if ( !gs_tooltips )
|
||||||
gs_tooltips = gtk_tooltips_new();
|
gs_tooltips = gtk_tooltips_new();
|
||||||
|
@@ -3716,10 +3716,10 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip )
|
|||||||
wxWindowBase::DoSetToolTip(tip);
|
wxWindowBase::DoSetToolTip(tip);
|
||||||
|
|
||||||
if (m_tooltip)
|
if (m_tooltip)
|
||||||
m_tooltip->Apply( (wxWindow *)this );
|
m_tooltip->GTKApply( (wxWindow *)this );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const gchar *tip )
|
void wxWindowGTK::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip )
|
||||||
{
|
{
|
||||||
gtk_tooltips_set_tip(tips, GetConnectWidget(), tip, NULL);
|
gtk_tooltips_set_tip(tips, GetConnectWidget(), tip, NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user