annotate src/engine_gui.h @ 20307:93d7e37bd666 draft

(svn r25259) -Codechange: track capacities and usage of links
author rubidium <rubidium@openttd.org>
date Sun, 19 May 2013 14:22:04 +0000
parents 8d78f45313bf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9380
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
1 /* $Id$ */
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
2
12778
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
3 /*
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
4 * This file is part of OpenTTD.
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
8 */
bc7926153e19 (svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents: 11662
diff changeset
9
18855
a0d7e20ebafe (svn r23704) -Doc: Doxygen comment fixes and additions.
alberth <alberth@openttd.org>
parents: 18244
diff changeset
10 /** @file engine_gui.h %Engine GUI functions, used by build_vehicle_gui and autoreplace_gui */
9380
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
11
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
12 #ifndef ENGINE_GUI_H
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
13 #define ENGINE_GUI_H
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
14
14258
a899d4e5ee1a (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
rubidium <rubidium@openttd.org>
parents: 13597
diff changeset
15 #include "engine_type.h"
9403
a6c2188b725a (svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
peter1138 <peter1138@openttd.org>
parents: 9380
diff changeset
16 #include "sortlist_type.h"
14258
a899d4e5ee1a (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
rubidium <rubidium@openttd.org>
parents: 13597
diff changeset
17 #include "gfx_type.h"
18886
8d78f45313bf (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed
rubidium <rubidium@openttd.org>
parents: 18855
diff changeset
18 #include "vehicle_type.h"
9380
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
19
11662
9463dadd8ee5 (svn r16042) -Feature [FS#1941]: Allow filtering of vehicle purchase lists by cargo. Based on patch by sbr.
frosch <frosch@openttd.org>
parents: 9403
diff changeset
20 typedef GUIList<EngineID, CargoID> GUIEngineList;
9380
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
21
18855
a0d7e20ebafe (svn r23704) -Doc: Doxygen comment fixes and additions.
alberth <alberth@openttd.org>
parents: 18244
diff changeset
22 typedef int CDECL EngList_SortTypeFunction(const EngineID*, const EngineID*); ///< argument type for #EngList_Sort.
a0d7e20ebafe (svn r23704) -Doc: Doxygen comment fixes and additions.
alberth <alberth@openttd.org>
parents: 18244
diff changeset
23 void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare);
a0d7e20ebafe (svn r23704) -Doc: Doxygen comment fixes and additions.
alberth <alberth@openttd.org>
parents: 18244
diff changeset
24 void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items);
9380
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
25
12837
a6a46b1b7ad9 (svn r17327) -Codechange: Allow external use of GetEngineCategoryName().
alberth <alberth@openttd.org>
parents: 12835
diff changeset
26 StringID GetEngineCategoryName(EngineID engine);
12838
7cdda3e6b6ff (svn r17328) -Codechange: Get the vehicle technical data as string rather than having it printed.
alberth <alberth@openttd.org>
parents: 12837
diff changeset
27 StringID GetEngineInfoString(EngineID engine);
13597
706013b8e441 (svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents: 13032
diff changeset
28
18244
8f6022f41538 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
frosch <frosch@openttd.org>
parents: 14319
diff changeset
29 void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
8f6022f41538 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
frosch <frosch@openttd.org>
parents: 14319
diff changeset
30 void DrawTrainEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
8f6022f41538 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
frosch <frosch@openttd.org>
parents: 14319
diff changeset
31 void DrawRoadVehEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
8f6022f41538 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
frosch <frosch@openttd.org>
parents: 14319
diff changeset
32 void DrawShipEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
8f6022f41538 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
frosch <frosch@openttd.org>
parents: 14319
diff changeset
33 void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
12835
0b809befe631 (svn r17325) -Codechange: Un-duplicate engine drawing routines.
alberth <alberth@openttd.org>
parents: 12778
diff changeset
34
9380
90ab27a08510 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff changeset
35 #endif /* ENGINE_GUI_H */