added wxListBox::HitTest() from Ryan (patch 1446207)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-09 12:48:52 +00:00
parent 22d29469a0
commit c00fed0ef4
10 changed files with 157 additions and 0 deletions

View File

@@ -114,6 +114,8 @@ protected:
virtual void* DoGetItemClientData(int n) const;
virtual void DoSetItemClientObject(int n, wxClientData* clientData);
virtual wxClientData* DoGetItemClientObject(int n) const;
virtual int DoListHitTest(const wxPoint& point) const;
void DoApplyWidgetStyle(GtkRcStyle *style);
private:

View File

@@ -107,6 +107,9 @@ public:
// instead
bool Selected(int n) const { return IsSelected(n); }
// returns the item number at a point or wxNOT_FOUND
int HitTest(const wxPoint& point) const { return DoListHitTest(point); }
protected:
// NB: due to wxGTK implementation details, DoInsert() is implemented
// using DoInsertItems() and not the other way round
@@ -121,6 +124,10 @@ protected:
virtual void DoSetSelection(int n, bool select) = 0;
// there is already wxWindow::DoHitTest() so call this one differently
virtual int DoListHitTest(const wxPoint& WXUNUSED(point)) const
{ return wxNOT_FOUND; }
DECLARE_NO_COPY_CLASS(wxListBoxBase)
};

View File

@@ -113,6 +113,7 @@ protected:
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);
virtual int DoListHitTest(const wxPoint& point) const;
void MacDelete( int n ) ;
void MacInsert( int n , const wxString& item) ;

View File

@@ -142,6 +142,7 @@ protected:
virtual void* DoGetItemClientData(int n) const;
virtual void DoSetItemClientObject(int n, wxClientData* clientData);
virtual wxClientData* DoGetItemClientObject(int n) const;
virtual int DoListHitTest(const wxPoint& point) const;
// free memory (common part of Clear() and dtor)
void Free();