00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __RT_WX_HISTORY__
00019 #define __RT_WX_HISTORY__
00020
00021 #include <wx/wx.h>
00022
00023 class RoboTourEvent;
00024
00025 class HistoryCtrl : public wxControl
00026 {
00027 public:
00028 HistoryCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size);
00029 ~HistoryCtrl();
00030
00031 void SetMaximum(int max);
00032 void ClearHistory();
00033 void UpdateFrom(RoboTourEvent&);
00034
00035 DECLARE_EVENT_TABLE()
00036 protected:
00037 wxSize DoGetBestSize();
00038 private:
00039 void EnsureSize(const wxSize&);
00040 void Paint(wxDC& dc);
00041
00042 void OnSize(wxSizeEvent&);
00043 void OnEraseBackground(wxEraseEvent&) { }
00044 void OnPaint(wxPaintEvent&);
00045
00046 int max;
00047 int screenPos, bmpPos;
00048 wxBitmap* buf;
00049 int lastCycle, minInterval;
00050 };
00051
00052
00053
00054 #endif