Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
wxFlatNotebook 2.2
SharkCZ:
The patch is here
--- Code: ---Index: wxFlatNotebook.cpp
===================================================================
--- wxFlatNotebook.cpp (revision 4338)
+++ wxFlatNotebook.cpp (working copy)
@@ -1122,7 +1122,11 @@
}
rect = wxRect(btnXPos, 8, 16, 16);
+#if wxCHECK_VERSION(2, 8, 0)
if(rect.Contains(pt))
+#else
+ if(rect.Inside(pt))
+#endif
{
return (style & wxFNB_NO_X_BUTTON) ? wxFNB_NOWHERE : wxFNB_X;
}
@@ -1131,18 +1135,30 @@
if( style & wxFNB_DROPDOWN_TABS_LIST )
{
rect = wxRect(render->GetDropArrowButtonPos( this ), 8, 16, 16);
+#if wxCHECK_VERSION(2, 8, 0)
if( rect.Contains(pt) )
+#else
+ if( rect.Inside(pt) )
+#endif
return wxFNB_DROP_DOWN_ARROW;
}
+#if wxCHECK_VERSION(2, 8, 0)
if(rect.Contains(pt))
+#else
+ if(rect.Inside(pt))
+#endif
{
return (style & wxFNB_NO_NAV_BUTTONS) ? wxFNB_NOWHERE : wxFNB_RIGHT_ARROW;
}
rect = wxRect(btnLeftPos, 8, 16, 16);
+#if wxCHECK_VERSION(2, 8, 0)
if(rect.Contains(pt))
+#else
+ if(rect.Inside(pt))
+#endif
{
return (style & wxFNB_NO_NAV_BUTTONS) ? wxFNB_NOWHERE : wxFNB_LEFT_ARROW;
}
@@ -1159,7 +1175,11 @@
if(style & wxFNB_X_ON_TAB && (int)cur == GetSelection())
{
// 'x' button exists on a tab
+#if wxCHECK_VERSION(2, 8, 0)
if(m_pagesInfoVec[cur].GetXRect().Contains(pt))
+#else
+ if(m_pagesInfoVec[cur].GetXRect().Inside(pt))
+#endif
{
pageInfo = pgInfo;
tabIdx = (int)cur;
@@ -1187,7 +1207,11 @@
wxRect tabRect = wxRect(pgInfo.GetPosition().x, pgInfo.GetPosition().y,
pgInfo.GetSize().x, pgInfo.GetSize().y);
+#if wxCHECK_VERSION(2, 8, 0)
if(tabRect.Contains(pt))
+#else
+ if(tabRect.Inside(pt))
+#endif
{
// We have a match
pageInfo = pgInfo;
--- End code ---
killerbot:
so it does not build without manual patch. I prefer to not to apply this patch, so our sources are the same as eranif's. Unless he would do a similar thing, but my opinion : wx26 is old ....
SharkCZ:
--- Quote from: killerbot on July 31, 2007, 09:09:46 pm ---so it does not build without manual patch. I prefer to not to apply this patch, so our sources are the same as eranif's. Unless he would do a similar thing, but my opinion : wx26 is old ....
--- End quote ---
I agree, it was published only for "archive" purposes. And I will use it locally for official FC-6 builds during then next few months until the Fedora 8 is published.
eranif:
I fixed this portability issue with 2.6.x in SVN
wxFlatNotebook.cpp:
--- Code: ---static bool InsideRect(const wxRect &rect, const wxPoint &pt)
{
#if wxCHECK_VERSION(2, 8, 0)
return rect.Contains(pt);
#else
return rect.Inside(pt);
#endif
}
--- End code ---
and replaced all calls for wxRect::Contains to it.
I dont have 2.6 - but I think it should compile now (can anyone confirm this?)
Eran
killerbot:
I will upgrade our sources tomorrow accordingly
Navigation
[0] Message Index
[*] Previous page
Go to full version