void wxListMainWindow::OnMouse( wxMouseEvent &event )
{
+
#ifdef __WXMAC__
// On wxMac we can't depend on the EVT_KILL_FOCUS event to properly
// shutdown the edit control when the mouse is clicked elsewhere on the
}
if ( !HasCurrent() || IsEmpty() )
+ {
+ if (event.RightDown())
+ {
+ SendNotify( (size_t)-1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() );
+ // Allow generation of context menu event
+ event.Skip();
+ }
return;
+ }
if (m_dirty)
return;
if ( !hitResult )
{
- // outside of any item, reset the selection and bail out
- HighlightAll(false);
+ // outside of any item
+ if (event.RightDown())
+ {
+ SendNotify( (size_t) -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() );
+ // Allow generation of context menu event
+ event.Skip();
+ }
+ else
+ {
+ // reset the selection and bail out
+ HighlightAll(false);
+ }
+
return;
}
case WXK_PAGEUP:
{
+ // we get a floating point exception without this
+ if (m_linesPerPage == 0)
+ m_linesPerPage = 1;
+
int steps = InReportView() ? m_linesPerPage - 1 : m_current % m_linesPerPage;
int index = m_current - steps;
case WXK_PAGEDOWN:
{
+ // we get a floating point exception without this
+ if (m_linesPerPage == 0)
+ m_linesPerPage = 1;
+
int steps = InReportView()
? m_linesPerPage - 1
: m_linesPerPage - (m_current % m_linesPerPage) - 1;
void wxListMainWindow::OnScroll(wxScrollWinEvent& event)
{
- // update our idea of which lines are shown when we redraw the window the
+ int cw, ch, vw, vh;
+ GetVirtualSize(&vw, &vh);
+ GetClientSize(&cw, &ch);
+
+ if( event.GetOrientation() == wxVERTICAL && ch >= vh)
+ return;
+ // update our idea of which lines are shown when we redraw the window the
// next time
ResetVisibleLinesRange();