OpenCPN Partial API docs
Loading...
Searching...
No Matches
ocpnCompass Class Reference

Represents a compass display in the OpenCPN navigation system. More...

#include <compass.h>

Public Member Functions

 ocpnCompass (ChartCanvas *parent, bool bShowGPS=true)
 
bool IsShown () const
 
void Show (bool show)
 
void Paint (ocpnDC &dc)
 
void UpdateStatus (bool newColorScheme=false)
 
bool MouseEvent (wxMouseEvent &event)
 
void SetColorScheme (ColorScheme cs)
 
int GetXOffset (void) const
 
int GetYOffset (void) const
 
float GetScaleFactor ()
 
void SetScaleFactor (float factor)
 
void Move (const wxPoint &pt)
 
wxRect GetRect (void) const
 Return the coordinates of the compass widget, in physical pixels relative to the canvas window.
 
wxRect GetLogicalRect (void) const
 Return the coordinates of the compass widget, in logical pixels.
 

Detailed Description

Represents a compass display in the OpenCPN navigation system.

The ocpnCompass class provides a visual compass display for the OpenCPN application. It shows the current heading and, optionally, GPS status. This compass is typically displayed as an overlay on the main chart view.

Definition at line 39 of file compass.h.

Constructor & Destructor Documentation

◆ ocpnCompass()

ocpnCompass::ocpnCompass ( ChartCanvas parent,
bool  bShowGPS = true 
)

Definition at line 43 of file compass.cpp.

◆ ~ocpnCompass()

ocpnCompass::~ocpnCompass ( )

Definition at line 71 of file compass.cpp.

Member Function Documentation

◆ GetLogicalRect()

wxRect ocpnCompass::GetLogicalRect ( void  ) const

Return the coordinates of the compass widget, in logical pixels.

This can be compared with data returned from wxWidgets APIs.

Definition at line 193 of file compass.cpp.

◆ GetRect()

wxRect ocpnCompass::GetRect ( void  ) const
inline

Return the coordinates of the compass widget, in physical pixels relative to the canvas window.

Beware when comparing with data returned from wxWidgets APIs, which return logical pixels.

Definition at line 63 of file compass.h.

◆ GetScaleFactor()

float ocpnCompass::GetScaleFactor ( )
inline

Definition at line 54 of file compass.h.

◆ GetXOffset()

int ocpnCompass::GetXOffset ( void  ) const
inline

Definition at line 52 of file compass.h.

◆ GetYOffset()

int ocpnCompass::GetYOffset ( void  ) const
inline

Definition at line 53 of file compass.h.

◆ IsShown()

bool ocpnCompass::IsShown ( ) const
inline

Definition at line 44 of file compass.h.

◆ MouseEvent()

bool ocpnCompass::MouseEvent ( wxMouseEvent &  event)

Definition at line 166 of file compass.cpp.

◆ Move()

void ocpnCompass::Move ( const wxPoint &  pt)
inline

Definition at line 57 of file compass.h.

◆ Paint()

void ocpnCompass::Paint ( ocpnDC dc)

Definition at line 82 of file compass.cpp.

◆ SetColorScheme()

void ocpnCompass::SetColorScheme ( ColorScheme  cs)

Definition at line 188 of file compass.cpp.

◆ SetScaleFactor()

void ocpnCompass::SetScaleFactor ( float  factor)

Definition at line 222 of file compass.cpp.

◆ Show()

void ocpnCompass::Show ( bool  show)
inline

Definition at line 45 of file compass.h.

◆ UpdateStatus()

void ocpnCompass::UpdateStatus ( bool  newColorScheme = false)

Definition at line 212 of file compass.cpp.


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