tilehighlight_type.h

Go to the documentation of this file.
00001 /* $Id: tilehighlight_type.h 15413 2009-02-08 15:45:34Z rubidium $ */
00002 
00005 #ifndef TILEHIGHLIGHT_TYPE_H
00006 #define TILEHIGHLIGHT_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 
00014 enum ViewportHighlightMode {
00015   VHM_NONE    = 0, 
00016   VHM_RECT    = 1, 
00017   VHM_POINT   = 2, 
00018   VHM_SPECIAL = 3, 
00019   VHM_DRAG    = 4, 
00020   VHM_RAIL    = 5, 
00021 };
00022 
00024 enum HighLightStyle {
00025   HT_NONE   = 0x00,
00026   HT_RECT   = 0x80,
00027   HT_POINT  = 0x40,
00028   HT_LINE   = 0x20,    
00029 
00030   HT_RAIL   = 0x10,    
00031 
00032   HT_DRAG_MASK = 0xF0, 
00033 
00034   /* lower bits (used with HT_LINE and HT_RAIL):
00035    * (see ASCII art in autorail.h for a visual interpretation) */
00036   HT_DIR_X  = 0,    
00037   HT_DIR_Y  = 1,    
00038   HT_DIR_HU = 2,    
00039   HT_DIR_HL = 3,    
00040   HT_DIR_VL = 4,    
00041   HT_DIR_VR = 5,    
00042   HT_DIR_MASK = 0x7 
00043 };
00044 DECLARE_ENUM_AS_BIT_SET(HighLightStyle);
00045 
00046 
00047 struct TileHighlightData {
00048   Point size;
00049   Point outersize;
00050   Point pos;
00051   Point offs;
00052 
00053   Point new_pos;
00054   Point new_size;
00055   Point new_outersize;
00056 
00057   Point selend, selstart;
00058 
00059   byte dirty;
00060   byte sizelimit;
00061 
00062   byte drawstyle;      // lower bits 0-3 are reserved for detailed highlight information information
00063   byte new_drawstyle;  // only used in UpdateTileSelection() to as a buffer to compare if there was a change between old and new
00064   byte next_drawstyle; // queued, but not yet drawn style
00065 
00066   ViewportHighlightMode place_mode;
00067   bool make_square_red;
00068   WindowClass window_class;
00069   WindowNumber window_number;
00070 
00071   ViewportPlaceMethod select_method;
00072   ViewportDragDropSelectionProcess select_proc;
00073 
00074   TileIndex redsq;
00075 };
00076 
00077 #endif /* TILEHIGHLIGHT_TYPE_H */

Generated on Thu Oct 1 11:03:18 2009 for OpenTTD by  doxygen 1.5.6