int CMPFUNC_CONV wxSizeTCmpFn(size_t n1, size_t n2) { return n1 - n2; }
-WX_DEFINE_SORTED_EXPORTED_ARRAY(size_t, wxIndexArray);
+WX_DEFINE_SORTED_EXPORTED_ARRAY_LONG(size_t, wxIndexArray);
// this class is used to store the selected items in the virtual list control
// (but it is not tied to list control and so can be used with other controls
void OnKillFocus( wxFocusEvent &event );
private:
- DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
+ DECLARE_DYNAMIC_CLASS(wxListTextCtrl)
DECLARE_EVENT_TABLE()
};
// if this is > 0, the control is frozen and doesn't redraw itself
size_t m_freezeCount;
- DECLARE_DYNAMIC_CLASS(wxListMainWindow);
+ DECLARE_DYNAMIC_CLASS(wxListMainWindow)
DECLARE_EVENT_TABLE()
};
// wxListHeaderWindow
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxListHeaderWindow,wxWindow);
+IMPLEMENT_DYNAMIC_CLASS(wxListHeaderWindow,wxWindow)
BEGIN_EVENT_TABLE(wxListHeaderWindow,wxWindow)
EVT_PAINT (wxListHeaderWindow::OnPaint)
// wxListTextCtrl (internal)
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxListTextCtrl,wxTextCtrl);
+IMPLEMENT_DYNAMIC_CLASS(wxListTextCtrl,wxTextCtrl)
BEGIN_EVENT_TABLE(wxListTextCtrl,wxTextCtrl)
EVT_CHAR (wxListTextCtrl::OnChar)
// wxListMainWindow
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxListMainWindow,wxScrolledWindow);
+IMPLEMENT_DYNAMIC_CLASS(wxListMainWindow,wxScrolledWindow)
BEGIN_EVENT_TABLE(wxListMainWindow,wxScrolledWindow)
EVT_PAINT (wxListMainWindow::OnPaint)
to = GetItemCount() - 1;
}
- // VZ: this code would work fine if wxGTK wxWindow::Refresh() were
- // reasonable, i.e. if it only generated one expose event for
- // several calls to it - as it is, each Refresh() results in a
- // repaint which provokes flicker too horrible to be seen
- //
- // when/if wxGTK is fixed, this code should be restored as normally it
- // should generate _less_ flicker than the version below
-#ifndef __WXGTK__
if ( HasCurrent() && m_current >= from && m_current <= to )
{
RefreshLine(m_current);
RefreshLine(line);
}
}
-#else // __WXGTK__
- size_t selMin = (size_t)-1,
- selMax = 0;
-
- for ( size_t line = from; line <= to; line++ )
- {
- if ( IsHighlighted(line) || (line == m_current) )
- {
- if ( line < selMin )
- selMin = line;
- if ( line > selMax )
- selMax = line;
- }
- }
-
- if ( selMin != (size_t)-1 )
- {
- RefreshLines(selMin, selMax);
- }
-#endif // !__WXGTK__/__WXGTK__
}
void wxListMainWindow::Freeze()
m_renameTimer->Stop();
m_lastOnSame = FALSE;
+#ifdef __WXGTK__
+ // FIXME: wxGTK generates bad sequence of events prior to doubleclick
+ // ("down, up, down, double, up" while other ports
+ // do "down, up, double, up"). We have to have this hack
+ // in place till somebody fixes wxGTK...
if ( current == m_lineBeforeLastClicked )
+#else
+ if ( current == m_lineLastClicked )
+#endif
{
SendNotify( current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
// focus handling
// ----------------------------------------------------------------------------
-#ifdef __WXGTK__
-extern wxWindow *g_focusWindow;
-#endif
-
void wxListMainWindow::SetFocus()
{
// VS: wxListMainWindow derives from wxPanel (via wxScrolledWindow) and wxPanel
wxWindow *oldFocus = FindFocus();
- if ( oldFocus->GetParent() == this )
+ if ( oldFocus && oldFocus->GetParent() == this )
{
wxWindow::SetFocus();
}
if ( !GetParent() )
return;
-#ifdef __WXGTK__
- g_focusWindow = GetParent();
-#endif
-
wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() );
event.SetEventObject( GetParent() );
GetParent()->GetEventHandler()->ProcessEvent( event );
wxListCtrl* lc = GetListCtrl();
wxCHECK_RET( lc, _T("no listctrl window?") );
- lc->m_headerWin->Refresh() ;
-#ifdef __WXMAC__
- lc->m_headerWin->MacUpdateImmediately() ;
-#endif
+ lc->m_headerWin->Refresh();
+ lc->m_headerWin->Update();
}
}