Applied initial patches for wx2.8 compatibility
[ctsim.git] / src / tips.cpp
index c263b48356aac5465dc3197086a2746a1e464485..b97021dd7f2d016ff610d04aa3d701471d3ca752 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: tips.cpp,v 1.1 2001/02/22 00:56:50 kevin Exp $
+**  $Id$
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ******************************************************************************/
 
-#ifdef MSVC
-#define strdup _strdup
-#endif
-
-// For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
 #endif
 
 
 const char* const CTSimTipProvider::s_aszTips[] = {
-  {"You can create a geometric phantom using the \"File - Create Phantom\" menu command."},
-  {"You can create a gray-scale, rasterized image of a phantom by using the \"Process - Rasterize\" menu command on a geometric phantom."},
-  {"You can simulate the x-ray process by using the \"Process - Projections\" menu command on a geometric phantom."},
-  {"You can simulate first, second, and third-fourth-fifth generation CT scanners by using different scanner geometries."},
-  {"You can reconstruct an image from the x-ray data by using the \"Reconstruction\" menu on a projection file."},
-  {"You can specify different levels of smoothing by using different filters in the \"Reconstruction\" dialog."},
-  {"You can select a row and column of an image by left-mouse button clicking on an image."},
-  {"You can plot a column or row of an image by using the \"Analyze - Plot\" command."},
-  {"You can save your plots to a disk file by using the \"File - Save\" command."},
-  {"You can create your own phantoms using a text editor. Please see the manual for the simple file format."},
-  {"You can perform 2-dimension Fourier transform of images using the \"Filter\" menu commands."},
-  {"You can create an image of a filter by using the \"File - Create Filter\" menu command."},
-  {"You can add two images by using the \"Image - Add\" menu command."},
-  {"You can display the value of a pixel in an image by right-mouse button clicking on an image."},
-  {"You can view a 3-dimensional view of an image using the \"Image - 3D\" menu command."},
-  {"You can scale an image to any size using the \"Image - Scale Size\" menu command."},
-  {"You can display context-sensitive help by using the \"Help\" button on dialog boxes."},
-  {"You can compare two images by using the \"Analyze - Compare Images\" menu command."},
-  {"You can display these tips at any time by using the \"Help - Tips\" menu command."},
-  {"You can control CTSim's operation using the \"File - Preferences\" menu command."},
+  "You can create a geometric phantom using the \"File - Create Phantom\" menu command.",
+  "You can create a gray-scale, rasterized image of a phantom by using the \"Process - Rasterize\" menu command on a geometric phantom.",
+  "You can simulate the x-ray process by using the \"Process - Projections\" menu command on a geometric phantom.",
+  "You can simulate first, second, and third-fourth-fifth generation CT scanners by using different scanner geometries.",
+  "You can reconstruct an image from the x-ray data by using the \"Reconstruction\" menu on a projection file.",
+  "You can specify different levels of smoothing by using different filters in the \"Reconstruction\" dialog.",
+  "You can select a row and column of an image by left-mouse button clicking on an image.",
+  "You can plot a column or row of an image by using the \"Analyze - Plot\" command.",
+  "You can save your plots to a disk file by using the \"File - Save\" command.",
+  "You can create your own phantoms using a text editor. Please see the manual for the simple file format.",
+  "You can perform 2-dimension Fourier transform of images using the \"Filter\" menu commands.",
+  "You can create an image of a filter by using the \"File - Create Filter\" menu command.",
+  "You can add two images by using the \"Image - Add\" menu command.",
+  "You can display the value of a pixel in an image by right-mouse button clicking on an image.",
+  "You can view a 3-dimensional view of an image using the \"Image - 3D\" menu command.",
+  "You can scale an image to any size using the \"Image - Scale Size\" menu command.",
+  "You can display context-sensitive help by using the \"Help\" button on dialog boxes.",
+  "You can compare two images by using the \"Analyze - Compare Images\" menu command.",
+  "You can display these tips at any time by using the \"Help - Tips\" menu command.",
+  "You can control CTSim's operation using the \"File - Preferences\" menu command.",
 };
 
-const int CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
+const size_t CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
 
 
 CTSimTipProvider::CTSimTipProvider (size_t iCurrentTip)
@@ -92,7 +83,7 @@ CTSimTipProvider::GetTip()
   size_t iThisTip = m_iCurrentTip;
   ++m_iCurrentTip;
 
-  return wxString (s_aszTips[iThisTip]);
+  return wxString (wxConvUTF8.cMB2WX(s_aszTips[iThisTip]));
 }
 
 size_t