projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use guard classes automatically restoring the old state in their dtor instead of...
[wxWidgets.git]
/
include
/
wx
/
timer.h
diff --git
a/include/wx/timer.h
b/include/wx/timer.h
index 4e36b6d35f174fc2ea4ddac948d86a19b87a08a7..a8501510db992643928e1b16c23c0eaf1b7caaa5 100644
(file)
--- a/
include/wx/timer.h
+++ b/
include/wx/timer.h
@@
-152,25
+152,27
@@
private:
class WXDLLIMPEXP_BASE wxTimerEvent : public wxEvent
{
public:
class WXDLLIMPEXP_BASE wxTimerEvent : public wxEvent
{
public:
+ wxTimerEvent()
+ : wxEvent(wxID_ANY, wxEVT_TIMER) { m_timer=NULL; }
+
wxTimerEvent(wxTimer& timer)
: wxEvent(timer.GetId(), wxEVT_TIMER),
wxTimerEvent(wxTimer& timer)
: wxEvent(timer.GetId(), wxEVT_TIMER),
- m_timer(timer)
+ m_timer(
&
timer)
{
SetEventObject(timer.GetOwner());
}
// accessors
{
SetEventObject(timer.GetOwner());
}
// accessors
- int GetInterval() const { return m_timer
.
GetInterval(); }
- wxTimer& GetTimer() const { return m_timer; }
+ int GetInterval() const { return m_timer
->
GetInterval(); }
+ wxTimer& GetTimer() const { return
*
m_timer; }
// implement the base class pure virtual
virtual wxEvent *Clone() const { return new wxTimerEvent(*this); }
private:
// implement the base class pure virtual
virtual wxEvent *Clone() const { return new wxTimerEvent(*this); }
private:
- wxTimer
&
m_timer;
+ wxTimer
*
m_timer;
- DECLARE_ABSTRACT_CLASS(wxTimerEvent)
- DECLARE_NO_ASSIGN_CLASS(wxTimerEvent)
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTimerEvent)
};
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
};
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);