merged 2.4 branch into the trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-12-04 14:11:26 +00:00
parent 59a944cb63
commit 2b5f62a0b2
1057 changed files with 37805 additions and 24034 deletions

View File

@@ -93,7 +93,7 @@
class wxListBoxItem : public wxOwnerDrawn
{
public:
wxListBoxItem(const wxString& str = "");
wxListBoxItem(const wxString& str = wxEmptyString);
};
wxListBoxItem::wxListBoxItem(const wxString& str) : wxOwnerDrawn(str, FALSE)
@@ -102,7 +102,7 @@ wxListBoxItem::wxListBoxItem(const wxString& str) : wxOwnerDrawn(str, FALSE)
SetMarginWidth(0);
}
wxOwnerDrawn *wxListBox::CreateItem(size_t WXUNUSED(n))
wxOwnerDrawn *wxListBox::CreateLboxItem(size_t WXUNUSED(n))
{
return new wxListBoxItem();
}
@@ -272,7 +272,7 @@ void wxListBox::Delete(int N)
SendMessage(GetHwnd(), LB_DELETESTRING, N, 0);
m_noItems--;
SetHorizontalExtent("");
SetHorizontalExtent(wxEmptyString);
}
int wxListBox::DoAppend(const wxString& item)
@@ -282,7 +282,7 @@ int wxListBox::DoAppend(const wxString& item)
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW ) {
wxOwnerDrawn *pNewItem = CreateItem(index); // dummy argument
wxOwnerDrawn *pNewItem = CreateLboxItem(index); // dummy argument
pNewItem->SetName(item);
m_aItems.Insert(pNewItem, index);
ListBox_SetItemData(GetHwnd(), index, pNewItem);
@@ -313,16 +313,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
ListBox_AddString(GetHwnd(), choices[i]);
if ( clientData )
{
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW )
{
wxASSERT_MSG(clientData[i] == NULL,
wxT("Can't use client data with owner-drawn listboxes"));
}
ListBox_SetItemData(GetHwnd(), i, clientData[i]);
#else // !wxUSE_OWNER_DRAWN
ListBox_SetItemData(GetHwnd(), i, clientData[i]);
#endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN
SetClientData(i, clientData[i]);
}
}
@@ -333,7 +324,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
// then create new ones
for ( size_t ui = 0; ui < (size_t)m_noItems; ui++ ) {
wxOwnerDrawn *pNewItem = CreateItem(ui);
wxOwnerDrawn *pNewItem = CreateLboxItem(ui);
pNewItem->SetName(choices[ui]);
m_aItems.Add(pNewItem);
ListBox_SetItemData(GetHwnd(), ui, pNewItem);
@@ -502,7 +493,7 @@ int wxListBox::GetSelection() const
// Find string for position
wxString wxListBox::GetString(int N) const
{
wxCHECK_MSG( N >= 0 && N < m_noItems, "",
wxCHECK_MSG( N >= 0 && N < m_noItems, wxEmptyString,
wxT("invalid index in wxListBox::GetClientData") );
int len = ListBox_GetTextLen(GetHwnd(), N);
@@ -529,7 +520,7 @@ wxListBox::DoInsertItems(const wxArrayString& items, int pos)
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW )
{
wxOwnerDrawn *pNewItem = CreateItem(idx);
wxOwnerDrawn *pNewItem = CreateLboxItem(idx);
pNewItem->SetName(items[i]);
pNewItem->SetFont(GetFont());
m_aItems.Insert(pNewItem, idx);