Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61538 - sandbox/geometry/libs/geometry/example
From: barend.gehrels_at_[hidden]
Date: 2010-04-24 11:56:04


Author: barendgehrels
Date: 2010-04-24 11:56:03 EDT (Sat, 24 Apr 2010)
New Revision: 61538
URL: http://svn.boost.org/trac/boost/changeset/61538

Log:
Updated x04_wxwidgets_world_mapper sample (vcproj, explanation)
Added:
   sandbox/geometry/libs/geometry/example/wxwidgets.vsprops (contents, props changed)
   sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper_readme.txt (contents, props changed)
Text files modified:
   sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp | 8 ++++----
   sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.sln | 1 -
   sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.vcproj | 21 ++++++++++++---------
   3 files changed, 16 insertions(+), 14 deletions(-)

Added: sandbox/geometry/libs/geometry/example/wxwidgets.vsprops
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/example/wxwidgets.vsprops 2010-04-24 11:56:03 EDT (Sat, 24 Apr 2010)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="wxwidgets"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(WXWIDGETS)\lib\vc_lib\mswd;$(WXWIDGETS)\include;..\..\.."
+ PreprocessorDefinitions="NOPCH;__WXMSW__"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalLibraryDirectories="$(WXWIDGETS)\lib\vc_lib"
+ />
+ <UserMacro
+ Name="WXWIDGETS"
+ Value="c:\software\libraries\wxWidgets-2.8.10"
+ />
+</VisualStudioPropertySheet>

Modified: sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp (original)
+++ sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp 2010-04-24 11:56:03 EDT (Sat, 24 Apr 2010)
@@ -53,7 +53,7 @@
 // Read an ASCII file containing WKT's
 // ----------------------------------------------------------------------------
 template <typename Geometry, typename Box>
-void read_wkt(std::string const& filename, std::vector<Geometry>& geometries, Box& m_box)
+void read_wkt(std::string const& filename, std::vector<Geometry>& geometries, Box& box)
 {
     std::ifstream cpp_file(filename.c_str());
     if (cpp_file.is_open())
@@ -68,7 +68,7 @@
                 Geometry geometry;
                 boost::geometry::read_wkt(line, geometry);
                 geometries.push_back(geometry);
- boost::geometry::combine(m_box, boost::geometry::make_envelope<Box>(geometry));
+ boost::geometry::combine(box, boost::geometry::make_envelope<Box>(geometry));
             }
         }
     }
