Merge branch 'qt-listctrl'

New version of wxListCtrl for wxQt, supporting virtual list controls,
checkboxes, sorting and with other fixes.

See https://github.com/wxWidgets/wxWidgets/pull/1551
This commit is contained in:
Vadim Zeitlin
2019-09-27 19:16:56 +02:00
4 changed files with 1311 additions and 386 deletions

View File

@@ -1543,7 +1543,8 @@ void MyListCtrl::OnContextMenu(wxContextMenuEvent& event)
{
point = ScreenToClient(point);
}
ShowContextMenu(point);
int flags;
ShowContextMenu(point, HitTest(point, flags));
}
else
{
@@ -1555,10 +1556,10 @@ void MyListCtrl::OnContextMenu(wxContextMenuEvent& event)
}
#endif
void MyListCtrl::ShowContextMenu(const wxPoint& pos)
void MyListCtrl::ShowContextMenu(const wxPoint& pos, long item)
{
wxMenu menu;
menu.Append(wxID_ANY, wxString::Format("Menu for item %ld", item));
menu.Append(wxID_ABOUT, "&About");
menu.AppendSeparator();
menu.Append(wxID_EXIT, "E&xit");

View File

@@ -78,7 +78,7 @@ public:
virtual bool IsItemChecked(long item) const wxOVERRIDE;
private:
void ShowContextMenu(const wxPoint& pos);
void ShowContextMenu(const wxPoint& pos, long item);
wxLog *m_logOld;
void SetColumnImage(int col, int image);