Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MapView Class Reference

#include <MapView.h>

Inheritance diagram for MapView:
View EventTarget SimObserver

List of all members.

Public Member Functions

 MapView (Window *win)
virtual ~MapView ()
virtual void Refresh ()
virtual void OnWindowMove ()
virtual void OnShow ()
virtual void OnHide ()
virtual void DrawTitle ()
virtual void DrawGalaxy ()
virtual void DrawSystem ()
virtual void DrawRegion ()
virtual void DrawGrid ()
virtual void DrawOrbital (Orbital &orbital, int index)
virtual void DrawShip (Ship &ship, bool current=false, int rep=3)
virtual void DrawElem (MissionElement &elem, bool current=false, int rep=3)
virtual void DrawNavRoute (OrbitalRegion *rgn, List< Instruction > &route, Color smarker, Ship *ship=0, MissionElement *elem=0)
virtual void DrawCombatantSystem (Combatant *c, Orbital *rgn, int x, int y, int r)
virtual void DrawCombatGroupSystem (CombatGroup *g, Orbital *rgn, int x1, int x2, int &y, int a)
virtual void DrawCombatGroup (CombatGroup *g, int rep=3)
virtual int GetViewMode () const
virtual void SetViewMode (int mode)
virtual void SetSelectionMode (int mode)
virtual int GetSelectionMode () const
virtual void SetSelection (int index)
virtual void SetSelectedShip (Ship *ship)
virtual void SetSelectedElem (MissionElement *elem)
virtual void SetRegion (OrbitalRegion *rgn)
virtual void SetRegionByName (const char *rgn_name)
virtual void SelectAt (int x, int y)
virtual OrbitalGetSelection ()
virtual ShipGetSelectedShip ()
virtual MissionElementGetSelectedElem ()
virtual int GetSelectionIndex ()
virtual void SetShipFilter (DWORD f)
virtual int OnMouseMove (int x, int y)
virtual int OnLButtonDown (int x, int y)
virtual int OnLButtonUp (int x, int y)
virtual int OnClick ()
virtual int OnRButtonDown (int x, int y)
virtual int OnRButtonUp (int x, int y)
virtual bool IsEnabled () const
virtual bool IsVisible () const
virtual bool IsFormActive () const
virtual Rect TargetRect () const
void ZoomIn ()
void ZoomOut ()
void SetGalaxy (List< StarSystem > &systems)
void SetSystem (StarSystem *s)
void SetMission (Mission *m)
void SetShip (Ship *s)
void SetCampaign (Campaign *c)
bool IsVisible (const Point &loc)
virtual void GetClickLoc (double &x, double &y)
List< StarSystem > & GetGalaxy ()
StarSystemGetSystem () const
OrbitalRegionGetRegion () const
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
bool GetEditorMode () const
void SetEditorMode (bool b)
- Public Member Functions inherited from View
 View (Window *c)
virtual ~View ()
int operator== (const View &that) const
virtual void SetWindow (Window *w)
virtual WindowGetWindow ()
- Public Member Functions inherited from EventTarget
virtual ~EventTarget ()
int operator== (const EventTarget &t) const
virtual int OnSelect ()
virtual int OnMouseEnter (int x, int y)
virtual int OnMouseExit (int x, int y)
virtual int OnMouseWheel (int wheel)
virtual int OnKeyDown (int vk, int flags)
virtual void SetFocus ()
virtual void KillFocus ()
virtual bool HasFocus () const
virtual const char * GetDescription () const
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Protected Member Functions

virtual void BuildMenu ()
virtual void ClearMenu ()
virtual void ProcessMenuItem (int action)
virtual bool SetCapture ()
virtual bool ReleaseCapture ()
virtual void DrawTabbedText (Font *font, const char *text)
bool IsClutter (Ship &s)
bool IsCrowded (Ship &s)
bool IsCrowded (MissionElement &elem)
void GetShipLoc (Ship &s, POINT &loc)
void GetElemLoc (MissionElement &s, POINT &loc)
void SelectShip (Ship *selship)
void SelectElem (MissionElement *selelem)
void SelectNavpt (Instruction *navpt)
void FindShips (bool friendly, bool station, bool starship, bool dropship, List< Text > &result)
void SetupScroll (Orbital *s)
double GetMinRadius (int type)

