/////////////////////////////////////////////////////////////////////////////
// Name: src/palmos/listctrl.cpp
// Purpose: wxListCtrl
-// Author: William Osborne
+// Author: William Osborne - minimal working wxPalmOS port
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "listctrl.h"
- #pragma implementation "listctrlbase.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
-#if wxUSE_LISTCTRL && defined(__WIN95__)
+#if wxUSE_LISTCTRL
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/settings.h"
+ #include "wx/dcclient.h"
+ #include "wx/textctrl.h"
#endif
-#include "wx/textctrl.h"
#include "wx/imaglist.h"
#include "wx/listctrl.h"
-#include "wx/dcclient.h"
-
-#include "wx/palmos/private.h"
-
-#include "wx/palmos/wrapcctl.h"
-
-// ----------------------------------------------------------------------------
-// private functions
-// ----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// private helper classes
-// ----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// events
-// ----------------------------------------------------------------------------
-
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_DRAGGING)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_END_DRAG)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_FOCUSED)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_CACHE_HINT)
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxListCtrlStyle )
{
}
-// Set the whole window style
-void wxListCtrl::SetWindowStyleFlag(long flag)
-{
-}
-
// ----------------------------------------------------------------------------
// accessors
// ----------------------------------------------------------------------------
-/* static */ wxVisualAttributes
-wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
+/* static */ wxVisualAttributes wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
{
wxVisualAttributes attrs;
return false;
}
+// Sets the item image
+bool wxListCtrl::SetItemColumnImage(long item, long column, int image)
+{
+ return false;
+}
+
// Gets the item text
wxString wxListCtrl::GetItemText(long item) const
{
}
// Sets the item data
-bool wxListCtrl::SetItemData(long item, long data)
+bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
{
return false;
}
// message processing
// ----------------------------------------------------------------------------
-// see comment at the end of wxListCtrl::GetColumn()
-#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
-
-WXLPARAM wxListCtrl::OnCustomDraw(WXLPARAM lParam)
-{
- return CDRF_DODEFAULT;
-}
-
-#endif // NM_CUSTOMDRAW supported
-
// Necessary for drawing hrules and vrules, if specified
void wxListCtrl::OnPaint(wxPaintEvent& event)
{
return -1;
}
+int wxListCtrl::OnGetItemColumnImage(long item, long column) const
+{
+ if (!column)
+ return OnGetItemImage(item);
+
+ return -1;
+}
+
wxListItemAttr *wxListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const
{
// no attributes by default
return NULL;
};
-static
-wxListItemInternalData *wxGetInternalData(const wxListCtrl *ctl, long itemId)
+static wxListItemInternalData *wxGetInternalData(const wxListCtrl *ctl, long itemId)
{
return wxGetInternalData(GetHwndOf(ctl), itemId);
};
}
#endif // wxUSE_LISTCTRL
-