m_method = method;
}
- virtual void operator()(wxEvtHandler *handler, wxEvent& event)
- {
- wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
-
- (realHandler->*m_method)(event);
- }
+ virtual void operator()(wxEvtHandler *handler, wxEvent& event);
virtual bool Matches(const wxEventFunctor& func) const
{
<
Class,
EventArg,
- wxConvertibleTo<Class, wxEvtHandler>::value
+ wxConvertibleTo<Class, wxEvtHandler>::value != 0
>
{
private:
: wxCommandEvent(eventType, id)
{ }
+ wxThreadEvent(const wxThreadEvent& event)
+ : wxCommandEvent(event)
+ {
+ // make sure our string member (which uses COW, aka refcounting) is not
+ // shared by other wxString instances:
+ SetString(GetString().c_str());
+ }
+
virtual wxEvent *Clone() const
{
wxThreadEvent* ev = new wxThreadEvent(*this);
virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); }
- enum
+ enum wxNavigationKeyEventFlags
{
IsBackward = 0x0000,
IsForward = 0x0001,
wxDECLARE_NO_ASSIGN_CLASS(wxEventConnectionRef);
};
+inline void wxObjectEventFunctor::operator()(wxEvtHandler *handler, wxEvent& event)
+{
+ wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
+
+ (realHandler->*m_method)(event);
+}
+
// Post a message to the given event handler which will be processed during the
// next event loop iteration.
//