Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

robwxhist.h

00001 /*
00002  * robwxhist.h
00003  * 
00004  * Copyright (c) 2000-2004 by Florian Fischer (florianfischer@gmx.de)
00005  * and Martin Trautmann (martintrautmann@gmx.de) 
00006  * 
00007  * This file may be distributed and/or modified under the terms of the 
00008  * GNU General Public License version 2 as published by the Free Software 
00009  * Foundation. 
00010  * 
00011  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013  * 
00014  */
00015 
00016 // History panel for visualization
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&) { /* do nothing */ }
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

This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer