/////////////////////////////////////////////////////////////////////////////
// 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"
#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
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxListCtrl)
- wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
+ wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxListCtrl)
wxEND_HANDLERS_TABLE()
-wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
+wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
/*
TODO : Expose more information of a list's layout etc. via appropriate objects (à la NotebookPageInfo)
return false;
}
-WXDWORD wxListCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
-{
- return 0;
-}
-
void wxListCtrl::UpdateStyle()
{
}
{
}
-// 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
{
// End label editing, optionally cancelling the edit
bool wxListCtrl::EndEditLabel(bool WXUNUSED(cancel))
{
- return FALSE;
+ return false;
}
// Ensures this item is visible
// in a wxListItemInternalData structure refernced by the actual lParam
long wxListCtrl::FindItem(long start, long data)
{
- return -1;
+ return wxNOT_FOUND;
}
// Find an item nearest this position in the specified direction, starting from
// the item after 'start' or the beginning if 'start' is -1.
long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction)
{
- return -1;
+ return wxNOT_FOUND;
}
// Determines which item (if any) is at the specified point,
// dx is interpreted as number of columns)
bool wxListCtrl::ScrollList(int dx, int dy)
{
- return FALSE;
+ return false;
}
// Sort items.
bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
{
- return FALSE;
+ return false;
}
// message processing
// ----------------------------------------------------------------------------
-bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id)
-{
- return false;
-}
-
-bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
-{
- return false;
-}
-
-// 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);
};
{
}
-// ----------------------------------------------------------------------------
-// wxWin <-> MSW items conversions
-// ----------------------------------------------------------------------------
-
-static void wxConvertFromMSWListItem(HWND hwndListCtrl,
- wxListItem& info,
- LV_ITEM& lvItem)
-{
-}
-
-static void wxConvertToMSWFlags(long state, long stateMask, LV_ITEM& lvItem)
-{
-}
-
-static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
- const wxListItem& info,
- LV_ITEM& lvItem)
-{
-}
-
-static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
- LV_COLUMN& lvCol)
-{
-}
-
#endif // wxUSE_LISTCTRL
-