home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Games / Empire-0.6-MIS / WorldMapView.h < prev    next >
Encoding:
Text File  |  1997-10-22  |  2.4 KB  |  83 lines

  1. //
  2. // $Id: WorldMapView.h,v 1.5 1997/10/23 02:25:55 nygard Exp $
  3. //
  4.  
  5. //
  6. //  This file is a part of Empire, a game of exploration and conquest.
  7. //  Copyright (C) 1996  Steve Nygard
  8. //
  9. //  This program is free software; you can redistribute it and/or modify
  10. //  it under the terms of the GNU General Public License as published by
  11. //  the Free Software Foundation; either version 2 of the License, or
  12. //  (at your option) any later version.
  13. //
  14. //  This program is distributed in the hope that it will be useful,
  15. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. //  GNU General Public License for more details.
  18. //
  19. //  You should have received a copy of the GNU General Public License
  20. //  along with this program; if not, write to the Free Software
  21. //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. //
  23. //  You may contact the author by:
  24. //     e-mail:  nygard@telusplanet.net
  25. //
  26.  
  27. #import <AppKit/AppKit.h>
  28.  
  29. @class Map;
  30. @class MapView;
  31.  
  32. //======================================================================
  33.  
  34. @interface WorldMapView : NSView
  35. {
  36.     id delegate;
  37.     Map *map;
  38.  
  39.     NSColor *terrainColors[4];
  40.     NSColor *playerColors[4];
  41.  
  42.     BOOL compressEvents;
  43. }
  44.  
  45. - initWithFrame:(NSRect)frameRect;
  46. - (void) dealloc;
  47.  
  48. - (BOOL) acceptsFirstResponder;
  49. - (BOOL) acceptsFirstMouse:(NSEvent *)theEvent;
  50.  
  51. - (void) drawRect:(NSRect)rect;
  52.  
  53. - (Map *) map;
  54. - (void) setMap:(Map *)aMap; // retains map
  55.  
  56. - (void) setCompressEvents:(BOOL)flag;
  57.  
  58. - (EMMapLocation) getLocationForPoint:(NSPoint)point;
  59. - (NSRect) getRectForLocation:(EMMapLocation)target;
  60. - (NSRect) getRectAround3x3Location:(EMMapLocation)target;
  61.  
  62. - (void) centerLocation:(EMMapLocation)target ifNotVisible:(BOOL)notVisibleFlag;
  63. - (void) scrollLocationToVisible:(EMMapLocation)target;
  64.  
  65. - (void) displayLocation:(EMMapLocation)target;
  66. - (void) displayAround3x3Location:(EMMapLocation)target;
  67.  
  68. - (void) vendorImagesUpdated:(BOOL)player1:(BOOL)player2:(BOOL)player3:(BOOL)other;
  69.  
  70. //======================================================================
  71. // Map Observer
  72. //======================================================================
  73.  
  74. - (void) refreshMap;
  75. - (void) refreshLocation:(EMMapLocation)target;
  76. - (void) refresh3x3Location:(EMMapLocation)target;
  77.  
  78. - (void) mouseDown:(NSEvent *)theEvent;
  79. - (void) mouseUp:(NSEvent *)theEvent;
  80. - (void) keyDown:(NSEvent *)theEvent;
  81.  
  82. @end
  83.