[ 1357527 ] Cast to void to silence GCC's warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1214,7 +1214,7 @@ void wxListCtrl::SetImageList(wxImageList *imageList, int which)
|
|||||||
m_imageListState = imageList;
|
m_imageListState = imageList;
|
||||||
m_ownsImageListState = false;
|
m_ownsImageListState = false;
|
||||||
}
|
}
|
||||||
ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
|
(void) ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListCtrl::AssignImageList(wxImageList *imageList, int which)
|
void wxListCtrl::AssignImageList(wxImageList *imageList, int which)
|
||||||
@@ -2766,7 +2766,7 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
|
|||||||
// pszText is not const, hence the cast
|
// pszText is not const, hence the cast
|
||||||
lvItem.pszText = (wxChar *)info.m_text.c_str();
|
lvItem.pszText = (wxChar *)info.m_text.c_str();
|
||||||
if ( lvItem.pszText )
|
if ( lvItem.pszText )
|
||||||
lvItem.cchTextMax = info.m_text.Length();
|
lvItem.cchTextMax = info.m_text.length();
|
||||||
else
|
else
|
||||||
lvItem.cchTextMax = 0;
|
lvItem.cchTextMax = 0;
|
||||||
}
|
}
|
||||||
@@ -2835,4 +2835,3 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_LISTCTRL
|
#endif // wxUSE_LISTCTRL
|
||||||
|
|
||||||
|
@@ -408,97 +408,97 @@ wxNotebook::~wxNotebook()
|
|||||||
|
|
||||||
size_t wxNotebook::GetPageCount() const
|
size_t wxNotebook::GetPageCount() const
|
||||||
{
|
{
|
||||||
// consistency check
|
// consistency check
|
||||||
wxASSERT( (int)m_pages.Count() == TabCtrl_GetItemCount(GetHwnd()) );
|
wxASSERT( (int)m_pages.Count() == TabCtrl_GetItemCount(GetHwnd()) );
|
||||||
|
|
||||||
return m_pages.Count();
|
return m_pages.Count();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxNotebook::GetRowCount() const
|
int wxNotebook::GetRowCount() const
|
||||||
{
|
{
|
||||||
return TabCtrl_GetRowCount(GetHwnd());
|
return TabCtrl_GetRowCount(GetHwnd());
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxNotebook::SetSelection(size_t nPage)
|
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 ( int(nPage) != m_nSelection )
|
if ( int(nPage) != m_nSelection )
|
||||||
{
|
|
||||||
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
|
|
||||||
event.SetSelection(nPage);
|
|
||||||
event.SetOldSelection(m_nSelection);
|
|
||||||
event.SetEventObject(this);
|
|
||||||
if ( !GetEventHandler()->ProcessEvent(event) || event.IsAllowed() )
|
|
||||||
{
|
{
|
||||||
// program allows the page change
|
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
|
||||||
event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
|
event.SetSelection(nPage);
|
||||||
(void)GetEventHandler()->ProcessEvent(event);
|
event.SetOldSelection(m_nSelection);
|
||||||
|
event.SetEventObject(this);
|
||||||
|
if ( !GetEventHandler()->ProcessEvent(event) || event.IsAllowed() )
|
||||||
|
{
|
||||||
|
// program allows the page change
|
||||||
|
event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
|
||||||
|
(void)GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
TabCtrl_SetCurSel(GetHwnd(), nPage);
|
TabCtrl_SetCurSel(GetHwnd(), nPage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return m_nSelection;
|
return m_nSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
|
bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
||||||
|
|
||||||
TC_ITEM tcItem;
|
TC_ITEM tcItem;
|
||||||
tcItem.mask = TCIF_TEXT;
|
tcItem.mask = TCIF_TEXT;
|
||||||
tcItem.pszText = (wxChar *)strText.c_str();
|
tcItem.pszText = (wxChar *)strText.c_str();
|
||||||
|
|
||||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxNotebook::GetPageText(size_t nPage) const
|
wxString wxNotebook::GetPageText(size_t nPage) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") );
|
||||||
|
|
||||||
wxChar buf[256];
|
wxChar buf[256];
|
||||||
TC_ITEM tcItem;
|
TC_ITEM tcItem;
|
||||||
tcItem.mask = TCIF_TEXT;
|
tcItem.mask = TCIF_TEXT;
|
||||||
tcItem.pszText = buf;
|
tcItem.pszText = buf;
|
||||||
tcItem.cchTextMax = WXSIZEOF(buf);
|
tcItem.cchTextMax = WXSIZEOF(buf);
|
||||||
|
|
||||||
wxString str;
|
wxString str;
|
||||||
if ( TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) )
|
if ( TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) )
|
||||||
str = tcItem.pszText;
|
str = tcItem.pszText;
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxNotebook::GetPageImage(size_t nPage) const
|
int wxNotebook::GetPageImage(size_t nPage) const
|
||||||
{
|
{
|
||||||
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") );
|
||||||
|
|
||||||
TC_ITEM tcItem;
|
TC_ITEM tcItem;
|
||||||
tcItem.mask = TCIF_IMAGE;
|
tcItem.mask = TCIF_IMAGE;
|
||||||
|
|
||||||
return TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) ? tcItem.iImage : wxNOT_FOUND;
|
return TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) ? tcItem.iImage : wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
||||||
|
|
||||||
TC_ITEM tcItem;
|
TC_ITEM tcItem;
|
||||||
tcItem.mask = TCIF_IMAGE;
|
tcItem.mask = TCIF_IMAGE;
|
||||||
tcItem.iImage = nImage;
|
tcItem.iImage = nImage;
|
||||||
|
|
||||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxNotebook::SetImageList(wxImageList* imageList)
|
void wxNotebook::SetImageList(wxImageList* imageList)
|
||||||
{
|
{
|
||||||
wxNotebookBase::SetImageList(imageList);
|
wxNotebookBase::SetImageList(imageList);
|
||||||
|
|
||||||
if ( imageList )
|
if ( imageList )
|
||||||
{
|
{
|
||||||
TabCtrl_SetImageList(GetHwnd(), (HIMAGELIST)imageList->GetHIMAGELIST());
|
(void) TabCtrl_SetImageList(GetHwnd(), (HIMAGELIST)imageList->GetHIMAGELIST());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: tabctrl.cpp
|
// Name: src/msw/tabctrl.cpp
|
||||||
// Purpose: wxTabCtrl
|
// Purpose: wxTabCtrl
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -315,7 +315,7 @@ int wxTabCtrl::SetSelection(int item)
|
|||||||
void wxTabCtrl::SetImageList(wxImageList* imageList)
|
void wxTabCtrl::SetImageList(wxImageList* imageList)
|
||||||
{
|
{
|
||||||
m_imageList = imageList;
|
m_imageList = imageList;
|
||||||
TabCtrl_SetImageList( (HWND) GetHWND(), (HIMAGELIST) imageList->GetHIMAGELIST() );
|
(void) TabCtrl_SetImageList( (HWND) GetHWND(), (HIMAGELIST) imageList->GetHIMAGELIST() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the text for an item
|
// Set the text for an item
|
||||||
@@ -430,5 +430,4 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // __WIN95__
|
||||||
// __WIN95__
|
|
||||||
|
@@ -835,9 +835,9 @@ void wxTreeCtrl::SetIndent(unsigned int indent)
|
|||||||
void wxTreeCtrl::SetAnyImageList(wxImageList *imageList, int which)
|
void wxTreeCtrl::SetAnyImageList(wxImageList *imageList, int which)
|
||||||
{
|
{
|
||||||
// no error return
|
// no error return
|
||||||
TreeView_SetImageList(GetHwnd(),
|
(void) TreeView_SetImageList(GetHwnd(),
|
||||||
imageList ? imageList->GetHIMAGELIST() : 0,
|
imageList ? imageList->GetHIMAGELIST() : 0,
|
||||||
which);
|
which);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeCtrl::SetImageList(wxImageList *imageList)
|
void wxTreeCtrl::SetImageList(wxImageList *imageList)
|
||||||
@@ -2020,7 +2020,7 @@ wxTreeItemId wxTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags)
|
|||||||
hitTestInfo.pt.x = (int)point.x;
|
hitTestInfo.pt.x = (int)point.x;
|
||||||
hitTestInfo.pt.y = (int)point.y;
|
hitTestInfo.pt.y = (int)point.y;
|
||||||
|
|
||||||
TreeView_HitTest(GetHwnd(), &hitTestInfo);
|
(void) TreeView_HitTest(GetHwnd(), &hitTestInfo);
|
||||||
|
|
||||||
flags = 0;
|
flags = 0;
|
||||||
|
|
||||||
@@ -2215,7 +2215,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
tvht.pt.x = x;
|
tvht.pt.x = x;
|
||||||
tvht.pt.y = y;
|
tvht.pt.y = y;
|
||||||
|
|
||||||
TreeView_HitTest(GetHwnd(), &tvht);
|
(void) TreeView_HitTest(GetHwnd(), &tvht);
|
||||||
|
|
||||||
switch ( nMsg )
|
switch ( nMsg )
|
||||||
{
|
{
|
||||||
@@ -3152,4 +3152,3 @@ int wxTreeCtrl::GetState(const wxTreeItemId& node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TREECTRL
|
#endif // wxUSE_TREECTRL
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user