X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6244848856584171db8cd74a7ff227250e46cc54..154f22b3facdbca2cb89e091ae2ea1398bfad9d1:/docs/latex/wx/body.tex?ds=sidebyside

diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex
index 238551d945..3c6903767d 100644
--- a/docs/latex/wx/body.tex
+++ b/docs/latex/wx/body.tex
@@ -7,14 +7,15 @@
 
 wxWindows is a C++ framework providing GUI (Graphical User
 Interface) and other facilities on more than one platform.  Version 2.0 currently
-supports subsets MS Windows (16-bit, Windows 95 and Windows NT) and GTK+, with Motif
-and Mac ports in an advanced state.
+supports MS Windows (16-bit, Windows 95 and Windows NT), Unix with GTK+, and Unix with Motif.
+A Mac port is in an advanced state, an OS/2 port and a port to the MGL graphics library
+have been started.
 
 wxWindows was originally developed at the Artificial Intelligence
 Applications Institute, University of Edinburgh, for internal use.
 wxWindows has been released into the public domain in the hope
 that others will also find it useful. Version 2.0 is written and
-maintained by Julian Smart, Robert Roebling and others.
+maintained by Julian Smart, Robert Roebling, Vadim Zeitlin and others.
 
 This manual discusses wxWindows in the context of multi-platform
 development.\helpignore{For more detail on the wxWindows version 2.0 API
@@ -29,7 +30,7 @@ variants, unless otherwise stated. All trademarks are acknowledged.
 
 wxWindows was developed to provide a cheap and flexible way to maximize
 investment in GUI application development.  While a number of commercial
-class libraries already exist for cross-platform development,
+class libraries already existed for cross-platform development,
 none met all of the following criteria:
 
 \begin{enumerate}\itemsep=0pt
@@ -39,22 +40,24 @@ none met all of the following criteria:
 \item support for a wide range of compilers.
 \end{enumerate}
 
+Since wxWindows was started, several other free or almost-free GUI frameworks have
+emerged. However, none has the range of features, flexibility, documentation and the
+well-established development team that wxWindows has.
+
 As public domain software and a project open to everyone, wxWindows has
 benefited from comments, ideas, bug fixes, enhancements and the sheer
 enthusiasm of users, especially via the Internet. This gives wxWindows a
-certain advantage over its commercial brothers, and a robustness against
+certain advantage over its commercial competitors (and over free libraries
+without an independent development team), plus a robustness against
 the transience of one individual or company. This openness and
 availability of source code is especially important when the future of
 thousands of lines of application code may depend upon the longevity of
 the underlying class library.
 
-In writing wxWindows, completeness has sometimes been traded for
-portability and simplicity of programming. Version 2.0 goes much
-further than previous versions in terms of generality and features,
+Version 2.0 goes much further than previous versions in terms of generality and features,
 allowing applications to be produced
 that are often indistinguishable from those produced using single-platform
-toolkits
-such as Motif and MFC.
+toolkits such as Motif and MFC.
 
 The importance of using a platform-independent class library cannot be
 overstated, since GUI application development is very time-consuming,
@@ -62,10 +65,9 @@ and sustained popularity of particular GUIs cannot be guaranteed.
 Code can very quickly become obsolete if it addresses the wrong
 platform or audience.  wxWindows helps to insulate the programmer from
 these winds of change. Although wxWindows may not be suitable for
-every application, it provides access to most of the functionality a
-GUI program normally requires, plus some extras such as form
-construction, interprocess communication and PostScript output, and
-can of course be extended as needs dictate.  As a bonus, it provides
+every application (such as an OLE-intensive program), it provides access to most of the functionality a
+GUI program normally requires, plus some extras such as network programming
+and PostScript output, and can of course be extended as needs dictate.  As a bonus, it provides
 a cleaner programming interface than the native
 APIs. Programmers may find it worthwhile to use wxWindows even if they
 are developing on only one platform.
@@ -76,14 +78,19 @@ here are some of the benefits:
 \begin{itemize}\itemsep=0pt
 \item Low cost (free, in fact!)
 \item You get the source.
+\item Available on a variety of popular platforms.
+\item Works with almost all popular C++ compilers.
 \item Several example programs.
-\item Over 700 pages of printable and on-line documentation.
+\item Over 900 pages of printable and on-line documentation.
+\item Includes Tex2RTF, to allow you to produce your own documentation
+in Windows Help, HTML and Word RTF formats.
 \item Simple-to-use, object-oriented API.
-\item Graphics calls include splines, polylines, rounded rectangles, etc.
+\item Flexible event system.
+\item Graphics calls include lines, rounded rectangles, splines, polylines, etc.
 \item Constraint-based layout option.
 \item Print/preview and document/view architectures.
-\item Status line facility, toolbar
-\item Encapsulated PostScript generation under Unix, normal MS Windows printing on the
+\item Toolbar, notebook, tree control, advanced list control classes.
+\item PostScript generation under Unix, normal MS Windows printing on the
 PC.
 \item MDI (Multiple Document Interface) support.
 \item Can be used to create DLLs under Windows, dynamic libraries on Unix.
@@ -92,7 +99,7 @@ PC.
 them to the clipboard.
 \item An API for invoking help from applications.
 \item Dialog Editor for building dialogs.
-\item Socket support.
+\item Network support via a family of socket and protocol classes.
 \end{itemize}
 
 \section{Changes from version 1.xx}\label{versionchanges}
@@ -142,7 +149,7 @@ same API;
 temporarily with the window as an argument;
 \item events from sliders and scrollbars can be handled more flexibly;
 \item the handling of window close events has been changed in line with the new
-event system, but backward {\bf OnClose} compatibility has been retained;
+event system;
 \item the concept of {\it validator} has been added to allow much easier coding of
 the relationship between controls and application data;
 \item the documentation has been revised, with more cross-referencing.
@@ -167,28 +174,38 @@ following setups.
 
 \begin{enumerate}\itemsep=0pt
 \item A 486 or higher PC running MS Windows.
-\item One of Microsoft Visual C++ 4.0 or higher, Borland C++, Gnu-Win32.
+\item A Windows compiler: most are supported, but please see {\tt install.txt} for
+details. Supported compilers include Microsoft Visual C++ 4.0 or higher, Borland C++, Cygwin,
+Metrowerks CodeWarrior.
 \item At least 60 MB of disk space.
 \end{enumerate}
 
 (b) Unix:
 
 \begin{enumerate}\itemsep=0pt
-\item Almost any C++ compiler, including GNU C++.
-\item Almost any Unix workstation, and one of: GTK+ 1.0, Motif 1.2 or higher, Lesstif.
+\item Almost any C++ compiler, including GNU C++ (EGCS 1.1.1 or above).
+\item Almost any Unix workstation, and one of: GTK+ 1.0, GTK+ 1.2, Motif 1.2 or higher, Lesstif.
 \item At least 60 MB of disk space.
 \end{enumerate}
 
 \section{Availability and location of wxWindows}
 
-wxWindows is currently available from the Artificial Intelligence
-Applications Institute by anonymous FTP and World Wide Web:
+wxWindows is available by anonymous FTP and World Wide Web:
 
 \begin{verbatim}
   ftp://www.remstar.com/pub/wxwin
-  http://wxwin.home.ml.org
+  http://www.wxwindows.org
 \end{verbatim}
 
+You can also buy a CD-ROM using the form on the Web site, or by contacting:
+
+Julian Smart\\
+12 North Street West\\
+Uppingham\\
+Rutland\\
+LE15 9SG\\
+julian.smart@ukonline.co.uk
+
 \section{Acknowledgments}
 
 Thanks are due to AIAI for being willing to release the original version of
@@ -203,7 +220,7 @@ Dunn, Hermann Dunkel, Jos van Eijndhoven, Tom Felici, Thomas Fettig, Matthew Fla
 Wolfram Gloger, Norbert Grotz, Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle, Harco de Hilster, Cord Hockemeyer, Markus 
 Holzem, Olaf Klein, Leif Jensen, Bart Jourquin, Guilhem Lavaux, Jan Lessner, Nicholas Liebmann, Torsten Liermann, Per Lindqvist, Thomas Runge, Tatu
 M\"{a}nnist\"{o}, Scott Maxwell, Thomas Myers, Oliver Niedung, Hernan Otero, Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti, 
-Garrett Potts, Marcel Rasche, Robert Roebling, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton, Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, 
+Garrett Potts, Marcel Rasche, Robert Roebling, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton, Paul Shirley, Vaclav Slavik, Stein Somers, Petr Smilauer, Neil Smith, 
 Kari Syst\"{a}, Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli, Vadim Zeitlin, Xiaokun Zhu, Edward Zimmermann.
 
 `Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos
@@ -348,7 +365,7 @@ STACKSIZE    8192
 The only lines which will usually have to be changed per application are
 NAME and DESCRIPTION.
 
-\subsection{Allocating and deleting wxWindows objects}
+\section{Allocating and deleting wxWindows objects}
 
 In general, classes derived from wxWindow must dynamically allocated
 with {\it new} and deleted with {\it delete}. If you delete a window,
@@ -378,6 +395,26 @@ make calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) befo
 a drawing object that may be in use. Code that doesn't do this will probably work
 fine on some platforms, and then fail under Windows.
 
+\section{Architecture dependency}
+
+A problem which sometimes arises from writing multi-platform programs is that
+the basic C types are not defiend the same on all platforms. This holds true
+for both the length in bits of the standard types (such as int and long) as 
+well as their byte order, which might be little endian (typically
+on Intel computers) or big endian (typically on some Unix workstations). wxWindows
+defines types and macros that make it easy to write architecture independent
+code. The types are:
+
+wxInt32, wxInt16, wxInt8, wxUint32, wxUint16 = wxWord, wxUint8 = wxByte
+
+where wxInt32 stands for a 32-bit signed integer type etc. You can also check
+which architecture the program is compiled on using the wxBYTE\_ORDER define
+which is either wxBIG\_ENDIAN or wxLITTLE\_ENDIAN (in the future maybe wxPDP\_ENDIAN
+as well).
+
+The macros handling bit-swapping with respect to the applications endianness
+are described in the \helpref{Macros}{macros} section.
+
 \section{Conditional compilation}
 
 One of the purposes of wxWindows is to reduce the need for conditional
@@ -395,11 +432,32 @@ The following documents some miscellaneous C++ issues.
 
 wxWindows does not use templates since it is a notoriously unportable feature.
 
+\subsection{RTTI}
+
+wxWindows does not use run-time type information since wxWindows provides
+its own run-time type information system, implemented using macros.
+
+\subsection{Type of NULL}
+
+Some compilers (e.g. the native IRIX cc) define NULL to be 0L so that
+no conversion to pointers is allowed. Because of that, all these
+occurences of NULL in the GTK port use an explicit conversion such 
+as
+
+{\small
+\begin{verbatim}
+  wxWindow *my_window = (wxWindow*) NULL;
+\end{verbatim}
+}
+
+It is recommended to adhere to this in all code using wxWindows as
+this make the code (a bit) more portable.
+
 \subsection{Precompiled headers}
 
 Some compilers, such as Borland C++ and Microsoft C++, support
 precompiled headers. This can save a great deal of compiling time. The
-recommended approach is to precompile {\tt ``wx.h''}, using this
+recommended approach is to precompile {\tt "wx.h"}, using this
 precompiled header for compiling both wxWindows itself and any
 wxWindows applications. For Windows compilers, two dummy source files
 are provided (one for normal applications and one for creating DLLs)
@@ -409,8 +467,7 @@ However, there are several downsides to using precompiled headers. One
 is that to take advantage of the facility, you often need to include
 more header files than would normally be the case. This means that
 changing a header file will cause more recompilations (in the case of
-wxWindows, everything needs to be recompiled since everything includes
-{\tt ``wx.h''}!)
+wxWindows, everything needs to be recompiled since everything includes {\tt "wx.h"}!)
 
 A related problem is that for compilers that don't have precompiled
 headers, including a lot of header files slows down compilation
@@ -460,8 +517,9 @@ descriptions of miscellaneous file handling functions.
 A number of `extras' are supplied with wxWindows, to complement
 the GUI functionality in the main class library. These are found
 below the utils directory and usually have their own source, library
-and documentation directories. For larger user-contributed packages,
-see the directory /pub/packages/wxwin/contrib.
+and documentation directories. For other user-contributed packages,
+see the directory ftp://www.remstar.com/pub/wxwin/contrib, which is
+more easily accessed via the Contributions page on the Web site.
 
 \section{wxHelp}\label{wxhelp}
 
@@ -596,8 +654,7 @@ The same goes for other data types: use classes wherever possible.
 
 Don't use absolute panel item positioning if you can avoid it. Different GUIs have
 very differently sized panel items. Consider using the constraint system, although this
-can be complex to program. If you needs are simple, the default relative positioning
-behaviour may be adequate (using default position values and wxPanel::NewLine).
+can be complex to program.
 
 Alternatively, you could use alternative .wrc (wxWindows resource files) on different
 platforms, with slightly different dimensions in each. Or space your panel items out
