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 37 of file compass.h.

Constructor & Destructor Documentation

◆ ocpnCompass()

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

Definition at line 51 of file compass.cpp.

◆ ~ocpnCompass()

ocpnCompass::~ocpnCompass ( )

Definition at line 79 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 201 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 61 of file compass.h.

◆ GetScaleFactor()

float ocpnCompass::GetScaleFactor ( )
inline

Definition at line 52 of file compass.h.

◆ GetXOffset()

int ocpnCompass::GetXOffset ( void  ) const
inline

Definition at line 50 of file compass.h.

◆ GetYOffset()

int ocpnCompass::GetYOffset ( void  ) const
inline

Definition at line 51 of file compass.h.

◆ IsShown()

bool ocpnCompass::IsShown ( ) const
inline

Definition at line 42 of file compass.h.

◆ MouseEvent()

bool ocpnCompass::MouseEvent ( wxMouseEvent &  event)

Definition at line 174 of file compass.cpp.

◆ Move()

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

Definition at line 55 of file compass.h.

◆ Paint()

void ocpnCompass::Paint ( ocpnDC dc)

Definition at line 90 of file compass.cpp.

◆ SetColorScheme()

void ocpnCompass::SetColorScheme ( ColorScheme  cs)

Definition at line 196 of file compass.cpp.

◆ SetScaleFactor()

void ocpnCompass::SetScaleFactor ( float  factor)

Definition at line 230 of file compass.cpp.

◆ Show()

void ocpnCompass::Show ( bool  show)
inline

Definition at line 43 of file compass.h.

◆ UpdateStatus()

void ocpnCompass::UpdateStatus ( bool  newColorScheme = false)

Definition at line 220 of file compass.cpp.


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