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
00021 enum HighLightStyle {
00022 HT_NONE = 0x000,
00023 HT_RECT = 0x010,
00024 HT_POINT = 0x020,
00025 HT_SPECIAL = 0x030,
00026 HT_DRAG = 0x040,
00027 HT_LINE = 0x008,
00028 HT_RAIL = 0x080,
00029 HT_VEHICLE = 0x100,
00030 HT_DIAGONAL = 0x200,
00031 HT_DRAG_MASK = 0x0F8,
00032
00033
00034
00035 HT_DIR_X = 0,
00036 HT_DIR_Y = 1,
00037 HT_DIR_HU = 2,
00038 HT_DIR_HL = 3,
00039 HT_DIR_VL = 4,
00040 HT_DIR_VR = 5,
00041 HT_DIR_END,
00042 HT_DIR_MASK = 0x7
00043 };
00044 DECLARE_ENUM_AS_BIT_SET(HighLightStyle)
00045
00046
00047
00048 struct TileHighlightData {
00049 Point pos;
00050 Point size;
00051 Point offs;
00052 Point outersize;
00053 bool diagonal;
00054
00055 Point new_pos;
00056 Point new_size;
00057 Point new_outersize;
00058 byte dirty;
00059
00060 Point selstart;
00061 Point selend;
00062 byte sizelimit;
00063
00064 HighLightStyle drawstyle;
00065 HighLightStyle next_drawstyle;
00066
00067 HighLightStyle place_mode;
00068 WindowClass window_class;
00069 WindowNumber window_number;
00070
00071 bool make_square_red;
00072 TileIndex redsq;
00073
00074 ViewportPlaceMethod select_method;
00075 ViewportDragDropSelectionProcess select_proc;
00076
00077 void Reset();
00078
00079 bool IsDraggingDiagonal();
00080 Window *GetCallbackWnd();
00081 };
00082
00083 #endif