\membersection{wxListCtrl::HitTest}\label{wxlistctrlhittest}
-\func{long}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}, \param{long *}{ptrSubItem}}
+\constfunc{long}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}, \param{long *}{ptrSubItem}}
Determines which item (if any) is at the specified point,
giving details in {\it flags}. Returns index of the item or {\tt wxNOT\_FOUND}
\membersection{wxTreeCtrl::HitTest}\label{wxtreectrlhittest}
-\func{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}
+\constfunc{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}
Calculates which (if any) item is under the given point, returning the tree item
id at this point plus extra information {\it flags}. {\it flags} is a bitlist of the following:
long FindItem( long start, const wxString& str, bool partial = false );
long FindItem( long start, wxUIntPtr data );
long FindItem( long start, const wxPoint& pt, int direction ); // not supported in wxGLC
- long HitTest( const wxPoint& point, int& flags, long *pSubItem = NULL );
+ long HitTest( const wxPoint& point, int& flags, long *pSubItem = NULL ) const;
long InsertItem(wxListItem& info);
long InsertItem( long index, const wxString& label );
long InsertItem( long index, int imageIndex );
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL);
- virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags);
+ virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const;
// called by wxTextTreeCtrl when it marks itself for deletion
void ResetTextControl();
// Determines which item (if any) is at the specified point,
// giving details in 'flags' (see wxLIST_HITTEST_... flags above)
// Request the subitem number as well at the given coordinate.
- long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL);
+ long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const;
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL);
- virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags);
+ virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const;
// obtain the user data for the lParam member of TV_ITEM
class wxTreeItemParam *GetItemParam(const wxTreeItemId& item) const;
// coordinates specified are relative to the client area of tree ctrl)
// and, in the second variant, fill the flags parameter with a bitmask
// of wxTREE_HITTEST_xxx constants.
- wxTreeItemId HitTest(const wxPoint& point)
+ wxTreeItemId HitTest(const wxPoint& point) const
{ int dummy; return DoTreeHitTest(point, dummy); }
- wxTreeItemId HitTest(const wxPoint& point, int& flags)
+ wxTreeItemId HitTest(const wxPoint& point, int& flags) const
{ return DoTreeHitTest(point, flags); }
// get the bounding rectangle of the item (or of its label only)
// real HitTest() implementation: again, can't be called just HitTest()
// because it's overloaded and so the non-virtual overload would be hidden
// (and can't be called DoHitTest() because this is already in wxWindow)
- virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) = 0;
+ virtual wxTreeItemId DoTreeHitTest(const wxPoint& point,
+ int& flags) const = 0;
wxImageList *m_imageListNormal, // images for tree elements
long FindItem( long start, const wxString& str, bool partial = false );
long FindItem( long start, wxUIntPtr data);
long FindItem( const wxPoint& pt );
- long HitTest( int x, int y, int &flags );
+ long HitTest( int x, int y, int &flags ) const;
void InsertItem( wxListItem &item );
void InsertColumn( long col, wxListItem &item );
int GetItemWidthWithImage(wxListItem * item);
return wxNOT_FOUND;
}
-long wxListMainWindow::HitTest( int x, int y, int &flags )
+long wxListMainWindow::HitTest( int x, int y, int &flags ) const
{
CalcUnscrolledPosition( x, y, &x, &y );
}
// TODO: sub item hit testing
-long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *)
+long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *) const
{
return m_mainWin->HitTest( (int)point.x, (int)point.y, flags );
}
}
}
-wxTreeItemId wxGenericTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags)
+wxTreeItemId
+wxGenericTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags) const
{
- // JACS: removed wxYieldIfNeeded() because it can cause the window
- // to be deleted from under us if a close window event is pending
-
int w, h;
GetSize(&w, &h);
flags=0;
// Determines which item (if any) is at the specified point,
// giving details in 'flags' (see wxLIST_HITTEST_... flags above)
-long wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem)
+long
+wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem) const
{
LV_HITTESTINFO hitTestInfo;
hitTestInfo.pt.x = (int) point.x;
DeleteTextCtrl();
}
-wxTreeItemId wxTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags)
+wxTreeItemId wxTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags) const
{
TV_HITTESTINFO hitTestInfo;
hitTestInfo.pt.x = (int)point.x;