Source/BoardUIView.h
author snej@snej.local
Tue Mar 10 22:36:23 2009 -0700 (2009-03-10)
changeset 27 b0affce7beb1
permissions -rw-r--r--
Fixed some problems reported by the CLANG static analyzer.
     1 //
     2 //  BoardUIView.h
     3 //  GeekGameBoard
     4 //
     5 //  Created by Jens Alfke on 3/7/08.
     6 //  Copyright 2008 __MyCompanyName__. All rights reserved.
     7 //
     8 
     9 #import <UIKit/UIKit.h>
    10 @class GGBLayer, Bit, Card, Grid, Game;
    11 @protocol BitHolder;
    12 
    13 
    14 /** NSView that hosts a game. */
    15 @interface BoardUIView : UIView
    16 {
    17     @private
    18     Game *_game;                                // Current Game
    19     GGBLayer *_gameboard;                       // Game's main layer
    20     
    21     // Used during mouse-down tracking:
    22     CGPoint _dragStartPos;                      // Starting position of mouseDown
    23     Bit *_dragBit;                              // Bit being dragged
    24     id<BitHolder> _oldHolder;                   // Bit's original holder
    25     CALayer *_oldSuperlayer;                    // Bit's original superlayer
    26     int _oldLayerIndex;                         // Bit's original index in _oldSuperlayer.layers
    27     CGPoint _oldPos;                            // Bit's original x/y position
    28     CGPoint _dragOffset;                        // Offset of mouse position from _dragBit's origin
    29     BOOL _dragMoved;                            // Has the mouse moved more than 3 pixels since mouseDown?
    30     id<BitHolder> _dropTarget;                  // Current BitHolder the cursor is over
    31     
    32     // Used while handling incoming drags:
    33     GGBLayer *_viewDropTarget;                   // Current drop target during an incoming drag-n-drop
    34 }
    35 
    36 - (void) startGameNamed: (NSString*)gameClassName;
    37 
    38 @property (readonly) Game *game;
    39 @property (readonly) GGBLayer *gameboard;
    40 
    41 - (CGRect) gameBoardFrame;
    42 
    43 @end