Protected Attributes

Text title
Rect rect
Campaigncampaign
Missionmission
List< StarSystemsystem_list
StarSystemsystem
List< Orbitalstars
List< Orbitalplanets
List< Orbitalregions
Shipship
Bitmap galaxy_image
bool editor
int current_star
int current_planet
int current_region
Shipcurrent_ship
MissionElementcurrent_elem
Instructioncurrent_navpt
int current_status
int view_mode
int seln_mode
bool captured
bool dragging
bool adding_navpt
bool moving_navpt
bool moving_elem
int scrolling
int mouse_x
int mouse_y
DWORD ship_filter
double zoom
double view_zoom [3]
double offset_x
double offset_y
double view_offset_x [3]
double view_offset_y [3]
double c
double r
double scroll_x
double scroll_y
double click_x
double click_y
Fontfont
Fonttitle_font
ActiveWindowactive_window
Menuactive_menu
Menumap_menu
Menumap_system_menu
Menumap_sector_menu
Menuship_menu
Menunav_menu
Menuaction_menu
Menuobjective_menu
Menuformation_menu
Menuspeed_menu
Menuhold_menu
Menufarcast_menu
MenuViewmenu_view
- Protected Attributes inherited from View
Windowwindow
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Additional Inherited Members

- Static Public Member Functions inherited from View
static const char * TYPENAME ()
- Static Public Member Functions inherited from EventTarget
static const char * TYPENAME ()
- Static Public Member Functions inherited from SimObserver
static const char * TYPENAME ()

Detailed Description

Definition at line 48 of file MapView.h.


Constructor & Destructor Documentation

MapView::MapView ( Window win)

Definition at line 69 of file MapView.cpp.

MapView::~MapView ( )
virtual

Definition at line 102 of file MapView.cpp.


Member Function Documentation

void MapView::BuildMenu ( )
protectedvirtual

Definition at line 280 of file MapView.cpp.

void MapView::ClearMenu ( )
protectedvirtual

Definition at line 376 of file MapView.cpp.

void MapView::DrawCombatantSystem ( Combatant c,
Orbital rgn,
int  x,
int  y,
int  r 
)
virtual

Definition at line 2757 of file MapView.cpp.

void MapView::DrawCombatGroup ( CombatGroup g,
int  rep = 3 
)
virtual

Definition at line 2835 of file MapView.cpp.

void MapView::DrawCombatGroupSystem ( CombatGroup g,
Orbital rgn,
int  x1,
int  x2,
int &  y,
int  a 
)
virtual

Definition at line 2789 of file MapView.cpp.

void MapView::DrawElem ( MissionElement elem,
bool  current = false,
int  rep = 3 
)
virtual

Definition at line 2400 of file MapView.cpp.

void MapView::DrawGalaxy ( )
virtual

Definition at line 1696 of file MapView.cpp.

void MapView::DrawGrid ( )
virtual

Definition at line 2069 of file MapView.cpp.

void MapView::DrawNavRoute ( OrbitalRegion rgn,
List< Instruction > &  route,
Color  smarker,
Ship ship = 0,
MissionElement elem = 0 
)
virtual

Definition at line 2534 of file MapView.cpp.

void MapView::DrawOrbital ( Orbital orbital,
int  index 
)
virtual

Definition at line 2091 of file MapView.cpp.

void MapView::DrawRegion ( )
virtual

Definition at line 1896 of file MapView.cpp.

void MapView::DrawShip ( Ship ship,
bool  current = false,
int  rep = 3 
)
virtual

Definition at line 2276 of file MapView.cpp.

void MapView::DrawSystem ( )
virtual

Definition at line 1829 of file MapView.cpp.

