OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ManufactureInfoState.h
1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_MANUFACTUREINFOSTATE_H
20 #define OPENXCOM_MANUFACTUREINFOSTATE_H
21 
22 #include "../Engine/State.h"
23 
24 namespace OpenXcom
25 {
26 class Base;
27 class Window;
28 class Text;
29 class ArrowButton;
30 class TextButton;
31 class ToggleTextButton;
32 class RuleManufacture;
33 class Production;
34 class Timer;
35 class InteractiveSurface;
36 
41 {
42 private:
43  Base * _base;
44  RuleManufacture * _item;
45  Production * _production;
46  Window * _window;
47  ArrowButton * _btnUnitUp, * _btnUnitDown, * _btnEngineerUp, * _btnEngineerDown;
48  TextButton * _btnStop, * _btnOk;
49  Text * _txtTitle, * _txtAvailableEngineer, * _txtAvailableSpace, * _txtAllocatedEngineer, * _txtUnitToProduce, * _txtUnitUp, * _txtUnitDown, * _txtEngineerUp, * _txtEngineerDown, * _txtAllocated, * _txtTodo;
50  ToggleTextButton *_btnSell;
51  Timer * _timerMoreEngineer, * _timerMoreUnit, * _timerLessEngineer, * _timerLessUnit;
52  InteractiveSurface *_surfaceEngineers, *_surfaceUnits;
54  void btnStopClick (Action * action);
56  void btnOkClick (Action * action);
58  void moreEngineer(int change);
60  void moreEngineerPress(Action * action);
62  void moreEngineerRelease(Action * action);
64  void moreEngineerClick(Action * action);
66  void moreUnit(int change);
68  void moreUnitPress(Action * action);
70  void moreUnitRelease(Action * action);
72  void moreUnitClick(Action * action);
74  void lessEngineer(int change);
76  void lessEngineerPress(Action * action);
78  void lessEngineerRelease(Action * action);
80  void lessEngineerClick(Action * action);
82  void lessUnit(int change);
84  void lessUnitPress(Action * action);
86  void lessUnitRelease(Action * action);
88  void lessUnitClick(Action * action);
90  void onMoreEngineer();
92  void onLessEngineer();
94  void handleWheelEngineer(Action *action);
96  void onMoreUnit();
98  void onLessUnit();
100  void handleWheelUnit(Action *action);
102  void setAssignedEngineer();
104  void think();
106  void buildUi();
108  void exitState();
109 public:
111  ManufactureInfoState (Game * game, Base * base, RuleManufacture * _item);
113  ManufactureInfoState (Game * game, Base * base, Production * production);
114 };
115 }
116 #endif
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Box with a coloured border and custom background.
Definition: Window.h:42
Timer used to run code in fixed intervals.
Definition: Timer.h:37
Surface that the user can interact with.
Definition: InteractiveSurface.h:39
Definition: ToggleTextButton.h:31
Text string displayed on screen.
Definition: Text.h:41
Definition: Production.h:31
Represents a player base on the globe.
Definition: Base.h:47
Coloured button with a text label.
Definition: TextButton.h:40
Button with an arrow on it.
Definition: ArrowButton.h:37
Represents the information needed to manufacture an object.
Definition: RuleManufacture.h:32
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
ManufactureInfoState(Game *game, Base *base, RuleManufacture *_item)
Creates the State (new production).
Definition: ManufactureInfoState.cpp:48
Screen that allows changing of Production settings (assigned engineer, units to build).
Definition: ManufactureInfoState.h:40