#pragma hdrstop
#endif
+#if wxUSE_TAB_DIALOG
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
m_shadowPen = wxGREY_PEN;
m_backgroundPen = wxLIGHT_GREY_PEN;
m_backgroundBrush = wxLIGHT_GREY_BRUSH;
- m_tabFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
- m_tabSelectedFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+ m_tabFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+ m_tabSelectedFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_window = (wxWindow *) NULL;
}
m_noTabs --;
// The layout has changed
- Layout();
+ LayoutTabs();
return TRUE;
}
tabNode = tabNode->Next();
layerNode = nextLayerNode;
}
m_noTabs = 0;
+ m_tabSelection = -1;
}
// Layout tabs (optional, e.g. if resizing window)
-void wxTabView::Layout(void)
+void wxTabView::LayoutTabs(void)
{
// Make a list of the tab controls, deleting the wxTabLayers.
wxList controls;
if (!event.LeftDown())
return FALSE;
- long x, y;
- event.Position(&x, &y);
+ wxCoord x, y;
+ event.GetPosition(&x, &y);
wxTabControl *hitControl = (wxTabControl *) NULL;
void wxTabView::SetTabSelection(int sel, bool activateTool)
{
+ if ( sel==m_tabSelection )
+ return;
+
int oldSel = m_tabSelection;
wxTabControl *control = FindTabControlForId(sel);
wxTabControl *oldControl = FindTabControlForId(m_tabSelection);
newWindow->Refresh();
}
+#endif // wxUSE_TAB_DIALOG