⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlg_about.cpp

📁 这是一个GPS相关的程序
💻 CPP
📖 第 1 页 / 共 5 页
字号:

///////////////////////////////////////////////////////////
//                                                       //
//                         SAGA                          //
//                                                       //
//      System for Automated Geoscientific Analyses      //
//                                                       //
//                    User Interface                     //
//                                                       //
//                    Program: SAGA                      //
//                                                       //
//-------------------------------------------------------//
//                                                       //
//                    DLG_About.cpp                      //
//                                                       //
//          Copyright (C) 2005 by Olaf Conrad            //
//                                                       //
//-------------------------------------------------------//
//                                                       //
// This file is part of 'SAGA - System for Automated     //
// Geoscientific Analyses'. SAGA is free software; you   //
// can redistribute it and/or modify it under the terms  //
// of the GNU General Public License as published by the //
// Free Software Foundation; version 2 of the License.   //
//                                                       //
// SAGA is distributed in the hope that it will be       //
// useful, but WITHOUT ANY WARRANTY; without even the    //
// implied warranty of MERCHANTABILITY or FITNESS FOR A  //
// PARTICULAR PURPOSE. See the GNU General Public        //
// License for more details.                             //
//                                                       //
// You should have received a copy of the GNU General    //
// Public License along with this program; if not,       //
// write to the Free Software Foundation, Inc.,          //
// 59 Temple Place - Suite 330, Boston, MA 02111-1307,   //
// USA.                                                  //
//                                                       //
//-------------------------------------------------------//
//                                                       //
//    contact:    Olaf Conrad                            //
//                Institute of Geography                 //
//                University of Goettingen               //
//                Goldschmidtstr. 5                      //
//                37077 Goettingen                       //
//                Germany                                //
//                                                       //
//    e-mail:     oconrad@saga-gis.org                   //
//                                                       //
///////////////////////////////////////////////////////////

//---------------------------------------------------------


///////////////////////////////////////////////////////////
//														 //
//														 //
//														 //
///////////////////////////////////////////////////////////

//---------------------------------------------------------
#include <wx/notebook.h>
#include <wx/textctrl.h>

#include <wx/scrolwin.h>
#include <wx/toolbar.h>
#include <wx/stattext.h>
#include <wx/dcclient.h>
#include <wx/button.h>
#include <wx/propgrid/propgrid.h>

#include <saga_api/saga_api.h>

#include "helper.h"

#include "res_controls.h"

#include "saga.h"

#include "dlg_about.h"
#include "dlg_about_logo.h"


///////////////////////////////////////////////////////////
//														 //
//														 //
//														 //
///////////////////////////////////////////////////////////

//---------------------------------------------------------
IMPLEMENT_CLASS(CDLG_About, CDLG_Base)

//---------------------------------------------------------
BEGIN_EVENT_TABLE(CDLG_About, CDLG_Base)
	EVT_TEXT_URL(wxID_ANY, CDLG_About::On_URL_Version)
END_EVENT_TABLE()


///////////////////////////////////////////////////////////
//														 //
//														 //
//														 //
///////////////////////////////////////////////////////////

//---------------------------------------------------------
CDLG_About::CDLG_About(void)
	: CDLG_Base(-1, LNG("About SAGA"), false)
{
	wxTextCtrl	*pText;

	m_pControl	= new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, NOTEBOOK_STYLE);
	
	m_pControl->AddPage(new CDLG_About_Logo(m_pControl), LNG("Logo"), false, -1);

	//-----------------------------------------------------
	m_pVersion	=
	pText		= new wxTextCtrl(m_pControl, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_CENTRE|wxTE_RICH|wxTE_AUTO_URL);
	pText->AppendText(_Get_Version());
	m_pControl->AddPage(pText, LNG("Version"), false, -1);
	pText->ShowPosition(0);

	//-----------------------------------------------------
	pText		= new wxTextCtrl(m_pControl, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_CENTRE);
	pText->AppendText(_Get_GPL());
	m_pControl->AddPage(pText, LNG("GPL"), false, -1);
	pText->ShowPosition(0);

	//-----------------------------------------------------
	pText		= new wxTextCtrl(m_pControl, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_CENTRE);
	pText->AppendText(_Get_LGPL());
	m_pControl->AddPage(pText, LNG("LGPL"), false, -1);
	pText->ShowPosition(0);

	//-----------------------------------------------------
	pText		= new wxTextCtrl(m_pControl, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_CENTRE);
	pText->AppendText(_Get_Acknowledgements());
	m_pControl->AddPage(pText, LNG("Acknowledgements"), false, -1);
	pText->ShowPosition(0);

	//-----------------------------------------------------
	Set_Positions();
}

//---------------------------------------------------------
CDLG_About::~CDLG_About(void)
{
}


///////////////////////////////////////////////////////////
//														 //
//														 //
//														 //
///////////////////////////////////////////////////////////

//---------------------------------------------------------
void CDLG_About::Set_Position(wxRect r)
{
	m_pControl->SetSize(r);
}


///////////////////////////////////////////////////////////
//														 //
//														 //
//														 //
///////////////////////////////////////////////////////////

//---------------------------------------------------------
void CDLG_About::On_URL_Version(wxTextUrlEvent &event)
{
	if( !event.GetMouseEvent().Moving() )
	{
		Open_WebBrowser(m_pVersion->GetValue().Mid(event.GetURLStart(), event.GetURLEnd() - event.GetURLStart()));
	}
}


///////////////////////////////////////////////////////////
//														 //
//														 //
//														 //
///////////////////////////////////////////////////////////

//---------------------------------------------------------
wxString CDLG_About::_Get_Version(void)
{
	wxString	s;

	s.Printf(wxT("\nSAGA\n"));

	s.Append(SG_Translate(
		wxT("System for Automated Geoscientific Analyses\n")
	));

	s.Append(
		wxT("http://www.saga-gis.org\n")
	);

#ifdef _SAGA_UNICODE
	s.Append(wxT("_______________________\n\n"));

	s.Append(
		wxT("UNICODE\n")
	);
#endif

	s.Append(wxT("_______________________\n\n"));

	s.Append(wxString::Format(
		wxT("SAGA GUI\n%s\n")
		wxT("build: %s\n")
		wxT("\n")
		wxT("Copyrights (c) 2005-2007 by Olaf Conrad\n")
		wxT("\n")
		wxT("GNU General Public License (GPL)\n"),
		SAGA_GUI_Get_Version(),
		SAGA_GUI_Get_Build()
	));

	s.Append(wxT("_______________________\n\n"));

	s.Append(wxString::Format(
		wxT("SAGA API\n%s\n")
		wxT("\n")
		wxT("Copyrights (c) 2002-2007 by Olaf Conrad\n")
		wxT("Portions (c) 2002 by Andre Ringeler\n")	// " (mat_formula.cpp)\n")
		wxT("Portions (c) 2005-2006 by Victor Olaya\n")
		wxT("\n")
		wxT("GNU Lesser General Public License (LGPL)\n"),
		SAGA_API_Get_Version()
	));

	s.Append(wxT("_______________________\n\n"));

	s.Append(wxString::Format(
		wxT("SAGA uses the portable C++ GUI toolkit wxWidgets\n")
		wxT("http://www.wxwidgets.org\n\n")
		wxT("%s\n")
		wxT("wxPropertyGrid"),
		wxVERSION_STRING
	));

	int		Version	= wxPG_VERSION;
	s.Append(wxString::Format(wxT(" %d"), Version / 1000));
	Version	-= (Version / 1000) * 1000;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -