]> git.saurik.com Git - wxWidgets.git/commitdiff
Some doc corrections (added blank lines at end of docs); corrected Forty sample
authorJulian Smart <julian@anthemion.co.uk>
Fri, 12 Feb 1999 08:22:29 +0000 (08:22 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 12 Feb 1999 08:22:29 +0000 (08:22 +0000)
dialog behaviour; added dummy menubar constructors; corrected wxMSW wxRegion bug

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

29 files changed:
distrib/msw/gtk.rsp
docs/bugs.txt
docs/changes.txt
docs/latex/wx/classes.tex
docs/latex/wx/fltinstr.tex
docs/latex/wx/fltoutst.tex
docs/latex/wx/protocol.tex
docs/latex/wx/tvalidat.tex
docs/motif/install.txt
docs/msw/install.txt
docs/readme.txt
include/wx/motif/bitmap.h
include/wx/motif/icon.h
include/wx/motif/menu.h
include/wx/msw/menu.h
include/wx/prop.h
samples/forty/canvas.cpp
samples/forty/card.cpp
samples/forty/forty.cpp
samples/forty/playerdg.cpp
samples/makefile.b32
src/generic/prop.cpp
src/motif/control.cpp
src/motif/dialog.cpp
src/motif/menu.cpp
src/motif/window.cpp
src/msw/makefile.vc
src/msw/menu.cpp
src/msw/region.cpp

index 6c53a637c5ba1c64c8cf21552dcd50b337da8a15..14cfe7c01d1847219aa5b724202e5c2712d65fca 100644 (file)
@@ -10,6 +10,8 @@ mkinstalldirs
 wxGTK.spec
 
 distrib/gtk/copy_src
+distrib/gtk/README.txt
+distrib/gtk/Setup
 
 docs/gtk/*.html
 docs/gtk/*.txt
index 78abe19b55e3cbc2967354bc9a087c1ff5b210ba..7a00fc64b312a994381f58ee4fcda972fd19059f 100644 (file)
@@ -4,9 +4,13 @@ wxWindows Buglist
 wxGTK:
 ------
 
+- TODO
+
 wxMSW:
 ------
 
+- TODO
+
 wxMotif:
 --------
 
@@ -28,6 +32,20 @@ wxMotif:
 - Can't set the colours for the buttons in the file selector, for
   some reason.
 
+- On SGI IRIX 6.4, XtDestroyWidget in ~wxWindow causes a crash in
+  some cicumstances. This is being looked into. Meanwhile, a
+  possible workaround is to remove the final XtDestroyWidget line in ~wxWindow
+  (window.cpp). This will mean that child windows will only get
+  destroyed when frames and dialogs are destroyed, so dynamic subwindow
+  deletion may not work properly.
+
+- There are reports that scrolling can cause crashes under Lesstif.
+  This is probably a Lesstif bug.
+
 General:
 --------
 
+- Dialog Editor could be more user-friendly. Controls are hard to
+  size and position accurately. No way of changing tab order
+  except by editing .wxr file.
+
index f0140f39e3e8de3261dad57e865cfbc1fdb8c738..0cec649ba29b6867354aa7ecb817875e6173892c 100644 (file)
@@ -12,7 +12,7 @@ wxMSW:
 
 - Makefiles for more compilers and samples; Cygwin makefiles
   rationalised.
-- Added VC++ project file for compiling as DLL.
+- Added VC++ project file for compiling wxWindows as DLL.
 
 wxMotif:
 
index 1b99b55c746ebe50f095007c9ed9430a35f1d6d7..5768d09eeacacd7d06bef27e079cbe41ddda6fed 100644 (file)
@@ -191,7 +191,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input strlist.tex
 \input strmbase.tex
 \input stream.tex
-\input strmmem.tex
+%\input strmmem.tex
 \input sysclevt.tex
 \input settings.tex
 \input tab.tex
index 4e935524dfa0ca2c9a4c12a4cf152f8d5c546873..a0deb39e6fb74b6e1e5eb2ec0b29a422f21a8ebe 100644 (file)
@@ -24,3 +24,4 @@ Initializes a "filter" stream. A filter stream has the capability of a normal
 stream but it can be placed on the top of another stream. So, for example, it
 can uncompress, uncrypt the datas which are read from another stream and pass it
 to the requester.
+
index 9feae4fd132f5b6dbb3eaabbaa900bedc1fd964a..c0a775aec9cbc31a0036fd28dc90cb9031c42fb9 100644 (file)
@@ -24,3 +24,4 @@ Initializes a "filter" stream. A filter stream has the capability of a normal
 stream but it can be placed on the top of another stream. So, for example, it
 can compress, crypt the datas which are passed to it and write them to another
 stream.
+
index 81c68bc9bbda0a448c0cc9f34a4c12b94b106984..c2232d2924ddf2aeeee780f9f03fd368b9a55d1b 100644 (file)
@@ -98,3 +98,4 @@ Sets the authentication user. It is mainly useful when FTP is used.
 \func{void}{SetPassword}{\param{const wxString\&}{ user}}
 
 Sets the authentication password. It is mainly useful when FTP is used.
+
index 2709a704c69549f5cab34689c6f25706021fc7c4..9d910371eeeec1977c31e2bc8da69f4b092ccc1e 100644 (file)
@@ -1,6 +1,7 @@
 \section{Validator overview}\label{validatoroverview}
 
-Classes: \helpref{wxValidator}{wxvalidator}, \helpref{wxTextValidator}{wxtextvalidator}
+Classes: \helpref{wxValidator}{wxvalidator}, \helpref{wxTextValidator}{wxtextvalidator}, 
+\helpref{wxGenericValidator}{wxgenericvalidator}
 
 The aim of the validator concept is to make dialogs very much easier to write.
 A validator is an object that can be plugged into a control (such as a wxTextCtrl), and
@@ -8,8 +9,10 @@ mediates between C++ data and the control, transferring the data in either direc
 and validating it. It also is able to intercept events generated
 by the control, providing filtering behaviour without the need to derive a new control class.
 
-You can use a stock validator, such as \helpref{wxTextValidator}{wxtextvalidator}; or
-you can write your own.
+You can use a stock validator, such as \helpref{wxTextValidator}{wxtextvalidator} (which does text
+control data transfer, validation and filtering) and 
+\helpref{wxGenericValidator}{wxgenericvalidator} (which does data transfer for a range of controls);
+or you can write your own.
 
 \wxheading{Example}
 
@@ -114,3 +117,6 @@ void wxDialog::OnOK(wxCommandEvent& event)
 So if using validators and a normal OK button, you may not even need to write any
 code for handling dialog dismissal.
 
+If you load your dialog from a resource file, you'll need to iterate through the controls
+setting validators, since validators can't be specified in a dialog resource.
+
index 6e9db5b047b99d1ab495a4bffc2a788c80b9f8b0..8f39f650df3f5798dfdaa514094bfe9599e78c7c 100644 (file)
@@ -118,6 +118,15 @@ Troubleshooting
   functions, try putting the gcc fixinclude file paths early in the
   include path.
 
+- If you get strange memory problems (for example in deletion
+  of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS to 0 in
+  setup.h, and recompile.
+
+- Problems with XtDestroyWidget crashing in ~wxWindow have been
+  reported on SGI IRIX 6.4. This has not yet been resolved, so
+  any advice here would be very welcome. See bugs.txt for a
+  possible temporary workaround.
+
 Other Notes
 -----------
 
@@ -163,6 +172,5 @@ compiler and the error message(s) to the wxwin-users mailing list at:
 
     wxwin-users@wx.dent.med.uni-muenchen.de
 
-
-Julian Smart, January 1999.
+Julian Smart, February 1999.
 julian.smart@ukonline.co.uk
index ddb16cc33488fe9b15df2592c652adf385911eb6..2263c5bc0c96a589cae01ae6562d18b3ff5beab1 100644 (file)
@@ -60,7 +60,10 @@ Using project files:
 
 1. Unarchive wx200vc.zip, the VC++ 5 project makefiles.
 2. Open src/wxvc.dsp, set Debug or Release configuration, and
-   compile. This will produce lib/wxvc.lib or lib/wxvc_debug.lib.
+   compile. This will produce src/Debug/wxvc.lib or
+   src/Release/wxvc.lib.  The project file src/wxvc_dll.dsp
+   will make a DLL version of wxWindow, which will go in
+   src/DebugDLL/wxvc.[lib,dll] and src/ReleaseDLL/wxvc.[lib,dll].
 3. Open a sample project file, choose a configuration, and compile.
    The project files don't use precompiled headers, to save
    space, but you can switch PCH compiling on for greater speed.
@@ -154,8 +157,8 @@ supplied.
 Watcom C++ 10.6 compilation
 ---------------------------
 
-1. Make sure your WXWIN variable is set, and uses the FAT (short
-   name) form.
+1. Make sure your WXWIN variable is set, and uses the DOS short
+   name form.
 2. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
    make the wxWindows core library.
 3. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
@@ -173,9 +176,9 @@ Metrowerks CodeWarrior compilation
 NOTES:
 
 (a) Unfortunately CodeWarrior support is broken in this
-release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
+    release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
 (b) You need CodeWarrior Pro 4 plus the patches to 4.1 from the
-Metrowerks Web site.
+    Metrowerks Web site.
 
 Symantec C++ compilation
 ------------------------
@@ -268,6 +271,8 @@ Here are the steps required:
   > cd c:\wx\samples\minimal
   > make -f makefile.g95
 
+  Ignore the warning about the default entry point.
+
 - Use the 'strip' command to reduce executable size.
 
 - With Cygnus Cygwin, you can invoke gdb --nw myfile.exe to
index d8fff9d6740bb00c6341d5123c649327f458ee4b..619896c0faaf24459c83b5880b1bdaea5344e9f4 100644 (file)
@@ -96,7 +96,7 @@ The wxWindows Web site is located at:
 
   http://www.wxwindows.org
 
-The wxGTK Web site (with further wxGTK-specific fiels and
+The wxGTK Web site (with further wxGTK-specific files and
 information) is located at:
 
   http://www.freiburg.linux.de/~wxxt
@@ -115,5 +115,5 @@ or contact Julian Smart <julian.smart@ukonline.co.uk>.
 
 Good luck!
 
-The wxWindows Team, January 1999
+The wxWindows Team, February 1999
 
index 39bd89c5a808243dcc4b7ed1575f6851fef9bc3b..644039ef0ab051319241fca426dfb8624be71143 100644 (file)
@@ -144,7 +144,7 @@ public:
   wxBitmap(char **data, wxControl* control = NULL);
 
   // Load a file or resource
-  wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XBM);
+  wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XPM);
 
   // Constructor for generalised creation from data
   wxBitmap(void *data, long type, int width, int height, int depth = 1);
@@ -155,7 +155,7 @@ public:
 
   virtual bool Create(int width, int height, int depth = -1);
   virtual bool Create(void *data, long type, int width, int height, int depth = 1);
-  virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM);
+  virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM);
   virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
 
   inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
index 4231ec7e05e2aa30d5ab3ffa135109fcc43dd9a8..cbb4f53c69abe990af27b58798e96414619eac30 100644 (file)
@@ -50,14 +50,14 @@ public:
   // Initialize with XPM data
   wxIcon(char **data);
 
-  wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
+  wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
     int desiredWidth = -1, int desiredHeight = -1);
   ~wxIcon();
 
-  bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
+  bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
       int desiredWidth = -1, int desiredHeight = -1);
-  bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM)
-    { return wxBitmap::LoadFile(name, type); }
+//  bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM)
+//    { return wxBitmap::LoadFile(name, type); }
 
   inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
   inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
index 1ed3a0da6b4d9f5c00e153b80da2cf71246c7133..22ddece86e9cb293a41b024148e77774a841149d 100644 (file)
@@ -169,6 +169,7 @@ class WXDLLEXPORT wxMenuBar: public wxEvtHandler
 {
   DECLARE_DYNAMIC_CLASS(wxMenuBar)
 
+  wxMenuBar( long style );
   wxMenuBar();
   wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
   ~wxMenuBar();
index 7c40f1ab0e8f43fc0fc87e39d84fd704d0218f69..33c6701ca6f837ceaeeb5dc162466327ee29a280 100644 (file)
@@ -143,6 +143,7 @@ class WXDLLEXPORT wxMenuBar: public wxEvtHandler
 
 public:
   wxMenuBar();
+  wxMenuBar( long style );
   wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
   ~wxMenuBar();
 
index 327bd20379f052a339bdeb85122b9d02f86a48da..8471c8b0a62f6825993cf1e37ac437e6df7732b5 100644 (file)
@@ -42,27 +42,27 @@ class WXDLLEXPORT wxPropertySheet: public wxObject
 {
  DECLARE_DYNAMIC_CLASS(wxPropertySheet)
  public:
-  wxPropertySheet(wxString name = "");
+  wxPropertySheet(const wxString& name = "");
   ~wxPropertySheet(void);
 
   // Set the name of the sheet
-  inline virtual void SetName(wxString name) { m_name=name; }
-  inline virtual wxString GetName() { return m_name; }
+  inline virtual void SetName(const wxString& name) { m_name=name; }
+  inline virtual wxString GetName() const { return m_name; }
   // Does this sheet contain a property with this name
-  virtual bool HasProperty(wxString name);
+  virtual bool HasProperty(const wxString& name) const;
 
   // Set property name to value
-  virtual bool SetProperty(const wxString name, wxPropertyValue value);
+  virtual bool SetProperty(const wxString& name, const wxPropertyValue& value);
 
   // Remove property from sheet by name, deleting it
-  virtual void RemoveProperty(wxString name);
+  virtual void RemoveProperty(const wxString& name);
 
   // Get the name of the sheet
   // Add a property
   virtual void AddProperty(wxProperty *property);
 
   // Get property by name
-  virtual wxProperty *GetProperty(wxString name);
+  virtual wxProperty *GetProperty(const wxString& name) const;
 
   // Clear all properties
   virtual void Clear(void);
index 373e16942faff6c7320d202a58c0ae0906edccbb..384d2bebbed510408edc32908a312b31b432c08e 100644 (file)
@@ -51,7 +51,6 @@ FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) :
        m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
 #endif
        SetBackgroundColour(FortyApp::BackgroundColour());
-       AllowDoubleClick(TRUE);
 
        m_handCursor = new wxCursor(wxCURSOR_HAND);
        m_arrowCursor = new wxCursor(wxCURSOR_ARROW);
@@ -98,7 +97,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
        // then ask the player for their name
        if (m_player.Length() == 0 && !m_playerDialog)
        {
-               m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
+               m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
                m_playerDialog->ShowModal();
                m_player = m_playerDialog->GetPlayersName();
                if (m_player.Length() > 0)
@@ -108,7 +107,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
                        m_scoreFile->ReadPlayersScore(m_player, wins, games, score);
                        m_game->NewPlayer(wins, games, score);
                        m_game->DisplayScore(dc);
-                       delete m_playerDialog;
+                       m_playerDialog->Destroy();
                        m_playerDialog = 0;
                        Refresh();
                }
index 5b5af43963483889e109c087a059bf7cb8c76b91..37999de3ed26f478e7dda87a6c0a61a21d3c5f79 100644 (file)
@@ -41,7 +41,7 @@
 #include "forty.h"
 #include "card.h"
 
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
 #include "pictures.xpm"
 #include "symbols.xbm"
 #endif
index 425f4202476ab9871b3e488c2216864892bc39ae..4d952a9993cad9bc4385f17a7e90d3ec99977fda 100644 (file)
@@ -91,7 +91,7 @@ bool FortyApp::OnInit()
                        -1, -1, 668, 510
                        );
 
-       // Show the frame
+       // Show the frame
        frame->Show(TRUE);
 
        return TRUE;
@@ -192,7 +192,7 @@ FortyFrame::~FortyFrame()
 
 void FortyFrame::OnCloseWindow(wxCloseEvent& event)
 {
-       if (m_canvas->OnCloseCanvas())
+    if (m_canvas->OnCloseCanvas() )
     {
         this->Destroy();
     }
index 2b221ecd4abf711eaef416e0efbcf496648690af..fa3ea03d046635a980e8bb183a87e0f594a8fe4c 100644 (file)
@@ -172,17 +172,17 @@ void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event)
                        else
                        {
                                m_player = name;
-                               Show(FALSE);
+                               EndModal(wxID_OK);
                        }
                }
                else
                {
-                       wxMessageBox("Please enter your name", "Forty Thieves");
+                       wxMessageBox("Please enter your name", "Forty Thieves");
                }
        }
        else
        {
                m_player = "";
-               Show(FALSE);
+               EndModal(wxID_CANCEL);
        }
 }
index 465f71c58e8fd63072f7c5aa44fe15fc50b86921..0c81281ef5ae3e7b44f06cdb3d83c2beed7d500c 100644 (file)
@@ -8,7 +8,7 @@
 # "%W% %G%"
 #
 # Makefile : Builds samples for Win95, BC++ WIN32
-# Use FINAL=1 argument to nmake to build final version with no debugging
+# Use FINAL=1 argument to make to build final version with no debugging
 # info
 
 # Set WXDIR for your system
@@ -16,146 +16,144 @@ WXDIR = $(WXWIN)
 
 THISDIR=$(WXDIR)\samples
 
-!include $(WXDIR)\src\makevc.env
-
 all:
         cd $(WXDIR)\samples\splitter
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\resource
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\controls
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\listctrl
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\treectrl
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\validate
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\mdi
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\minimal
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\layout
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\printing
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\toolbar
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\dialogs
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\docview
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\docvwmdi
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\controls
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\nativdlg
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\grid
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\internat
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\dnd
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\joytest
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\taskbar
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\sashtest
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
 !if "$(FINAL)" == "0"
         cd $(WXDIR)\samples\memcheck
 !endif
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\ownerdrw
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\checklst
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\minifram
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\bombs
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\fractal
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\wxpoem
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\typetest
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\proplist
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\image
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
         cd $(WXDIR)\samples\dde
-        nmake -f makefile.b32 FINAL=$(FINAL)
+        make -f makefile.b32 FINAL=$(FINAL)
 #        cd $(WXDIR)\samples\regtest
-#        nmake -f makefile.b32 FINAL=$(FINAL)
+#        make -f makefile.b32 FINAL=$(FINAL)
 
 clean:
         cd $(WXDIR)\samples\splitter
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\mdi
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\minimal
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\layout
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\printing
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\toolbar
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\dialogs
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\resource
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\listctrl
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\treectrl
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\validate
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\docview
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\docvwmdi
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\controls
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\nativdlg
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\grid
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\internat
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\checklst
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\ownerdrw
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\dnd
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\joytest
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\regtest
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\taskbar
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\sashtest
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\memcheck
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\minifram
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\bombs
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\fractal
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\wxpoem
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\typetest
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\proplist
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\image
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples\dde
-        nmake -f makefile.b32 clean
+        make -f makefile.b32 clean
         cd $(WXDIR)\samples
 
index bd2f6c13235d54cbf0dc2c62fe4ac0697a06d041..a353201fcc596d2ea0bd4a23dd09f94aa9eb1fd7 100644 (file)
@@ -941,7 +941,7 @@ wxPropertyValidator *wxPropertyView::FindPropertyValidator(wxProperty *property)
 
 IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
 
-wxPropertySheet::wxPropertySheet(wxString name)
+wxPropertySheet::wxPropertySheet(const wxString& name)
 :m_properties(wxKEY_STRING),m_name(name)
 {
 }
@@ -972,7 +972,7 @@ void wxPropertySheet::AddProperty(wxProperty *property)
 }
 
 // Get property by name
-wxProperty *wxPropertySheet::GetProperty(wxString name)
+wxProperty *wxPropertySheet::GetProperty(const wxString& name) const
 {
   wxNode *node = m_properties.Find((const char*) name);
   if (!node)
@@ -980,7 +980,8 @@ wxProperty *wxPropertySheet::GetProperty(wxString name)
   else
     return (wxProperty *)node->Data();
 }
-bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
+
+bool wxPropertySheet::SetProperty(const wxString& name, const wxPropertyValue& value)
 {
   wxProperty* prop = GetProperty(name);
   if(prop){
@@ -990,7 +991,8 @@ bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
     return FALSE;
   }
 }
-void wxPropertySheet::RemoveProperty(wxString name)
+
+void wxPropertySheet::RemoveProperty(const wxString& name)
 {
   wxNode *node = m_properties.Find(name);
   if(node)
@@ -1000,10 +1002,12 @@ void wxPropertySheet::RemoveProperty(wxString name)
     m_properties.DeleteNode(node);
   }
 }      
-bool wxPropertySheet::HasProperty(wxString name)
+
+bool wxPropertySheet::HasProperty(const wxString& name) const
 { 
        return (GetProperty(name)?TRUE:FALSE); 
 }
+
 // Clear all properties
 void wxPropertySheet::Clear(void)
 {
index 91758e606a0ad9635dcab455f4b0deb031b7bb94..090eae88f8b962d1f45257d5417030e08100a685 100644 (file)
@@ -42,7 +42,7 @@ wxControl::~wxControl()
     if (parent)
     {
         if (parent->GetDefaultItem() == (wxButton*) this)
-            parent->SetDefaultItem(NULL);
+            parent->SetDefaultItem((wxButton*) NULL);
     }
 }
 
index 8cb958e77a8765a9179a93e5c0bd841f4fb5af5e..30b03d55b202409bac1b13d0fa6c218d92d85d05 100644 (file)
@@ -285,26 +285,16 @@ wxDialog::~wxDialog()
     // but I think this should work, if we destroy the children first.
     // Note that this might need to be done for wxFrame also.
     DestroyChildren();
-    
-    // This causes a crash in e.g. the resource sample when closing
-    // the example dialog. TODO: Probably not necessary (?)
-#if 0
-    // Now process all events, because otherwise
-    // this might remain on the screen.
-    Display* display;
-    if (m_mainWidget)
-        display = XtDisplay((Widget) m_mainWidget);
-    else
-        display = (Display*) wxGetDisplay();
-    
-    XSync(display, FALSE);
-    XEvent event;
-    while (XtAppPending((XtAppContext) wxTheApp->GetAppContext())) {
-        XFlush(display);
-        XtAppNextEvent((XtAppContext) wxTheApp->GetAppContext(), &event);
-        XtDispatchEvent(&event);
+
+    // The idea about doing it here is that if you have to remove the
+    // XtDestroyWidget from ~wxWindow, at least top-level windows
+    // will still be deleted (and destroy children implicitly).
+    if (GetMainWidget())
+    {
+      DetachWidget(GetMainWidget()); // Removes event handlers
+      XtDestroyWidget((Widget) GetMainWidget());
+      SetMainWidget((WXWidget) NULL);
     }
-#endif
 }
 
 // By default, pressing escape cancels the dialog
index 959d442bb99df1b98f2235fff2ad1507ead84f0b..b940cce13365d24b49baf4170fd8090168217cfd 100644 (file)
@@ -508,6 +508,19 @@ wxMenuBar::wxMenuBar()
     m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 }
 
+wxMenuBar::wxMenuBar(long WXUNUSED(style))
+{
+    m_eventHandler = this;
+    m_menuCount = 0;
+    m_menus = NULL;
+    m_titles = NULL;
+    m_menuBarFrame = NULL;
+    m_mainWidget = (WXWidget) NULL;
+    m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENU);
+    m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENUTEXT);
+    m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+}
+
 wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
 {
     m_eventHandler = this;
index 8ec4c0d3b5d2d5e2b69c67851df8b0a8bf101801..9fcceb9f7bb221c667686c16cf981f33d375a2af 100644 (file)
@@ -235,7 +235,11 @@ wxWindow::~wxWindow()
     // Destroy the window
     if (GetMainWidget())
     {
-        wxDeleteWindowFromTable((Widget) GetMainWidget());
+        // If this line (XtDestroyWidget) causes a crash, you may comment it out.
+        // Child widgets will get destroyed automatically when a frame
+        // or dialog is destroyed, but before that you may get some memory
+        // leaks and potential layout problems if you delete and then add
+        // child windows.
         XtDestroyWidget((Widget) GetMainWidget());
         SetMainWidget((WXWidget) NULL);
     }
index 4bb2cd095a3a5dd0872c897c502d4461bdf5efc4..365acc54daac969be8aea24128f597c1763adec3 100644 (file)
@@ -92,6 +92,7 @@ COMMONOBJS = \
   $(COMMDIR)\filefn.obj \
   $(COMMDIR)\fileconf.obj \
   $(COMMDIR)\framecmn.obj \
+  $(COMMDIR)\ftp.obj \
   $(COMMDIR)\gdicmn.obj \
   $(COMMDIR)\image.obj \
   $(COMMDIR)\intl.obj \
@@ -833,6 +834,11 @@ $(COMMDIR)/framecmn.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
+$(COMMDIR)/ftp.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
 $(COMMDIR)/gdicmn.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
index dbf1723befbfd79336bdc0c3a16002f4b9c2acb0..77923bb06a1e5652a8f73a59dbbabac05f417530 100644 (file)
@@ -562,7 +562,16 @@ bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
 wxMenuBar::wxMenuBar()
 {
   m_eventHandler = this;
+  m_menuCount = 0;
+  m_menus = NULL;
+  m_titles = NULL;
+  m_menuBarFrame = NULL;
+  m_hMenu = 0;
+}
 
+wxMenuBar::wxMenuBar( long WXUNUSED(style) )
+{
+  m_eventHandler = this;
   m_menuCount = 0;
   m_menus = NULL;
   m_titles = NULL;
index e26d294ce764c71ac6a777b887082697f71b3216..56846e68ddd58aad58cb330d1e4c7895a8e452dd 100644 (file)
@@ -351,13 +351,13 @@ void wxRegionIterator::Reset(const wxRegion& region)
 
         m_rects = new wxRect[header->nCount];
 
-        RECT* rect = (RECT*) (rgnData + sizeof(RGNDATAHEADER)) ;
+        RECT* rect = (RECT*) ((char*)rgnData + sizeof(RGNDATAHEADER)) ;
         size_t i;
         for (i = 0; i < header->nCount; i++)
         {
             m_rects[i] = wxRect(rect->left, rect->top,
                                  rect->right - rect->left, rect->bottom - rect->top);
-            rect += sizeof(RECT);
+            rect ++; // Advances pointer by sizeof(RECT)
         }
 
         m_numRects = header->nCount;