~ubuntu-branches/ubuntu/raring/simutrans/raring-proposed

« back to all changes in this revision

Viewing changes to gui/factory_chart.h

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-11-03 19:59:02 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20111103195902-uopgwf488mfctb75
Tags: 111.0-1
* New upstream release.
* debian/rules: Update get-orig-source target for new upstream release.
* Use xz compression for source and binary packages.
* Use override_* targets to simplify debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2011 Knightly
 
3
 *
 
4
 * This file is part of the Simutrans project under the artistic licence.
 
5
 * (see licence.txt)
 
6
 */
 
7
 
 
8
 
 
9
#ifndef factory_chart_h
 
10
#define factory_chart_h
 
11
 
 
12
#define MAX_PROD_LABEL      (7-1)
 
13
#define ALIGN_RIGHT_PRD_LABEL   (1-1)
 
14
 
 
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"
 
23
 
 
24
 
 
25
class factory_chart_t : public gui_container_t, private action_listener_t
 
26
{
 
27
private:
 
28
        const fabrik_t *factory;
 
29
 
 
30
        // Tab panel for grouping 2 sets of statistics
 
31
        gui_tab_panel_t tab_panel;
 
32
 
 
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;
 
40
 
 
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];
 
47
 
 
48
        // Variables for reference lines
 
49
        sint64 prod_ref_line_data[MAX_FAB_REF_LINE];
 
50
 
 
51
public:
 
52
        factory_chart_t(const fabrik_t *_factory);
 
53
        virtual ~factory_chart_t();
 
54
 
 
55
        virtual bool action_triggered(gui_action_creator_t *komp, value_t extra);
 
56
 
 
57
        virtual void zeichnen(koord pos);
 
58
};
 
59
 
 
60
#endif