projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warnings about signed/unsigned comparisons inside wxMax() and friends.
[wxWidgets.git]
/
src
/
os2
/
notebook.cpp
diff --git
a/src/os2/notebook.cpp
b/src/os2/notebook.cpp
index 5876c5b5a76868094bd2b9686e6396e1d2f40c27..fb45fe10a3e64131652bd3d23bf4b46fd09356ed 100644
(file)
--- a/
src/os2/notebook.cpp
+++ b/
src/os2/notebook.cpp
@@
-76,7
+76,6
@@
IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase)
void wxNotebook::Init()
{
m_imageList = NULL;
void wxNotebook::Init()
{
m_imageList = NULL;
- m_nSelection = -1;
m_nTabSize = 0;
} // end of wxNotebook::Init
m_nTabSize = 0;
} // end of wxNotebook::Init
@@
-210,14
+209,14
@@
int wxNotebook::SetSelection( size_t nPage )
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
- if (nPage != (size_t)m_
nS
election)
+ if (nPage != (size_t)m_
s
election)
{
wxBookCtrlEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
,m_windowId
);
vEvent.SetSelection(nPage);
{
wxBookCtrlEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
,m_windowId
);
vEvent.SetSelection(nPage);
- vEvent.SetOldSelection(m_
nS
election);
+ vEvent.SetOldSelection(m_
s
election);
vEvent.SetEventObject(this);
if (!HandleWindowEvent(vEvent) || vEvent.IsAllowed())
{
vEvent.SetEventObject(this);
if (!HandleWindowEvent(vEvent) || vEvent.IsAllowed())
{
@@
-235,7
+234,7
@@
int wxNotebook::SetSelection( size_t nPage )
);
}
}
);
}
}
- m_
nS
election = nPage;
+ m_
s
election = nPage;
return nPage;
} // end of wxNotebook::SetSelection
return nPage;
} // end of wxNotebook::SetSelection
@@
-243,7
+242,7
@@
int wxNotebook::ChangeSelection( size_t nPage )
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
- if (nPage != (size_t)m_
nS
election)
+ if (nPage != (size_t)m_
s
election)
{
::WinSendMsg( GetHWND()
,BKM_TURNTOPAGE
{
::WinSendMsg( GetHWND()
,BKM_TURNTOPAGE
@@
-251,7
+250,7
@@
int wxNotebook::ChangeSelection( size_t nPage )
,(MPARAM)0
);
}
,(MPARAM)0
);
}
- m_
nS
election = nPage;
+ m_
s
election = nPage;
return nPage;
}
return nPage;
}
@@
-404,7
+403,7
@@
wxNotebookPage* wxNotebook::DoRemovePage ( size_t nPage )
//
// No selection any more, the notebook becamse empty
//
//
// No selection any more, the notebook becamse empty
//
- m_
nSelection = -1
;
+ m_
selection = wxNOT_FOUND
;
}
else // notebook still not empty
{
}
else // notebook still not empty
{
@@
-413,19
+412,19
@@
wxNotebookPage* wxNotebook::DoRemovePage ( size_t nPage )
//
int nSelNew;
//
int nSelNew;
- if (m_
nS
election == (int)GetPageCount())
+ if (m_
s
election == (int)GetPageCount())
{
//
// Last page deleted, make the new last page the new selection
//
{
//
// Last page deleted, make the new last page the new selection
//
- nSelNew = m_
nS
election - 1;
+ nSelNew = m_
s
election - 1;
}
}
- else if (nPage <= (size_t)m_
nS
election)
+ else if (nPage <= (size_t)m_
s
election)
{
//
// We must show another page, even if it has the same index
//
{
//
// We must show another page, even if it has the same index
//
- nSelNew = m_
nS
election;
+ nSelNew = m_
s
election;
}
else // nothing changes for the currently selected page
{
}
else // nothing changes for the currently selected page
{
@@
-437,16
+436,16
@@
wxNotebookPage* wxNotebook::DoRemovePage ( size_t nPage )
// control (i.e. when there are too many pages) -- otherwise after
// deleting a page nothing at all is shown
//
// control (i.e. when there are too many pages) -- otherwise after
// deleting a page nothing at all is shown
//
- m_pages[m_
nS
election]->Refresh();
+ m_pages[m_
s
election]->Refresh();
}
if (nSelNew != wxNOT_FOUND)
{
//
}
if (nSelNew != wxNOT_FOUND)
{
//
- // m_
nS
election must be always valid so reset it before calling
+ // m_
s
election must be always valid so reset it before calling
// SetSelection()
//
// SetSelection()
//
- m_
nSelection = -1
;
+ m_
selection = wxNOT_FOUND
;
SetSelection(nSelNew);
}
}
SetSelection(nSelNew);
}
}
@@
-469,7
+468,7
@@
bool wxNotebook::DeleteAllPages()
,(MPARAM)0
,(MPARAM)BKA_ALL
);
,(MPARAM)0
,(MPARAM)BKA_ALL
);
- m_
nSelection = -1
;
+ m_
selection = wxNOT_FOUND
;
return true;
} // end of wxNotebook::DeleteAllPages
return true;
} // end of wxNotebook::DeleteAllPages
@@
-569,12
+568,12
@@
bool wxNotebook::InsertPage ( size_t nPage,
// If the inserted page is before the selected one, we must update the
// index of the selected page
//
// If the inserted page is before the selected one, we must update the
// index of the selected page
//
- if (nPage <= (size_t)m_
nS
election)
+ if (nPage <= (size_t)m_
s
election)
{
//
// One extra page added
//
{
//
// One extra page added
//
- m_
nS
election++;
+ m_
s
election++;
}
if (pPage)
}
if (pPage)
@@
-657,7
+656,7
@@
bool wxNotebook::InsertPage ( size_t nPage,
if (bSelect)
nSelNew = nPage;
if (bSelect)
nSelNew = nPage;
- else if ( m_
nSelection == -1
)
+ else if ( m_
selection == wxNOT_FOUND
)
nSelNew = 0;
if (nSelNew != wxNOT_FOUND)
nSelNew = 0;
if (nSelNew != wxNOT_FOUND)
@@
-725,7
+724,7
@@
void wxNotebook::OnSelChange (
wxNotebookPage* pPage = m_pages[nSel];
pPage->Show(true);
wxNotebookPage* pPage = m_pages[nSel];
pPage->Show(true);
- m_
nS
election = nSel;
+ m_
s
election = nSel;
}
//
}
//
@@
-746,8
+745,8
@@
void wxNotebook::OnSetFocus (
//
// set focus to the currently selected page if any
//
//
// set focus to the currently selected page if any
//
- if (m_
nSelection != -1
)
- m_pages[m_
nS
election]->SetFocus();
+ if (m_
selection != wxNOT_FOUND
)
+ m_pages[m_
s
election]->SetFocus();
rEvent.Skip();
} // end of wxNotebook::OnSetFocus
rEvent.Skip();
} // end of wxNotebook::OnSetFocus
@@
-786,7
+785,7
@@
void wxNotebook::OnNavigationKey (
//
// No, it doesn't come from child, case (b): forward to a page
//
//
// No, it doesn't come from child, case (b): forward to a page
//
- if (m_
nSelection != -1
)
+ if (m_
selection != wxNOT_FOUND
)
{
//
// So that the page knows that the event comes from it's parent
{
//
// So that the page knows that the event comes from it's parent
@@
-794,7
+793,7
@@
void wxNotebook::OnNavigationKey (
//
rEvent.SetEventObject(this);
//
rEvent.SetEventObject(this);
- wxWindow* pPage = m_pages[m_
nS
election];
+ wxWindow* pPage = m_pages[m_
s
election];
if (!pPage->HandleWindowEvent(rEvent))
{
if (!pPage->HandleWindowEvent(rEvent))
{