03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

{<br />

public:<br />

// Construct/destruct/setup<br />

~CFleetView();<br />

void ConstructL(const TRect& aRect);<br />

void SetController(TFleet& aFleet, MGameViewCmdHandler&<br />

aCmdHandler);<br />

// Zoom<br />

void SetZoomL(TInt aZoomFactor);<br />

TInt GetZoom() const;<br />

// Cursor<br />

void SetCursorOff();<br />

void SetCursor(TInt aX, TInt aY);<br />

TBool CursorOn() const;<br />

void GetCursor(TInt& aX, TInt& aY) const;<br />

// Incremental drawing<br />

void DrawTilesNow() const;<br />

void DrawBordersNow() const;<br />

private:<br />

// From CCoeControl<br />

void Draw(const TRect&) const;<br />

void HandlePointerEventL(const TPointerEvent& aPointerEvent);<br />

TKeyResponse OfferKeyEventL(const TKeyEvent&<br />

aKeyEvent,TEventCode<br />

aType);<br />

// Auxiliary draw functions<br />

void DrawOutside() const;<br />

void DrawBorders() const;<br />

void DrawHorizontalBorder(const TRect& aRect) const;<br />

void DrawVerticalBorder(const TRect& aRect) const;<br />

void DrawTiles() const;<br />

void DrawTile(TInt aX, TInt aY) const;<br />

// Cursor movement<br />

void MoveCursor(TInt aDx, TInt aDy);<br />

private:<br />

TFleet* iFleet;<br />

MGameViewCmdHandler* iCmdHandler;<br />

// Cursor<br />

TBool iCursorOn;<br />

TInt iCursorX;<br />

TInt iCursorY;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!