#endif // HAVE_NATIVE_LISTCTRL/!HAVE_NATIVE_LISTCTRL
#include "wx/selstore.h"
-
#include "wx/renderer.h"
+#include "wx/math.h"
#ifdef __WXMAC__
#include "wx/mac/private.h"
#endif
-#include <math.h>
// NOTE: If using the wxListBox visual attributes works everywhere then this can
const wxString &name = _T("listctrlmainwindow") );
virtual ~wxListMainWindow();
-
+
wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); }
bool HasFlag(int flag) const { return m_parent->HasFlag(flag); }
void Freeze();
void Thaw();
- void SetFocus();
-
void OnRenameTimer();
bool OnRenameAccept(size_t itemEdit, const wxString& value);
void OnRenameCancelled(size_t itemEdit);
m_finished = true;
- m_owner->SetFocus();
+ m_owner->SetFocusIgnoringChildren();
}
}
// focus handling
// ----------------------------------------------------------------------------
-void wxListMainWindow::SetFocus()
-{
- // VS: wxListMainWindow derives from wxPanel (via wxScrolledWindow) and wxPanel
- // overrides SetFocus in such way that it does never change focus from
- // panel's child to the panel itself. Unfortunately, we must be able to change
- // focus to the panel from wxListTextCtrl because the text control should
- // disappear when the user clicks outside it.
-
- wxWindow *oldFocus = DoFindFocus();
-
- if ( oldFocus && oldFocus->GetParent() == this )
- {
- wxWindow::SetFocus();
- }
- else
- {
- wxScrolledWindow::SetFocus();
- }
-}
-
void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
{
if ( GetParent() )
if (item.m_itemId > count)
item.m_itemId = count;
-
+
size_t id = item.m_itemId;
m_dirty = true;
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0,0), size, style );
-#ifdef __WXMAC_CARBON__
+#ifdef __WXMAC_CARBON__
// Human Interface Guidelines ask us for a special font in this case
if ( GetWindowVariant() == wxWINDOW_VARIANT_NORMAL )
{