On Mon, 20 May 2013 13:39:00 +0800 John Roberts wrote:
JR> On 19/05/2013 7:22 PM, Vadim Zeitlin wrote:
JR> > On Sun, 19 May 2013 16:34:52 +0800 John Roberts wrote:
JR> >
JR> > JR> I haven't found an equivalent for EVT_MOUSE_EVENTS in a
JR> > JR> wxEVT_MOUSE_EVENTS form that would be usable for Bind and Connect.
JR> > JR>
JR> > JR> Have I missed it or if not is there a reason why we don't have one.
JR> >
JR> > There is: it's not a single event but a macro expanding into ~20 or so
JR> > other event table macros. And this can't be done with Bind(), a single call
JR> > to it can be used only to bind a handler for a single event type.
JR>
JR> I think I understood but the "There is:" confused me.
Sorry, rereading it now it does seem rather unclear, but my "There is" was
in reply to your "is there a reason" question.
JR> I can't find a wxEVT_MOUSE_EVENTS but did find EVT_MOUSE_EVENTS in
JR> event.h which is the expanding macro you referred to. The latter is
JR> useful for event tables only. As you confirmed EVT_MOUSE_EVENTS cannot
JR> be used in Bind or Connect.
Yes, this is correct. And there is nothing we can do about it.
OTOH I never understood the point of having EVT_MOUSE_EVENTS neither, it
doesn't look useful to me to handle all mouse events in the same way. And
just looking at the code in e.g. wxGenericListCtrl doing it like this
should be a convincing enough argument for not using it.