]> git.saurik.com Git - wxWidgets.git/commitdiff
Doc mods; fixed return non-processing problem; fixed toolbar sizing problems
authorJulian Smart <julian@anthemion.co.uk>
Sun, 28 Feb 1999 20:59:08 +0000 (20:59 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 28 Feb 1999 20:59:08 +0000 (20:59 +0000)
(incl. MDI area clipping); put wxPrintPaperDatabase, wxPrintPaperType into prntbase.cpp
since it's needed in non-PostScript WIN16 for the generic page setup dialog;
corrected some 16-bit makefiles

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

41 files changed:
docs/latex/wx/app.tex
docs/latex/wx/arrstrng.tex
docs/latex/wx/tex2rtf.ini
docs/latex/wx/ti18n.tex
docs/latex/wx/tprint.tex
docs/latex/wx/ttreectl.tex
docs/latex/wx/wx.hpj
docs/latex/wx/wxPython.tex
include/wx/generic/dcpsg.h
include/wx/prntbase.h
samples/controls/controls.cpp
samples/printing/makefile.dos
samples/resource/makefile.dos
samples/toolbar/test.cpp
samples/validate/validate.def
src/common/event.cpp
src/common/prntbase.cpp
src/common/tbarsmpl.cpp
src/common/valtext.cpp
src/generic/choicdgg.cpp
src/generic/dcpsg.cpp
src/generic/prntdlgg.cpp
src/generic/textdlgg.cpp
src/gtk/data.cpp
src/gtk1/data.cpp
src/mac/carbon/data.cpp
src/mac/data.cpp
src/motif/data.cpp
src/msw/app.cpp
src/msw/button.cpp
src/msw/control.cpp
src/msw/data.cpp
src/msw/dialog.cpp
src/msw/makefile.dos
src/msw/mdi.cpp
src/msw/radiobox.cpp
src/msw/tbar95.cpp
src/msw/tbarmsw.cpp
src/msw/textctrl.cpp
src/msw/window.cpp
src/stubs/data.cpp

index a9044b7132fd86a7e15fe8792fd85e411475dc88..b8833be0e6c6171a1538bfd621ad21a32698fc24 100644 (file)
@@ -131,18 +131,17 @@ otherwise.
 
 \helpref{wxApp::SetExitOnDelete}{wxappsetexitondelete}
 
-\membersection{wxApp::GetPrintMode}\label{wxappgetprintmode}
-
-\constfunc{bool}{GetPrintMode}{\void}
-
-Returns the print mode: see \helpref{wxApp::SetPrintMode}{wxappsetprintmode}.
-
 \membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
 
 \constfunc{wxWindow *}{GetTopWindow}{\void}
 
 Returns a pointer to the top window.
 
+\wxheading{Remarks}
+
+If the top window hasn't been set using \helpref{wxApp::SetTopWindow}{wxappsettopwindow}, this
+function will find the first top-level window (frame or dialog) and return that.
+
 \wxheading{See also}
 
 \helpref{wxApp::SetTopWindow}{wxappsettopwindow}
@@ -271,7 +270,7 @@ Under Windows, OnEndSession is called in response to the WM\_ENDSESSION message.
 \func{bool}{OnInit}{\void}
 
 This must be provided by the application, and will usually create the
-application's main window, calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
+application's main window, optionally calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
 
 Return TRUE to continue processing, FALSE to exit the application.
 
@@ -423,31 +422,16 @@ deleted. If FALSE, the application will continue to run.}
 
 Currently, setting this to FALSE only has an effect under Windows.
 
-\membersection{wxApp::SetPrintMode}\label{wxappsetprintmode}
-
-\func{void}{SetPrintMode}{\param{int}{ mode}}
-
-Sets the print mode determining what printing facilities will be
-used by the printing framework.
-
-\wxheading{Parameters}
-
-\docparam{mode}{This can be one of:
-
-\begin{twocollist}\itemsep=0pt
-\twocolitem{{\bf wxPRINT\_WINDOWS}}{Under Windows, use Windows printing (wxPrinterDC). This is the
-default under Windows.}
-\twocolitem{{\bf wxPRINT\_POSTSCRIPT}}{Use PostScript printing (wxPostScriptDC). This is the
-default for non-Windows platforms.}
-\end{twocollist}
-}%
-
 \membersection{wxApp::SetTopWindow}\label{wxappsettopwindow}
 
 \func{void}{SetTopWindow}{\param{wxWindow* }{window}}
 
-Sets the `top' window. You should normally call this from within \helpref{wxApp::OnInit}{wxapponinit} to
-let wxWindows know which is the main window.
+Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to
+let wxWindows know which is the main window. You don't have to set the top window;
+it's only a convenience so that (for example) certain dialogs without parents can use a
+specific window as the top window. If no top window is specified by the application,
+wxWindows just uses the first frame or dialog in its top-level window list, when it
+needs to use the top window.
 
 \wxheading{Parameters}
 
index e41d6102ed304bfb19dd21cf8cb425b8d076facd..ab2cd027887c73e0ee6082074d53610c1908162b 100644 (file)
@@ -3,11 +3,11 @@
 wxArrayString is an efficient container for storing 
 \helpref{wxString}{wxstring} objects. It has the same features as all 
 \helpref{wxArray}{wxarray} classes, i.e. it dynamically expands when new items
-are added to it (so it is as easy to sue as a linked list), but the access
-time to the elements is constant (instead of being linear in number of
-elements as in the case of linked lists). It is also very size efficient and
-doesn't take more space than a C array {\it wxString[]} type (wxArrayString
-uses its knowledge of internals of wxString class to achieve this).
+are added to it (so it is as easy to use as a linked list), but the access
+time to the elements is constantinstead of being linear in number of
+elements as in the case of linked lists. It is also very size efficient and
+doesn't take more space than a C array {\it wxString[]} typewxArrayString
+uses its knowledge of internals of wxString class to achieve this.
 
 This class is used in the same way as other dynamic \helpref{arrays}{wxarray},
 except that no {\it WX\_DEFINE\_ARRAY} declaration is needed for it. When a
@@ -29,7 +29,7 @@ array elements may be modified in place like this
 Finally, none of the methods of this class is virtual including its
 destructor, so this class should not be derived from.
 
-\wxheading{Specialization of}
+\wxheading{Derived from}
 
 Although this is not true strictly speaking, this class may be considered as a
 specialization of \helpref{wxArray}{wxarray} class for the wxString member
@@ -42,8 +42,7 @@ functions.
 
 \wxheading{See also}
 
-\helpref{wxArray}{wxarray}, \helpref{wxString}{wxstring}, \helpref{wxString
-overview}{wxstringoverview}
+\helpref{wxArray}{wxarray}, \helpref{wxString}{wxstring}, \helpref{wxString overview}{wxstringoverview}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
@@ -224,10 +223,11 @@ wxString\&} parameters and returning {\it int} value less than, equal to or
 greater than 0 if the first string is less than, equal to or greater than the
 second one.
 
-Example: sorting strings by their length:
+\wxheading{Example}
 
-\begin{verbatim}
+The following example sorts strings by their length.
 
+\begin{verbatim}
 static int CompareStringLen(const wxString& first, const wxString& second)
 {
     return first.length() - second.length();
@@ -243,7 +243,7 @@ array.Add("three");
 array.Add("four");
 
 array.Sort(CompareStringLen);
-
 \end{verbatim}
 
 See also: \helpref{Sort}{wxarraystringsort}
+
index 969a942309487086496c3782178fd4ca96a2badd..b46abf0a3800e04b73c677c96be411f7e793f382 100644 (file)
@@ -11,16 +11,17 @@ headerRule = yes
 footerRule = yes
 useHeadingStyles = yes
 listItemIndent=40
-generateHPJ = no
+generateHPJ = yes
 htmlBrowseButtons = bitmap
 winHelpContents = yes
-winHelpVersion = 4 ; 3 for Windows 3.x, 4 for Windows 95
+winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
 winHelpTitle = "wxWindows Manual"
 truncateFilenames = yes
 combineSubSections = yes
-\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
-\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
-\sethotspotcolour{on}\sethotspotunderline{on}}
+;\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
+;\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
+;\sethotspotcolour{on}\sethotspotunderline{on}}
+\overview [2] {\helpref{#1}{#2}}
 \docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}}
 \wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}}
 \const [0] {{\bf const}}
index 3c667e54230f935f30a48372238ea1c4df2f8b9b..f90cd6b23501201c0cb722593cea5e4dd9c5e962 100644 (file)
@@ -7,10 +7,10 @@ and others right to left, character encoding may differ and many other things
 may need changing too), it is a necessary first step. wxWindows provides
 facilities for the messages translation with its 
 \helpref{wxLocale}{wxlocale} class and is itself fully translated into several
-languages (please consult wxWindows home page for the most up-to-date
-translations - and if you may translate it in one of the languages not done
+languages. Please consult wxWindows home page for the most up-to-date
+translations - and if you translate it into one of the languages not done
 yet, your translations would be gratefully accepted for inclusion into the
-future versions of the library!).
+future versions of the library!
 
 The wxWindows approach to i18n closely follows GNU gettext package. wxWindows uses the
 message catalogs which are binary compatible with gettext catalogs and this
@@ -18,7 +18,7 @@ allows to use all of the programs in this package to work with them. But note
 that no additional libraries are needed during the run-time, however, so you
 have only the message catalogs to distribute and nothing else.
 
-However, during the program development you will need the gettext package for
+During program development you will need the gettext package for
 working with message catalogs. {\bf Warning:} gettext versions < 0.10 are known
 to be buggy, so you should find a later version of it!
 
@@ -30,25 +30,22 @@ Only the binary files are needed during program execution.
 The program i18n involves several steps:
 
 \begin{enumerate}\itemsep=0pt
-
 \item Translating the strings in the program text using 
 \helpref{wxGetTranslation}{wxgettranslation} or equivalently the \_() macro.
-
 \item Extracting the strings to be translated from the program: this uses the
 work done in the previous step because {\it xgettext} program used for string
-extraction may be told (using its -k option) to reckognize \_() and
+extraction may be told (using its -k option) to recognise \_() and
 wxGetTranslation and extract all strings inside the calls to these functions.
 Alternatively, you may use -a option to extract all the strings, but it will
 usually result in many strings being found which don't have to be translated at
 all. This will create a text message catalog - a .po file.
-
 \item Translating the strings extracted in the previous step to other
 language(s). It involves editing the .po file.
-
 \item Compiling the .po file into .mo file to be used by the program.
-
 \item Setting the appropriate locale in your program to use the strings for the
 given language: see \helpref{wxLocale}{wxlocale}.
-
 \end{enumerate}
 
+See also the GNU gettext documentation linked from {\tt docs/html/index.htm} in
+your wxWindows distribution.
+
index b6f031cc26a50bdc50a72127ba44e467feda785b..6588e312c40f97b332fb039e8e2e795cc1034862 100644 (file)
@@ -56,4 +56,3 @@ please look at the printout sample code.
     }
 \end{verbatim}
 
-
index 43adf1b8915a3e270de18ac06a60ecf88e4d83c2..7c30c800b082b491a652e82d0357c57f0cc76d6e 100644 (file)
@@ -62,7 +62,7 @@ only thing to remember is that the {\it cookie} passed to
 \helpref{GetNextChild}{wxtreectrlgetnextchild} should be the same variable (and
 that nothing should be done with it by the user code).
 
-Among other functionalities of the tree control are: item sorting with 
+Among other features of the tree control are: item sorting with 
 \helpref{SortChildren}{wxtreectrlsortchildren} which uses the user-defined comparison
 function \helpref{OnCompareItems}{wxtreectrloncompareitems} (by default the
 comparison is the alphabetic comparison of tree labels), hit testing
@@ -75,5 +75,6 @@ Finally, the tree control has a keyboard interface: the cursor navigation (arrow
 may be used to change the current selection. <HOME> and <END> are used to go to
 the first/last sibling of the current item. '+', '-' and '*' expand, collapse
 and toggle the current branch. Note, however, that <DEL> and <INS> keys do
-nothing by default, but it is custom to associate them with deleting item from
-a tree and inserting a new one in it.
+nothing by default, but it is usual to associate them with deleting item from
+a tree and inserting a new one into it.
+
index 03b31643a97fb3411ef013533ce70b0bfe8e430c..b97b7aa3b23db06f8e0664edabcbd124945f593b 100644 (file)
@@ -1,14 +1,8 @@
-; This file is maintained by HCW. Do not modify this file directly.
-
-
 [OPTIONS]
-COMPRESS=60 Hall Zeck
-LCID=0x409 0x0 0x0 ; English (United States)
-REPORT=Yes
-CONTENTS=Contents
+BMROOT=d:\wx2\wxwind~1\docs/latex/wx ; Assume that bitmaps are where the source is
 TITLE=wxWindows Manual
-BMROOT=.
-HLP=wx.hlp
+CONTENTS=Contents
+COMPRESS=HIGH
 
 [FILES]
 wx.rtf
@@ -16,3 +10,8 @@ wx.rtf
 [CONFIG]
 CreateButton("Up", "&Up", "JumpId(`wx.hlp', `Contents')")
 BrowseButtons()
+
+[MAP]
+
+[BITMAPS]
+
index f713998c85d1938a6b6aa56e493ecb0557aa86b2..7561ae8d3d0fe9c5e53f3f1d10ddf1a277d1ed5a 100644 (file)
@@ -3,15 +3,17 @@
 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
+This addendum is written by Robin Dunn, author of the wxPython wrapper
+
 %----------------------------------------------------------------------
 \section{What is wxPython?}\label{wxpwhat}
 
-wxPython is a blending of the wxWindows GUI classes and the
+wxPython is a blending of the wxWindows GUI classes and the 
 \urlref{Python}{http://www.python.org/} programming language.
 
 \wxheading{Python}
 
-So what is Python?  Go to
+So what is Python?  Go to 
 \urlref{http://www.python.org}{http://www.python.org}
 to learn more, but in a nutshell Python is an interpreted,
 interactive, object-oriented programming language. It is often
@@ -43,18 +45,17 @@ applications, or in situations where Python is embedded in a C++
 application as an internal scripting or macro language.
 
 Currently wxPython is available for Win32 platforms and the GTK
-toolkit (wxGTK) on most *nix/X-windows platforms.  The effort to
-enable wxPython for wxMotif will begin shortly.  See \helpref{Building
-Python}{wxpbuild} for details about getting wxPython working for you.
+toolkit (wxGTK) on most Unix/X-windows platforms.  The effort to
+enable wxPython for wxMotif will begin shortly.  See \helpref{Building Python}{wxpbuild} for
+details about getting wxPython working for you.
 
 
 %----------------------------------------------------------------------
 \section{Why use wxPython?}\label{wxpwhy}
 
-
 So why would you want to use wxPython over just C++ and wxWindows?
-Personally I prefer using Python for everything.  I only use C++ when
-I absolutly have to eek more performance out of an algorithm, and even
+Personally I prefer using Python for everything. I only use C++ when
+I absolutely have to eek more performance out of an algorithm, and even
 then I ususally code it as an extension module and leave the majority
 of the program in Python.
 
@@ -66,7 +67,6 @@ application in a few hours with Python that would normally take a few
 days or longer with C++.  Converting a wxPython app to a C++/wxWindows app
 should be a straight forward task.
 
-
 %----------------------------------------------------------------------
 \section{Other Python GUIs}\label{wxpother}
 
@@ -118,7 +118,6 @@ cross-platform compatible.  See \urlref{this
 link}{http://www.python.org/download/Contributed.html\#Graphics}
 for a listing of a few of them.
 
-
 %----------------------------------------------------------------------
 \section{Building wxPython}\label{wxpbuild}
 
@@ -135,7 +134,7 @@ make won't attempt to build them from the .i files.
 I added a few minor features to SWIG to control some of the code
 generation.  If you want to play around with this the patches are in
 wxPython/SWIG.patches and they should be applied to the 1.1p5 version
-of SWIG.  These new patches are documented at
+of SWIG.  These new patches are documented at 
 \urlref{this site}{http://starship.skyport.net/crew/robind/python/\#swig},
 and they should also end up in the 1.2 version of SWIG.
 
@@ -146,10 +145,9 @@ should be named wxPython.)  You can control where the build process
 will dump wxPython by setting the \tt{TARGETDIR} makefile variable.
 The default is \tt{\$(WXWIN)/utils/wxPython}.  If you leave it here
 then you should add \tt{\$(WXWIN)/utils} to your \tt{PYTHONPATH}.
-However, you may prefer to use something that is already on your
+However, you may prefer to use something that is already on your 
 \tt{PYTHONPATH}, such as the \tt{site-packages} directory on Unix
- systems.
-
+systems.
 
 \wxheading{Win32}
 
@@ -163,34 +161,26 @@ specified below.
 \item Build wxWindows with \tt{wxUSE_RESOURCE_LOADING_IN_MSW} set to 1 in
 \tt{include/wx/msw/setup.h} so icons can be loaded dynamically.  While
 there, make sure \tt{wxUSE_OWNER_DRAWN} is also set to 1.
-
 \item Change into the \tt{\$(WXWIN)/utils/wxPython/src} directory.
-
 \item Edit makefile.vc and specify where your python installation is at.
 You may also want to fiddle with the \tt{TARGETDIR} variable as described
 above.
-
 \item Run \tt{nmake -f makefile.vc}
-
 \item If it builds successfully, congratulations!  Move on to the next
 step.  If not then you can try mailing the wxwin-developers list for
-help.  Also, I will always have a pre-built win32 version of this extension module at
+help.  Also, I will always have a pre-built win32 version of this extension module at 
 \urlref{http://alldunn.com/wxPython}{http://alldunn.com/wxPython}.
-
 \item Change to the \tt{\$(WXWIN)/utils/wxPython/tests} directory.
-
 \item Try executing the test programs.  Note that some of these print
 diagnositc or test info to standard output, so they will require the
 console version of python.  For example:
 
-    \tt{python test1.py}
+\tt{python test1.py}
 
 To run them without requiring a console, you can use the \tt{pythonw.exe}
 version of Python either from the command line or from a shortcut.
-
 \end{enumerate}
 
-
 \wxheading{Unix}
 
 These directions assume that you have already successfully built
@@ -203,29 +193,23 @@ with the development libraries, etc. that you will need to install.
 
 \begin{enumerate}\itemsep=0pt
 \item Change into the \tt{\$(WXWIN)/utils/wxPython/src} directory.
-
 \item Edit \tt{Setup.in} and ensure that the flags, directories, and toolkit
 options are correct, (hopefully this will be done by \tt{configure}
 soon.)  See the above commentary about \tt{TARGETDIR}.  There are a
 few sample Setup.in.[platform] files provided.
-
 \item Run this command to generate a makefile:
 
-    \tt{make -f Makefile.pre.in boot}
+\tt{make -f Makefile.pre.in boot}
 
-\item Once you have the \tt{Makefile}, run \bftt{make} to build and then
+\item Once you have the \tt{Makefile}, run \bftt{make} to build and then 
 \bftt{make install} to install the wxPython extension module.
-
 \item Change to the \tt{\$(WXWIN)/utils/wxPython/tests} directory.
-
 \item Try executing the test programs.  For example:
 
-    \tt{python test1.py}
-
+\tt{python test1.py}
 \end{enumerate}
 
 
-
 %----------------------------------------------------------------------
 \section{Using wxPython}\label{wxpusing}
 
@@ -325,13 +309,14 @@ it by issuing this command:
 \end{verbatim}
 \hrule
 
-\wxheading{Things to notice:}\begin{enumerate}\itemsep=0pt
+\wxheading{Things to notice}
+
+\begin{enumerate}\itemsep=0pt
 \item At line 2 the wxPython classes, constants, and etc. are imported
 into the current module's namespace.  If you prefer to reduce
 namespace polution you can use "\tt{from wxPython import wx}" and
 then access all the wxPython identifiers through the wx module, for
 example, "\tt{wx.wxFrame}".
-
 \item At line 13 the frame's sizing and moving events are connected to
 methods of the class.  These helper functions are intended to be like
 the event table macros that wxWindows employs.  But since static event
@@ -339,20 +324,17 @@ tables are impossible with wxPython, we use helpers that are named the
 same to dynamically build the table.  The only real difference is
 that the first arguemnt to the event helpers is always the window that
 the event table entry should be added to.
-
-\item Notice the use of \tt{wxDLG_PNT} and \tt{wxDLG_SZE} in lines 19
+\item Notice the use of \tt{wxDLG\_PNT} and \tt{wxDLG\_SZE} in lines 19
 - 29 to convert from dialog units to pixels.  These helpers are unique
 to wxPython since Python can't do method overloading like C++.
-
 \item There is an \tt{OnCloseWindow} method at line 34 but no call to
-EVT_CLOSE to attach the event to the method.  Does it really get
-called?  The answer is, yes it does.  This is because many of the
+EVT\_CLOSE to attach the event to the method.  Does it really get
+called?  The answer is, yes it does.  This is because many of the 
 \em{standard} events are attached to windows that have the associated
 \em{standard} method names.  I have tried to follow the lead of the
 C++ classes in this area to determine what is \em{standard} but since
 that changes from time to time I can make no guarentees, nor will it
-be fully documented.  When in doubt, use an EVT_*** function.
-
+be fully documented.  When in doubt, use an EVT\_*** function.
 \item At lines 17 to 21 notice that there are no saved references to
 the panel or the static text items that are created.  Those of you
 who know Python might be wondering what happens when Python deletes
@@ -361,16 +343,14 @@ don't.  Remember that in wxPython the Python objects are just shadows of the
 coresponding C++ objects.  Once the C++ windows and controls are
 attached to their parents, the parents manage them and delete them
 when necessary.  For this reason, most wxPython objects do not need to
-have a __del__ method that explicitly causes the C++ object to be
+have a \_\_del\_\_ method that explicitly causes the C++ object to be
 deleted.  If you ever have the need to forcibly delete a window, use
 the Destroy() method as shown on line 36.
-
 \item Just like wxWindows in C++, wxPython apps need to create a class
-derived from \tt{wxApp} (line 56) that implements a method named
+derived from \tt{wxApp} (line 56) that implements a method named 
 \tt{OnInit}, (line 59.) This method should create the application's
 main window (line 62) and use \tt{wxApp.SetTopWindow()} (line 66) to
 inform wxWindows about it.
-
 \item And finally, at line 72 an instance of the application class is
 created.  At this point wxPython finishes initializing itself, and calls
 the \tt{OnInit} method to get things started.  (The zero parameter here is
@@ -378,11 +358,8 @@ a flag for functionality that isn't quite implemented yet.  Just
 ignore it for now.)  The call to \tt{MainLoop} at line 73 starts the event
 loop which continues until the application terminates or all the top
 level windows are closed.
-
 \end{enumerate}
 
-
-
 %----------------------------------------------------------------------
 \section{wxWindows classes implemented in wxPython}\label{wxpclasses}
 
@@ -520,7 +497,7 @@ as possible to the C++ spec over time.
 \section{Where to go for help}\label{wxphelp}
 
 Since wxPython is a blending of multiple technologies, help comes from
-multiple sources.  See
+multiple sources. See 
 \urlref{http://alldunn.com/wxPython}{http://alldunn.com/wxPython} for details on
 various sources of help, but probably the best source is the
 wxPython-users mail list.  You can view the archive or subscribe by
@@ -532,8 +509,3 @@ Or you can send mail directly to the list using this address:
 
 wxpython-users@starship.python.net
 
-
-
-
-
-
index b52b60fd1a50b72323b18ef137eea9103cd74897..c8704dab2795324e76c60adf57a0b6f3f6fdf004 100644 (file)
@@ -267,46 +267,6 @@ private:
 WXDLLEXPORT_DATA(extern wxPrintSetupData*) wxThePrintSetupData;
 WXDLLEXPORT extern void wxInitializePrintSetupData(bool init = TRUE);
 
-/*
- * Again, this only really needed for non-Windows platforms
- * or if you want to test the PostScript printing under Windows.
- */
-
-class WXDLLEXPORT wxPrintPaperType: public wxObject
-{
-public:
-    wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
-    ~wxPrintPaperType();
-
-public:
-    int widthMM;
-    int heightMM;
-    int widthPixels;
-    int heightPixels;
-    char *pageName;
-
-private:
-    DECLARE_DYNAMIC_CLASS(wxPrintPaperType)
-};
-
-class WXDLLEXPORT wxPrintPaperDatabase: public wxList
-{
-public:
-    wxPrintPaperDatabase();
-    ~wxPrintPaperDatabase();
-
-    void CreateDatabase();
-    void ClearDatabase();
-
-    void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
-    wxPrintPaperType *FindPaperType(const char *name);
-
-private:
-    DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase)
-};
-
-WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase;
-
 #endif
     // wxUSE_POSTSCRIPT
 
index c147a654973c0e4efe77ba0bf30ca9ba2cf5d528..6861da9218fa9253a0c95f1aeb2ea768c38df9af 100644 (file)
@@ -340,5 +340,47 @@ public:
   DECLARE_EVENT_TABLE()
 };
 
+/*
+ * Again, this only really needed for non-Windows platforms
+ * or if you want to test the PostScript printing under Windows,
+ * or if you're using the generic page setup dialog under e.g. Win16.
+ */
+
+class WXDLLEXPORT wxPrintPaperType: public wxObject
+{
+public:
+    wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
+    ~wxPrintPaperType();
+
+public:
+    int widthMM;
+    int heightMM;
+    int widthPixels;
+    int heightPixels;
+    char *pageName;
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxPrintPaperType)
+};
+
+class WXDLLEXPORT wxPrintPaperDatabase: public wxList
+{
+public:
+    wxPrintPaperDatabase();
+    ~wxPrintPaperDatabase();
+
+    void CreateDatabase();
+    void ClearDatabase();
+
+    void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
+    wxPrintPaperType *FindPaperType(const char *name);
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase)
+};
+
+WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase;
+
+
 #endif
     // _WX_PRNTBASEH__
index 6a45c6ac39d3116b5749727a0a8f0acfd87f8407..4b77d0f7b7700c2b4c82f2f44fdfdfa065e0a3c5 100644 (file)
@@ -95,7 +95,9 @@ public:
     void OnSetFont( wxCommandEvent &event );
     void OnPageChanged( wxNotebookEvent &event );
     void OnSliderUpdate( wxCommandEvent &event );
+#ifndef __WIN16__
     void OnSpinUpdate( wxSpinEvent &event );
+#endif
     void OnPasteFromClipboard( wxCommandEvent &event );
     void OnCopyToClipboard( wxCommandEvent &event );
     void OnMoveToEndOfText( wxCommandEvent &event );
@@ -108,7 +110,9 @@ public:
     wxGauge       *m_gauge;
     wxSlider      *m_slider;
     wxButton      *m_fontButton;
+#ifndef __WIN16__
     wxSpinButton  *m_spinbutton;
+#endif
     wxTextCtrl    *m_spintext;
     MyTextCtrl    *m_multitext;
     MyTextCtrl    *m_textentry;
@@ -336,7 +340,9 @@ EVT_BUTTON    (ID_RADIOBOX_FONT,        MyPanel::OnRadioButtons)
 EVT_CHECKBOX  (ID_RADIOBOX_ENABLE,      MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_SET_FONT,             MyPanel::OnSetFont)
 EVT_SLIDER    (ID_SLIDER,               MyPanel::OnSliderUpdate)
+#ifndef __WIN16__
 EVT_SPIN      (ID_SPIN,                 MyPanel::OnSpinUpdate)
+#endif
 EVT_BUTTON    (ID_PASTE_TEXT,           MyPanel::OnPasteFromClipboard)
 EVT_BUTTON    (ID_COPY_TEXT,            MyPanel::OnCopyToClipboard)
 EVT_BUTTON    (ID_MOVE_END_ZONE,        MyPanel::OnMoveToEndOfText)
@@ -541,8 +547,10 @@ m_text(NULL), m_notebook(NULL)
                           );
 #endif
     m_spintext = new wxTextCtrl( panel, -1, "0", wxPoint(20,160), wxSize(80,-1) );
