2
* Copyright (c) 2011 Knightly
4
* This file is part of the Simutrans project under the artistic licence.
9
#ifndef factory_chart_h
10
#define factory_chart_h
12
#define MAX_PROD_LABEL (7-1)
13
#define ALIGN_RIGHT_PRD_LABEL (1-1)
15
#include "../simfab.h"
16
#include "gui_frame.h"
17
#include "components/action_listener.h"
18
#include "components/gui_label.h"
19
#include "components/gui_button.h"
20
#include "components/gui_chart.h"
21
#include "components/gui_tab_panel.h"
22
#include "gui_container.h"
25
class factory_chart_t : public gui_container_t, private action_listener_t
28
const fabrik_t *factory;
30
// Tab panel for grouping 2 sets of statistics
31
gui_tab_panel_t tab_panel;
33
// GUI components for input/output goods' statistics
34
gui_container_t goods_cont;
35
gui_chart_t goods_chart;
36
button_t *goods_buttons;
37
gui_label_t *goods_labels;
38
uint16 goods_button_count;
39
uint16 goods_label_count;
41
// GUI components for other production-related statistics
42
gui_container_t prod_cont;
43
gui_chart_t prod_chart;
44
button_t prod_buttons[MAX_FAB_STAT];
45
button_t prod_ref_line_buttons[MAX_FAB_REF_LINE];
46
gui_label_t prod_labels[MAX_PROD_LABEL];
48
// Variables for reference lines
49
sint64 prod_ref_line_data[MAX_FAB_REF_LINE];
52
factory_chart_t(const fabrik_t *_factory);
53
virtual ~factory_chart_t();
55
virtual bool action_triggered(gui_action_creator_t *komp, value_t extra);
57
virtual void zeichnen(koord pos);