]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/book/chap_intro.tex
Committing in .
[wxWidgets.git] / docs / latex / book / chap_intro.tex
CommitLineData
397f14ce
JS
1\chapter{Introducing wxWindows}\label{chapintro}
2\pagenumbering{arabic}%
3\setheader{{\it CHAPTER \thechapter: INTRODUCING wxWINDOWS}}{}{}{}{}{{\it CHAPTER \thechapter: INTRODUCING wxWINDOWS}}%
4\setfooter{\thepage}{}{}{}{}{\thepage}%
5
c49edcd0
JS
6\section{The need for portability}
7
8Not so long ago, it seemed as though Microsoft was on course to
9take over the desktop for good with the Windows range of
10operating systems. Unix was retreating to server territory and
11had all but given up the fight against NT. Apple was sickening
12and it seemed almost common sense that the quirky Mac had had
13its day.
14
15At the start of the new century, the picture has changed quite
16dramatically. Linux is advancing from its position of strength
17in the server market and is poised to make inroads on the
18desktop, where the high price of Windows gives it an advantage.
19Apple has made an impressive comeback and is revamping its own
20operating system. The embedded market continues to explode and
21has given rise to new niches for specialist operating systems.
22The keyword bow is diversity, when the best guess of a few years
23was that Microsoft would conquer all. More than ever,
24application developers need to keep their options open and
25targeting one platform only can be a recipe for commercial (or
26open source) disaster.
27
28In the light of this change in the computing landscape,
29cross-platform development (or multiplatform development as we
30call it in this book) has become quite a hot and sometimes
31bitterly controversial topic. There are a number of ways to
32achieve the goal of portability, and many tools and languages to choose from.
33However, it is still generally agreed wisdom that C++ is the
34language of choice for desktop applications that depend on
35speed, ease of delivery and compatibility with billions of lines
36of existing code. Plus, there are many hundreds of thousands of
37developers now experienced in C++ programming.
38
39The purpose of this book is to give you (the developer or
40interested manager) a solid grounding in one increasingly
41popular multiplatform solution: wxWindows. wxWindows is an open
42source GUI toolkit that has been on the scene since 1993 and has
43reached a high degree of stability and functionality. It is
44available for Linux (and most other Unix variants), all desktop
45versions of Microsoft Windows, and Mac. Other ports are in
46progress.
47
48\section{Why wxWindows?}
49
50While wxWindows is labelled a GUI development toolkit, it is in
51fact much more than that and has many features that are useful
52for many aspects of application development. This has to
53be the case, since the whole of a wxWindows application needs to
54be portable to different platforms, and not just the GUI
55component. So wxWindows provides classes for working with files
56and streams, multithreading, management of application settings,
57interprocess communication, and much else.
58
59wxWindows is open source, with a vibrant developer and user
60community, and may be used in any proprietary or non-proprietary
61project. wxWindows encompasses the whole spectrum of users from
62one-man software outfits to big-name companies such as Xerox,
63Lockheed-Martin, Pratt and Whitney, and Motorola; from computer
64science departments to medical research groups; from ecological
65research, to the telecommunications industry, and in a myriad of
66open source projects.
67
68When you use wxWindows you tap into an astonishing talent pool,
69with contributors from a wide range of backgrounds. Many aspects
70of application development that you might otherwise have to
71laboriously code yourself have been encapsulated by these
72developers in easy-to-use classes that you can plug into your
73code. Since there are a lot of people subscribed to the mailing
74lists, you'll enjoy discussions not only about wxWindows but
75often other matters close to the hearts of both experienced and
76inexperienced developers. And hopefully, one day you'll join in the
77success of wxWindows and become a contributor yourself!
78
79\section{The history of wxWindows}
80
81wxWindows was started in 1992 at the Artificial Intelligence
82Applications Institute, University of Edinburgh, by Julian
83Smart. Julian was designing a kind of meta-CASE tool called
84Hardy which needed to run on Windows as well as X-based Unix
85workstations. The existing commercial cross-platform tools were
86deemed too expensive for an in-house experimental project, so
87the only alternative was to build one. wxWindows (w for Microsoft
88Windows, x for the X Windowing System) started off with support for XView and MFC 1.0, and
89AIAI allowed it to be released to the Internet. As it became
90clear that XView was doomed, a Motif port was written. Borland
91C++ users began to request a version that was not dependent on
92MFC, so the Windows port was rewritten to use the native Windows
93API. Over time, a small but enthusiastic community of wxWindows
94users was established and a mailing list set up. Contributions
95and fixes were sent in, the largest contributions being the Mac
96and Xt ports. wxWindows gradually picked up more and more users
97from all over the world: commercial, government, and - most
98gratifying of all - company users who found that wxWindows
99offered a better product, and better support, than the
100commercial products they had looked at or used.
101
102During 1995, Markus Holzem released his port of wxWindows to Xt,
103the X toolkit. This meant that software could be written that
104would work on X systems without the need for installing Motif,
105which is a commercial product.
106
107In 1996, Julian left AIAI to pursue freelance consultancy, and
108there were few new releases. The seemingly unstoppable advance
109of Java was throwing some doubt on the future of C++ libraries.
110After many contributions, the wxWindows code was looking rather
111tired and in need of a serious rethink. At the start of 1997 it
112was make or break time - call it a day and move onto other
113things, or commit to re-engineering wxWindows with an API that
114was flexible enough for current and future user interface
115trends, with more 'widgets', and better use of C++. After an
116exchange between Julian Smart and Markus Holzem (the author of
117the Xt port), it was decided that it was worthwhile. Julian
118would do the Windows port, Markus the combined Motif/Xt port,
119with both contributing to the generic parts. wxWindows 2 API
120ideas and code started to take shape.
121
122During 1997 an effort to produce a standard Linux desktop
123environment was underway - GNOME. Its widget set was GTK+, built
124on top of X11 and it looked as though GTK+-based apps were to
125become the standard in the Linux universe. Its one major problem
126- GTK+ was C-based, and only a thin (and unportable) C++ wrapper
127existed for it. In August 1997, Wolfram Gloger made a suggestion
128that wxWindows 2 should be ported to GTK+ - Robert Roebling had
129initial reservations, but in general supported the idea. He
130became the prime mover for wxGTK and alphas were made available
131at the beginning of 1998. In May 1998 the Windows and GTK+ ports
132were merged and put into a CVS repository made available to all
133contributors to wxWindows.
134
135Markus Holzem had to drop out of the wxWindows 2 effort in early
1361998, but Julian Smart started a new wxMotif port. The idea of
137an Xt port was dropped, since there remain two possibilities for
138free Unix programming with wxWindows: wxGTK, and wxMotif with
139the Motif clone Lesstif.
140
141In September 1998, Stefan Csomor started a new version of the
142wxMac 2 port based in part on Greg Whitehead's initial work.
143Several releases have been made and the code will be integrated
144into the main CVS stream in Summer 2000.
145
146David Webster and Stefan Neis are working on an OS/2 port, and
147interest has been expressed in ports to other systems, such as
148BeOS.
149
150wxWindows 2.1.11 saw the bundling of Vaclav Slavik's impressive
151wxHTML classes, with subsequent enhancements including
152print/preview ability, and a helpview application and help
153controller class for cross-platform HTML help. wxHTML gives
154applications easy access to enviable formatted text viewing and
155reporting capabilities.
156
157During 2000 wxWindows will adopt Vaclav's XML resource system
158as a replacement for the WXR system; this will allow much
159greater flexibility and portability with support for
160sizers and many more controls than WXR.
161
162\section{How to use this book}
163
164The chapters in this book are meant to be fairly independent, but
165as usual, the ordering reflects a progression from basic concepts
166to more advanced ones, so the first few chapters at least
167should be read consecutively for best effect.
397f14ce 168