class WXDLLEXPORT wxOwnerDrawn;
// define the array of list box items
- #include <wx/dynarray.h>
+ #include "wx/dynarray.h"
WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
#endif // wxUSE_OWNER_DRAWN
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);
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
int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); }
#endif // wxUSE_OWNER_DRAWN
- // Windows-specific code to set the horizontal extent of the listbox, if
- // necessary. If s is non-NULL, it's used to calculate the horizontal
- // extent. Otherwise, all strings are used.
- virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
-
// Windows callbacks
- virtual void SetupColours();
- virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ;
+ virtual void SetupColours();
+ virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
+ 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 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() ;
// do we have multiple selections?
bool HasMultipleSelection() const;
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
private:
DECLARE_DYNAMIC_CLASS(wxListBox)
- DECLARE_EVENT_TABLE()
+ DECLARE_EVENT_TABLE()
};
#endif