Pioneer
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SectorView Class Reference

#include <SectorView.h>

Inheritance diagram for SectorView:
Inheritance graph
[legend]
Collaboration diagram for SectorView:
Collaboration graph
[legend]

Classes

struct  InputBinding
 

Public Member Functions

 SectorView (Game *game)
 
 SectorView (const Json &jsonObj, Game *game)
 
 ~SectorView () override
 
void Update () override
 
void ShowAll () override
 
void Draw3D () override
 
vector3f GetPosition () const
 
SystemPath GetCurrent () const
 
SystemPath GetSelected () const
 
void SwitchToPath (const SystemPath &path)
 
SystemPath GetHyperspaceTarget () const
 
void SetHyperspaceTarget (const SystemPath &path)
 
void ResetHyperspaceTarget ()
 
void GotoSector (const SystemPath &path)
 
void GotoSystem (const SystemPath &path)
 
void GotoCurrentSystem ()
 
void GotoSelectedSystem ()
 
void GotoHyperspaceTarget ()
 
bool IsCenteredOn (const SystemPath &path)
 
void SaveToJson (Json &jsonObj) override
 
double GetZoomLevel () const
 
void ZoomIn ()
 
void ZoomOut ()
 
vector3f GetCenterSector ()
 
double GetCenterDistance ()
 
void SetDrawUninhabitedLabels (bool value)
 
void SetDrawVerticalLines (bool value)
 
void SetDrawOutRangeLabels (bool value)
 
void SetAutomaticSystemSelection (bool value)
 
std::vector< SystemPathGetNearbyStarSystemsByName (std::string pattern)
 
const std::set< const Faction * > & GetVisibleFactions ()
 
const std::set< const Faction * > & GetHiddenFactions ()
 
void SetFactionVisible (const Faction *faction, bool visible)
 
void SetZoomMode (bool enable)
 
void SetRotateMode (bool enable)
 
void ResetView ()
 
bool MoveRouteItemUp (const std::vector< SystemPath >::size_type element)
 
bool MoveRouteItemDown (const std::vector< SystemPath >::size_type element)
 
void UpdateRouteItem (const std::vector< SystemPath >::size_type element, const SystemPath &path)
 
void AddToRoute (const SystemPath &path)
 
bool RemoveRouteItem (const std::vector< SystemPath >::size_type element)
 
void ClearRoute ()
 
std::vector< SystemPathGetRoute ()
 
const std::string AutoRoute (const SystemPath &start, const SystemPath &target, std::vector< SystemPath > &outRoute) const
 
void SetDrawRouteLines (bool value)
 
- Public Member Functions inherited from PiGuiView
 PiGuiView (std::string name)
 
virtual void DrawPiGui () override
 
const std::string & GetViewName ()
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
virtual void LoadFromJson (const Json &jsonObj)
 
void Attach ()
 
void Detach ()
 
void SetRenderer (Graphics::Renderer *r)
 
- Public Member Functions inherited from Gui::Fixed
 Fixed (float w, float h)
 
 Fixed ()
 
void Add (Widget *child, float x, float y)
 
void Remove (Widget *child)
 
virtual ~Fixed ()
 
virtual void GetSizeRequested (float size[2])
 
virtual void OnChildResizeRequest (Widget *)
 
virtual void UpdateAllChildSizes ()
 
void SetSizeRequest (float x, float y)
 
void SetSizeRequest (float size[2])
 
- Public Member Functions inherited from Gui::Container
 Container ()
 
virtual ~Container ()
 
bool OnMouseDown (MouseButtonEvent *e)
 
bool OnMouseUp (MouseButtonEvent *e)
 
bool OnMouseMotion (MouseMotionEvent *e)
 
void RemoveAllChildren ()
 
void DeleteAllChildren ()
 
void GetChildPosition (const Widget *child, float outPos[2]) const
 
int GetNumChildren ()
 
virtual void Draw ()
 
void ShowChildren ()
 
void HideChildren ()
 
virtual void Show ()
 
virtual void HideAll ()
 
void SetBgColor (const Color &col)
 
void SetTransparency (bool a)
 
void RemoveChild (Widget *w)
 
- Public Member Functions inherited from Gui::Widget
 Widget ()
 
virtual ~Widget ()
 
virtual void GetMinimumSize (float size[2])
 
void GetAbsolutePosition (float pos[2]) const
 
void GetSize (float size[2])
 
void SetSize (float w, float h)
 
void ResizeRequest ()
 
void SetShortcut (SDL_Keycode key, SDL_Keymod mod)
 