void MapView::DrawTabbedText ( Font font,
const char *  text 
)
protectedvirtual

Definition at line 1597 of file MapView.cpp.

void MapView::DrawTitle ( )
virtual

Definition at line 1687 of file MapView.cpp.

void MapView::FindShips ( bool  friendly,
bool  station,
bool  starship,
bool  dropship,
List< Text > &  result 
)
protected

Definition at line 779 of file MapView.cpp.

virtual void MapView::GetClickLoc ( double &  x,
double &  y 
)
inlinevirtual

Definition at line 122 of file MapView.h.

bool MapView::GetEditorMode ( ) const
inline

Definition at line 130 of file MapView.h.

void MapView::GetElemLoc ( MissionElement s,
POINT &  loc 
)
protected

Definition at line 3109 of file MapView.cpp.

List<StarSystem>& MapView::GetGalaxy ( )
inline

Definition at line 123 of file MapView.h.

double MapView::GetMinRadius ( int  type)
protected

Definition at line 2238 of file MapView.cpp.

virtual const char* MapView::GetObserverName ( ) const
inlinevirtual

Reimplemented from SimObserver.

Definition at line 128 of file MapView.h.

OrbitalRegion * MapView::GetRegion ( ) const

Definition at line 3158 of file MapView.cpp.

MissionElement * MapView::GetSelectedElem ( )
virtual

Definition at line 1554 of file MapView.cpp.

Ship * MapView::GetSelectedShip ( )
virtual

Definition at line 1548 of file MapView.cpp.

Orbital * MapView::GetSelection ( )
virtual

Definition at line 1517 of file MapView.cpp.

int MapView::GetSelectionIndex ( )
virtual

Definition at line 1562 of file MapView.cpp.

virtual int MapView::GetSelectionMode ( ) const
inlinevirtual

Definition at line 84 of file MapView.h.

void MapView::GetShipLoc ( Ship s,
POINT &  loc 
)
protected

Definition at line 3030 of file MapView.cpp.

StarSystem* MapView::GetSystem ( ) const
inline

Definition at line 124 of file MapView.h.

virtual int MapView::GetViewMode ( ) const
inlinevirtual

Definition at line 81 of file MapView.h.

bool MapView::IsClutter ( Ship s)
protected

Definition at line 2969 of file MapView.cpp.

bool MapView::IsCrowded ( Ship s)
protected

Definition at line 2998 of file MapView.cpp.

bool MapView::IsCrowded ( MissionElement elem)
protected

Definition at line 3079 of file MapView.cpp.

bool MapView::IsEnabled ( ) const
virtual

Reimplemented from EventTarget.

Definition at line 3235 of file MapView.cpp.

bool MapView::IsFormActive ( ) const
virtual

Reimplemented from EventTarget.

Definition at line 3253 of file MapView.cpp.

bool MapView::IsVisible ( ) const
virtual

Reimplemented from EventTarget.

Definition at line 3244 of file MapView.cpp.

bool MapView::IsVisible ( const Point loc)

Definition at line 1176 of file MapView.cpp.

int MapView::OnClick ( )
virtual

Reimplemented from EventTarget.

Definition at line 3359 of file MapView.cpp.

void MapView::OnHide ( )
virtual

Reimplemented from View.

Definition at line 3217 of file MapView.cpp.

int MapView::OnLButtonDown ( int  x,
int  y 
)
virtual

Reimplemented from EventTarget.

Definition at line 3364 of file MapView.cpp.

int MapView::OnLButtonUp ( int  x,
int  y 
)
virtual

Reimplemented from EventTarget.

Definition at line 3420 of file MapView.cpp.

int MapView::OnMouseMove ( int  x,
int  y 
)
virtual

Reimplemented from EventTarget.

Definition at line 3273 of file MapView.cpp.

int MapView::OnRButtonDown ( int  x,
int  y 
)
virtual

Reimplemented from EventTarget.

Definition at line 3326 of file MapView.cpp.

int MapView::OnRButtonUp ( int  x,
int  y 
)
virtual

