viewport_type.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef VIEWPORT_TYPE_H
00013 #define VIEWPORT_TYPE_H
00014
00015 #include "zoom_type.h"
00016 #include "strings_type.h"
00017
00021 struct ViewPort {
00022 int left;
00023 int top;
00024 int width;
00025 int height;
00026
00027 int virtual_left;
00028 int virtual_top;
00029 int virtual_width;
00030 int virtual_height;
00031
00032 ZoomLevel zoom;
00033 };
00034
00036 enum ViewportSignMargin {
00037 VPSM_LEFT = 1,
00038 VPSM_RIGHT = 1,
00039 VPSM_TOP = 1,
00040 VPSM_BOTTOM = 1,
00041 };
00042
00044 struct ViewportSign {
00045 int32 center;
00046 int32 top;
00047 uint16 width_normal;
00048 uint16 width_small;
00049
00050 void UpdatePosition(int center, int top, StringID str);
00051 void MarkDirty() const;
00052 };
00053
00054 enum {
00055 ZOOM_IN = 0,
00056 ZOOM_OUT = 1,
00057 ZOOM_NONE = 2,
00058 };
00059
00066 enum {
00067 BB_HEIGHT_UNDER_BRIDGE = 6,
00068 BB_Z_SEPARATOR = 7,
00069 };
00070
00072 enum ViewportPlaceMethod {
00073 VPM_X_OR_Y = 0,
00074 VPM_FIX_X = 1,
00075 VPM_FIX_Y = 2,
00076 VPM_X_AND_Y = 3,
00077 VPM_X_AND_Y_LIMITED = 4,
00078 VPM_FIX_HORIZONTAL = 5,
00079 VPM_FIX_VERTICAL = 6,
00080 VPM_X_LIMITED = 7,
00081 VPM_Y_LIMITED = 8,
00082 VPM_RAILDIRS = 0x40,
00083 VPM_SIGNALDIRS = 0x80,
00084 };
00085 DECLARE_ENUM_AS_BIT_SET(ViewportPlaceMethod);
00086
00089 enum ViewportDragDropSelectionProcess {
00090 DDSP_DEMOLISH_AREA,
00091 DDSP_RAISE_AND_LEVEL_AREA,
00092 DDSP_LOWER_AND_LEVEL_AREA,
00093 DDSP_LEVEL_AREA,
00094 DDSP_CREATE_DESERT,
00095 DDSP_CREATE_ROCKS,
00096 DDSP_CREATE_WATER,
00097 DDSP_CREATE_RIVER,
00098 DDSP_PLANT_TREES,
00099 DDSP_BUILD_BRIDGE,
00100
00101
00102 DDSP_PLACE_RAIL,
00103 DDSP_BUILD_SIGNALS,
00104 DDSP_BUILD_STATION,
00105 DDSP_REMOVE_STATION,
00106 DDSP_CONVERT_RAIL,
00107
00108
00109 DDSP_PLACE_ROAD_X_DIR,
00110 DDSP_PLACE_ROAD_Y_DIR,
00111 DDSP_PLACE_AUTOROAD,
00112 };
00113
00114 #endif