void SetScissor (bool enabled)
 
bool GetEnabled ()
 
void SetEnabled (bool v)
 
virtual void GrabFocus ()
 
bool IsFocused ()
 
virtual void Hide ()
 
void HideTooltip ()
 
bool IsVisible () const
 
ContainerGetParent () const
 
void SetParent (Container *p)
 
void SetToolTip (std::string s)
 
const std::string & GetToolTip () const
 
virtual void OnActivate ()
 
virtual void OnMouseEnter ()
 
virtual void OnMouseLeave ()
 
virtual bool OnKeyDown (const SDL_Keysym *sym)
 
virtual void OnTextInput (Uint32 unicode)
 
bool IsMouseOver ()
 
void OnPreShortcut (const SDL_Keysym *sym)
 
unsigned int GetEventMask ()
 
- Public Member Functions inherited from DeleteEmitter
 DeleteEmitter ()
 
virtual ~DeleteEmitter ()
 
- Public Member Functions inherited from LuaWrappable
virtual ~LuaWrappable ()
 

Public Attributes

sigc::signal< void > onHyperspaceTargetChanged
 
- Public Attributes inherited from Gui::Container
sigc::signal< void, MouseButtonEvent * > onMouseButtonEvent
 
- Public Attributes inherited from Gui::Widget
sigc::signal< void > onMouseEnter
 
sigc::signal< void > onMouseLeave
 
sigc::signal< void > onSetSize
 
sigc::signal< void > onDelete
 
float w
 
float h
 
- Public Attributes inherited from DeleteEmitter
sigc::signal< void > onDelete
 

Protected Member Functions

void OnSwitchTo () override
 
void OnSwitchFrom () override
 
- Protected Member Functions inherited from Gui::Container
void PrependChild (Widget *w, float x, float y)
 
void AppendChild (Widget *w, float x, float y)
 
void MoveChild (Widget *w, float x, float y)
 
WidgetList::const_iterator FindChild (const Widget *w) const
 
WidgetList::iterator FindChild (const Widget *w)
 
- Protected Member Functions inherited from Gui::Widget
virtual std::string GetOverrideTooltip ()
 
void UpdateOverriddenTooltip ()
 

Protected Attributes

SectorView::InputBinding InputBindings
 
- Protected Attributes inherited from View
Graphics::Rendererm_renderer
 
- Protected Attributes inherited from Gui::Container
WidgetList m_children
 
- Protected Attributes inherited from Gui::Widget
unsigned int m_eventMask
 
struct {
   SDL_Keycode   sym
 