Reimplemented from EventTarget.

Definition at line 3344 of file MapView.cpp.

void MapView::OnShow ( )
virtual

Reimplemented from View.

Definition at line 3209 of file MapView.cpp.

void MapView::OnWindowMove ( )
virtual

Reimplemented from View.

Definition at line 113 of file MapView.cpp.

void MapView::ProcessMenuItem ( int  action)
protectedvirtual

Definition at line 406 of file MapView.cpp.

void MapView::Refresh ( )
virtual

Reimplemented from View.

Definition at line 1617 of file MapView.cpp.

bool MapView::ReleaseCapture ( )
protectedvirtual

Definition at line 614 of file MapView.cpp.

void MapView::SelectAt ( int  x,
int  y 
)
virtual

Definition at line 1254 of file MapView.cpp.

void MapView::SelectElem ( MissionElement selelem)
protected

Definition at line 693 of file MapView.cpp.

void MapView::SelectNavpt ( Instruction navpt)
protected

Definition at line 719 of file MapView.cpp.

void MapView::SelectShip ( Ship selship)
protected

Definition at line 672 of file MapView.cpp.

void MapView::SetCampaign ( Campaign c)

Definition at line 243 of file MapView.cpp.

bool MapView::SetCapture ( )
protectedvirtual

Definition at line 602 of file MapView.cpp.

void MapView::SetEditorMode ( bool  b)
inline

Definition at line 131 of file MapView.h.

void MapView::SetGalaxy ( List< StarSystem > &  systems)

Definition at line 122 of file MapView.cpp.

void MapView::SetMission ( Mission m)

Definition at line 218 of file MapView.cpp.

void MapView::SetRegion ( OrbitalRegion rgn)
virtual

Definition at line 1202 of file MapView.cpp.

void MapView::SetRegionByName ( const char *  rgn_name)
virtual

Definition at line 1236 of file MapView.cpp.

void MapView::SetSelectedElem ( MissionElement elem)
virtual

Definition at line 1084 of file MapView.cpp.

void MapView::SetSelectedShip ( Ship ship)
virtual

Definition at line 1048 of file MapView.cpp.

void MapView::SetSelection ( int  index)
virtual

Definition at line 850 of file MapView.cpp.

void MapView::SetSelectionMode ( int  mode)
virtual

Definition at line 831 of file MapView.cpp.

void MapView::SetShip ( Ship s)

Definition at line 189 of file MapView.cpp.

virtual void MapView::SetShipFilter ( DWORD  f)
inlinevirtual

Definition at line 95 of file MapView.h.

void MapView::SetSystem ( StarSystem s)

Definition at line 133 of file MapView.cpp.

void MapView::SetupScroll ( Orbital s)
protected

Definition at line 1110 of file MapView.cpp.

void MapView::SetViewMode ( int  mode)
virtual

Definition at line 626 of file MapView.cpp.

Rect MapView::TargetRect ( ) const
virtual

Reimplemented from EventTarget.

Definition at line 3262 of file MapView.cpp.

bool MapView::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 659 of file MapView.cpp.

void MapView::ZoomIn ( )

Definition at line 3171 of file MapView.cpp.

void MapView::ZoomOut ( )

Definition at line 3189 of file MapView.cpp.


Member Data Documentation

Menu* MapView::action_menu
protected

Definition at line 212 of file MapView.h.

Menu* MapView::active_menu
protected

Definition at line 205 of file MapView.h.

ActiveWindow* MapView::active_window
protected

Definition at line 204 of file MapView.h.

bool MapView::adding_navpt
protected

Definition at line 181 of file MapView.h.

double MapView::c
protected

Definition at line 195 of file MapView.h.

Campaign* MapView::campaign
protected

Definition at line 158 of file MapView.h.

bool MapView::captured
protected

Definition at line 179 of file MapView.h.

double MapView::click_x
protected

Definition at line 198 of file MapView.h.

double MapView::click_y
protected

Definition at line 199 of file MapView.h.

