1
#ifndef DISPLAY_INTERNAL_HH
2
#define DISPLAY_INTERNAL_HH
14
typedef px::Rect ScreenArea;
15
typedef px::Rect WorldArea;
16
typedef std::list<Model*> ModelList;
22
Window (const ScreenArea &area) : m_area(area)
25
const ScreenArea &get_area() const { return m_area; }
33
TextDisplay(px::Font &f);
35
void set_text(const std::string &t, bool scrolling, double duration = -1);
37
void tick(double dtime);
38
bool has_changed() const { return changedp; }
39
bool has_finished() const { return finishedp; }
41
void draw(px::GC &gc, const px::Rect &r);
45
bool changedp, finishedp;
48
double scrollspeed; // pixels per second
49
std::auto_ptr<px::Surface> textsurface;
54
class StatusBarImpl : public StatusBar, public Window {
56
StatusBarImpl (const ScreenArea &area);
59
bool has_changed() const { return m_changedp; }
60
void redraw (px::GC &gc, const ScreenArea &r);
61
void tick (double dtime);
64
// StatusBar interface.
65
void set_time (double time);
66
void set_inventory (const std::vector<std::string> &modelnames);
67
void show_text (const std::string &str, bool scrolling, double duration);
70
void show_move_counter (bool active);
71
void show_odometer (bool active);
73
void set_speed (double speed);
74
void set_travelled_distance (double distance);
75
void set_counter (int new_counter);
78
ScreenArea m_itemarea;
79
std::vector<Model*> m_models;
81
TextDisplay m_textview;
87
bool m_showodometer_p;
88
bool m_interruptible; // Current text message may be interrupted