projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No real changes, just backwards propagate the changes to stc.cpp.
[wxWidgets.git]
/
src
/
univ
/
listbox.cpp
diff --git
a/src/univ/listbox.cpp
b/src/univ/listbox.cpp
index 8297decc68c188c619fd014264b2f36455933b10..147ebfb148dfe4cf9be1209cc73da746f320f6ce 100644
(file)
--- a/
src/univ/listbox.cpp
+++ b/
src/univ/listbox.cpp
@@
-97,8
+97,6
@@
protected:
// implementation of wxListBox
// ============================================================================
// implementation of wxListBox
// ============================================================================
-IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
-
BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase)
EVT_SIZE(wxListBox::OnSize)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase)
EVT_SIZE(wxListBox::OnSize)
END_EVENT_TABLE()
@@
-283,7
+281,7
@@
int wxListBox::DoInsertItems(const wxArrayStringsAdapter& items,
void wxListBox::SetString(unsigned int n, const wxString& s)
{
void wxListBox::SetString(unsigned int n, const wxString& s)
{
- wxCHECK_RET( !IsSorted(),
_
T("can't set string in sorted listbox") );
+ wxCHECK_RET( !IsSorted(),
wx
T("can't set string in sorted listbox") );
if ( IsSorted() )
(*m_strings.sorted)[n] = s;
if ( IsSorted() )
(*m_strings.sorted)[n] = s;
@@
-341,7
+339,7
@@
void wxListBox::DoClear()
void wxListBox::DoDeleteOneItem(unsigned int n)
{
wxCHECK_RET( IsValid(n),
void wxListBox::DoDeleteOneItem(unsigned int n)
{
wxCHECK_RET( IsValid(n),
-
_
T("invalid index in wxListBox::Delete") );
+
wx
T("invalid index in wxListBox::Delete") );
// do it before removing the index as otherwise the last item will not be
// refreshed (as GetCount() will be decremented)
// do it before removing the index as otherwise the last item will not be
// refreshed (as GetCount() will be decremented)
@@
-460,7
+458,7
@@
void wxListBox::DoSetSelection(int n, bool select)
// sanity check: a single selection listbox can't have more than one item
// selected
wxASSERT_MSG( HasMultipleSelection() || (m_selections.GetCount() < 2),
// sanity check: a single selection listbox can't have more than one item
// selected
wxASSERT_MSG( HasMultipleSelection() || (m_selections.GetCount() < 2),
-
_
T("multiple selected items in single selection lbox?") );
+
wx
T("multiple selected items in single selection lbox?") );
if ( select )
{
if ( select )
{
@@
-472,12
+470,12
@@
void wxListBox::DoSetSelection(int n, bool select)
int wxListBox::GetSelection() const
{
wxCHECK_MSG( !HasMultipleSelection(), wxNOT_FOUND,
int wxListBox::GetSelection() const
{
wxCHECK_MSG( !HasMultipleSelection(), wxNOT_FOUND,
-
_
T("use wxListBox::GetSelections for ths listbox") );
+
wx
T("use wxListBox::GetSelections for ths listbox") );
return m_selections.IsEmpty() ? wxNOT_FOUND : m_selections[0];
}
return m_selections.IsEmpty() ? wxNOT_FOUND : m_selections[0];
}
-int wxCMPFUNC_CONV wxCompareInts(int *n, int *m)
+
static
int wxCMPFUNC_CONV wxCompareInts(int *n, int *m)
{
return *n - *m;
}
{
return *n - *m;
}
@@
-639,7
+637,7
@@
void wxListBox::UpdateItems()
if ( m_updateCount == -1 )
{
// refresh all
if ( m_updateCount == -1 )
{
// refresh all
- wxLogTrace(
_T("listbox"), _
T("Refreshing all"));
+ wxLogTrace(
wxT("listbox"), wx
T("Refreshing all"));
Refresh();
}
Refresh();
}
@@
-656,7
+654,7
@@
void wxListBox::UpdateItems()
// entire line(s)
CalcScrolledPosition(0, rect.y, NULL, &rect.y);
// entire line(s)
CalcScrolledPosition(0, rect.y, NULL, &rect.y);
- wxLogTrace(
_T("listbox"), _
T("Refreshing items %d..%d (%d-%d)"),
+ wxLogTrace(
wxT("listbox"), wx
T("Refreshing items %d..%d (%d-%d)"),
m_updateFrom, m_updateFrom + m_updateCount - 1,
rect.GetTop(), rect.GetBottom());
m_updateFrom, m_updateFrom + m_updateCount - 1,
rect.GetTop(), rect.GetBottom());
@@
-726,7
+724,7
@@
void wxListBox::DoDraw(wxControlRenderer *renderer)
itemLast = itemMax;
// do draw them
itemLast = itemMax;
// do draw them
- wxLogTrace(
_T("listbox"), _
T("Repainting items %d..%d"),
+ wxLogTrace(
wxT("listbox"), wx
T("Repainting items %d..%d"),
itemFirst, itemLast);
DoDrawRange(renderer, itemFirst, itemLast);
itemFirst, itemLast);
DoDrawRange(renderer, itemFirst, itemLast);
@@
-947,7
+945,7
@@
bool wxListBox::FindItem(const wxString& prefix, bool strictlyAfter)
int last = first == 0 ? count - 1 : first - 1;
// if this is not true we'd never exit from the loop below!
int last = first == 0 ? count - 1 : first - 1;
// if this is not true we'd never exit from the loop below!
- wxASSERT_MSG( first < (int)count && last < (int)count,
_
T("logic error") );
+ wxASSERT_MSG( first < (int)count && last < (int)count,
wx
T("logic error") );
// precompute it outside the loop
size_t len = prefix.length();
// precompute it outside the loop
size_t len = prefix.length();
@@
-1193,7
+1191,7
@@
bool wxListBox::PerformAction(const wxControlAction& action,
AnchorSelection(item == -1 ? m_current : item);
else if ( action == wxACTION_LISTBOX_SELECTALL ||
action == wxACTION_LISTBOX_SELTOGGLE )
AnchorSelection(item == -1 ? m_current : item);
else if ( action == wxACTION_LISTBOX_SELECTALL ||
action == wxACTION_LISTBOX_SELTOGGLE )
- wxFAIL_MSG(
_
T("unimplemented yet"));
+ wxFAIL_MSG(
wx
T("unimplemented yet"));
else
return wxControl::PerformAction(action, numArg, strArg);
else
return wxControl::PerformAction(action, numArg, strArg);
@@
-1504,7
+1502,7
@@
bool wxStdListboxInputHandler::HandleMouseMove(wxInputConsumer *consumer,
{
// pass something into strArg to tell the listbox that it shouldn't
// send the notification message: see PerformAction() above
{
// pass something into strArg to tell the listbox that it shouldn't
// send the notification message: see PerformAction() above
- lbox->PerformAction(m_actionMouse, item,
_
T("no"));
+ lbox->PerformAction(m_actionMouse, item,
wx
T("no"));
}
// else: don't pass invalid index to the listbox
}
}
// else: don't pass invalid index to the listbox
}