Change to the NativeUI Library, ListViewItemListener interface

1 post / 0 new
Last post
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:
Change to the NativeUI Library, ListViewItemListener interface

Hi,
In the NativeUI libary, the ListViewItemListener is defined like this:
namespace NativeUI
{

// Forward declaration.
class ListView;
class ListViewItem;

/**
* \brief Listener for ListView events.
*/
class ListViewListener
{
public:
/**
* This method is called when a list view item is clicked.
* @param listView The list view object that generated the event.
* @param listViewItem The ListViewItem object that was clicked.
*/
virtual void listViewItemClicked(
ListView* listView,
ListViewItem* listViewItem) = 0;
};

} // namespace NativeUI

As ListViews can contain any widget, and not just ListViewItems, it would be more useful to make listViewItemClicked return a Widget* rather than a ListViewItem*. This would make it:
virtual void listViewItemClicked(
ListView* listView,
Widget* listViewItem) = 0;

Just an idea.