MissionElement* MapView::current_elem
protected

Definition at line 173 of file MapView.h.

Instruction* MapView::current_navpt
protected

Definition at line 174 of file MapView.h.

int MapView::current_planet
protected

Definition at line 170 of file MapView.h.

int MapView::current_region
protected

Definition at line 171 of file MapView.h.

Ship* MapView::current_ship
protected

Definition at line 172 of file MapView.h.

int MapView::current_star
protected

Definition at line 169 of file MapView.h.

int MapView::current_status
protected

Definition at line 175 of file MapView.h.

bool MapView::dragging
protected

Definition at line 180 of file MapView.h.

bool MapView::editor
protected

Definition at line 167 of file MapView.h.

Menu* MapView::farcast_menu
protected

Definition at line 217 of file MapView.h.

Font* MapView::font
protected

Definition at line 201 of file MapView.h.

Menu* MapView::formation_menu
protected

Definition at line 214 of file MapView.h.

Bitmap MapView::galaxy_image
protected

Definition at line 166 of file MapView.h.

Menu* MapView::hold_menu
protected

Definition at line 216 of file MapView.h.

Menu* MapView::map_menu
protected

Definition at line 207 of file MapView.h.

Menu* MapView::map_sector_menu
protected

Definition at line 209 of file MapView.h.

Menu* MapView::map_system_menu
protected

Definition at line 208 of file MapView.h.

MenuView* MapView::menu_view
protected

Definition at line 219 of file MapView.h.

Mission* MapView::mission
protected

Definition at line 159 of file MapView.h.

int MapView::mouse_x
protected

Definition at line 185 of file MapView.h.

int MapView::mouse_y
protected

Definition at line 186 of file MapView.h.

bool MapView::moving_elem
protected

Definition at line 183 of file MapView.h.

bool MapView::moving_navpt
protected

Definition at line 182 of file MapView.h.

Menu* MapView::nav_menu
protected

Definition at line 211 of file MapView.h.

Menu* MapView::objective_menu
protected

Definition at line 213 of file MapView.h.

double MapView::offset_x
protected

Definition at line 191 of file MapView.h.

double MapView::offset_y
protected

Definition at line 192 of file MapView.h.

List<Orbital> MapView::planets
protected

Definition at line 163 of file MapView.h.

double MapView::r
protected

Definition at line 195 of file MapView.h.

Rect MapView::rect
protected

Definition at line 157 of file MapView.h.

List<Orbital> MapView::regions
protected

Definition at line 164 of file MapView.h.

double MapView::scroll_x
protected

Definition at line 196 of file MapView.h.

double MapView::scroll_y
protected

Definition at line 197 of file MapView.h.

int MapView::scrolling
protected

Definition at line 184 of file MapView.h.

int MapView::seln_mode
protected

Definition at line 178 of file MapView.h.

Ship* MapView::ship
protected

Definition at line 165 of file MapView.h.

DWORD MapView::ship_filter
protected

Definition at line 187 of file MapView.h.

Menu* MapView::ship_menu
protected

Definition at line 210 of file MapView.h.

Menu* MapView::speed_menu
protected

Definition at line 215 of file MapView.h.

List<Orbital> MapView::stars
protected

Definition at line 162 of file MapView.h.

StarSystem* MapView::system
protected

Definition at line 161 of file MapView.h.

List<StarSystem> MapView::system_list
protected

Definition at line 160 of file MapView.h.

Text MapView::title
protected

Definition at line 156 of file MapView.h.

Font* MapView::title_font
protected

Definition at line 202 of file MapView.h.

int MapView::view_mode
protected

Definition at line 177 of file MapView.h.

double MapView::view_offset_x[3]
protected

Definition at line 193 of file MapView.h.

double MapView::view_offset_y[3]
protected

Definition at line 194 of file MapView.h.

double MapView::view_zoom[3]
protected

Definition at line 190 of file MapView.h.

double MapView::zoom
protected

Definition at line 189 of file MapView.h.


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