Allow compiling wxStatusBar without tooltips and theme support.
Closes #13846.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70310
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// used by DoUpdateStatusText()
wxClientDC *m_pDC;
// used by DoUpdateStatusText()
wxClientDC *m_pDC;
// the tooltips used when wxSTB_SHOW_TIPS is given
wxVector<wxToolTip*> m_tooltips;
// the tooltips used when wxSTB_SHOW_TIPS is given
wxVector<wxToolTip*> m_tooltips;
private:
struct MSWBorders
private:
struct MSWBorders
// occupy
PostSizeEventToParent();
// occupy
PostSizeEventToParent();
// delete existing tooltips
for (size_t i=0; i<m_tooltips.size(); i++)
{
wxDELETE(m_tooltips[i]);
}
// delete existing tooltips
for (size_t i=0; i<m_tooltips.size(); i++)
{
wxDELETE(m_tooltips[i]);
}
+#endif // wxUSE_TOOLTIPS
// keep in synch also our m_tooltips array
// keep in synch also our m_tooltips array
// reset all current tooltips
for (size_t i=0; i<m_tooltips.size(); i++)
{
// reset all current tooltips
for (size_t i=0; i<m_tooltips.size(); i++)
{
// shrink/expand the array:
m_tooltips.resize(nFields, NULL);
// shrink/expand the array:
m_tooltips.resize(nFields, NULL);
+#endif // wxUSE_TOOLTIPS
wxStatusBarBase::SetFieldsCount(nFields, widths);
wxStatusBarBase::SetFieldsCount(nFields, widths);
wxLogLastError("StatusBar_SetText");
}
wxLogLastError("StatusBar_SetText");
}
if (HasFlag(wxSTB_SHOW_TIPS))
{
wxASSERT(m_tooltips.size() == m_panes.GetCount());
if (HasFlag(wxSTB_SHOW_TIPS))
{
wxASSERT(m_tooltips.size() == m_panes.GetCount());
//else: leave m_tooltips[nField]==NULL
}
}
//else: leave m_tooltips[nField]==NULL
}
}
+#endif // wxUSE_TOOLTIPS
}
wxStatusBar::MSWBorders wxStatusBar::MSWGetBorders() const
}
wxStatusBar::MSWBorders wxStatusBar::MSWGetBorders() const
// into account to make sure the text drawn by user fits inside the
// pane. Notice that it's not the value returned by SB_GETBORDERS
// which, at least on this Windows 2003 system, returns {0, 2, 2}
// into account to make sure the text drawn by user fits inside the
// pane. Notice that it's not the value returned by SB_GETBORDERS
// which, at least on this Windows 2003 system, returns {0, 2, 2}
if ( wxUxThemeEngine::GetIfActive() )
{
s_metrics.gripWidth = 20;
s_metrics.textMargin = 8;
}
else // classic/unthemed look
if ( wxUxThemeEngine::GetIfActive() )
{
s_metrics.gripWidth = 20;
s_metrics.textMargin = 8;
}
else // classic/unthemed look
{
s_metrics.gripWidth = 18;
s_metrics.textMargin = 4;
{
s_metrics.gripWidth = 18;
s_metrics.textMargin = 4;