@@ -82,7 +82,7 @@
 class HelloWorldFrame: public wxFrame
 {
 public:
- HelloWorldFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
+ HelloWorldFrame(wxFrame *frame, wxString const& title, wxPoint const& pos, wxSize const& size);
 
     void OnCloseWindow(wxCloseEvent& );
     void OnExit(wxCommandEvent& );
@@ -160,7 +160,7 @@
 
 
 // ----------------------------------------------------------------------------
-HelloWorldFrame::HelloWorldFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size)
+HelloWorldFrame::HelloWorldFrame(wxFrame *frame, wxString const& title, wxPoint const& pos, wxSize const& size)
     : wxFrame(frame, wxID_ANY, title, pos, size, wxDEFAULT_FRAME_STYLE | wxFULL_REPAINT_ON_RESIZE )
 {
     CreateStatusBar(2);

Modified: sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.sln
==============================================================================
--- sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.sln (original)
+++ sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.sln 2010-04-24 11:56:03 EDT (Sat, 24 Apr 2010)
@@ -1,4 +1,3 @@
-
 Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual C++ Express 2008
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x04_wxwidgets_world_mapper", "x04_wxwidgets_world_mapper.vcproj", "{DD1D469B-29A8-4873-A596-9CCCB24F54FA}"

Modified: sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.vcproj (original)
+++ sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.vcproj 2010-04-24 11:56:03 EDT (Sat, 24 Apr 2010)
@@ -19,7 +19,7 @@
                         OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                         IntermediateDirectory="$(ConfigurationName)\x04_wxwidgets_world_mapper"
                         ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ InheritedPropertySheets=".\boost.vsprops;.\wxwidgets.vsprops"
                         UseOfMFC="0"
                         ATLMinimizesCRunTimeLibraryUsage="false"
>
@@ -42,9 +42,9 @@
                                 Name="VCCLCompilerTool"
                                 AdditionalOptions="/EHsc "
                                 Optimization="0"
- AdditionalIncludeDirectories="&quot;c:\software\libraries\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;c:\software\libraries\wxWidgets-2.8.10\include&quot;;..\..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH"
- RuntimeLibrary="2"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__WXDEBUG__"
+ RuntimeLibrary="3"
                                 RuntimeTypeInfo="true"
                                 WarningLevel="3"
                                 SuppressStartupBanner="true"
@@ -66,7 +66,6 @@
                                 Name="VCLinkerTool"
                                 AdditionalDependencies="wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib odbc32.lib gdiplus.lib"
                                 SuppressStartupBanner="true"
- AdditionalLibraryDirectories="c:\software\libraries\wxWidgets-2.8.10\lib\vc_lib"
                                 IgnoreDefaultLibraryNames=""
                                 GenerateDebugInformation="true"
                                 SubSystem="2"
@@ -102,7 +101,7 @@
                         OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                         IntermediateDirectory="$(ConfigurationName)\x04_wxwidgets_world_mapper"
                         ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ InheritedPropertySheets=".\boost.vsprops;.\wxwidgets.vsprops"
                         UseOfMFC="0"
                         ATLMinimizesCRunTimeLibraryUsage="false"
>
@@ -126,8 +125,8 @@
                                 AdditionalOptions="/EHsc "
                                 Optimization="2"
                                 InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="&quot;c:\software\libraries\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;c:\software\libraries\wxWidgets-2.8.10\include&quot;;..\..\.."
- PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH"
+ AdditionalIncludeDirectories="..\..\.."
+ PreprocessorDefinitions="WIN32;_WINDOWS"
                                 StringPooling="true"
                                 RuntimeLibrary="2"
                                 EnableFunctionLevelLinking="true"
@@ -152,7 +151,7 @@
                                 Name="VCLinkerTool"
                                 AdditionalDependencies="wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib odbc32.lib gdiplus.lib"
                                 SuppressStartupBanner="true"
- AdditionalLibraryDirectories="c:\software\libraries\wxWidgets-2.8.10\lib\vc_lib"
+ AdditionalLibraryDirectories=""
                                 ProgramDatabaseFile=""
                                 SubSystem="2"
                                 RandomizedBaseAddress="1"
@@ -208,6 +207,10 @@
                                 />
                         </FileConfiguration>
                 </File>
+ <File
+ RelativePath=".\x04_wxwidgets_world_mapper_readme.txt"
+ >
+ </File>
         </Files>
         <Globals>
         </Globals>

Added: sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper_readme.txt
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper_readme.txt 2010-04-24 11:56:03 EDT (Sat, 24 Apr 2010)
@@ -0,0 +1,31 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+
+wxWidgets World Mapper example
+
+It will show a basic wxWidgets window, displaying world countries, highlighting the country under
+the mouse, and indicating position of the mouse in latitude/longitude and in pixels.
+
+
+To compile this program:
+
+Install wxWidgets (if not done before)
+Install Boost (if not done before)
+
+Using MSVC:
+ - edit the file wxwidgets.vsprops
+ - set the UserMacro WXWIDGETS to point to your wxWidgets distribution
+ - edit the file boost.vsprops
+ - set the UserMacro BOOST_ROOT to point to your Boost distribution
+ - alternatively you can include Boost/wxWidgets in your standard include path
+
+Using Linux/gcc
+ - check if installation is OK, http://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu
+ - compile using e.g. gcc -o x04_wxwidgets -I../../.. x04_wxwidgets_world_mapper.cpp `wx-config --cxxflags` `wx-config --libs`
+
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk