diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-22 13:44:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-22 13:44:32 +0100 |
| commit | 21b2cd0a6e34be7590fef11af91fd47985bf970c (patch) | |
| tree | 18795947d0000a4547544c12785eb4cc3c58e0f1 /src/wx/wx_util.h | |
| parent | 0401db037ade0781849072329feb5eef73d5ca98 (diff) | |
Be a bit safer with ThreadedStaticText.
Diffstat (limited to 'src/wx/wx_util.h')
| -rw-r--r-- | src/wx/wx_util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index 555a3ab0e..3a454c7c4 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -19,6 +19,7 @@ #include <wx/wx.h> #include <boost/function.hpp> +#include <boost/thread.hpp> /** @file src/wx/wx_util.h * @brief Some utility functions and classes. @@ -36,10 +37,13 @@ class ThreadedStaticText : public wxStaticText { public: ThreadedStaticText (wxWindow* parent, std::string initial, boost::function<std::string ()> fn); + ~ThreadedStaticText (); private: void run (boost::function<std::string ()> fn); void thread_finished (wxCommandEvent& ev); + boost::thread* _thread; + static const int _update_event_id; }; |
