viewport_type.h
Go to the documentation of this file.00001
00002
00005 #ifndef VIEWPORT_TYPE_H
00006 #define VIEWPORT_TYPE_H
00007
00008 #include "core/geometry_type.hpp"
00009 #include "zoom_type.h"
00010 #include "window_type.h"
00011 #include "tile_type.h"
00012
00013 struct ViewPort {
00014 int left,top;
00015 int width, height;
00016
00017 int virtual_left, virtual_top;
00018 int virtual_width, virtual_height;
00019
00020 ZoomLevel zoom;
00021 };
00022
00023 enum {
00024 ZOOM_IN = 0,
00025 ZOOM_OUT = 1,
00026 ZOOM_NONE = 2,
00027 };
00028
00035 enum {
00036 BB_HEIGHT_UNDER_BRIDGE = 6,
00037 BB_Z_SEPARATOR = 7,
00038 };
00039
00041 enum ViewportPlaceMethod {
00042 VPM_X_OR_Y = 0,
00043 VPM_FIX_X = 1,
00044 VPM_FIX_Y = 2,
00045 VPM_RAILDIRS = 3,
00046 VPM_X_AND_Y = 4,
00047 VPM_X_AND_Y_LIMITED = 5,
00048 VPM_SIGNALDIRS = 6,
00049 };
00050
00052 enum ViewportHighlightMode {
00053 VHM_NONE = 0,
00054 VHM_RECT = 1,
00055 VHM_POINT = 2,
00056 VHM_SPECIAL = 3,
00057 VHM_DRAG = 4,
00058 VHM_RAIL = 5,
00059 };
00060
00061
00062 enum HighLightStyle {
00063 HT_NONE = 0x00,
00064 HT_RECT = 0x80,
00065 HT_POINT = 0x40,
00066 HT_LINE = 0x20,
00067
00068 HT_RAIL = 0x10,
00069
00070 HT_DRAG_MASK = 0xF0,
00071
00072
00073
00074 HT_DIR_X = 0,
00075 HT_DIR_Y = 1,
00076 HT_DIR_HU = 2,
00077 HT_DIR_HL = 3,
00078 HT_DIR_VL = 4,
00079 HT_DIR_VR = 5,
00080 HT_DIR_MASK = 0x7
00081 };
00082 DECLARE_ENUM_AS_BIT_SET(HighLightStyle);
00083
00084
00085 struct TileHighlightData {
00086 Point size;
00087 Point outersize;
00088 Point pos;
00089 Point offs;
00090
00091 Point new_pos;
00092 Point new_size;
00093 Point new_outersize;
00094
00095 Point selend, selstart;
00096
00097 byte dirty;
00098 byte sizelimit;
00099
00100 byte drawstyle;
00101 byte new_drawstyle;
00102 byte next_drawstyle;
00103
00104 ViewportHighlightMode place_mode;
00105 bool make_square_red;
00106 WindowClass window_class;
00107 WindowNumber window_number;
00108
00109 ViewportPlaceMethod select_method;
00110 byte select_proc;
00111
00112 TileIndex redsq;
00113 };
00114
00115 #endif