fix warning about hiding virtual Select()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-09-21 20:31:32 +00:00
parent f637c8e680
commit 1b3947754a
2 changed files with 9 additions and 9 deletions

View File

@@ -129,10 +129,10 @@ public:
void Activate(int item = -1); void Activate(int item = -1);
// select or unselect the specified or current (if -1) item // select or unselect the specified or current (if -1) item
void Select(bool sel = TRUE, int item = -1); void DoSelect(int item = -1, bool sel = TRUE);
// more readable wrapper // more readable wrapper
void Unselect(int item) { Select(FALSE, item); } void DoUnselect(int item) { DoSelect(item, FALSE); }
// select an item and send a notification about it // select an item and send a notification about it
void SelectAndNotify(int item); void SelectAndNotify(int item);

View File

@@ -1007,7 +1007,7 @@ void wxListBox::ExtendSelection(int itemTo)
} }
} }
void wxListBox::Select(bool sel, int item) void wxListBox::DoSelect(int item, bool sel)
{ {
if ( item != -1 ) if ( item != -1 )
{ {
@@ -1027,7 +1027,7 @@ void wxListBox::Select(bool sel, int item)
void wxListBox::SelectAndNotify(int item) void wxListBox::SelectAndNotify(int item)
{ {
Select(TRUE, item); DoSelect(item);
SendEvent(wxEVT_COMMAND_LISTBOX_SELECTED); SendEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
} }
@@ -1046,7 +1046,7 @@ void wxListBox::Activate(int item)
if ( item != -1 ) if ( item != -1 )
{ {
Select(TRUE, item); DoSelect(item);
SendEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED); SendEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
} }
@@ -1089,7 +1089,7 @@ bool wxListBox::PerformAction(const wxControlAction& action,
item = m_current; item = m_current;
if ( IsSelected(item) ) if ( IsSelected(item) )
Unselect(item); DoUnselect(item);
else else
SelectAndNotify(item); SelectAndNotify(item);
} }
@@ -1100,12 +1100,12 @@ bool wxListBox::PerformAction(const wxControlAction& action,
if ( strArg.empty() ) if ( strArg.empty() )
SelectAndNotify(item); SelectAndNotify(item);
else else
Select(TRUE, item); DoSelect(item);
} }
else if ( action == wxACTION_LISTBOX_SELECTADD ) else if ( action == wxACTION_LISTBOX_SELECTADD )
Select(TRUE, item); DoSelect(item);
else if ( action == wxACTION_LISTBOX_UNSELECT ) else if ( action == wxACTION_LISTBOX_UNSELECT )
Select(FALSE, item); DoUnselect(item);
else if ( action == wxACTION_LISTBOX_MOVEDOWN ) else if ( action == wxACTION_LISTBOX_MOVEDOWN )
ChangeCurrent(1); ChangeCurrent(1);
else if ( action == wxACTION_LISTBOX_MOVEUP ) else if ( action == wxACTION_LISTBOX_MOVEUP )