Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::SpaceGame::FrontCamera Class Reference

Main 3D display. More...

#include <FrontCamera.h>

Collaboration diagram for Teddy::SpaceGame::FrontCamera:

Collaboration graph
[legend]
List of all members.

Public Methods

 FrontCamera (const char *name, Camera *camera, Root *root, LayoutConstraint *lc, bool frame)
 Constructor. More...

virtual ~FrontCamera ()
 Destructor. More...

virtual void drawSelf ()
virtual void focusActive (const bool active)
 Received or lost focus. More...

virtual void mouseKey (const int button, const int state, const int x, const int y)
 MouseListener interface. More...

virtual void mouseMotion (const int x, const int y, const int dx, const int dy)
virtual Area * getTarget (const Event e) const
 Return event target. More...

virtual void keyDown (const SDL_keysym key)
 KeyListener interface implementation. More...

virtual void keyUp (const SDL_keysym key)

Protected Attributes

Rootroot
WindowFrame * window_frame
PlayerShipplayer_ship
Label * title
int mouse_drag_x [4]
int mouse_drag_y [4]
int mouse_click_x [4]
int mouse_click_y [4]
int mouse_b [4]

Static Protected Attributes

bool keys [SDLK_LAST+1]

Detailed Description

Main 3D display.

Bug:
Bad name, it can be other than front camera too
Todo:
Fix the name
Warning:
Class name will change

Definition at line 57 of file FrontCamera.h.


Constructor & Destructor Documentation

Teddy::SpaceGame::FrontCamera::FrontCamera const char *    name,
Camera *    camera,
Root   root,
LayoutConstraint *    lc,
bool    frame
 

Constructor.

Definition at line 49 of file FrontCamera.cpp.

References keys, mouse_click_x, mouse_click_y, mouse_drag_x, mouse_drag_y, player_ship, root, title, and window_frame.

Teddy::SpaceGame::FrontCamera::~FrontCamera   [virtual]
 

Destructor.

Definition at line 109 of file FrontCamera.cpp.


Member Function Documentation

void Teddy::SpaceGame::FrontCamera::drawSelf   [virtual]
 

Definition at line 94 of file FrontCamera.cpp.

References title.

void Teddy::SpaceGame::FrontCamera::focusActive const bool    active [virtual]
 

Received or lost focus.

Definition at line 115 of file FrontCamera.cpp.

References root, and window_frame.

Area * Teddy::SpaceGame::FrontCamera::getTarget const Event    e const [virtual]
 

Return event target.

Definition at line 103 of file FrontCamera.cpp.

References window_frame.

void Teddy::SpaceGame::FrontCamera::keyDown const SDL_keysym    key [virtual]
 

KeyListener interface implementation.

Definition at line 159 of file FrontCamera.cpp.

References keys, player_ship, and root.

void Teddy::SpaceGame::FrontCamera::keyUp const SDL_keysym    key [virtual]
 

Definition at line 298 of file FrontCamera.cpp.

References keys, and player_ship.

void Teddy::SpaceGame::FrontCamera::mouseKey const int    button,
const int    state,
const int    x,
const int    y
[virtual]
 

MouseListener interface.

Definition at line 130 of file FrontCamera.cpp.

References mouse_b, mouse_click_x, mouse_click_y, mouse_drag_x, mouse_drag_y, and root.

void Teddy::SpaceGame::FrontCamera::mouseMotion const int    x,
const int    y,
const int    dx,
const int    dy
[virtual]
 

Definition at line 149 of file FrontCamera.cpp.

References mouse_b, and root.


Member Data Documentation

bool Teddy::SpaceGame::FrontCamera::keys [static, protected]
 

Definition at line 45 of file FrontCamera.cpp.

Referenced by FrontCamera(), keyDown(), and keyUp().

int Teddy::SpaceGame::FrontCamera::mouse_b[4] [protected]
 

Definition at line 86 of file FrontCamera.h.

Referenced by mouseKey(), and mouseMotion().

int Teddy::SpaceGame::FrontCamera::mouse_click_x[4] [protected]
 

Definition at line 84 of file FrontCamera.h.

Referenced by FrontCamera(), and mouseKey().

int Teddy::SpaceGame::FrontCamera::mouse_click_y[4] [protected]
 

Definition at line 85 of file FrontCamera.h.

Referenced by FrontCamera(), and mouseKey().

int Teddy::SpaceGame::FrontCamera::mouse_drag_x[4] [protected]
 

Definition at line 82 of file FrontCamera.h.

Referenced by FrontCamera(), and mouseKey().

int Teddy::SpaceGame::FrontCamera::mouse_drag_y[4] [protected]
 

Definition at line 83 of file FrontCamera.h.

Referenced by FrontCamera(), and mouseKey().

PlayerShip* Teddy::SpaceGame::FrontCamera::player_ship [protected]
 

Definition at line 80 of file FrontCamera.h.

Referenced by FrontCamera(), keyDown(), and keyUp().

Root* Teddy::SpaceGame::FrontCamera::root [protected]
 

Definition at line 78 of file FrontCamera.h.

Referenced by focusActive(), FrontCamera(), keyDown(), mouseKey(), and mouseMotion().

Label* Teddy::SpaceGame::FrontCamera::title [protected]
 

Definition at line 81 of file FrontCamera.h.

Referenced by drawSelf(), and FrontCamera().

WindowFrame* Teddy::SpaceGame::FrontCamera::window_frame [protected]
 

Definition at line 79 of file FrontCamera.h.

Referenced by focusActive(), FrontCamera(), and getTarget().


The documentation for this class was generated from the following files: