]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/book/chap_intro.tex
added wxFontMapper::Get/Set
[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
45961fa0
JS
12(in the non-derogatory sense of the word!) and it seemed almost
13common sense that the quirky Mac had had its day.
c49edcd0
JS
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.
42b3e73e 22The keyword now is diversity, when the best guess of a few years
c49edcd0
JS
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
45961fa0
JS
88Windows, x for the X Windowing System) started off with support for Sun's XView
89and Microsoft's MFC 1.0, and
c49edcd0
JS
90AIAI allowed it to be released to the Internet. As it became
91clear that XView was doomed, a Motif port was written. Borland
92C++ users began to request a version that was not dependent on
93MFC, so the Windows port was rewritten to use the native Windows
94API. Over time, a small but enthusiastic community of wxWindows
45961fa0
JS
95users was established and a mailing list set up. Many contributions
96and fixes were sent in. wxWindows gradually picked up more and more users
97from all over the world: academic, government, and corporate users
98who found that wxWindows offered a better product, and better support, than the
c49edcd0
JS
99commercial products they had looked at or used.
100
101During 1995, Markus Holzem released his port of wxWindows to Xt,
102the X toolkit. This meant that software could be written that
45961fa0
JS
103would work on X-based systems without the need for installing Motif,
104then still a commercial product.
c49edcd0
JS
105
106In 1996, Julian left AIAI to pursue freelance consultancy, and
107there were few new releases. The seemingly unstoppable advance
108of Java was throwing some doubt on the future of C++ libraries.
109After many contributions, the wxWindows code was looking rather
110tired and in need of a serious rethink. At the start of 1997 it
111was make or break time - call it a day and move onto other
112things, or commit to re-engineering wxWindows with an API that
113was flexible enough for current and future user interface
45961fa0
JS
114trends, with more sophisticated widgets, and making better use of C++.
115After a short debate, the effort was relaunched
116with Julian concentrating on the Windows port, and Markus on the combined Motif/Xt port,
117with both contributing to the common and generic parts. wxWindows 2 API
c49edcd0
JS
118ideas and code started to take shape.
119
120During 1997 an effort to produce a standard Linux desktop
121environment was underway - GNOME. Its widget set was GTK+, built
122on top of X11 and it looked as though GTK+-based apps were to
45961fa0
JS
123become the standard in the Linux universe. Its one major problem:
124GTK+ was C-based, and only a thin (and unportable) C++ wrapper
c49edcd0
JS
125existed for it. In August 1997, Wolfram Gloger made a suggestion
126that wxWindows 2 should be ported to GTK+ - Robert Roebling had
127initial reservations, but in general supported the idea. He
128became the prime mover for wxGTK and alphas were made available
129at the beginning of 1998. In May 1998 the Windows and GTK+ ports
130were merged and put into a CVS repository made available to all
45961fa0
JS
131contributors to wxWindows: a decision that has accelerated the development
132effort tremendously. At this point Vadim Zeitlin became a prime
133mover on the Windows port and revamped much of the container
134and collection support.
c49edcd0
JS
135
136Markus Holzem had to drop out of the wxWindows 2 effort in early
1371998, but Julian Smart started a new wxMotif port. The idea of
138an Xt port was dropped, since there remain two possibilities for
45961fa0 139free Unix programming with wxWindows: wxGTK, and wxMotif using
c49edcd0
JS
140the Motif clone Lesstif.
141
142In September 1998, Stefan Csomor started a new version of the
143wxMac 2 port based in part on Greg Whitehead's initial work.
45961fa0
JS
144In 1999 wxMac became ready for prime-time and Stefan has
145made it ready for MacOS X.
146
147Also in 1998, Vaclav Slavik burst onto the wxWindows scene with his
148exciting wxHTML module that can now provide applications with (to name but a few) HTML help, superb
149About boxes, and report viewing and printing facilities. Vaclav has
150also written an enhanced resource system for wxWindows based on XML,
151that supports many more wxWindows features than the old WXR-based system.
152
153Since 1998 Robin Dunn has been completely rewriting the old Python/wxWindows
154marriage and now wxPython is another force to be reckoned with in the
155development community.
156
157%David Webster and Stefan Neis have been working on an OS/2 port, and
158%interest has been expressed in ports to other systems, such as
159%BeOS.
160%
161Development on wxWindows is concentrating on achieving more modularity,
162additional sophisticated GUI components, and compatibility with
163a wider range platforms. The wxStudio IDE project promises to
164make wxWindows development much easier and introduce wxWindows to people
165used to rapid application development environments under Microsoft Windows.
c49edcd0
JS
166
167\section{How to use this book}
168
169The chapters in this book are meant to be fairly independent, but
170as usual, the ordering reflects a progression from basic concepts
171to more advanced ones, so the first few chapters at least
172should be read consecutively for best effect.
397f14ce 173
45961fa0
JS
174Complete programs illustrating concepts in many of the chapters can be
175found in the accompanying CD-ROM, along with wxWindows itself and lots
176of extra, cool stuff.
177
178We all hope that you enjoy reading this book and, most importantly,
179have fun using wxWindows to build great-looking, multiplatform applications!
180