   SDL_Keymod   mod
 
m_shortcut
 

Additional Inherited Members

- Public Types inherited from Gui::Widget
enum  EventMask {
  EVENT_NONE = 0 , EVENT_KEYDOWN = 1 << 0 , EVENT_KEYUP = 1 << 1 , EVENT_MOUSEDOWN = 1 << 2 ,
  EVENT_MOUSEUP = 1 << 3 , EVENT_MOUSEMOTION = 1 << 4
}
 
- Static Public Attributes inherited from Gui::Widget
static const unsigned int EVENT_ALL = 0xffffffff
 
- Protected Types inherited from Gui::Container
typedef std::list< widget_posWidgetList
 

Constructor & Destructor Documentation

◆ SectorView() [1/2]

SectorView::SectorView ( Game game)
Here is the call graph for this function:

◆ SectorView() [2/2]

SectorView::SectorView ( const Json jsonObj,
Game game 
)
Here is the call graph for this function:

◆ ~SectorView()

SectorView::~SectorView ( )
override

Member Function Documentation

◆ AddToRoute()

void SectorView::AddToRoute ( const SystemPath path)

◆ AutoRoute()

const std::string SectorView::AutoRoute ( const SystemPath start,
const SystemPath target,
std::vector< SystemPath > &  outRoute 
) const
Here is the call graph for this function:

◆ ClearRoute()

void SectorView::ClearRoute ( )

◆ Draw3D()

void SectorView::Draw3D ( )
overridevirtual

Reimplemented from PiGuiView.

Here is the call graph for this function:

◆ GetCenterDistance()

double SectorView::GetCenterDistance ( )
Here is the call graph for this function:

◆ GetCenterSector()

vector3f SectorView::GetCenterSector ( )

◆ GetCurrent()

SystemPath SectorView::GetCurrent ( ) const
inline

◆ GetHiddenFactions()

const std::set<const Faction *>& SectorView::GetHiddenFactions ( )
inline

◆ GetHyperspaceTarget()

SystemPath SectorView::GetHyperspaceTarget ( ) const
inline

◆ GetNearbyStarSystemsByName()

std::vector< SystemPath > SectorView::GetNearbyStarSystemsByName ( std::string  pattern)
Here is the call graph for this function:

◆ GetPosition()

vector3f SectorView::GetPosition ( ) const
inline

◆ GetRoute()

std::vector< SystemPath > SectorView::GetRoute ( )

◆ GetSelected()

SystemPath SectorView::GetSelected ( ) const
inline

◆ GetVisibleFactions()

const std::set<const Faction *>& SectorView::GetVisibleFactions ( )
inline

◆ GetZoomLevel()

double SectorView::GetZoomLevel ( ) const

◆ GotoCurrentSystem()

void SectorView::GotoCurrentSystem ( )
inline
Here is the call graph for this function:

◆ GotoHyperspaceTarget()

void SectorView::GotoHyperspaceTarget ( )
inline
Here is the call graph for this function:

◆ GotoSector()

void SectorView::GotoSector ( const SystemPath path)

◆ GotoSelectedSystem()

void SectorView::GotoSelectedSystem ( )
inline
Here is the call graph for this function:

◆ GotoSystem()

void SectorView::GotoSystem ( const SystemPath path)

◆ IsCenteredOn()

bool SectorView::IsCenteredOn ( const SystemPath path)

◆ MoveRouteItemDown()

bool SectorView::MoveRouteItemDown ( const std::vector< SystemPath >::size_type  element)

◆ MoveRouteItemUp()

bool SectorView::MoveRouteItemUp ( const std::vector< SystemPath >::size_type  element)

◆ OnSwitchFrom()

void SectorView::OnSwitchFrom ( )
overrideprotectedvirtual

Reimplemented from View.

Here is the call graph for this function:

◆ OnSwitchTo()

void SectorView::OnSwitchTo ( )
overrideprotectedvirtual

Reimplemented from PiGuiView.

Here is the call graph for this function:

◆ RemoveRouteItem()

bool SectorView::RemoveRouteItem ( const std::vector< SystemPath >::size_type  element)

◆ ResetHyperspaceTarget()

void SectorView::ResetHyperspaceTarget ( )
Here is the call graph for this function:

◆ ResetView()

void SectorView::ResetView ( )
Here is the call graph for this function:

◆ SaveToJson()

void SectorView::SaveToJson ( Json jsonObj)
overridevirtual

Reimplemented from View.

Here is the call graph for this function:

◆ SetAutomaticSystemSelection()

void SectorView::SetAutomaticSystemSelection ( bool  value)
inline

◆ SetDrawOutRangeLabels()

void SectorView::SetDrawOutRangeLabels ( bool  value)
inline

◆ SetDrawRouteLines()

void SectorView::SetDrawRouteLines ( bool  value)
inline

◆ SetDrawUninhabitedLabels()

void SectorView::SetDrawUninhabitedLabels ( bool  value)
inline

◆ SetDrawVerticalLines()

void SectorView::SetDrawVerticalLines ( bool  value)
inline

◆ SetFactionVisible()

void SectorView::SetFactionVisible ( const Faction faction,
bool  visible 
)

◆ SetHyperspaceTarget()

void SectorView::SetHyperspaceTarget ( const SystemPath path)

◆ SetRotateMode()

void SectorView::SetRotateMode ( bool  enable)
Here is the call graph for this function:

◆ SetZoomMode()

void SectorView::SetZoomMode ( bool  enable)
Here is the call graph for this function:

◆ ShowAll()

void SectorView::ShowAll ( )
overridevirtual

Reimplemented from Gui::Container.

Here is the call graph for this function:

◆ SwitchToPath()

void SectorView::SwitchToPath ( const SystemPath path)
Here is the call graph for this function:

◆ Update()

void SectorView::Update ( )
overridevirtual

Reimplemented from PiGuiView.

Here is the call graph for this function:

◆ UpdateRouteItem()

void SectorView::UpdateRouteItem ( const std::vector< SystemPath >::size_type  element,
const SystemPath path 
)

◆ ZoomIn()

void SectorView::ZoomIn ( )
Here is the call graph for this function:

◆ ZoomOut()

void SectorView::ZoomOut ( )
Here is the call graph for this function:

Member Data Documentation

◆ InputBindings

SectorView::InputBinding SectorView::InputBindings
protected

◆ onHyperspaceTargetChanged

sigc::signal<void> SectorView::onHyperspaceTargetChanged

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