1 /*
2  * This file is part of OpenTTD.
3  * 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.
4  * 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.
5  * 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/>.
6  */
7 
8 /** @file tilehighlight_func.h Functions related to tile highlights. */
9 
10 #ifndef TILEHIGHLIGHT_FUNC_H
11 #define TILEHIGHLIGHT_FUNC_H
12 
13 #include "gfx_type.h"
14 #include "tilehighlight_type.h"
15 
16 void PlaceProc_DemolishArea(TileIndex tile);
17 bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile);
18 
19 bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode);
20 void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w);
21 void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num);
22 void ResetObjectToPlace();
23 
24 void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method);
25 void VpStartDragging(ViewportDragDropSelectionProcess process);
26 void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process);
27 void VpSetPresizeRange(TileIndex from, TileIndex to);
28 void VpSetPlaceSizingLimit(int limit);
29 
30 void UpdateTileSelection();
31 
32 extern TileHighlightData _thd;
33 
34 #endif /* TILEHIGHLIGHT_FUNC_H */
35