Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef TILEHIGHLIGHT_TYPE_H
00013 #define TILEHIGHLIGHT_TYPE_H
00014
00015 #include "core/geometry_type.hpp"
00016 #include "window_type.h"
00017 #include "tile_type.h"
00018 #include "viewport_type.h"
00019
00020
00022 enum HighLightStyle {
00023 HT_NONE = 0x000,
00024 HT_RECT = 0x010,
00025 HT_POINT = 0x020,
00026 HT_SPECIAL = 0x030,
00027 HT_DRAG = 0x040,
00028 HT_LINE = 0x008,
00029 HT_RAIL = 0x080,
00030 HT_VEHICLE = 0x100,
00031 HT_DIAGONAL = 0x200,
00032 HT_PREVIEW = 0x400,
00033 HT_DRAG_MASK = 0x4F8,
00034
00035
00036
00037 HT_DIR_X = 0,
00038 HT_DIR_Y = 1,
00039 HT_DIR_HU = 2,
00040 HT_DIR_HL = 3,
00041 HT_DIR_VL = 4,
00042 HT_DIR_VR = 5,
00043 HT_DIR_END,
00044 HT_DIR_MASK = 0x7
00045 };
00046 DECLARE_ENUM_AS_BIT_SET(HighLightStyle)
00047
00048
00049
00050 struct TileHighlightData {
00051 Point pos;
00052 Point size;
00053 Point offs;
00054 Point outersize;
00055 bool diagonal;
00056
00057 Point new_pos;
00058 Point new_size;
00059 Point new_outersize;
00060 byte dirty;
00061
00062 Point selstart;
00063 Point selend;
00064 byte sizelimit;
00065
00066 HighLightStyle drawstyle;
00067 HighLightStyle next_drawstyle;
00068
00069 HighLightStyle place_mode;
00070 WindowClass window_class;
00071 WindowNumber window_number;
00072
00073 bool make_square_red;
00074 TileIndex redsq;
00075
00076 ViewportPlaceMethod select_method;
00077 ViewportDragDropSelectionProcess select_proc;
00078
00079 void Reset();
00080
00081 bool IsDraggingDiagonal();
00082 Window *GetCallbackWnd();
00083 };
00084
00085 #endif