<commit_before>//
// Name:		ProjectionDlg.cpp
//
// Copyright (c) 2002-2006 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include "ProjectionDlg.h"
#include "StatePlaneDlg.h"
#include "Helper.h"			// for GuessZoneFromGeo
#include "vtdata/vtLog.h"

//
// Must offset the values we use for Datum because a Choice
// control cannot handle "client data" values less than 0.
//
#define CHOICE_OFFSET 10

// WDR: class implementations

//---------------------------------------------------------------------------
// ProjectionDlg
//---------------------------------------------------------------------------

// WDR: event table for ProjectionDlg

BEGIN_EVENT_TABLE(ProjectionDlg, AutoDialog)
	EVT_INIT_DIALOG (ProjectionDlg::OnInitDialog)
	EVT_CHOICE( ID_PROJ, ProjectionDlg::OnProjChoice )
	EVT_BUTTON( ID_STATEPLANE, ProjectionDlg::OnSetStatePlane )
	EVT_CHOICE( ID_ZONE, ProjectionDlg::OnZone )
	EVT_CHOICE( ID_HORUNITS, ProjectionDlg::OnHorizUnits )
	EVT_LIST_ITEM_RIGHT_CLICK( ID_PROJPARAM, ProjectionDlg::OnItemRightClick )
	EVT_CHOICE( ID_DATUM, ProjectionDlg::OnDatum )
	EVT_CHECKBOX( ID_SHOW_ALL_DATUMS, ProjectionDlg::OnShowAllDatums )
	EVT_BUTTON( ID_PROJ_LOAD, ProjectionDlg::OnProjLoad )
	EVT_BUTTON( ID_PROJ_SAVE, ProjectionDlg::OnProjSave )
END_EVENT_TABLE()

ProjectionDlg::ProjectionDlg( wxWindow *parent, wxWindowID id, const wxString &title,
	const wxPoint &position, const wxSize& size, long style ) :
	AutoDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
{
	m_bInitializedUI = false;
	m_bShowAllDatums = false;

	m_GeoRefPoint.Set(0,0);

	ProjectionDialogFunc( this, TRUE );

	m_pParamCtrl = GetProjparam();
	m_pZoneCtrl = GetZonechoice();
	m_pHorizCtrl = GetHorizchoice();
	m_pDatumCtrl = GetDatumchoice();
	m_pProjCtrl = GetProjchoice();

	AddValidator(ID_PROJ, &m_iProj);
	AddValidator(ID_ZONE, &m_iZone);
	AddValidator(ID_SHOW_ALL_DATUMS, &m_bShowAllDatums);

	m_pProjCtrl->Append(_("Albers Equal Area Conic"));
	m_pProjCtrl->Append(_("Geographic"));
	m_pProjCtrl->Append(_("Hotine Oblique Mercator"));
	m_pProjCtrl->Append(_("Lambert Azimuthal Equal-Area"));
	m_pProjCtrl->Append(_("Lambert Conformal Conic"));
	m_pProjCtrl->Append(_("New Zealand Map Grid"));
	m_pProjCtrl->Append(_("Oblique Stereographic"));
	m_pProjCtrl->Append(_("Polar Stereographic"));
	m_pProjCtrl->Append(_("Sinusoidal"));
	m_pProjCtrl->Append(_("Stereographic"));
	m_pProjCtrl->Append(_("Mercator"));
	m_pProjCtrl->Append(_("Transverse Mercator"));
	m_pProjCtrl->Append(_("UTM"));<commit_msg>fix projection dialog for Krovak<commit_after>//
// Name:		ProjectionDlg.cpp
//
// Copyright (c) 2002-2007 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include "ProjectionDlg.h"
#include "StatePlaneDlg.h"
#include "Helper.h"			// for GuessZoneFromGeo
#include "vtdata/vtLog.h"

//
// Must offset the values we use for Datum because a Choice
// control cannot handle "client data" values less than 0.
//
#define CHOICE_OFFSET 10

// WDR: class implementations

//---------------------------------------------------------------------------
// ProjectionDlg
//---------------------------------------------------------------------------

// WDR: event table for ProjectionDlg

BEGIN_EVENT_TABLE(ProjectionDlg, AutoDialog)
	EVT_INIT_DIALOG (ProjectionDlg::OnInitDialog)
	EVT_CHOICE( ID_PROJ, ProjectionDlg::OnProjChoice )
	EVT_BUTTON( ID_STATEPLANE, ProjectionDlg::OnSetStatePlane )
	EVT_CHOICE( ID_ZONE, ProjectionDlg::OnZone )
	EVT_CHOICE( ID_HORUNITS, ProjectionDlg::OnHorizUnits )
	EVT_LIST_ITEM_RIGHT_CLICK( ID_PROJPARAM, ProjectionDlg::OnItemRightClick )
	EVT_CHOICE( ID_DATUM, ProjectionDlg::OnDatum )
	EVT_CHECKBOX( ID_SHOW_ALL_DATUMS, ProjectionDlg::OnShowAllDatums )
	EVT_BUTTON( ID_PROJ_LOAD, ProjectionDlg::OnProjLoad )
	EVT_BUTTON( ID_PROJ_SAVE, ProjectionDlg::OnProjSave )
END_EVENT_TABLE()

ProjectionDlg::ProjectionDlg( wxWindow *parent, wxWindowID id, const wxString &title,
	const wxPoint &position, const wxSize& size, long style ) :
	AutoDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
{
	m_bInitializedUI = false;
	m_bShowAllDatums = false;

	m_GeoRefPoint.Set(0,0);

	ProjectionDialogFunc( this, TRUE );

	m_pParamCtrl = GetProjparam();
	m_pZoneCtrl = GetZonechoice();
	m_pHorizCtrl = GetHorizchoice();
	m_pDatumCtrl = GetDatumchoice();
	m_pProjCtrl = GetProjchoice();

	AddValidator(ID_PROJ, &m_iProj);
	AddValidator(ID_ZONE, &m_iZone);
	AddValidator(ID_SHOW_ALL_DATUMS, &m_bShowAllDatums);

	m_pProjCtrl->Append(_("Albers Equal Area Conic"));
	m_pProjCtrl->Append(_("Geographic"));
	m_pProjCtrl->Append(_("Hotine Oblique Mercator"));
	m_pProjCtrl->Append(_("Krovak"));
	m_pProjCtrl->Append(_("Lambert Azimuthal Equal-Area"));
	m_pProjCtrl->Append(_("Lambert Conformal Conic"));
	m_pProjCtrl->Append(_("New Zealand Map Grid"));
	m_pProjCtrl->Append(_("Oblique Stereographic"));
	m_pProjCtrl->Append(_("Polar Stereographic"));
	m_pProjCtrl->Append(_("Sinusoidal"));
	m_pProjCtrl->Append(_("Stereographic"));
	m_pProjCtrl->Append(_("Mercator"));
	m_pProjCtrl->Append(_("Transverse Mercator"));
	m_pProjCtrl->Append(_("UTM"));
{'fraction_non_alphanumeric': 0.1786770140428677, 'fraction_numerical': 0.004804138950480414, 'mean_word_length': 4.501016260162602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1763852', 'n_tokens_mistral': 1993, 'n_tokens_neox': 1976, 'n_words': 368}