X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ffecfa5aeb540b54914739dbb8603edbbd4c00a0..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/palmos/listctrl.cpp diff --git a/src/palmos/listctrl.cpp b/src/palmos/listctrl.cpp index ba7bb430fa..97de7a90a9 100644 --- a/src/palmos/listctrl.cpp +++ b/src/palmos/listctrl.cpp @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////////////////////////////////////////////// @@ -29,7 +29,7 @@ #pragma hdrstop #endif -#if wxUSE_LISTCTRL && defined(__WIN95__) +#if wxUSE_LISTCTRL #ifndef WX_PRECOMP #include "wx/app.h" @@ -43,18 +43,6 @@ #include "wx/listctrl.h" #include "wx/dcclient.h" -#include "wx/palmos/private.h" - -#include "wx/palmos/wrapcctl.h" - -// ---------------------------------------------------------------------------- -// private functions -// ---------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// private helper classes -// ---------------------------------------------------------------------------- - // ---------------------------------------------------------------------------- // events // ---------------------------------------------------------------------------- @@ -94,7 +82,7 @@ wxBEGIN_FLAGS( wxListCtrlStyle ) wxFLAGS_MEMBER(wxBORDER_RAISED) wxFLAGS_MEMBER(wxBORDER_STATIC) wxFLAGS_MEMBER(wxBORDER_NONE) - + // old style border flags wxFLAGS_MEMBER(wxSIMPLE_BORDER) wxFLAGS_MEMBER(wxSUNKEN_BORDER) @@ -133,7 +121,7 @@ wxEND_FLAGS( wxListCtrlStyle ) 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() @@ -141,7 +129,7 @@ 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) @@ -182,11 +170,6 @@ bool wxListCtrl::Create(wxWindow *parent, return false; } -WXDWORD wxListCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const -{ - return 0; -} - void wxListCtrl::UpdateStyle() { } @@ -208,17 +191,11 @@ void wxListCtrl::SetSingleStyle(long style, bool add) { } -// 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; @@ -499,7 +476,7 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) // End label editing, optionally cancelling the edit bool wxListCtrl::EndEditLabel(bool WXUNUSED(cancel)) { - return FALSE; + return false; } // Ensures this item is visible @@ -522,14 +499,14 @@ long wxListCtrl::FindItem(long start, const wxString& str, bool partial) // 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, @@ -581,7 +558,7 @@ long wxListCtrl::InsertColumn(long col, // dx is interpreted as number of columns) bool wxListCtrl::ScrollList(int dx, int dy) { - return FALSE; + return false; } // Sort items. @@ -622,7 +599,7 @@ int CALLBACK wxInternalDataCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM l bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) { - return FALSE; + return false; } @@ -631,26 +608,6 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) // 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) { @@ -697,8 +654,7 @@ static wxListItemInternalData *wxGetInternalData(HWND hwnd, long itemId) return NULL; }; -static -wxListItemInternalData *wxGetInternalData(const wxListCtrl *ctl, long itemId) +static wxListItemInternalData *wxGetInternalData(const wxListCtrl *ctl, long itemId) { return wxGetInternalData(GetHwndOf(ctl), itemId); }; @@ -712,30 +668,5 @@ static void wxDeleteInternalData(wxListCtrl* ctl, long 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