+#ifndef __WIN16__
     m_spinbutton = new wxSpinButton( panel, ID_SPIN, wxPoint(103,159), wxSize(-1,-1) );
     m_spinbutton->SetRange(0,100);
+#endif
     m_notebook->AddPage(panel, "wxGauge", FALSE, Image_Gauge);
 }
 
@@ -873,12 +881,14 @@ void MyPanel::OnSliderUpdate( wxCommandEvent &WXUNUSED(event) )
     m_gauge->SetValue( m_slider->GetValue() );
 }
 
+#ifndef __WIN16__
 void MyPanel::OnSpinUpdate( wxSpinEvent &event )
 {
     wxString value;
     value.sprintf( "%d", (int)event.GetPosition() );
     m_spintext->SetValue( value );
 }
+#endif
 
 MyPanel::~MyPanel()
 {
index 7269a3224237e11ae744e148e38e7baa81f0c768..14946d6b93afbe0b836a80923d42cab77a10ba37 100644 (file)
@@ -1,88 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds printing example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
-# info.
+# info
 
-# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\printing
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-DUMMY=$(WXDIR)\src\msw\dummy.obj
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-DEBUGFLAG=#/DDEBUG=1
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(DEBUGFLAG) /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-LINKFLAGS=/NOD /NOE /CO /ONERROR:NOEXE /SEG:256
-!else
-CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256
-!endif
-
-HEADERS = printing.h
-SOURCES = printing.$(SRCSUFF)
-OBJECTS = printing.obj
-
-printing:    printing.exe
-
-all:    wx printing.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-printing.exe:      $(DUMMY) $(WXLIB) printing.obj printing.def printing.res
-        link $(LINKFLAGS) @<<
-$(DUMMY) printing.obj,
-printing,
-NUL,
-$(LIBS),
-printing.def
-;
-<<
-        rc -31 -K printing.res
-
-printing.obj:      printing.h printing.$(SRCSUFF) $(DUMMY) $(WXDIR)\include\base\wx_print.h
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-printing.res :      printing.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa printing
-
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
+TARGET=printing
+OBJECTS=$(TARGET).obj
 
+!include $(WXDIR)\src\makeprog.msc
 
index 6096ca810ce52c1e4c2a975b8e80afcd30657539..351562fe3cee8746edd78a5780b9110fa546866c 100644 (file)
@@ -1,86 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds resource example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
-# info.
+# info
 
-# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\resource
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-DUMMY=$(WXDIR)\src\msw\dummy.obj
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256
-!else
-CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256
-!endif
-
-HEADERS = resource.h
-SOURCES = resource.$(SRCSUFF)
-OBJECTS = resource.obj
-
-resource:    resource.exe
-
-all:    wx resource.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-resource.exe:      $(DUMMY) $(WXLIB) resource.obj resource.def resource.res
-        link $(LINKFLAGS) @<<
-$(DUMMY) resource.obj,
-resource,
-NUL,
-$(LIBS),
-resource.def
-;
-<<
-        rc -31 -K resource.res
-
-resource.obj:      resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=resource
+OBJECTS=$(TARGET).obj
 
-resource.res :      resource.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 5758c9f800d0dffae96a98251d03dbbb8ff489d4..889c478a13418478cbd4b657fb8dcdad13dba792 100644 (file)
@@ -70,7 +70,7 @@ bool MyApp::OnInit(void)
   frame->SetMenuBar(menuBar);
 
   // Create the toolbar
-  frame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT|wxTB_DOCKABLE, ID_TOOLBAR);
+  frame->CreateToolBar(wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT|wxTB_DOCKABLE, ID_TOOLBAR);
   
   frame->GetToolBar()->SetMargins( 2, 2 );
 
index f49fa9473e29b9420e290a077e2210a706d91a9e..e4d87cc7df2f695a8920d072454197369ddef7b8 100644 (file)
@@ -1,4 +1,3 @@
-      *   Last change:  JS   13 Mar 97    5:02 pm
 NAME         Events
 DESCRIPTION  'Event tester'
 EXETYPE      WINDOWS
index 2b596a135e091b0ddedbb025c0600843eb5c1180..713c0fdac6b0948d0bc557c97cc203f628c91af8 100644 (file)
@@ -429,7 +429,6 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
     }
     return FALSE;
 }
-
 void wxEvtHandler::Connect( int id, int lastId,
                             wxEventType eventType,
                             wxObjectEventFunction func,
index 23e49e721e0e8040c8125a9b15813afe8609f881..c85848e897e0e93322c1ef8ded469fe451fa8f14 100644 (file)
@@ -39,6 +39,7 @@
 #include "wx/prntbase.h"
 #include "wx/dcprint.h"
 #include "wx/printdlg.h"
+#include "wx/module.h"
 
 #include <stdlib.h>
 #include <string.h>
@@ -66,6 +67,7 @@ IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
 IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow)
 IMPLEMENT_CLASS(wxPreviewFrame, wxFrame)
 IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
 
 BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog)
        EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel)
@@ -758,3 +760,121 @@ void wxPrintPreviewBase::SetZoom(int percent)
     m_previewCanvas->Refresh();
   }
 }
+
+/*
+ * Paper size database for PostScript or where the generic page setup dialog is
+ * needed
+ */
+
+wxPrintPaperType::wxPrintPaperType(const char *name, int wmm, int hmm, int wp, int hp)
+{
+  widthMM = wmm;
+  heightMM = hmm;
+  widthPixels = wp;
+  heightPixels = hp;
+  pageName = copystring(name);
+}
+
+wxPrintPaperType::~wxPrintPaperType()
+{
+  delete[] pageName;
+}
+
+/*
+ * Print paper database for PostScript
+ */
+
+wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase*) NULL;
+
+#if !USE_SHARED_LIBRARIES
+IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
+#endif
+
+wxPrintPaperDatabase::wxPrintPaperDatabase():wxList(wxKEY_STRING)
+{
+  DeleteContents(TRUE);
+}
+
+wxPrintPaperDatabase::~wxPrintPaperDatabase()
+{
+}
+
+void wxPrintPaperDatabase::CreateDatabase()
+{
+  // Need correct values for page size in pixels.
+  // Each unit is one 'point' = 1/72 of an inch.
+  // NOTE: WE NEED ALSO TO MAKE ADJUSTMENTS WHEN TRANSLATING
+  // in wxPostScriptDC code, so we can start from top left.
+  // So access this database and translate by appropriate number
+  // of points for this paper size. OR IS IT OK ALREADY?
+  // Can't remember where the PostScript origin is by default.
+  // Heck, someone will know how to make it hunky-dory...
+  // JACS 25/5/95
+
+  AddPaperType(_("A4 210 x 297 mm"), 210, 297,         595, 842);
+  AddPaperType(_("A3 297 x 420 mm"), 297, 420,         842, 1191);
+  AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279,    612, 791);
+  AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356,     612, 1009);
+  
+/*
+  This is for 100 ppi
+
+  AddPaperType(_("A4 210 x 297 mm"), 210, 297,         210*4, 297*4 );
+  AddPaperType(_("A3 297 x 420 mm"), 297, 420,         297*4, 420*4 );
+  AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279,    216*4, 279*4 );
+  AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356,     216*4, 356*4 );
+*/
+}
+
+void wxPrintPaperDatabase::ClearDatabase()
+{
+  Clear();
+}
+
+void wxPrintPaperDatabase::AddPaperType(const char *name, int wmm, int hmm, int wp, int hp)
+{
+  Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp));
+}
+
+wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name)
+{
+  wxNode *node = Find(name);
+  if (node)
+    return (wxPrintPaperType *)node->Data();
+  else
+    return (wxPrintPaperType *) NULL;
+}
+
+// A module to allow initialization/cleanup of print paper
+// things without calling these functions from app.cpp.
+
+class WXDLLEXPORT wxPrintBaseModule: public wxModule
+{
+DECLARE_DYNAMIC_CLASS(wxPrintBaseModule)
+public:
+    wxPrintBaseModule() {}
+    bool OnInit();
+    void OnExit();
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxPrintBaseModule, wxModule)
+
+/*
+ * Initialization/cleanup module
+ */
+
+bool wxPrintBaseModule::OnInit()
+{
+    wxThePrintPaperDatabase = new wxPrintPaperDatabase;
+    wxThePrintPaperDatabase->CreateDatabase();
+
+    return TRUE;
+}
+
+void wxPrintBaseModule::OnExit()
+{
+    delete wxThePrintPaperDatabase;
+    wxThePrintPaperDatabase = NULL;
+}
+
+
index 0e1a739d299db287bc9a0f86f785abadbb181a4d..10d7117d601460c58d159a3626be861769727096 100644 (file)
@@ -66,6 +66,7 @@ bool wxToolBarSimple::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos
   m_yMargin = 0;
   m_toolPacking = 1;
   m_toolSeparation = 5;
+  SetCursor(*wxSTANDARD_CURSOR);
   
   return TRUE;
 }
index 259b201326f81b6295cd5ea2abb49879276bd3ad..d3fa339c47ff0443e4fbea7935ab20cc0ef81162 100644 (file)
@@ -134,7 +134,7 @@ bool wxTextValidator::Validate(wxWindow *parent)
 
     wxString val(control->GetValue());
 
-    bool ok = true;
+    bool ok = TRUE;
 
     // this format string should contian exactly one '%s'
     const char *errormsg = _("'%s' is invalid");
@@ -143,37 +143,37 @@ bool wxTextValidator::Validate(wxWindow *parent)
     {
         if ( !m_includeList.Member(val) )
         {
-            ok = false;
+            ok = FALSE;
         }
     }
     else if ( m_validatorStyle & wxFILTER_EXCLUDE_LIST )
     {
         if ( m_excludeList.Member(val) )
         {
-            ok = false;
+            ok = FALSE;
         }
     }
     else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
     {
-        ok = false;
+        ok = FALSE;
 
         errormsg = _("'%s' should only contain ASCII characters.");
     }
     else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
     {
-        ok = false;
+        ok = FALSE;
 
         errormsg = _("'%s' should only contain alphabetic characters.");
     }
     else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
     {
-        ok = false;
+        ok = FALSE;
 
         errormsg = _("'%s' should only contain alphabetic or numeric characters.");
     }
     else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val))
     {
-        ok = false;
+        ok = FALSE;
 
         errormsg = _("'%s' should be numeric.");
     }
index 4fd5d33454ee5a478165146ae37a5e7592e21761..46f8fdc3b90f094c324a029bc205c9ae13ed57a4 100644 (file)
@@ -203,7 +203,7 @@ IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
 
 wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
         int n, const wxString *choices, char **clientData, long style, const wxPoint& pos):
-         wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+         wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
 {
         Create(parent, message, caption, n, choices, clientData, style);
 }
index f592a769c82274f4324b9a050b8cbc5fc4f683fe..039151f007aaf95c44223ba3033976dfe4e6faff 100644 (file)
@@ -1837,10 +1837,8 @@ void wxPostScriptDC::GetSizeMM(long *width, long *height) const
 wxPrintSetupData *wxThePrintSetupData = (wxPrintSetupData *) NULL;
 
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxPostScriptModule, wxModule)
 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC)
 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject)
-IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
 #endif
 
 // Redundant now I think
@@ -2338,86 +2336,19 @@ void wxInitializePrintSetupData(bool init)
   }
 }
 
-/*
- * Paper size database for PostScript
- */
-
-wxPrintPaperType::wxPrintPaperType(const char *name, int wmm, int hmm, int wp, int hp)
-{
-  widthMM = wmm;
-  heightMM = hmm;
-  widthPixels = wp;
-  heightPixels = hp;
-  pageName = copystring(name);
-}
-
-wxPrintPaperType::~wxPrintPaperType()
-{
-  delete[] pageName;
-}
-
-/*
- * Print paper database for PostScript
- */
-
-#if !USE_SHARED_LIBRARIES
-IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
-#endif
-
-wxPrintPaperDatabase::wxPrintPaperDatabase():wxList(wxKEY_STRING)
-{
-  DeleteContents(TRUE);
-}
-
-wxPrintPaperDatabase::~wxPrintPaperDatabase()
-{
-}
-
-void wxPrintPaperDatabase::CreateDatabase()
-{
-  // Need correct values for page size in pixels.
-  // Each unit is one 'point' = 1/72 of an inch.
-  // NOTE: WE NEED ALSO TO MAKE ADJUSTMENTS WHEN TRANSLATING
-  // in wxPostScriptDC code, so we can start from top left.
-  // So access this database and translate by appropriate number
-  // of points for this paper size. OR IS IT OK ALREADY?
-  // Can't remember where the PostScript origin is by default.
-  // Heck, someone will know how to make it hunky-dory...
-  // JACS 25/5/95
-
-  AddPaperType(_("A4 210 x 297 mm"), 210, 297,         595, 842);
-  AddPaperType(_("A3 297 x 420 mm"), 297, 420,         842, 1191);
-  AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279,    612, 791);
-  AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356,     612, 1009);
-  
-/*
-  This is for 100 ppi
-
-  AddPaperType(_("A4 210 x 297 mm"), 210, 297,         210*4, 297*4 );
-  AddPaperType(_("A3 297 x 420 mm"), 297, 420,         297*4, 420*4 );
-  AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279,    216*4, 279*4 );
-  AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356,     216*4, 356*4 );
-*/
-}
+// A module to allow initialization/cleanup of PostScript-related
+// things without calling these functions from app.cpp.
 
-void wxPrintPaperDatabase::ClearDatabase()
+class WXDLLEXPORT wxPostScriptModule: public wxModule
 {
-  Clear();
-}
-
-void wxPrintPaperDatabase::AddPaperType(const char *name, int wmm, int hmm, int wp, int hp)
-{
-  Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp));
-}
+DECLARE_DYNAMIC_CLASS(wxPostScriptModule)
+public:
+    wxPostScriptModule() {}
+    bool OnInit();
+    void OnExit();
+};
 
-wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name)
-{
-  wxNode *node = Find(name);
-  if (node)
-    return (wxPrintPaperType *)node->Data();
-  else
-    return (wxPrintPaperType *) NULL;
-}
+IMPLEMENT_DYNAMIC_CLASS(wxPostScriptModule, wxModule)
 
 /*
  * Initialization/cleanup module
@@ -2426,8 +2357,6 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name)
 bool wxPostScriptModule::OnInit()
 {
     wxInitializePrintSetupData();
-    wxThePrintPaperDatabase = new wxPrintPaperDatabase;
-    wxThePrintPaperDatabase->CreateDatabase();
 
     return TRUE;
 }
@@ -2435,8 +2364,6 @@ bool wxPostScriptModule::OnInit()
 void wxPostScriptModule::OnExit()
 {
     wxInitializePrintSetupData(FALSE);
-    delete wxThePrintPaperDatabase;
-    wxThePrintPaperDatabase = NULL;
 }
 
 #endif
index 1e9e94156f032ad3bf3671a01581e76f7ca22e88..b1ff434de5cb718bd0b0cd53b92cc625b2f2af8f 100644 (file)
 #endif
 
 #include "wx/generic/prntdlgg.h"
+
+#if wxUSE_POSTSCRIPT
 #include "wx/generic/dcpsg.h"
+#endif
+
 #include "wx/printdlg.h"
 
+// For print paper things
+#include "wx/prntbase.h"
+
 #include <stdlib.h>
 #include <string.h>
 
+#if wxUSE_POSTSCRIPT
+
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
 IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
@@ -69,7 +78,7 @@ extern wxPrintPaperDatabase *wxThePrintPaperDatabase;
 
 
 wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
-  wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+  wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
 {
   if ( data )
     printData = *data;
@@ -274,7 +283,7 @@ wxDC *wxGenericPrintDialog::GetPrintDC(void)
  */
 
 wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data):
-  wxDialog(parent, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+  wxDialog(parent, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
 {
   if ( data )
     printData = *data;
@@ -408,6 +417,8 @@ wxChoice *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y)
   choice->SetSelection(sel);
   return choice;
 }
+#endif
+  // wxUSE_POSTSCRIPT
 
 /*
  * Generic page setup dialog
@@ -429,33 +440,10 @@ void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event))
     printDialog->ShowModal();
 
     printDialog->Destroy();
-
-#if 0
-  if (wxTheApp->GetPrintMode() == wxPRINT_POSTSCRIPT)
-  {
-    wxGenericPrintSetupDialog *genericPrintSetupDialog =
-          new wxGenericPrintSetupDialog(this, wxThePrintSetupData);
-    int ret = genericPrintSetupDialog->ShowModal();
-    if (ret == wxID_OK)
-      *wxThePrintSetupData = genericPrintSetupDialog->GetPrintData();
-
-    genericPrintSetupDialog->Close(TRUE);
-  }
-#ifdef __WXMSW__
-  else
-  {
-    wxPrintData data;
-    data.SetSetupDialog(TRUE);
-    wxPrintDialog printDialog(this, & data);
-    printDialog.ShowModal();
-  }
-#endif
-#endif
-  // 0
 }
 
 wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data):
-  wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE)
+  wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL)
 {
   if ( data )
     pageData = *data;
@@ -583,12 +571,16 @@ bool wxGenericPageSetupDialog::TransferDataFromWindow(void)
     int sel = orientationRadioBox->GetSelection();
     if (sel == 0)
     {
+#if wxUSE_POSTSCRIPT
       wxThePrintSetupData->SetPrinterOrientation(wxPORTRAIT);
+#endif
       pageData.SetOrientation(wxPORTRAIT);
     }
     else
     {
+#if wxUSE_POSTSCRIPT
       wxThePrintSetupData->SetPrinterOrientation(wxLANDSCAPE);
+#endif
       pageData.SetOrientation(wxLANDSCAPE);
     }
   }
index d4ce2cdc1df82854c28e93b0f8c7c34d02b6f62e..aca40ee5d9cc4d5348909f641afa874e2921f5be 100644 (file)
@@ -79,7 +79,7 @@ static void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *
 
 wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption,
         const wxString& value, long style, const wxPoint& pos):
-       wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+       wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
 {
        m_dialogStyle = style;
        m_value = value;
index 324dc713bcac05e126eef337a5973a30ff8aa4da..39b6114278adbf9bb23055133e919704121f5265 100644 (file)
@@ -59,7 +59,9 @@ char *wxOsVersion = (char *) NULL;
 
 /* For printing several pages */
 int wxPageNumber;
-wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
+
+// Now in prntbase.cpp
+// wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
 
 /* GDI Object Lists */
 wxBrushList      *wxTheBrushList = (wxBrushList *) NULL;
index 324dc713bcac05e126eef337a5973a30ff8aa4da..39b6114278adbf9bb23055133e919704121f5265 100644 (file)
@@ -59,7 +59,9 @@ char *wxOsVersion = (char *) NULL;
 
 /* For printing several pages */
 int wxPageNumber;
-wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
+
+// Now in prntbase.cpp
+// wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
 
 /* GDI Object Lists */
 wxBrushList      *wxTheBrushList = (wxBrushList *) NULL;
index 7143aa5e953c240192638fd391ae7a4486628b38..138289a5bf4f5ca7ab402b0cd4761f81d876da7c 100644 (file)
@@ -131,10 +131,6 @@ const char *wxFatalErrorStr = "wxWindows Fatal Error";
 const char *wxFloatToStringStr = "%.2f";
 const char *wxDoubleToStringStr = "%.2f";
 
-#if wxUSE_POSTSCRIPT
-wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
-#endif
-
 #if wxUSE_SHARED_LIBRARY
 ///// Event tables (also must be in one, statically-linked file for shared libraries)
 
index 7143aa5e953c240192638fd391ae7a4486628b38..138289a5bf4f5ca7ab402b0cd4761f81d876da7c 100644 (file)
@@ -131,10 +131,6 @@ const char *wxFatalErrorStr = "wxWindows Fatal Error";
 const char *wxFloatToStringStr = "%.2f";
 const char *wxDoubleToStringStr = "%.2f";
 
-#if wxUSE_POSTSCRIPT
-wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
-#endif
-
 #if wxUSE_SHARED_LIBRARY
 ///// Event tables (also must be in one, statically-linked file for shared libraries)
 
index e980207553896f94158caf5ff3885346bcacfe2a..bbe4fe2ad76c133d786c80e5156eddd6c97199cf 100644 (file)
@@ -128,10 +128,6 @@ const char *wxFatalErrorStr = "wxWindows Fatal Error";
 const char *wxFloatToStringStr = "%.2f";
 const char *wxDoubleToStringStr = "%.2f";
 
-#if wxUSE_POSTSCRIPT
-wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
-#endif
-
 #if wxUSE_SHARED_LIBRARY
 ///// Event tables (also must be in one, statically-linked file for shared libraries)
 
index 9e1d6f64e44e497dec0b9fbc8ee4abce785d4500..b87a7a9f14adf4679079ba35018c098c8cf5072d 100644 (file)
@@ -491,6 +491,7 @@ void wxApp::CleanUp()
     // (double deletion of the cursor).
     wxSetCursor(wxNullCursor);
     delete g_globalCursor;
+    g_globalCursor = NULL;
 
     wxDeleteStockObjects() ;
 
@@ -932,6 +933,7 @@ void wxApp::Dispatch()
  * the message. Some may have accelerator tables, or have
  * MDI complications.
  */
+
 bool wxApp::ProcessMessage(WXMSG *wxmsg)
 {
     MSG *msg = (MSG *)wxmsg;
index 661ddad461bcee6f7bb5a73dfd37c9493319b678..764c28db6f071628331ab2cf4bbdf7b88a8553c6 100644 (file)
@@ -78,11 +78,6 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
                     0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
                     wxGetInstance(), NULL);
 
-#if wxUSE_CTL3D
-//  if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
-//    Ctl3dSubclassCtl(wx_button);
-#endif
-
   m_hWnd = (WXHWND)wx_button;
 
   // Subclass again for purposes of dialog editing mode
index d027e9d5e5decc9e8391fa3c68095e52ef4046c7..bcbd6f38ff73f5a7c6bb85292e62a746d437cd49 100644 (file)
@@ -53,6 +53,7 @@ wxControl::wxControl(void)
   m_backgroundColour = *wxWHITE;
   m_foregroundColour = *wxBLACK;
   m_callback = 0;
+//  m_windowCursor = wxNullCursor; // To avoid the standard cursor being used
 }
 
 wxControl::~wxControl(void)
index 32bc09daff41ce7e9247a4a87abb3877ae4c4863..e7e0283111655d21a2c116aea01d210f81e52a60 100644 (file)
@@ -24,6 +24,8 @@
 #include "wx/wx.h"
 #endif
 
+#include "wx/prntbase.h"
+
 #define _MAXPATHLEN 500
 
 // Useful buffer, initialized in wxCommonInit
@@ -154,11 +156,6 @@ const char *wxDoubleToStringStr = "%.2f";
 const char *wxUserResourceStr = "TEXT";
 #endif
 
-#if wxUSE_POSTSCRIPT
-class wxPrintPaperDatabase;
-wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
-#endif
-
 #if wxUSE_SHARED_LIBRARY
 /*
  * For wxWindows to be made into a dynamic library (e.g. Sun),
@@ -319,9 +316,10 @@ IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC)
 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject)
+#endif
+
 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
-#endif
 
 #if wxUSE_WX_RESOURCES
 #include "wx/resource.h"
index 14f2cfb07db800874b56cde5d4a215266dc9fb49..60ee421c6914d997cfe416f6a7d57a29805b3b41 100644 (file)
@@ -208,13 +208,13 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
   {
     if (event.m_keyCode == WXK_ESCAPE)
     {
-    // Behaviour changed in 2.0: we'll send a Cancel message
-    // to the dialog instead of Close.
-    wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
-    cancelEvent.SetEventObject( this );
-    GetEventHandler()->ProcessEvent(cancelEvent);
+        // Behaviour changed in 2.0: we'll send a Cancel message
+        // to the dialog instead of Close.
+        wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
+        cancelEvent.SetEventObject( this );
+        GetEventHandler()->ProcessEvent(cancelEvent);
 
-    return;
+        return;
     }
   }
   // We didn't process this event.
@@ -557,7 +557,7 @@ void wxDialog::OnCancel(wxCommandEvent& event)
     else
     {
         SetReturnCode(wxID_CANCEL);
-    this->Show(FALSE);
+        this->Show(FALSE);
     }
 }
 
index adba1c6dd1831372eb6497efb5582cb58a553ee0..1efd525aebb6ce1686027f19a8e92540d5ae7af2 100644 (file)
@@ -70,6 +70,7 @@ GENERICOBJS= \
   $(GENDIR)\statusbr.obj \
   $(GENDIR)\tabg.obj \
   $(GENDIR)\textdlgg.obj\
+  $(GENDIR)\prntdlgg.obj \
   $(GENDIR)\treectrl.obj
 
 # Don't need these generic objects for Windows
@@ -77,7 +78,6 @@ GENERICOBJS= \
 #  $(GENDIR)\fontdlgg.obj \
 #  $(GENDIR)\colrdlgg.obj \
 #  $(GENDIR)\printps.obj \
-#  $(GENDIR)\prntdlgg.obj \
 # $(GENDIR)\helpxlp.obj \
  
 COMMONOBJS = \
index 1e91b0cbcfdf460fa88d17c377ce2f991c40dc27..d22ac24e7679e1fa2b1c8f9a284c3bb34dbdb575 100644 (file)
@@ -289,53 +289,6 @@ void wxMDIParentFrame::OnActivate(wxActivateEvent& event)
        // Do nothing
 }
 
-#if WXWIN_COMPATIBILITY
-/*
-void wxMDIParentFrame::OldOnSize(int x, int y)
-{
-#if WXWIN_COMPATIBILITY == 1
-  wxSizeEvent event(wxSize(x, y), m_windowId);
-  event.SetEventObject( this );
-  GetEventHandler()->ProcessEvent(event);
-#else
-
-#if wxUSE_CONSTRAINTS
-  if (GetAutoLayout())
-    Layout();
-#endif
-  int x = 0;
-  int y = 0;
-  int width, height;
-  GetClientSize(&width, &height);
-  if ( GetToolBar() )
-  {
-      int wt, ht;
-      GetToolBar()->GetSize(&wt, &ht);
-      height -= ht;
-      y += ht;
-  }
-
-  if ( GetClientWindow() )
-      GetClientWindow()->SetSize(x, y, width, height);
-
-#endif
-}
-
-// Default activation behaviour - nothing.
-// Default activation behaviour - override dedault wxFrame behaviour
-void wxMDIParentFrame::OldOnActivate(bool flag)
-{
-#if WXWIN_COMPATIBILITY == 1
-  wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
-  event.SetEventObject( this );
-  GetEventHandler()->ProcessEvent(event);
-#else
-#endif
-}
-*/
-
-#endif
-
 // Returns the active MDI child window
 wxMDIChildFrame *wxMDIParentFrame::GetActiveChild(void) const
 {
index 6ce66a88eac8eec6e005b2891a9d357bc70b47d0..26e5d29336c0d24602b03bb1c18c0b8866121923 100644 (file)
 #endif // Win32/16
 
 // wnd proc for radio buttons
+#ifdef __WIN32__
 LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hWnd,
                                            UINT message,
                                            WPARAM wParam,
                                            LPARAM lParam);
+#endif
 
 // ---------------------------------------------------------------------------
 // global vars
@@ -706,14 +708,19 @@ void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn)
     if ( !s_wndprocRadioBtn )
         s_wndprocRadioBtn = (WNDPROC)::GetWindowLong(hwndBtn, GWL_WNDPROC);
 
+    // No GWL_USERDATA in Win16, so omit this subclassing.
+#ifdef __WIN32__
     ::SetWindowLong(hwndBtn, GWL_WNDPROC, (long)wxRadioBtnWndProc);
     ::SetWindowLong(hwndBtn, GWL_USERDATA, (long)this);
+#endif
 }
 
 // ---------------------------------------------------------------------------
 // window proc for radio buttons
 // ---------------------------------------------------------------------------
 
+#ifdef __WIN32__
+
 LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
                                            UINT msg,
                                            WPARAM wParam,
@@ -777,4 +784,5 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
     else
         return 0;
 }
+#endif
 
index 5f26caa4135d376db5bcc6a76bb5234c8d5a2722..2cf8e00d613939fb2c32d00b41667a9f0651ed20 100644 (file)
@@ -151,10 +151,18 @@ bool wxToolBar95::Create(wxWindow *parent,
         msflags |= TBSTYLE_FLAT;
   }
 
+  bool want3D;
+  WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ;
+
+  // Even with extended styles, need to combine with WS_BORDER
+  // for them to look right.
+  if ( want3D || wxStyleHasBorder(m_windowStyle) )
+      msflags |= WS_BORDER;
+
   // Create the toolbar control.
   HWND hWndToolbar = CreateWindowEx
                      (
-                      0L,                       // No extended styles.
+                      exStyle,                  // Extended styles.
                       TOOLBARCLASSNAME,         // Class name for the toolbar.
                       "",                       // No default text.
                       msflags,                  // Styles
@@ -428,7 +436,8 @@ void wxToolBar95::GetSize(int *w, int *h) const
   wxWindow::GetSize(w, h);
   // For some reason, the returned height is several pixels bigger than that
   // displayed!
-  *h -= 2;
+  // Taking this fudge factor out now, it seems fine without it.
+//  *h -= 2;
 }
 
 // The button size is bigger than the bitmap size
index 625cfafd027a263917451ac4d6b745b060d83f17..2e5fdab316a83ef464c90d2403d99caecb4c2cbf 100644 (file)
@@ -465,12 +465,20 @@ void wxToolBarMSW::Layout(void)
     node = node->Next();
   }
   if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
+  {
     m_maxWidth += maxToolWidth;
+    m_maxHeight += maxToolHeight;
+  }
   else
+  {
+    m_maxWidth += maxToolWidth;
     m_maxHeight += maxToolHeight;
+  }
 
   m_maxWidth += m_xMargin;
   m_maxHeight += m_yMargin;
+
+  SetSize(m_maxWidth, m_maxHeight);
 }
 
 
index fd62249fe959cf84091aa8c00e50b7dfca4f72ac..bfb35eaa50dd0757b10b00cc22ccd5c66ad60f9d 100644 (file)
@@ -971,8 +971,11 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
 
         case WXK_RETURN:
         {
+/* Oh yes it will, because we also specify DLGC_WANTCHARS
             wxASSERT_MSG( m_windowStyle & wxTE_PROCESS_ENTER,
                           "this text ctrl should never receive return" );
+*/
+
             if ( (m_windowStyle & wxTE_MULTILINE) == 0 )
             {
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
@@ -1007,8 +1010,8 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
     // don't just call event.Skip() because this will cause TABs and ENTERs
     // be passed upwards and we don't always want this - instead process it
     // right here
-    //Default();
-    event.Skip();
+    Default();
+//    event.Skip();
 }
 
 long wxTextCtrl::MSWGetDlgCode()
index a3e3a9d72794b7586186cbee77617651b5134ea1..437b7a3e872c153d7c67c842dbc62fcafa4e425c 100644 (file)
@@ -59,6 +59,8 @@
 
 #include "wx/msw/private.h"
 
+#include "wx/textctrl.h"
+
 #include <string.h>
 
 #ifndef __GNUWIN32__
@@ -234,6 +236,7 @@ void wxWindow::Init()
     m_isWindow = TRUE;
 
     // Generic
+//    m_windowCursor = * wxSTANDARD_CURSOR;
     m_windowId = 0;
     m_isShown = TRUE;
     m_windowStyle = 0;
@@ -938,7 +941,7 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
     #define DIMENSION_TYPE int
 #endif
 
-// Main Windows window proc
+// Main Windows window proc
 long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
 {
     wxASSERT( m_lastMsg == message &&
@@ -1176,6 +1179,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
             return MSWOnSysCommand(wParam, lParam);
             break;
         }
+
     case WM_COMMAND:
         {
 #ifdef __WIN32__
@@ -1227,7 +1231,6 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
             return MSWOnMeasureItem((int)wParam, (WXMEASUREITEMSTRUCT *)lParam);
             break;
         }
-
     case WM_KEYDOWN:
         // If this has been processed by an event handler,
         // return 0 now (we've handled it).
@@ -1288,7 +1291,6 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
         }
 
         break;
-
     case WM_KEYUP:
     {
         if (!MSWOnKeyUp((WORD) wParam, lParam))
@@ -1301,7 +1303,6 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
                 return Default();
             break;
         }
-
     case WM_HSCROLL:
         {
 #ifdef __WIN32__
@@ -1479,7 +1480,6 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
                 return 1L;
             break;
         }
-
     case WM_GETMINMAXINFO:
         {
             MINMAXINFO *info = (MINMAXINFO *)lParam;
@@ -1494,10 +1494,10 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
             return MSWDefWindowProc(message, wParam, lParam );
             break;
         }
-
     case WM_GETDLGCODE:
-        return MSWGetDlgCode();
-
+        {
+            return MSWGetDlgCode();
+        }
     case WM_SETCURSOR:
         {
             // don't set cursor for other windows, only for this one: this
@@ -1551,7 +1551,6 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
                 }
             }
         }
-
         return MSWDefWindowProc(message, wParam, lParam );
 
     default:
@@ -2147,6 +2146,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
         if ( ::IsDialogMessage((HWND)GetHWND(), msg) )
             return TRUE;
     }
+
 #if wxUSE_TOOLTIPS
     if ( m_tooltip )
     {
@@ -2157,6 +2157,15 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
     }
 #endif // wxUSE_TOOLTIPS
 
+    // In case we don't have wxTAB_TRAVERSAL style on.
+    // If we don't call this, we may never process Enter correctly.
+    if ( m_hWnd != 0 && (GetWindowStyleFlag() & wxTAB_TRAVERSAL) == 0 )
+    {
+        MSG *msg = (MSG *)pMsg;
+        if ( ::IsDialogMessage((HWND)GetHWND(), msg) )
+            return TRUE;
+    }
+
     return FALSE;
 }
 
index 40bcb684e2e943adac157a7c8598fbea1b4c4e62..aea15f67990a048c5d31c55dedd3253cc57f6592 100644 (file)
@@ -131,10 +131,6 @@ const char *wxFatalErrorStr = "wxWindows Fatal Error";
 const char *wxFloatToStringStr = "%.2f";
 const char *wxDoubleToStringStr = "%.2f";
 
-#if wxUSE_POSTSCRIPT
-wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
-#endif
-
 #if wxUSE_SHARED_LIBRARY
 ///// Event tables (also must be in one, statically-linked file for shared libraries)