X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51abe921b849be69f02c174365c9a7bc8b46bd08..a2b9e9520297da0f7d13e4cc2e36acdf2bda105d:/include/wx/mac/listbox.h diff --git a/include/wx/mac/listbox.h b/include/wx/mac/listbox.h index 96be3d0f0e..d1ca11ca7a 100644 --- a/include/wx/mac/listbox.h +++ b/include/wx/mac/listbox.h @@ -1,31 +1,33 @@ ///////////////////////////////////////////////////////////////////////////// // Name: listbox.h // Purpose: wxListBox class -// Author: AUTHOR +// Author: Stefan Csomor // Modified by: -// Created: ??/??/98 +// Created: 1998-01-01 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_LISTBOX_H_ #define _WX_LISTBOX_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "listbox.h" #endif // ---------------------------------------------------------------------------- // simple types // ---------------------------------------------------------------------------- +#include "wx/dynarray.h" + #if wxUSE_OWNER_DRAWN class WXDLLEXPORT wxOwnerDrawn; // define the array of list box items - #include + #include "wx/dynarray.h" WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray); #endif // wxUSE_OWNER_DRAWN @@ -66,7 +68,8 @@ public: const wxString& name = wxListBoxNameStr); virtual ~wxListBox(); - + virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL); + // implement base class pure virtuals virtual void Clear(); virtual void Delete(int n); @@ -91,6 +94,7 @@ public: virtual void* DoGetItemClientData(int n) const; virtual void DoSetItemClientObject(int n, wxClientData* clientData); virtual wxClientData* DoGetItemClientObject(int n) const; + virtual void DoSetSize(int x, int y,int width, int height,int sizeFlags = wxSIZE_AUTO ) ; // wxCheckListBox support #if wxUSE_OWNER_DRAWN @@ -106,39 +110,45 @@ public: // Windows callbacks - virtual void SetupColours(); - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void SetupColours(); + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ; + virtual bool MacCanFocus() const { return true ; } + void OnChar(wxKeyEvent& event); - ListHandle m_macList ; - wxArrayString m_stringArray ; - wxListDataArray m_dataArray ; - void MacSetRedraw( bool doDraw ) ; + void* m_macList ; + wxArrayString m_stringArray ; + wxListDataArray m_dataArray ; + wxArrayInt m_selectionPreImage ; + void MacSetRedraw( bool doDraw ) ; protected: - void MacDestroy() ; - void MacDelete( int n ) ; - void MacInsert( int n , const char * text) ; - void MacAppend( const char * text) ; - void MacSet( int n , const char *text ) ; - void MacClear() ; - void MacSetSelection( int n , bool select ) ; - int MacGetSelection() const ; - int MacGetSelections(wxArrayInt& aSelections) const ; - bool MacIsSelected( int n ) const ; - void MacScrollTo( int n ) ; - void OnSize( const wxSizeEvent &size ) ; - void MacDoClick() ; - void MacDoDoubleClick() ; + void MacDestroy() ; + void MacDelete( int n ) ; + void MacInsert( int n , const wxString& item) ; + void MacAppend( const wxString& item) ; + void MacSet( int n , const wxString& item ) ; + void MacClear() ; + void MacSetSelection( int n , bool select ) ; + int MacGetSelection() const ; + int MacGetSelections(wxArrayInt& aSelections) const ; + bool MacIsSelected( int n ) const ; + void MacScrollTo( int n ) ; + void OnSize( const wxSizeEvent &size ) ; + void MacDoClick() ; + void MacDoDoubleClick() ; // do we have multiple selections? bool HasMultipleSelection() const; // free memory (common part of Clear() and dtor) - void Free(); + // prevent collision with some BSD definitions of macro Free() + void FreeData(); int m_noItems; int m_selected; + wxString m_typeIn ; + long m_lastTypeIn ; - virtual wxSize DoGetBestSize(); + virtual wxSize DoGetBestSize() const; #if wxUSE_OWNER_DRAWN // control items @@ -147,7 +157,7 @@ protected: private: DECLARE_DYNAMIC_CLASS(wxListBox) - DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() }; #endif