Exemplo n.º 1
0
// Copy Constructor
ODPoint::ODPoint( ODPoint* orig )
{
    m_ODPointName = orig->GetName();
    m_lat = orig->m_lat;
    m_lon = orig->m_lon;
    m_seg_len = orig->m_seg_len;
    m_seg_vmg = orig->m_seg_vmg;
    m_seg_etd = orig->m_seg_etd;
    m_bDynamicName = orig->m_bDynamicName;
    m_bPtIsSelected = orig->m_bPtIsSelected;
    m_bIsBeingEdited = orig->m_bIsBeingEdited;
    m_bIsActive = orig->m_bIsActive;
    m_bPointPropertiesBlink = orig->m_bPointPropertiesBlink;
    m_bPathManagerBlink = orig->m_bPathManagerBlink;
    m_bIsInRoute = orig->m_bIsInRoute;
    m_bIsInPath = orig->m_bIsInPath;
    m_bIsInBoundary = orig->m_bIsInBoundary;
    m_bIsInTrack = orig->m_bIsInTrack;
    m_CreateTimeX = orig->m_CreateTimeX;
    m_GPXTrkSegNo = orig->m_GPXTrkSegNo;
    m_bIsolatedMark = orig->m_bIsolatedMark;
    m_bShowName = orig->m_bShowName;
    m_bKeepXPath = orig->m_bKeepXPath;
    m_bIsVisible = orig->m_bIsVisible;
    m_bIsListed = orig->m_bIsListed;
    CurrentRect_in_DC = orig->CurrentRect_in_DC;
    m_NameLocationOffsetX = orig->m_NameLocationOffsetX;
    m_NameLocationOffsetY = orig->m_NameLocationOffsetY;
    m_pMarkFont = orig->m_pMarkFont;
    m_ODPointDescription = orig->m_ODPointDescription;
    m_btemp = orig->m_btemp;
    m_sTypeString = orig->m_sTypeString;

    m_HyperlinkList = new HyperlinkList;
    m_IconName = orig->m_IconName;
    ReLoadIcon();

    m_bIsInLayer = orig->m_bIsInLayer;
    m_GUID = GetUUID();
    
    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    m_fIconScaleFactor = 1.0;
    
    m_ODPointArrivalRadius = orig->GetODPointArrivalRadius();
    
    m_bShowODPointRangeRings = orig->m_bShowODPointRangeRings;
    m_iODPointRangeRingsNumber = g_iODPointRangeRingsNumber;
    m_fODPointRangeRingsStep = g_fODPointRangeRingsStep;
    m_iODPointRangeRingsStepUnits = g_iODPointRangeRingsStepUnits;
    m_wxcODPointRangeRingsColour = g_colourODPointRangeRingsColour;
    m_iRangeRingStyle = wxPENSTYLE_SOLID;
    m_iRangeRingWidth = 2;
    SetRangeRingBBox();

    CreateColourSchemes();
    SetColourScheme(g_global_color_scheme);

}
Exemplo n.º 2
0
// Copy Constructor
RoutePoint::RoutePoint( RoutePoint* orig )
{
    m_MarkName = orig->GetName();
    m_lat = orig->m_lat;
    m_lon = orig->m_lon;
    m_seg_len = orig->m_seg_len;
    m_seg_vmg = orig->m_seg_vmg;
    m_seg_etd = orig->m_seg_etd;
    m_bDynamicName = orig->m_bDynamicName;
    m_bPtIsSelected = orig->m_bPtIsSelected;
    m_bRPIsBeingEdited = orig->m_bRPIsBeingEdited;
    m_bIsActive = orig->m_bIsActive;
    m_bBlink = orig->m_bBlink;
    m_bIsInRoute = orig->m_bIsInRoute;
    m_CreateTimeX = orig->m_CreateTimeX;
    m_bIsolatedMark = orig->m_bIsolatedMark;
    m_bShowName = orig->m_bShowName;
    m_bKeepXRoute = orig->m_bKeepXRoute;
    m_bIsVisible = orig->m_bIsVisible;
    m_bIsListed = orig->m_bIsListed;
    CurrentRect_in_DC = orig->CurrentRect_in_DC;
    m_NameLocationOffsetX = orig->m_NameLocationOffsetX;
    m_NameLocationOffsetY = orig->m_NameLocationOffsetY;
    m_pMarkFont = orig->m_pMarkFont;
    m_MarkDescription = orig->m_MarkDescription;
    m_btemp = orig->m_btemp;
    m_ScaMin = orig->m_ScaMin;
    m_ScaMax = orig->m_ScaMax;
    m_HyperlinkList = new HyperlinkList;
    m_IconName = orig->m_IconName;
    m_TideStation = orig->m_TideStation;
    SetPlannedSpeed(orig->GetPlannedSpeed());
    ReLoadIcon();

    m_bIsInLayer = orig->m_bIsInLayer;
    m_GUID = pWayPointMan->CreateGUID( this );
    
    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    
    m_WaypointArrivalRadius = orig->GetWaypointArrivalRadius();
    m_bShowWaypointRangeRings = orig->m_bShowWaypointRangeRings;   
    m_iWaypointRangeRingsNumber = orig->m_iWaypointRangeRingsNumber;
    m_fWaypointRangeRingsStep = orig->m_fWaypointRangeRingsStep;
    m_iWaypointRangeRingsStepUnits = orig->m_iWaypointRangeRingsStepUnits;
    m_wxcWaypointRangeRingsColour = orig->m_wxcWaypointRangeRingsColour;
    m_ScaMin = orig->m_ScaMin;
    m_ScaMax = orig->m_ScaMax;
    b_UseScamin = orig->b_UseScamin;
    
    m_bDrawDragHandle = false;
    m_dragIconTexture = 0;
    m_draggingOffsetx = m_draggingOffsety = 0;

    
}
Exemplo n.º 3
0
RoutePoint::RoutePoint()
{
    m_pbmIcon = NULL;

    //  Nice defaults
    m_seg_len = 0.0;
    m_seg_vmg = 0.0;
    m_seg_etd = wxInvalidDateTime;
    m_bDynamicName = false;
    m_bPtIsSelected = false;
    m_bIsBeingEdited = false;
    m_bIsActive = false;
    m_bBlink = false;
    m_bIsInRoute = false;
    m_CreateTimeX = wxDateTime::Now();
    m_bIsolatedMark = false;
    m_bShowName = true;
    m_bKeepXRoute = false;
    m_bIsVisible = true;
    m_bIsListed = true;
    CurrentRect_in_DC = wxRect( 0, 0, 0, 0 );
    m_NameLocationOffsetX = -10;
    m_NameLocationOffsetY = 8;
    m_pMarkFont = NULL;
    m_btemp = false;
    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    
    m_HyperlinkList = new HyperlinkList;

    m_GUID = pWayPointMan->CreateGUID( this );

    m_IconName = wxEmptyString;
    ReLoadIcon();

    m_MarkName = wxEmptyString;

    m_bIsInLayer = false;
    m_LayerID = 0;
    
    m_WaypointArrivalRadius = g_n_arrival_circle_radius;

    m_bShowWaypointRangeRings = false;
   
    m_iWaypointRangeRingsNumber = g_iWaypointRangeRingsNumber;
    m_fWaypointRangeRingsStep = g_fWaypointRangeRingsStep;
    m_iWaypointRangeRingsStepUnits = g_iWaypointRangeRingsStepUnits;
    m_wxcWaypointRangeRingsColour = g_colourWaypointRangeRingsColour;
#ifdef ocpnUSE_GL
    m_pos_on_screen = false;
#endif
    
}
void ScopeBarIcon::UpdateScale(double scale)
{
  int overlay_width  = FOCUS_OVERLAY_WIDTH.CP(scale);
  int overlay_height = FOCUS_OVERLAY_HEIGHT.CP(scale);

  SetMinMaxSize(overlay_width, overlay_height);
  focus_layer_.reset(Style::Instance().FocusOverlay(overlay_width, overlay_height));

  SetSize(TEXTURE_SIZE.CP(scale));
  ReLoadIcon();
  QueueDraw();
}
Exemplo n.º 5
0
// Copy Constructor
RoutePoint::RoutePoint( RoutePoint* orig )
{
    m_MarkName = orig->GetName();
    m_lat = orig->m_lat;
    m_lon = orig->m_lon;
    m_seg_len = orig->m_seg_len;
    m_seg_vmg = orig->m_seg_vmg;
    m_seg_etd = orig->m_seg_etd;
    m_bDynamicName = orig->m_bDynamicName;
    m_bPtIsSelected = orig->m_bPtIsSelected;
    m_bIsBeingEdited = orig->m_bIsBeingEdited;
    m_bIsActive = orig->m_bIsActive;
    m_bBlink = orig->m_bBlink;
    m_bIsInRoute = orig->m_bIsInRoute;
    m_CreateTimeX = orig->m_CreateTimeX;
    m_bIsolatedMark = orig->m_bIsolatedMark;
    m_bShowName = orig->m_bShowName;
    m_bKeepXRoute = orig->m_bKeepXRoute;
    m_bIsVisible = orig->m_bIsVisible;
    m_bIsListed = orig->m_bIsListed;
    CurrentRect_in_DC = orig->CurrentRect_in_DC;
    m_NameLocationOffsetX = orig->m_NameLocationOffsetX;
    m_NameLocationOffsetY = orig->m_NameLocationOffsetY;
    m_pMarkFont = orig->m_pMarkFont;
    m_MarkDescription = orig->m_MarkDescription;
    m_btemp = orig->m_btemp;

    m_HyperlinkList = new HyperlinkList;
    m_IconName = orig->m_IconName;
    ReLoadIcon();

    m_bIsInLayer = orig->m_bIsInLayer;
    m_GUID = pWayPointMan->CreateGUID( this );
    
    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    
    m_WaypointArrivalRadius = orig->GetWaypointArrivalRadius();

    m_bShowWaypointRangeRings = false;
   
    m_iWaypointRangeRingsNumber = g_iWaypointRangeRingsNumber;
    m_fWaypointRangeRingsStep = g_fWaypointRangeRingsStep;
    m_iWaypointRangeRingsStepUnits = g_iWaypointRangeRingsStepUnits;
    m_wxcWaypointRangeRingsColour = g_colourWaypointRangeRingsColour;
    
}
Exemplo n.º 6
0
RoutePoint::RoutePoint()
{
    m_pbmIcon = NULL;

    //  Nice defaults
    m_seg_len = 0.0;
    m_seg_vmg = 0.0;
    m_seg_etd = wxInvalidDateTime;
    m_bDynamicName = false;
    m_bPtIsSelected = false;
    m_bIsBeingEdited = false;
    m_bIsActive = false;
    m_bBlink = false;
    m_bIsInRoute = false;
    m_bIsInTrack = false;
    wxDateTime now = wxDateTime::Now();
    m_CreateTime = now.ToUTC();
    m_GPXTrkSegNo = 1;
    m_bIsolatedMark = false;
    m_bShowName = true;
    m_bKeepXRoute = false;
    m_bIsVisible = true;
    m_bIsListed = true;
    m_ConfigWPNum = -1;
    CurrentRect_in_DC = wxRect( 0, 0, 0, 0 );
    m_NameLocationOffsetX = -10;
    m_NameLocationOffsetY = 8;
    m_pMarkFont = NULL;
    m_btemp = false;

    m_prop_string_format = _T ( "A" );

    m_HyperlinkList = new HyperlinkList;

    m_GUID = pWayPointMan->CreateGUID( this );

    m_IconName = wxEmptyString;
    ReLoadIcon();

    m_MarkName = wxEmptyString;

    m_bIsInLayer = false;
    m_LayerID = 0;
}
Exemplo n.º 7
0
// Copy Constructor
RoutePoint::RoutePoint( RoutePoint* orig )
{
    m_MarkName = orig->GetName();
    m_lat = orig->m_lat;
    m_lon = orig->m_lon;
    m_seg_len = orig->m_seg_len;
    m_seg_vmg = orig->m_seg_vmg;
    m_seg_etd = orig->m_seg_etd;
    m_bDynamicName = orig->m_bDynamicName;
    m_bPtIsSelected = orig->m_bPtIsSelected;
    m_bIsBeingEdited = orig->m_bIsBeingEdited;
    m_bIsActive = orig->m_bIsActive;
    m_bBlink = orig->m_bBlink;
    m_bIsInRoute = orig->m_bIsInRoute;
    m_bIsInTrack = orig->m_bIsInTrack;
    m_CreateTime = orig->m_CreateTime;
    m_GPXTrkSegNo = orig->m_GPXTrkSegNo;
    m_bIsolatedMark = orig->m_bIsolatedMark;
    m_bShowName = orig->m_bShowName;
    m_bKeepXRoute = orig->m_bKeepXRoute;
    m_bIsVisible = orig->m_bIsVisible;
    m_bIsListed = orig->m_bIsListed;
    m_ConfigWPNum = orig->m_ConfigWPNum;
    CurrentRect_in_DC = orig->CurrentRect_in_DC;
    m_NameLocationOffsetX = orig->m_NameLocationOffsetX;
    m_NameLocationOffsetY = orig->m_NameLocationOffsetY;
    m_pMarkFont = orig->m_pMarkFont;
    m_prop_string_format = orig->m_prop_string_format;
    m_MarkDescription = orig->m_MarkDescription;
    m_btemp = orig->m_btemp;
        
    m_HyperlinkList = new HyperlinkList;
    m_IconName = orig->m_IconName;
    ReLoadIcon();

    m_bIsInLayer = orig->m_bIsInLayer;
    m_GUID = pWayPointMan->CreateGUID( this );
}
Exemplo n.º 8
0
RoutePoint::RoutePoint( double lat, double lon, const wxString& icon_ident, const wxString& name,
        const wxString &pGUID, bool bAddToList )
{
    //  Establish points
    m_lat = lat;
    m_lon = lon;

    //      Normalize the longitude, to fix any old poorly formed points
    if( m_lon < -180. ) m_lon += 360.;
    else
        if( m_lon > 180. ) m_lon -= 360.;

    //  Nice defaults
    m_seg_len = 0.0;
    m_seg_vmg = 0.0;
    m_seg_etd = wxInvalidDateTime;
    m_bDynamicName = false;
    m_bPtIsSelected = false;
    m_bIsBeingEdited = false;
    m_bIsActive = false;
    m_bBlink = false;
    m_bIsInRoute = false;
    m_CreateTimeX = wxDateTime::Now();
    m_bIsolatedMark = false;
    m_bShowName = true;
    m_bKeepXRoute = false;
    m_bIsVisible = true;
    m_bIsListed = true;
    CurrentRect_in_DC = wxRect( 0, 0, 0, 0 );
    m_NameLocationOffsetX = -10;
    m_NameLocationOffsetY = 8;
    m_pMarkFont = NULL;
    m_btemp = false;

    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    m_IconScaleFactor = 1.0;
    
    m_HyperlinkList = new HyperlinkList;

    if( !pGUID.IsEmpty() )
        m_GUID = pGUID;
    else
        m_GUID = pWayPointMan->CreateGUID( this );

    //      Get Icon bitmap
    m_IconName = icon_ident;
    ReLoadIcon();

    SetName( name );

    //  Possibly add the waypoint to the global list maintained by the waypoint manager

    if( bAddToList && NULL != pWayPointMan )
        pWayPointMan->AddRoutePoint( this );

    m_bIsInLayer = g_bIsNewLayer;
    if( m_bIsInLayer ) {
        m_LayerID = g_LayerIdx;
        m_bIsListed = false;
    } else
        m_LayerID = 0;
    
    SetWaypointArrivalRadius( g_n_arrival_circle_radius );

    m_bShowWaypointRangeRings = false;
    m_iWaypointRangeRingsNumber = g_iWaypointRangeRingsNumber;
    m_fWaypointRangeRingsStep = g_fWaypointRangeRingsStep;
    m_iWaypointRangeRingsStepUnits = g_iWaypointRangeRingsStepUnits;
    m_wxcWaypointRangeRingsColour = g_colourWaypointRangeRingsColour;
}
Exemplo n.º 9
0
RoutePoint::RoutePoint( double lat, double lon, const wxString& icon_ident, const wxString& name,
        const wxString &pGUID, bool bAddToList )
{
    //  Establish points
    m_lat = lat;
    m_lon = lon;

    //      Normalize the longitude, to fix any old poorly formed points
    if( m_lon < -180. ) m_lon += 360.;
    else
        if( m_lon > 180. ) m_lon -= 360.;

    //  Nice defaults
    m_seg_len = 0.0;
    m_seg_vmg = 0.0;
    m_seg_etd = wxInvalidDateTime;
    m_bDynamicName = false;
    m_bPtIsSelected = false;
    m_bIsBeingEdited = false;
    m_bIsActive = false;
    m_bBlink = false;
    m_bIsInRoute = false;
    m_bIsInTrack = false;
    wxDateTime now = wxDateTime::Now();
    m_CreateTime = now.ToUTC();
    m_GPXTrkSegNo = 1;
    m_bIsolatedMark = false;
    m_bShowName = true;
    m_bKeepXRoute = false;
    m_bIsVisible = true;
    m_bIsListed = true;
    m_ConfigWPNum = -1;
    CurrentRect_in_DC = wxRect( 0, 0, 0, 0 );
    m_NameLocationOffsetX = -10;
    m_NameLocationOffsetY = 8;
    m_pMarkFont = NULL;
    m_btemp = false;
    
    m_prop_string_format = _T ( "A" );           // Set the current Property String format indicator

    m_HyperlinkList = new HyperlinkList;

    if( !pGUID.IsEmpty() ) m_GUID = pGUID;
    else
        m_GUID = pWayPointMan->CreateGUID( this );

    //      Get Icon bitmap
    m_IconName = icon_ident;
    ReLoadIcon();

    SetName( name );

    //  Possibly add the waypoint to the global list maintained by the waypoint manager

    if( bAddToList && NULL != pWayPointMan ) pWayPointMan->m_pWayPointList->Append( this );

    m_bIsInLayer = g_bIsNewLayer;
    if( m_bIsInLayer ) {
        m_LayerID = g_LayerIdx;
        m_bIsListed = false;
    } else
        m_LayerID = 0;
}
Exemplo n.º 10
0
ODPoint::ODPoint()
{
    m_pbmIcon = NULL;

    //  Nice defaults
    m_seg_len = 0.0;
    m_seg_vmg = 0.0;
    m_seg_etd = wxInvalidDateTime;
    m_bDynamicName = false;
    m_bPtIsSelected = false;
    m_bIsBeingEdited = false;
    m_bIsActive = false;
    m_bPointPropertiesBlink = false;
    m_bPathManagerBlink = false;
    m_bIsInRoute = false;
    m_bIsInPath = false;
    m_bIsInBoundary = false;
    m_bIsInTrack = false;
    m_CreateTimeX = wxDateTime::Now();
    m_GPXTrkSegNo = 1;
    m_bIsolatedMark = false;
    m_bShowName = true;
    m_bKeepXPath = false;
    m_bIsVisible = true;
    m_bIsListed = true;
    CurrentRect_in_DC = wxRect( 0, 0, 0, 0 );
    m_NameLocationOffsetX = -10;
    m_NameLocationOffsetY = 8;
    m_pMarkFont = NULL;
    m_btemp = false;
    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    m_fIconScaleFactor = 1.0;
    m_sTypeString = wxEmptyString;
    
    m_HyperlinkList = new HyperlinkList;

    m_GUID = GetUUID();

    m_IconName = wxEmptyString;
    ReLoadIcon();

    m_ODPointName = wxEmptyString;

    m_bIsInLayer = false;
    m_LayerID = 0;
    
    m_ODPointArrivalRadius = g_n_arrival_circle_radius;
    
    m_bShowODPointRangeRings = g_bODPointShowRangeRings;
    m_iODPointRangeRingsNumber = g_iODPointRangeRingsNumber;
    m_fODPointRangeRingsStep = g_fODPointRangeRingsStep;
    m_iODPointRangeRingsStepUnits = g_iODPointRangeRingsStepUnits;
    m_wxcODPointRangeRingsColour = g_colourODPointRangeRingsColour;
    m_iRangeRingStyle = wxPENSTYLE_SOLID;
    m_iRangeRingWidth = 2;
    SetRangeRingBBox();
    
    CreateColourSchemes();
    SetColourScheme(g_global_color_scheme);

}
Exemplo n.º 11
0
ODPoint::ODPoint( double lat, double lon, const wxString& icon_ident, const wxString& name,
        const wxString &pGUID, bool bAddToList )
{
    //  Establish points
    m_lat = lat;
    m_lon = lon;

    //      Normalize the longitude, to fix any old poorly formed points
    if( m_lon < -180. ) m_lon += 360.;
    else
        if( m_lon > 180. ) m_lon -= 360.;

    //  Nice defaults
    m_seg_len = 0.0;
    m_seg_vmg = 0.0;
    m_seg_etd = wxInvalidDateTime;
    m_bDynamicName = false;
    m_bPtIsSelected = false;
    m_bIsBeingEdited = false;
    m_bIsActive = false;
    m_bPointPropertiesBlink = false;
    m_bPathManagerBlink = false;
    m_bIsInRoute = false;
    m_bIsInPath = false;
    m_bIsInBoundary = false;
    m_bIsInTrack = false;
    m_CreateTimeX = wxDateTime::Now();
    m_GPXTrkSegNo = 1;
    m_bIsolatedMark = false;
    m_bShowName = g_bBoundaryPointShowName;
    m_bKeepXPath = false;
    m_bIsVisible = true;
    m_bIsListed = true;
    CurrentRect_in_DC = wxRect( 0, 0, 0, 0 );
    m_NameLocationOffsetX = -10;
    m_NameLocationOffsetY = 8;
    m_pMarkFont = NULL;
    m_btemp = false;
    m_sTypeString = wxEmptyString;

    m_SelectNode = NULL;
    m_ManagerNode = NULL;
    m_fIconScaleFactor = 1.0;
    
    m_HyperlinkList = new HyperlinkList;

    if( !pGUID.IsEmpty() )
        m_GUID = pGUID;
    else
        m_GUID = GetUUID();

    //      Get Icon bitmap
    m_IconName = icon_ident;
    ReLoadIcon();

    SetName( name );

    //  Possibly add the ODPoint to the global list maintained by the ODPoint manager

    if( bAddToList && NULL != g_pODPointMan )
        g_pODPointMan->AddODPoint( this );

    m_bIsInLayer = g_bODIsNewLayer;
    if( m_bIsInLayer ) {
        m_LayerID = g_ODLayerIdx;
        m_bIsListed = false;
    } else
        m_LayerID = 0;
    
    SetODPointArrivalRadius( g_n_arrival_circle_radius );

    m_bShowODPointRangeRings = g_bODPointShowRangeRings;
    m_iODPointRangeRingsNumber = g_iODPointRangeRingsNumber;
    m_fODPointRangeRingsStep = g_fODPointRangeRingsStep;
    m_iODPointRangeRingsStepUnits = g_iODPointRangeRingsStepUnits;
    m_wxcODPointRangeRingsColour = g_colourODPointRangeRingsColour;
    m_iRangeRingStyle = wxPENSTYLE_SOLID;
    m_iRangeRingWidth = 2;
    SetRangeRingBBox();
    
    CreateColourSchemes();
    SetColourScheme(g_global_color_scheme);
    
}