]> git.saurik.com Git - wxWidgets.git/commitdiff
Made wxStubs compile on Unix.
authorJulian Smart <julian@anthemion.co.uk>
Wed, 16 Sep 1998 21:52:23 +0000 (21:52 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 16 Sep 1998 21:52:23 +0000 (21:52 +0000)
Improvements to doc/view on MDI, including multiple menus for wxFileHistory.
Added wxDirExists to wxMSW; moved wxMatchWild to filefn.cpp

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

43 files changed:
distrib/msw/generic.rsp
docs/latex/wx/docmanag.tex
docs/latex/wx/document.tex
docs/latex/wx/filehist.tex
docs/latex/wx/menu.tex
docs/latex/wx/strlist.tex
include/wx/defs.h
include/wx/docview.h
include/wx/msw/app.h
include/wx/msw/control.h
include/wx/msw/metafile.h
include/wx/msw/window.h
include/wx/msw/wx.rc
include/wx/stubs/app.h
include/wx/stubs/bitmap.h
include/wx/stubs/control.h
include/wx/stubs/pen.h
include/wx/stubs/setup.h
include/wx/stubs/textctrl.h
include/wx/stubs/window.h
include/wx/zstream.h
samples/minimal/makefile.unx [new file with mode: 0644]
src/common/docmdi.cpp
src/common/docview.cpp
src/common/filefn.cpp
src/common/socket.cpp
src/common/zstream.cpp
src/generic/listctrl.cpp
src/gtk/utilsgtk.cpp
src/gtk1/utilsgtk.cpp
src/make.env [new file with mode: 0644]
src/makeprog.env [new file with mode: 0644]
src/msw/metafile.cpp
src/msw/utils.cpp
src/stubs.inc [new file with mode: 0644]
src/stubs/app.cpp
src/stubs/dialog.cpp
src/stubs/dnd.cpp
src/stubs/makefile.unx [new file with mode: 0644]
src/stubs/notebook.cpp
src/stubs/print.cpp
src/stubs/slider.cpp
src/stubs/textctrl.cpp

index d05047be2711dbdb048353358128de845b5b27b6..b21b78523a1f8d8780f7c2eaaac9f93ff2900f1a 100644 (file)
@@ -321,15 +321,25 @@ samples/ipc/*.xpm
 samples/ipc/*.ico
 samples/ipc/*.rc
 
-samples/types/*.cpp
-samples/types/*.h
-samples/types/*.def
-samples/types/*.rc
-samples/types/*.txt
-samples/types/makefile*
-samples/types/*.xbm
-samples/types/*.xpm
-samples/types/*.ico
+samples/typetest/*.cpp
+samples/typetest/*.h
+samples/typetest/*.def
+samples/typetest/*.rc
+samples/typetest/*.txt
+samples/typetest/makefile*
+samples/typetest/*.xbm
+samples/typetest/*.xpm
+samples/typetest/*.ico
+
+samples/sashtest/*.cpp
+samples/sashtest/*.h
+samples/sashtest/*.def
+samples/sashtest/*.rc
+samples/sashtest/*.txt
+samples/sashtest/makefile*
+samples/sashtest/*.xbm
+samples/sashtest/*.xpm
+samples/sashtest/*.ico
 
 samples/resource/*.cpp
 samples/resource/*.h
index 1cfbfbe0b7b565b6b201955f7cd705c0dc2a3cd7..19eaa58a66d424aaaf4304eedc24f51bb93bd02d 100644 (file)
@@ -12,7 +12,7 @@ and \helpref{wxDocTemplate}{wxdoctemplate} classes.
 \wxheading{See also}
 
 \helpref{wxDocManager overview}{wxdocmanageroverview}, \helpref{wxDocument}{wxdocument},\rtfsp
-\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}
+\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}, \helpref{wxFileHistory}{wxfilehistory}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
@@ -139,28 +139,54 @@ of view is presented to the user.
 
 Removes the template from the list of templates.
 
-\membersection{wxDocManager::FileHistoryLoad}
+\membersection{wxDocManager::FileHistoryAddFilesToMenu}\label{wxdocmanagerfilehistoryaddfilestomenu}
 
-\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
+\func{void}{FileHistoryAddFilesToMenu}{\void}
 
-Loads the file history from a resource file, using the given section. This must be called
-explicitly by the application.
+Appends the files in the history list, to all menus managed by the file history object.
+
+\func{void}{FileHistoryAddFilesToMenu}{\param{wxMenu*}{ menu}}
+
+Appends the files in the history list, to the given menu only.
+
+\membersection{wxDocManager::FileHistoryLoad}\label{wxdocmanagerfilehistoryload}
+
+\func{void}{FileHistoryLoad}{\param{wxConfigBase\& }{config}}
+
+Loads the file history from a config object.
+
+\wxheading{See also}
 
-\membersection{wxDocManager::FileHistorySave}
+\helpref{wxConfig}{wxconfigbase}
 
-\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
+\membersection{wxDocManager::FileHistoryRemoveMenu}\label{wxdocmanagerfilehistoryremovemenu}
 
-Saves the file history into a resource file, using the given section. This must be called
+\func{void}{FileHistoryRemoveMenu}{\param{wxMenu*}{ menu}}
+
+Removes the given menu from the list of menus managed by the file history object.
+
+\membersection{wxDocManager::FileHistorySave}\label{wxdocmanagerfilehistorysave}
+
+\func{void}{FileHistorySave}{\param{wxConfigBase\& }{resourceFile}}
+
+Saves the file history into a config object. This must be called
 explicitly by the application.
 
-\membersection{wxDocManager::FileHistoryUseMenu}
+\wxheading{See also}
+
+\helpref{wxConfig}{wxconfigbase}
 
-\func{void}{FileHistoryUseMenu}{\param{wxMenu *}{menu}}
+\membersection{wxDocManager::FileHistoryUseMenu}\label{wxdocmanagerfilehistoryusemenu}
+
+\func{void}{FileHistoryUseMenu}{\param{wxMenu*}{ menu}}
 
 Use this menu for appending recently-visited document filenames, for convenient
 access. Calling this function with a valid menu pointer enables the history
 list functionality.
 
+Note that you can add multiple menus using this function, to be managed by the
+file history object.
+
 \membersection{wxDocManager::FindTemplateForPath}
 
 \func{wxDocTemplate *}{FindTemplateForPath}{\param{const wxString\& }{path}}
index 99a4553c03baf7793260205684aa5bad4f6ced70..a5b7e6b077860af0cda69d933d1dbc85d6f7b048 100644 (file)
@@ -324,4 +324,8 @@ Sets the title for this document. The document title is used for an associated
 frame (if any), and is usually constructed by the framework from
 the filename.
 
+\membersection{wxDocument::UpdateAllViews}\label{wxdocumentupdateallviews}
 
+\func{void}{UpdateAllViews}{\param{wxView* }{sender = NULL}}
+
+Updates all views. If {\it sender} is non-NULL, does not update this view.
index e136f1c6d8600cce3c8b453be27b89312082279a..1d9001be31ca0e7c410e778710987c6b0860bfe1 100644 (file)
@@ -3,13 +3,17 @@
 The wxFileHistory encapsulates a user interface convenience, the
 list of most recently visited files as shown on a menu (usually the File menu).
 
+wxFileHistory can manage one or more file menus. More than one menu may be required
+in an MDI application, where the file history should appear on each MDI child menu
+as well as the MDI parent frame.
+
 \wxheading{Derived from}
 
 \helpref{wxObject}{wxobject}
 
 \wxheading{See also}
 
-\overview{wxFileHistory overview}{wxfilehistoryoverview}
+\helpref{wxFileHistory overview}{wxfilehistoryoverview}, \helpref{wxDocManager}{wxdocmanager}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
@@ -56,38 +60,65 @@ Destructor.
 
 Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
 
-\membersection{wxFileHistory::FileHistoryLoad}
-
-\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
+\membersection{wxFileHistory::AddFilesToMenu}\label{wxfilehistoryaddfilestomenu}
 
-Loads the file history from a resource file, using the given section. This must be called
-explicitly by the application.
+\func{void}{AddFilesToMenu}{\void}
 
-\membersection{wxFileHistory::FileHistorySave}
+Appends the files in the history list, to all menus managed by the file history object.
 
-\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
+\func{void}{AddFilesToMenu}{\param{wxMenu*}{ menu}}
 
-Saves the file history into a resource file, using the given section. This must be called
-explicitly by the application.
+Appends the files in the history list, to the given menu only.
 
-\membersection{wxFileHistory::FileHistoryUseMenu}
+\membersection{wxFileHistory::GetHistoryFile}\label{wxfilehistorygethistoryfile}
 
-\func{void}{FileHistoryUseMenu}{\param{wxMenu* }{menu}}
+\constfunc{wxString}{GetHistoryFile}{\param{int}{ index}}
 
-Use this menu for appending recently-visited document filenames, for convenient
-access. Calling this function with a valid menu pointer enables the history
-list functionality.
+Returns the file at this index (zero-based).
 
 \membersection{wxFileHistory::GetMaxFiles}
 
-\func{int}{GetMaxFiles}{\void}
+\constfunc{int}{GetMaxFiles}{\void}
 
 Returns the maximum number of files that can be stored.
 
 \membersection{wxFileHistory::GetNoHistoryFiles}
 
-\func{int}{GetNoHistoryFiles}{\void}
+\constfunc{int}{GetNoHistoryFiles}{\void}
 
 Returns the number of files currently stored in the file history.
 
+\membersection{wxFileHistory::Load}
+
+\func{void}{Load}{\param{wxConfigBase\& }{config}}
+
+Loads the file history from the given config object. This function should be called explicitly by the application.
+
+\wxheading{See also}
+
+\helpref{wxConfig}{wxconfigbase}
+
+\membersection{wxFileHistory::RemoveMenu}
+
+\func{void}{RemoveMenu}{\param{wxMenu* }{menu}}
+
+Removes this menu from the list of those managed by this object.
+
+\membersection{wxFileHistory::Save}
+
+\func{void}{Save}{\param{wxConfigBase\& }{config}}
+
+Saves the file history into the given config object. This must be called
+explicitly by the application.
+
+\wxheading{See also}
+
+\helpref{wxConfig}{wxconfigbase}
+
+\membersection{wxFileHistory::UseMenu}
+
+\func{void}{UseMenu}{\param{wxMenu* }{menu}}
+
+Adds this menu to the list of those managed by this object.
+
 
index c39660ccbff8dd8f6ff505b0dbf6e6e2d31d0c1d..8d2b277cf5a29d4ebeec0a86bab816cba4b69557 100644 (file)
@@ -525,6 +525,18 @@ Use only after the menubar has been associated with a frame.
 
 \helpref{wxMenuBar::SetLabelTop}{wxmenubarsetlabeltop}
 
+\membersection{wxMenuBar::GetMenu}\label{wxmenubargetmenu}
+
+\constfunc{wxMenu*}{GetMenu}{\param{int}{ menuIndex}}
+
+Returns the menu at {\it menuIndex} (zero-based).
+
+\membersection{wxMenuBar::GetMenuCount}\label{wxmenubargetmenucount}
+
+\constfunc{int}{GetMenuCount}{\void}
+
+Returns the number of menus in this menubar.
+
 \membersection{wxMenuBar::IsChecked}\label{wxmenubarischecked}
 
 \constfunc{bool}{IsChecked}{\param{int}{ id}}
index 0c45fe457e0eff152f24a90883d64aab71ad1963..6488e8a3c828ba625670a89e9b76e78fbb794183 100644 (file)
@@ -39,6 +39,12 @@ Deletes string list, deallocating strings.
 
 Adds string to list, allocating memory.
 
+\membersection{wxStringList::Clear}
+
+\func{void}{Clear}{\void}
+
+Clears all strings from the list.
+
 \membersection{wxStringList::Delete}
 
 \func{void}{Delete}{\param{const wxString\& }{s}}
index c4ff0facb3a9d8561fa15f6adbc4b96ff4d3070b..0cbd0e9effc2a5cf0258b3906902fb9568a687fa 100644 (file)
@@ -824,6 +824,7 @@ enum {
 #define wxID_PASTE              5032
 #define wxID_CLEAR              5033
 #define wxID_FIND               5034
+#define wxID_DUPLICATE          5035
 
 #define wxID_FILE1              5050
 #define wxID_FILE2              5051
index 008929ec76daae59856019134c389b1f4562356a..6bc84b0f0ade5d3689b0a97fc9e50f67de9010fd 100644 (file)
@@ -34,6 +34,7 @@ class WXDLLEXPORT wxPrintInfo;
 class WXDLLEXPORT wxCommand;
 class WXDLLEXPORT wxCommandProcessor;
 class WXDLLEXPORT wxFileHistory;
+class WXDLLEXPORT wxConfigBase;
 
 class WXDLLIMPORT ostream;
 class WXDLLIMPORT istream;
@@ -332,8 +333,11 @@ class WXDLLEXPORT wxDocManager: public wxEvtHandler
   virtual int GetNoHistoryFiles(void) const;
   virtual wxString GetHistoryFile(int i) const;
   virtual void FileHistoryUseMenu(wxMenu *menu);
-  virtual void FileHistoryLoad(const wxString& resourceFile, const wxString& section);
-  virtual void FileHistorySave(const wxString& resourceFile, const wxString& section);
+  virtual void FileHistoryRemoveMenu(wxMenu *menu);
+  virtual void FileHistoryLoad(wxConfigBase& config);
+  virtual void FileHistorySave(wxConfigBase& config);
+  virtual void FileHistoryAddFilesToMenu();
+  virtual void FileHistoryAddFilesToMenu(wxMenu* menu);
  protected:
   long              m_flags;
   int               m_defaultDocumentNameCounter;
@@ -465,7 +469,8 @@ class WXDLLEXPORT wxCommandProcessor: public wxObject
   virtual bool Submit(wxCommand *command, bool storeIt = TRUE);
   virtual bool Undo(void);
   virtual bool Redo(void);
-  virtual bool CanUndo(void);
+  virtual bool CanUndo(void) const;
+  virtual bool CanRedo(void) const;
 
   // Call this to manage an edit menu.
   inline void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
@@ -484,6 +489,8 @@ class WXDLLEXPORT wxCommandProcessor: public wxObject
   wxMenu*       m_commandEditMenu;
 };
 
+// File history management
+
 class WXDLLEXPORT wxFileHistory: public wxObject
 {
   DECLARE_DYNAMIC_CLASS(wxFileHistory)
@@ -491,21 +498,36 @@ class WXDLLEXPORT wxFileHistory: public wxObject
   wxFileHistory(int maxFiles = 9);
   ~wxFileHistory(void);
 
-  // File history management
+// Operations
   virtual void AddFileToHistory(const wxString& file);
-  inline virtual int GetNoHistoryFiles(void) const { return m_fileHistoryN; }
-  virtual wxString GetHistoryFile(int i) const;
   virtual int GetMaxFiles(void) const { return m_fileMaxFiles; }
-  virtual void FileHistoryUseMenu(wxMenu *menu);
-  virtual void FileHistoryLoad(const wxString& resourceFile, const wxString& section);
-  virtual void FileHistorySave(const wxString& resourceFile, const wxString& section);
+  virtual void UseMenu(wxMenu *menu);
+
+  // Remove menu from the list (MDI child may be closing)
+  virtual void RemoveMenu(wxMenu *menu);
+
+  virtual void Load(wxConfigBase& config);
+  virtual void Save(wxConfigBase& config);
+
+  virtual void AddFilesToMenu();
+  virtual void AddFilesToMenu(wxMenu* menu); // Single menu
+
+// Accessors
+  virtual wxString GetHistoryFile(int i) const;
+
+  // A synonym for GetNoHistoryFiles
+  virtual int GetCount() const { return m_fileHistoryN; }
+  inline int GetNoHistoryFiles(void) const { return m_fileHistoryN; }
+
+  inline wxList& GetMenus() const { return (wxList&) m_fileMenus; }
+
  protected:
   // Last n files
   char**            m_fileHistory;
   // Number of files saved
   int               m_fileHistoryN;
-  // Menu to maintain
-  wxMenu*           m_fileMenu;
+  // Menus to maintain (may need several for an MDI app)
+  wxList            m_fileMenus;
   // Max files to maintain
   int               m_fileMaxFiles;
 };
index 0889410bf6cc0fdf4bfa2ed0227d653a33b9bf5a..f5c3d406077d2d17350f9931f796fe8fa7dd8443 100644 (file)
@@ -57,7 +57,7 @@ class WXDLLEXPORT wxApp: public wxEvtHandler
   virtual bool Pending() ;
   virtual void Dispatch() ;
 
-  virtual void OnIdle(wxIdleEvent& event);
+  void OnIdle(wxIdleEvent& event);
 
 // Generic
   virtual bool OnInit() { return FALSE; };
index 495799bf32021d2e4d822a286f1f3180014777c2..7516125e92f04c012f95df61c3c349abfdd96e6f 100644 (file)
@@ -28,7 +28,7 @@ public:
    wxControl(void);
    ~wxControl(void);
 
-   virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0;        // Simulates an event
+   virtual void Command(wxCommandEvent& WXUNUSED(event)) {};        // Simulates an event
    virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
                                                                  // appropriate event handlers
    virtual void SetClientSize(int width, int height);
index 993e8738fa4f0017167626cc1315ce2540341ad6..60d3c1db500b8a9a1cbe8849c197960d6bdff520 100644 (file)
@@ -71,9 +71,9 @@ class WXDLLEXPORT wxMetaFileDC: public wxDC
   // Should be called at end of drawing
   virtual wxMetaFile *Close(void);
   virtual void SetMapMode(int mode);
-  virtual void GetTextExtent(const wxString& string, float *x, float *y,
-                     float *descent = NULL, float *externalLeading = NULL,
-                     wxFont *theFont = NULL, bool use16bit = FALSE);
+  virtual void GetTextExtent(const wxString& string, long *x, long *y,
+                     long *descent = NULL, long *externalLeading = NULL,
+                     wxFont *theFont = NULL, bool use16bit = FALSE) const;
 
   // Implementation
   inline wxMetaFile *GetMetaFile(void) { return m_metaFile; }
index 716be466069ab46273e1cefc625e4b12382c8bb6..d47ad0e97d881d1cd1c97855ee15588dbab02572 100644 (file)
@@ -403,6 +403,7 @@ public:
   // Does this window want to accept keyboard focus?
   virtual bool AcceptsFocus() const;
 
+  virtual void PrepareDC( wxDC &dc ) {};
 public:
   ////////////////////////////////////////////////////////////////////////
   //// IMPLEMENTATION
index 9bbc41a3ed6b52e8d50326d4e3e0108247c81389..a3877551d71891d7fa7d62b913ecd5f826ac5b65 100644 (file)
@@ -67,7 +67,7 @@ BEGIN
     BEGIN
         MENUITEM "&Cascade",                    4002
         MENUITEM "&Tile",                       4001
-        MENUITEM "&Arrange icons",              4003
+        MENUITEM "&Arrange Icons",              4003
         MENUITEM "&Next",                       4004
     END
 END
index 3b1467fec58a94bf6275647b6dbd1b158f644ebd..948e6b4fe6663031e6e8c8b68c7e1283924145c0 100644 (file)
@@ -59,7 +59,7 @@ class WXDLLEXPORT wxApp: public wxEvtHandler
   virtual bool Pending() ;
   virtual void Dispatch() ;
 
-  virtual void OnIdle(wxIdleEvent& event);
+  void OnIdle(wxIdleEvent& event);
 
 // Generic
   virtual bool OnInit() { return FALSE; };
index 195944f835b4829a17176b61fd99d7b709803c3f..0b1efd764e00a10c0b53211d0e23cc64fde08362 100644 (file)
@@ -161,10 +161,10 @@ public:
   void SetQuality(int q);
   void SetOk(bool isOk);
 
-  inline wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : NULL); }
+  inline wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : (wxPalette*) NULL); }
   void SetPalette(const wxPalette& palette);
 
-  inline wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : NULL); }
+  inline wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : (wxMask*) NULL); }
   void SetMask(wxMask *mask) ;
 
   inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
index 5432b5c5e756e919830af86872aed69f18413bde..c75756a72a8a1016db8278654a291232f390f445 100644 (file)
@@ -28,7 +28,7 @@ public:
    wxControl();
    ~wxControl();
 
-   virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0;        // Simulates an event
+   virtual void Command(wxCommandEvent& WXUNUSED(event)) {};        // Simulates an event
    virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
                                                                  // appropriate event handlers
    virtual void SetLabel(const wxString& label);
index da7b165e380542e600cb27e7ae4d09ed496563b7..2d0aa7b84657ddce2597e9ff1f2da17fb890457a 100644 (file)
@@ -85,10 +85,10 @@ public:
   inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
   inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
   inline int GetDashes(wxDash **ptr) const {
-     *ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
+     *ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
   }
 
-  inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); };
+  inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };
 
 // Implementation
 
index dc99dbf74b33ea95f0fba74d0f6200a3b0662cc0..864edf23a95e6d0c75d72218e207d2acad407f3d 100644 (file)
@@ -17,6 +17,8 @@
  *
  */
 
+#define USE_CONSTRAINTS       1
+                                // Use constraints mechanism
 #define USE_CONFIG           1
                                 // Use wxConfig, with CreateConfig in wxApp
 #define _WX_GOODCOMPILER__
@@ -92,7 +94,7 @@
 #define USE_C_MAIN 0
                                   // Set to 1 to use main.c instead of main.cpp (UNIX only)
 
-#define USE_ODBC                   1
+#define USE_ODBC                   0
                                     // Define 1 to use ODBC classes
 
 #define USE_IOSTREAMH     1
index 7c3d7b1ac25b482274609681b7e494a5ee0f28ba..2ed500aafe87b996922827219d6741c66fa666b1 100644 (file)
@@ -122,8 +122,8 @@ public:
   // callbacks
   // ---------
   void OnDropFiles(wxDropFilesEvent& event);
-  void OnChar(wxKeyEvent& event); // Process 'enter' if required
-  void OnEraseBackground(wxEraseEvent& event);
+//  void OnChar(wxKeyEvent& event); // Process 'enter' if required
+//  void OnEraseBackground(wxEraseEvent& event);
   
   // Implementation
   // --------------
index 541dd58040c98bb197ae52f0a8913c45adbfab59..6e87206d56a331600f782480fa73c44ca6905f54 100644 (file)
@@ -334,12 +334,6 @@ public:
   virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL);
 #endif
 
-  // Native resource loading
-  virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id);
-  virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name);
-  virtual wxWindow* GetWindowChild1(wxWindowID& id);
-  virtual wxWindow* GetWindowChild(wxWindowID& id);
-
   virtual void GetTextExtent(const wxString& string, int *x, int *y,
                              int *descent = NULL,
                              int *externalLeading = NULL,
@@ -376,6 +370,9 @@ public:
   // Does this window want to accept keyboard focus?
   virtual bool AcceptsFocus() const;
 
+  virtual void PrepareDC( wxDC &dc ) {};
+
+
 public:
   ////////////////////////////////////////////////////////////////////////
   //// IMPLEMENTATION
@@ -501,7 +498,7 @@ inline int wxWindow::GetId() const { return m_windowId; }
 inline void wxWindow::SetId(int id) { m_windowId = id; }
 inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
 inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
-inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); }
+inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
 inline wxList *wxWindow::GetChildren() const { return m_children; }
 inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
 inline wxString wxWindow::GetName() const { return m_windowName; }
index 6d68c5fc75b0849ae98b3ea4e8a2e27f524a82da..3f2de88380246b3ff09104e2f14a2f5b56bed3b5 100644 (file)
@@ -16,7 +16,7 @@
 #endif
 
 #include <wx/stream.h>
-#include "../zlib/zlib.h"
+#include "../zlib/zlib.h"   // don't change this, Robert
 
 class wxZlibInputStream: public wxFilterInputStream {
  public:
diff --git a/samples/minimal/makefile.unx b/samples/minimal/makefile.unx
new file mode 100644 (file)
index 0000000..7365f9c
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# File:                makefile.unx
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+# Copyright:   (c) 1998 Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile for minimal example (UNIX).
+
+include ../../src/makeprog.env
+
+PROGRAM=minimal
+
+OBJECTS=$(PROGRAM).o
index ecb7b1504c6b04c65fe8ec11505bddb39f16806b..a0de68f3d45766828f374f6e29cc4c7268076268 100644 (file)
@@ -108,9 +108,6 @@ wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
 // Extend event processing to search the view's event table
 bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event)
 {
-    if (m_childView)
-        m_childView->Activate(TRUE);
-
        if ( !m_childView || ! m_childView->ProcessEvent(event) )
     {
         // Only hand up to the parent if it's a menu command
@@ -127,7 +124,7 @@ void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event)
 {
   wxMDIChildFrame::OnActivate(event);
 
-  if (m_childView)
+  if (event.GetActive() && m_childView)
     m_childView->Activate(event.GetActive());
 }
 
index cec8525fabab4e2cef99f614416f70241b81eff6..b54ea6d75bfd2b9d6b9264a2609178fa08d64e0b 100644 (file)
@@ -48,6 +48,7 @@
 #include "wx/printdlg.h"
 #include "wx/generic/prntdlgg.h"
 #include "wx/generic/printps.h"
+#include "wx/confbase.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -290,6 +291,7 @@ bool wxDocument::OnOpenDocument(const wxString& file)
   }
   SetFilename(file, TRUE);
   Modify(FALSE);
+  m_savedYet = TRUE;
 
   UpdateAllViews();
   
@@ -1059,19 +1061,37 @@ wxString wxDocManager::GetHistoryFile(int i) const
 void wxDocManager::FileHistoryUseMenu(wxMenu *menu)
 {
   if (m_fileHistory)
-    m_fileHistory->FileHistoryUseMenu(menu);
+    m_fileHistory->UseMenu(menu);
 }
 
-void wxDocManager::FileHistoryLoad(const wxString& resourceFile, const wxString& section)
+void wxDocManager::FileHistoryRemoveMenu(wxMenu *menu)
 {
   if (m_fileHistory)
-    m_fileHistory->FileHistoryLoad(resourceFile, section);
+    m_fileHistory->RemoveMenu(menu);
 }
 
-void wxDocManager::FileHistorySave(const wxString& resourceFile, const wxString& section)
+void wxDocManager::FileHistoryLoad(wxConfigBase& config)
 {
   if (m_fileHistory)
-    m_fileHistory->FileHistorySave(resourceFile, section);
+    m_fileHistory->Load(config);
+}
+
+void wxDocManager::FileHistorySave(wxConfigBase& config)
+{
+  if (m_fileHistory)
+    m_fileHistory->Save(config);
+}
+
+void wxDocManager::FileHistoryAddFilesToMenu(wxMenu* menu)
+{
+  if (m_fileHistory)
+    m_fileHistory->AddFilesToMenu(menu);
+}
+
+void wxDocManager::FileHistoryAddFilesToMenu()
+{
+  if (m_fileHistory)
+    m_fileHistory->AddFilesToMenu();
 }
 
 int wxDocManager::GetNoHistoryFiles(void) const
@@ -1610,13 +1630,18 @@ bool wxCommandProcessor::Redo(void)
   return FALSE;
 }
 
-bool wxCommandProcessor::CanUndo(void)
+bool wxCommandProcessor::CanUndo(void) const
 {
   if (m_currentCommand)
     return ((wxCommand *)m_currentCommand->Data())->CanUndo();
   return FALSE;
 }
 
+bool wxCommandProcessor::CanRedo(void) const
+{
+  return ((m_currentCommand && m_currentCommand->Next()));
+}
+
 void wxCommandProcessor::Initialize(void)
 {
   m_currentCommand = m_commands.Last();
@@ -1704,7 +1729,6 @@ void wxCommandProcessor::ClearCommands(void)
 wxFileHistory::wxFileHistory(int maxFiles)
 {
   m_fileMaxFiles = maxFiles;
-  m_fileMenu = (wxMenu *) NULL;
   m_fileHistoryN = 0;
   m_fileHistory = new char *[m_fileMaxFiles];
 }
@@ -1720,18 +1744,14 @@ wxFileHistory::~wxFileHistory(void)
 // File history management
 void wxFileHistory::AddFileToHistory(const wxString& file)
 {
-  if (!m_fileMenu)
-    return;
-    
   int i;
-
   // Check we don't already have this file
   for (i = 0; i < m_fileHistoryN; i++)
   {
-    if (m_fileHistory[i] && wxString(m_fileHistory[i]) == file)
-      return;
+      if (m_fileHistory[i] && wxString(m_fileHistory[i]) == file)
+          return;
   }
-  
+
   // Add to the project file history:
   // Move existing files (if any) down so we can insert file at beginning.
   
@@ -1743,9 +1763,15 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
   }
   if (m_fileHistoryN < m_fileMaxFiles)
   {
-    if (m_fileHistoryN == 0)
-      m_fileMenu->AppendSeparator();
-    m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]"));
+    wxNode* node = m_fileMenus.First();
+    while (node)
+    {
+        wxMenu* menu = (wxMenu*) node->Data();
+        if (m_fileHistoryN == 0)
+            menu->AppendSeparator();
+        menu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]"));
+        node = node->Next();
+    }
     m_fileHistoryN ++;
   }
   // Shuffle filenames down
@@ -1760,7 +1786,13 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
     {
       char buf[400];
       sprintf(buf, "&%d %s", i+1, m_fileHistory[i]);
-      m_fileMenu->SetLabel(wxID_FILE1+i, buf);
+      wxNode* node = m_fileMenus.First();
+      while (node)
+      {
+        wxMenu* menu = (wxMenu*) node->Data();
+        menu->SetLabel(wxID_FILE1+i, buf);
+        node = node->Next();
+      }
     }
 }
 
@@ -1772,40 +1804,84 @@ wxString wxFileHistory::GetHistoryFile(int i) const
     return wxString("");
 }
 
-void wxFileHistory::FileHistoryUseMenu(wxMenu *menu)
+void wxFileHistory::UseMenu(wxMenu *menu)
 {
-  m_fileMenu = menu;
+  if (!m_fileMenus.Member(menu))
+    m_fileMenus.Append(menu);
 }
 
-void wxFileHistory::FileHistoryLoad(const wxString& resourceFile, const wxString& section)
+void wxFileHistory::RemoveMenu(wxMenu *menu)
+{
+  m_fileMenus.DeleteObject(menu);
+}
+
+void wxFileHistory::Load(wxConfigBase& config)
 {
-#if USE_RESOURCES
   m_fileHistoryN = 0;
   char buf[400];
   sprintf(buf, "file%d", m_fileHistoryN+1);
-  char *historyFile = (char *) NULL;
-  while ((m_fileHistoryN <= m_fileMaxFiles) && wxGetResource(section, buf, &historyFile, resourceFile) && historyFile)
+  wxString historyFile("");
+  while ((m_fileHistoryN <= m_fileMaxFiles) && config.Read(buf, &historyFile) && (historyFile != ""))
   {
-    // wxGetResource allocates memory so this is o.k.
-    m_fileHistory[m_fileHistoryN] = historyFile;
+    m_fileHistory[m_fileHistoryN] = copystring((const char*) historyFile);
     m_fileHistoryN ++;
     sprintf(buf, "file%d", m_fileHistoryN+1);
-    historyFile = (char *) NULL;
+    historyFile = "";
   }
-#endif
+  AddFilesToMenu();
 }
 
-void wxFileHistory::FileHistorySave(const wxString& resourceFile, const wxString& section)
+void wxFileHistory::Save(wxConfigBase& config)
 {
-#if USE_RESOURCES
-  char buf[400];
   int i;
   for (i = 0; i < m_fileHistoryN; i++)
   {
-    sprintf(buf, "file%d", i+1);
-    wxWriteResource(section, buf, m_fileHistory[i], resourceFile);
+    wxString buf;
+    buf.Printf("file%d", i+1);
+    config.Write(buf, wxString(m_fileHistory[i]));
   }
-#endif
+}
+
+void wxFileHistory::AddFilesToMenu()
+{
+    if (m_fileHistoryN > 0)
+    {
+        wxNode* node = m_fileMenus.First();
+        while (node)
+        {
+            wxMenu* menu = (wxMenu*) node->Data();
+            menu->AppendSeparator();
+            int i;
+            for (i = 0; i < m_fileHistoryN; i++)
+            {
+                if (m_fileHistory[i])
+                {
+                    wxString buf;
+                    buf.Printf("&%d %s", i+1, m_fileHistory[i]);
+                    menu->Append(wxID_FILE1+i, buf);
+                }
+            }
+            node = node->Next();
+        }
+    }
+}
+
+void wxFileHistory::AddFilesToMenu(wxMenu* menu)
+{
+    if (m_fileHistoryN > 0)
+    {
+        menu->AppendSeparator();
+        int i;
+        for (i = 0; i < m_fileHistoryN; i++)
+        {
+            if (m_fileHistory[i])
+            {
+                wxString buf;
+                buf.Printf("&%d %s", i+1, m_fileHistory[i]);
+                menu->Append(wxID_FILE1+i, buf);
+            }
+        }
+    }
 }
 
 #if 0
index d0a65e01ec05d5bbe897e757ecf1308a7c4a79d9..52af1f7b4cf71e0532cdf18e6379490a71f84c0e 100644 (file)
@@ -1371,3 +1371,160 @@ void WXDLLEXPORT wxSplitPath(const char *pszFileName,
       pstrExt->Empty();
   }
 }
+
+//------------------------------------------------------------------------
+// wild character routines
+//------------------------------------------------------------------------
+
+bool wxIsWild( const wxString& pattern )
+{
+  wxString tmp = pattern;
+  char *pat = WXSTRINGCAST(tmp);
+    while (*pat) {
+       switch (*pat++) {
+       case '?': case '*': case '[': case '{':
+           return TRUE;
+       case '\\':
+           if (!*pat++)
+               return FALSE;
+       }
+    }
+    return FALSE;
+};
+
+
+bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
+{
+  wxString tmp1 = pat;
+  char *pattern = WXSTRINGCAST(tmp1);
+  wxString tmp2 = text;
+  char *str = WXSTRINGCAST(tmp2);
+    char c;
+    char *cp;
+    bool done = FALSE, ret_code, ok;
+    // Below is for vi fans
+    const char OB = '{', CB = '}';
+
+    // dot_special means '.' only matches '.'
+    if (dot_special && *str == '.' && *pattern != *str)
+       return FALSE;
+
+    while ((*pattern != '\0') && (!done)
+    && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
+       switch (*pattern) {
+       case '\\':
+           pattern++;
+           if (*pattern != '\0')
+               pattern++;
+           break;
+       case '*':
+           pattern++;
+           ret_code = FALSE;
+           while ((*str!='\0')
+           && (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
+               /*loop*/;
+           if (ret_code) {
+               while (*str != '\0')
+                   str++;
+               while (*pattern != '\0')
+                   pattern++;
+           }
+           break;
+       case '[':
+           pattern++;
+         repeat:
+           if ((*pattern == '\0') || (*pattern == ']')) {
+               done = TRUE;
+               break;
+           }
+           if (*pattern == '\\') {
+               pattern++;
+               if (*pattern == '\0') {
+                   done = TRUE;
+                   break;
+               }
+           }
+           if (*(pattern + 1) == '-') {
+               c = *pattern;
+               pattern += 2;
+               if (*pattern == ']') {
+                   done = TRUE;
+                   break;
+               }
+               if (*pattern == '\\') {
+                   pattern++;
+                   if (*pattern == '\0') {
+                       done = TRUE;
+                       break;
+                   }
+               }
+               if ((*str < c) || (*str > *pattern)) {
+                   pattern++;
+                   goto repeat;
+               }
+           } else if (*pattern != *str) {
+               pattern++;
+               goto repeat;
+           }
+           pattern++;
+           while ((*pattern != ']') && (*pattern != '\0')) {
+               if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
+                   pattern++;
+               pattern++;
+           }
+           if (*pattern != '\0') {
+               pattern++, str++;
+           }
+           break;
+       case '?':
+           pattern++;
+           str++;
+           break;
+       case OB:
+           pattern++;
+           while ((*pattern != CB) && (*pattern != '\0')) {
+               cp = str;
+               ok = TRUE;
+               while (ok && (*cp != '\0') && (*pattern != '\0')
+               &&  (*pattern != ',') && (*pattern != CB)) {
+                   if (*pattern == '\\')
+                       pattern++;
+                   ok = (*pattern++ == *cp++);
+               }
+               if (*pattern == '\0') {
+                   ok = FALSE;
+                   done = TRUE;
+                   break;
+               } else if (ok) {
+                   str = cp;
+                   while ((*pattern != CB) && (*pattern != '\0')) {
+                       if (*++pattern == '\\') {
+                           if (*++pattern == CB)
+                               pattern++;
+                       }
+                   }
+               } else {
+                   while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
+                       if (*++pattern == '\\') {
+                            if (*++pattern == CB || *pattern == ',')
+                               pattern++;
+                       }
+                   }
+               }
+               if (*pattern != '\0')
+                   pattern++;
+           }
+           break;
+       default:
+           if (*str == *pattern) {
+               str++, pattern++;
+           } else {
+               done = TRUE;
+           }
+       }
+    }
+    while (*pattern == '*')
+       pattern++;
+    return ((*str == '\0') && (*pattern == '\0'));
+};
+
index da261af97da460661c2d480bdfe2c05f4dc92a49..53ddde5e89e13974b88c481ba3428587c03cc57f 100644 (file)
@@ -31,6 +31,9 @@
 #include <wx/timer.h>
 #include <wx/utils.h>
 
+// Not enough OS behaviour defined for wxStubs
+#ifndef __WXSTUBS__
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -1537,3 +1540,6 @@ HWND wxSocketHandler::GetHWND() const
 }
 
 #endif
+
+#endif
+  // __WXSTUBS__
index 569401fdce270be46585d399fa83e7ee8916ee41..d2b33bc0e046e10f4f19933ac616c62d13726091 100644 (file)
@@ -41,7 +41,7 @@ wxZlibInputStream::wxZlibInputStream(wxInputStream& stream)
 
   m_inflate.zalloc = (alloc_func)0;
   m_inflate.zfree = (free_func)0;
-  m_inflate.opaque = (voidpf)0;
+  m_inflate.opaque = (void*)0;
 
   err = inflateInit(&m_inflate);
   if (err != Z_OK) {
@@ -107,7 +107,7 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream)
 
   m_deflate.zalloc = (alloc_func)0;
   m_deflate.zfree = (free_func)0;
-  m_deflate.opaque = (voidpf)0;
+  m_deflate.opaque = (void*)0;
 
   err = deflateInit(&m_deflate, Z_DEFAULT_COMPRESSION);
   if (err != Z_OK) {
index a5e2c197782e3c6069a6941642b98700a49324fc..957a697493c52214b3b6608f1315a4c4a5f0fecc 100644 (file)
@@ -542,7 +542,7 @@ void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
        if (hilight)
          dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
        else
-          dc->SetTextForeground( info->GetColour() );
+          dc->SetTextForeground( info->GetColour() );
       dc->DrawText( s, info->GetX()+2, info->GetY() );
       dc->DestroyClippingRegion();
       node = node->Next();
@@ -565,7 +565,7 @@ void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
        if (hilight)
          dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
        else
-          dc->SetTextForeground( item->GetColour() );
+          dc->SetTextForeground( item->GetColour() );
         dc->DrawText( s, m_bound_label.x, m_bound_label.y );
       }
     }
@@ -978,9 +978,9 @@ void wxListMainWindow::HilightAll( bool on )
 
 void wxListMainWindow::ActivateLine( wxListLineData *line )
 {
-  if (!m_parent) return;
-  wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, m_parent->GetId() );
-  le.SetEventObject( m_parent );
+  if (!GetParent()) return;
+  wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
+  le.SetEventObject( GetParent() );
   le.m_code = 0;
   le.m_itemIndex = GetIndexOfLine( line );
   le.m_col = 0;
@@ -990,9 +990,9 @@ void wxListMainWindow::ActivateLine( wxListLineData *line )
 
 void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command )
 {
-  if (!m_parent) return;
-  wxListEvent le( command, m_parent->GetId() );
-  le.SetEventObject( m_parent );
+  if (!GetParent()) return;
+  wxListEvent le( command, GetParent()->GetId() );
+  le.SetEventObject( GetParent() );
   le.m_code = 0;
   le.m_itemIndex = GetIndexOfLine( line );
   le.m_col = 0;
@@ -1032,10 +1032,10 @@ void wxListMainWindow::StartLabelEdit( wxListLineData *line )
 
 void wxListMainWindow::RenameLine( wxListLineData *line, const wxString &newName )
 {
-  if (!m_parent) return;
+  if (!GetParent()) return;
   
-  wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, m_parent->GetId() );
-  le.SetEventObject( m_parent );
+  wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
+  le.SetEventObject( GetParent() );
   le.m_code = 0;
   le.m_itemIndex = GetIndexOfLine( line );
   le.m_col = 0;
@@ -1087,7 +1087,7 @@ void wxListMainWindow::OnRenameAccept()
 
 void wxListMainWindow::OnMouse( wxMouseEvent &event )
 {
-  if (m_parent->ProcessEvent( event)) return;
+  if (GetParent()->ProcessEvent( event)) return;
 
   if (!m_current) return;
   if (m_dirty) return;
@@ -1117,7 +1117,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
   if (event.Dragging() && (m_dragCount > 3))
   {
     m_dragCount = 0;
-    wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, m_parent->GetId() );
+    wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, GetParent()->GetId() );
     le.SetEventObject( this );
     le.m_code = 0;
     le.m_itemIndex = 0;
@@ -1398,11 +1398,11 @@ void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
   m_hasFocus = TRUE;
   RefreshLine( m_current );
   
-  if (!m_parent) return;
+  if (!GetParent()) return;
   
-  wxFocusEvent event( wxEVT_SET_FOCUS, m_parent->GetId() );
-  event.SetEventObject( m_parent );
-  m_parent->ProcessEvent( event );
+  wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() );
+  event.SetEventObject( GetParent() );
+  GetParent()->ProcessEvent( event );
 }
 
 void wxListMainWindow::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
@@ -2054,7 +2054,7 @@ void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
 
 bool wxListMainWindow::OnListNotify( wxListEvent &event )
 {
-  if (m_parent) m_parent->ProcessEvent( event );
+  if (GetParent()) GetParent()->ProcessEvent( event );
   return FALSE;
 }
 
index 25210a4e0be987fb228923005a59120a9cf1e458..4a6dbc728d69963513abe5f763d214c2d9d39fcf 100644 (file)
@@ -198,162 +198,6 @@ bool wxDirExists( const wxString& dir )
   return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE);
 };
 
-//------------------------------------------------------------------------
-// wild character routines
-//------------------------------------------------------------------------
-
-bool wxIsWild( const wxString& pattern )
-{
-  wxString tmp = pattern;
-  char *pat = WXSTRINGCAST(tmp);
-    while (*pat) {
-       switch (*pat++) {
-       case '?': case '*': case '[': case '{':
-           return TRUE;
-       case '\\':
-           if (!*pat++)
-               return FALSE;
-       }
-    }
-    return FALSE;
-};
-
-
-bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
-{
-  wxString tmp1 = pat;
-  char *pattern = WXSTRINGCAST(tmp1);
-  wxString tmp2 = text;
-  char *str = WXSTRINGCAST(tmp2);
-    char c;
-    char *cp;
-    bool done = FALSE, ret_code, ok;
-    // Below is for vi fans
-    const char OB = '{', CB = '}';
-
-    // dot_special means '.' only matches '.'
-    if (dot_special && *str == '.' && *pattern != *str)
-       return FALSE;
-
-    while ((*pattern != '\0') && (!done)
-    && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
-       switch (*pattern) {
-       case '\\':
-           pattern++;
-           if (*pattern != '\0')
-               pattern++;
-           break;
-       case '*':
-           pattern++;
-           ret_code = FALSE;
-           while ((*str!='\0')
-           && (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
-               /*loop*/;
-           if (ret_code) {
-               while (*str != '\0')
-                   str++;
-               while (*pattern != '\0')
-                   pattern++;
-           }
-           break;
-       case '[':
-           pattern++;
-         repeat:
-           if ((*pattern == '\0') || (*pattern == ']')) {
-               done = TRUE;
-               break;
-           }
-           if (*pattern == '\\') {
-               pattern++;
-               if (*pattern == '\0') {
-                   done = TRUE;
-                   break;
-               }
-           }
-           if (*(pattern + 1) == '-') {
-               c = *pattern;
-               pattern += 2;
-               if (*pattern == ']') {
-                   done = TRUE;
-                   break;
-               }
-               if (*pattern == '\\') {
-                   pattern++;
-                   if (*pattern == '\0') {
-                       done = TRUE;
-                       break;
-                   }
-               }
-               if ((*str < c) || (*str > *pattern)) {
-                   pattern++;
-                   goto repeat;
-               }
-           } else if (*pattern != *str) {
-               pattern++;
-               goto repeat;
-           }
-           pattern++;
-           while ((*pattern != ']') && (*pattern != '\0')) {
-               if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
-                   pattern++;
-               pattern++;
-           }
-           if (*pattern != '\0') {
-               pattern++, str++;
-           }
-           break;
-       case '?':
-           pattern++;
-           str++;
-           break;
-       case OB:
-           pattern++;
-           while ((*pattern != CB) && (*pattern != '\0')) {
-               cp = str;
-               ok = TRUE;
-               while (ok && (*cp != '\0') && (*pattern != '\0')
-               &&  (*pattern != ',') && (*pattern != CB)) {
-                   if (*pattern == '\\')
-                       pattern++;
-                   ok = (*pattern++ == *cp++);
-               }
-               if (*pattern == '\0') {
-                   ok = FALSE;
-                   done = TRUE;
-                   break;
-               } else if (ok) {
-                   str = cp;
-                   while ((*pattern != CB) && (*pattern != '\0')) {
-                       if (*++pattern == '\\') {
-                           if (*++pattern == CB)
-                               pattern++;
-                       }
-                   }
-               } else {
-                   while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
-                       if (*++pattern == '\\') {
-                            if (*++pattern == CB || *pattern == ',')
-                               pattern++;
-                       }
-                   }
-               }
-               if (*pattern != '\0')
-                   pattern++;
-           }
-           break;
-       default:
-           if (*str == *pattern) {
-               str++, pattern++;
-           } else {
-               done = TRUE;
-           }
-       }
-    }
-    while (*pattern == '*')
-       pattern++;
-    return ((*str == '\0') && (*pattern == '\0'));
-};
-
 //------------------------------------------------------------------------
 // subprocess routines
 //------------------------------------------------------------------------
index 25210a4e0be987fb228923005a59120a9cf1e458..4a6dbc728d69963513abe5f763d214c2d9d39fcf 100644 (file)
@@ -198,162 +198,6 @@ bool wxDirExists( const wxString& dir )
   return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE);
 };
 
-//------------------------------------------------------------------------
-// wild character routines
-//------------------------------------------------------------------------
-
-bool wxIsWild( const wxString& pattern )
-{
-  wxString tmp = pattern;
-  char *pat = WXSTRINGCAST(tmp);
-    while (*pat) {
-       switch (*pat++) {
-       case '?': case '*': case '[': case '{':
-           return TRUE;
-       case '\\':
-           if (!*pat++)
-               return FALSE;
-       }
-    }
-    return FALSE;
-};
-
-
-bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
-{
-  wxString tmp1 = pat;
-  char *pattern = WXSTRINGCAST(tmp1);
-  wxString tmp2 = text;
-  char *str = WXSTRINGCAST(tmp2);
-    char c;
-    char *cp;
-    bool done = FALSE, ret_code, ok;
-    // Below is for vi fans
-    const char OB = '{', CB = '}';
-
-    // dot_special means '.' only matches '.'
-    if (dot_special && *str == '.' && *pattern != *str)
-       return FALSE;
-
-    while ((*pattern != '\0') && (!done)
-    && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
-       switch (*pattern) {
-       case '\\':
-           pattern++;
-           if (*pattern != '\0')
-               pattern++;
-           break;
-       case '*':
-           pattern++;
-           ret_code = FALSE;
-           while ((*str!='\0')
-           && (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
-               /*loop*/;
-           if (ret_code) {
-               while (*str != '\0')
-                   str++;
-               while (*pattern != '\0')
-                   pattern++;
-           }
-           break;
-       case '[':
-           pattern++;
-         repeat:
-           if ((*pattern == '\0') || (*pattern == ']')) {
-               done = TRUE;
-               break;
-           }
-           if (*pattern == '\\') {
-               pattern++;
-               if (*pattern == '\0') {
-                   done = TRUE;
-                   break;
-               }
-           }
-           if (*(pattern + 1) == '-') {
-               c = *pattern;
-               pattern += 2;
-               if (*pattern == ']') {
-                   done = TRUE;
-                   break;
-               }
-               if (*pattern == '\\') {
-                   pattern++;
-                   if (*pattern == '\0') {
-                       done = TRUE;
-                       break;
-                   }
-               }
-               if ((*str < c) || (*str > *pattern)) {
-                   pattern++;
-                   goto repeat;
-               }
-           } else if (*pattern != *str) {
-               pattern++;
-               goto repeat;
-           }
-           pattern++;
-           while ((*pattern != ']') && (*pattern != '\0')) {
-               if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
-                   pattern++;
-               pattern++;
-           }
-           if (*pattern != '\0') {
-               pattern++, str++;
-           }
-           break;
-       case '?':
-           pattern++;
-           str++;
-           break;
-       case OB:
-           pattern++;
-           while ((*pattern != CB) && (*pattern != '\0')) {
-               cp = str;
-               ok = TRUE;
-               while (ok && (*cp != '\0') && (*pattern != '\0')
-               &&  (*pattern != ',') && (*pattern != CB)) {
-                   if (*pattern == '\\')
-                       pattern++;
-                   ok = (*pattern++ == *cp++);
-               }
-               if (*pattern == '\0') {
-                   ok = FALSE;
-                   done = TRUE;
-                   break;
-               } else if (ok) {
-                   str = cp;
-                   while ((*pattern != CB) && (*pattern != '\0')) {
-                       if (*++pattern == '\\') {
-                           if (*++pattern == CB)
-                               pattern++;
-                       }
-                   }
-               } else {
-                   while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
-                       if (*++pattern == '\\') {
-                            if (*++pattern == CB || *pattern == ',')
-                               pattern++;
-                       }
-                   }
-               }
-               if (*pattern != '\0')
-                   pattern++;
-           }
-           break;
-       default:
-           if (*str == *pattern) {
-               str++, pattern++;
-           } else {
-               done = TRUE;
-           }
-       }
-    }
-    while (*pattern == '*')
-       pattern++;
-    return ((*str == '\0') && (*pattern == '\0'));
-};
-
 //------------------------------------------------------------------------
 // subprocess routines
 //------------------------------------------------------------------------
diff --git a/src/make.env b/src/make.env
new file mode 100644 (file)
index 0000000..a5a1a2d
--- /dev/null
@@ -0,0 +1,121 @@
+# generic.env
+# Linux/generic
+#
+# Common makefile settings for wxWindows programs
+# This file is included by all the other makefiles, thus changes 
+# made here take effect everywhere (except where overriden).
+#
+# An alternative to editing this file is to create a shell script
+# to export specific variables, and call make with the -e switch
+# to override makefile variables. See wx/install/install.txt.
+# And you can override specific variables on the make command line, e.g.
+#
+# make -f makefile.unix DEBUG=''
+#
+# You may prefer to use the GNU configure script than raw makefiles -
+# see contrib/wxshlib.
+#
+
+########################### Programs #################################
+
+# Replace this with your own path if necessary
+WXDIR       = /home/jacs/wx2
+
+# C++ compiler
+CC          = g++
+
+# C compiler
+CCC         = gcc
+
+# Compiler for lex/yacc .c programs
+CCLEX       = $(CCC)
+
+LEX         = lex
+YACC        = yacc
+MAKE        = make
+AROPTIONS   = ruv
+RANLIB      = ranlib
+
+############################ Switches #################################
+
+# Debug/trace mode. 1 or more for debugging.
+DEBUG       = 0
+GUI         = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
+GUISUFFIX   = _stubs
+
+########################## Compiler flags #############################
+
+# Misc options
+OPTIONS     = -D__WXDEBUG__ -DWXDEBUG
+COPTIONS    =
+DEBUGFLAGS  = -ggdb
+INCLUDE     =
+WARN        = -Wall -Wno-unused # -w
+CWARN       = -Wall -Wno-unused # -w
+OPT         = # -O2
+
+############################ Includes #################################
+
+# Compiler or system-specific include paths
+COMPPATHS   =
+XINCLUDE    = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
+              -I/usr/include/X11/Xm -I/usr/include
+XLIB        = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
+
+############################ Libraries ################################
+
+COMPLIBS    = -lstdc++
+GUILDLIBS   = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm
+
+############################# Suffixes ################################
+
+# Change cpp to c if you want to use main.c instead of main.cpp.
+# Edit wx_setup.h accordingly (USE_C_MAIN=1)
+
+OBJSUFF     =o
+SRCSUFF     =cpp
+MAINSUFF    =cpp
+
+####################### No changes below this line ####################
+
+WXINC       = $(WXDIR)/include
+WXLIB       = $(WXDIR)/lib/libwx$(GUISUFFIX).a
+INC         = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
+
+# Directory for object files
+OBJDIR = objects$(GUISUFFIX)
+
+CPPFLAGS    = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
+CFLAGS      = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT)
+LDFLAGS     = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
+LDLIBS      = $(EXTRALDLIBS) $(GUILDLIBS)
+
+# Clears all default suffixes
+.SUFFIXES:     .o .cpp .c
+
+.c.o :
+       $(CC) -c $(CFLAGS) -o $@ $<
+
+.cpp.o :
+       $(CC) -c $(CPPFLAGS) -o $@ $<
+
+####################### Targets to allow multiple GUIs ####################
+
+dummy:
+       echo Use a target: one of motif, stubs
+
+stubs:
+       make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
+
+motif:
+       make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
+
+cleanstubs:
+       make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
+
+cleanmotif:
+       make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
+
+$(OBJDIR):
+       mkdir $(OBJDIR)
+
diff --git a/src/makeprog.env b/src/makeprog.env
new file mode 100644 (file)
index 0000000..8a1ee6d
--- /dev/null
@@ -0,0 +1,11 @@
+# Replace this with your own path if necessary
+WXDIR       = /home/jacs/wx2
+include $(WXDIR)/src/make.env
+
+all:    $(PROGRAM)$(GUISUFFIX)
+
+$(PROGRAM)$(GUISUFFIX):        $(OBJECTS) $(WXLIB)
+       $(CC) $(LDFLAGS) -o $(PROGRAM)$(GUISUFFIX) $(OBJECTS) $(LDLIBS)
+
+clean:
+       rm -f $(OBJECTS) minimal$(GUISUFFIX) core
index ec79708311543c2d5cc0c26328ea73e100749524..28d972b3a221d472e492d89a6fa5a34c3d1e7733 100644 (file)
@@ -108,9 +108,13 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file)
 
   if (!file.IsNull() && wxFileExists(file))
     wxRemoveFile(file);
-  m_hDC = (WXHDC) CreateMetaFile(file);
 
-  m_ok = TRUE;
+  if (!file.IsNull() && (file != ""))
+    m_hDC = (WXHDC) CreateMetaFile(file);
+  else
+    m_hDC = (WXHDC) CreateMetaFile(NULL);
+
+  m_ok = (m_hDC != (WXHDC) 0) ;
 
   // Actual Windows mapping mode, for future reference.
   m_windowsMappingMode = MM_TEXT;
@@ -145,12 +149,12 @@ wxMetaFileDC::~wxMetaFileDC(void)
   m_hDC = 0;
 }
 
-void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y,
-                                 float *descent, float *externalLeading, wxFont *theFont, bool use16bit)
+void wxMetaFileDC::GetTextExtent(const wxString& string, long *x, long *y,
+                                 long *descent, long *externalLeading, wxFont *theFont, bool use16bit) const
 {
   wxFont *fontToUse = theFont;
   if (!fontToUse)
-    fontToUse = &m_font;
+    fontToUse = (wxFont*) &m_font;
 
   HDC dc = GetDC(NULL);
 
@@ -161,10 +165,10 @@ void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y,
 
   ReleaseDC(NULL, dc);
 
-  *x = (float)XDEV2LOGREL(sizeRect.cx);
-  *y = (float)YDEV2LOGREL(sizeRect.cy);
-  if (descent) *descent = (float)tm.tmDescent;
-  if (externalLeading) *externalLeading = (float)tm.tmExternalLeading;
+  *x = XDEV2LOGREL(sizeRect.cx);
+  *y = YDEV2LOGREL(sizeRect.cy);
+  if (descent) *descent = tm.tmDescent;
+  if (externalLeading) *externalLeading = tm.tmExternalLeading;
 }
 
 wxMetaFile *wxMetaFileDC::Close(void)
index 5fd182e3fa6be4e5b0b13899632917db96d7b89e..9cb654cd38098a1983759d698959ebc5cebe2b68 100644 (file)
@@ -697,3 +697,196 @@ void wxDisplaySize(int *width, int *height)
   ReleaseDC(NULL, dc);
 }
 
+bool wxDirExists(const wxString& dir)
+{
+  /* MATTHEW: [6] Always use same code for Win32, call FindClose */
+#if defined(__WIN32__)
+  WIN32_FIND_DATA fileInfo;
+#else
+#ifdef __BORLANDC__
+  struct ffblk fileInfo;
+#else
+  struct find_t fileInfo;
+#endif
+#endif
+
+#if defined(__WIN32__)
+       HANDLE h = FindFirstFile((LPTSTR) WXSTRINGCAST dir,(LPWIN32_FIND_DATA)&fileInfo);
+
+       if (h==INVALID_HANDLE_VALUE)
+        return FALSE;
+       else {
+        FindClose(h);
+        return ((fileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY);
+       }
+#else
+  // In Borland findfirst has a different argument
+  // ordering from _dos_findfirst. But _dos_findfirst
+  // _should_ be ok in both MS and Borland... why not?
+#ifdef __BORLANDC__
+  return ((findfirst(WXSTRINGCAST dir, &fileInfo, _A_SUBDIR) == 0  && (fileInfo.ff_attrib & _A_SUBDIR) != 0));
+#else
+  return (((_dos_findfirst(WXSTRINGCAST dir, _A_SUBDIR, &fileInfo) == 0) && (fileInfo.attrib & _A_SUBDIR)) != 0);
+#endif
+#endif
+}
+
+#if 0
+//------------------------------------------------------------------------
+// wild character routines
+//------------------------------------------------------------------------
+
+bool wxIsWild( const wxString& pattern )
+{
+  wxString tmp = pattern;
+  char *pat = WXSTRINGCAST(tmp);
+    while (*pat) {
+       switch (*pat++) {
+       case '?': case '*': case '[': case '{':
+           return TRUE;
+       case '\\':
+           if (!*pat++)
+               return FALSE;
+       }
+    }
+    return FALSE;
+};
+
+
+bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
+{
+  wxString tmp1 = pat;
+  char *pattern = WXSTRINGCAST(tmp1);
+  wxString tmp2 = text;
+  char *str = WXSTRINGCAST(tmp2);
+    char c;
+    char *cp;
+    bool done = FALSE, ret_code, ok;
+    // Below is for vi fans
+    const char OB = '{', CB = '}';
+
+    // dot_special means '.' only matches '.'
+    if (dot_special && *str == '.' && *pattern != *str)
+       return FALSE;
+
+    while ((*pattern != '\0') && (!done)
+    && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
+       switch (*pattern) {
+       case '\\':
+           pattern++;
+           if (*pattern != '\0')
+               pattern++;
+           break;
+       case '*':
+           pattern++;
+           ret_code = FALSE;
+           while ((*str!='\0')
+           && (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
+               /*loop*/;
+           if (ret_code) {
+               while (*str != '\0')
+                   str++;
+               while (*pattern != '\0')
+                   pattern++;
+           }
+           break;
+       case '[':
+           pattern++;
+         repeat:
+           if ((*pattern == '\0') || (*pattern == ']')) {
+               done = TRUE;
+               break;
+           }
+           if (*pattern == '\\') {
+               pattern++;
+               if (*pattern == '\0') {
+                   done = TRUE;
+                   break;
+               }
+           }
+           if (*(pattern + 1) == '-') {
+               c = *pattern;
+               pattern += 2;
+               if (*pattern == ']') {
+                   done = TRUE;
+                   break;
+               }
+               if (*pattern == '\\') {
+                   pattern++;
+                   if (*pattern == '\0') {
+                       done = TRUE;
+                       break;
+                   }
+               }
+               if ((*str < c) || (*str > *pattern)) {
+                   pattern++;
+                   goto repeat;
+               }
+           } else if (*pattern != *str) {
+               pattern++;
+               goto repeat;
+           }
+           pattern++;
+           while ((*pattern != ']') && (*pattern != '\0')) {
+               if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
+                   pattern++;
+               pattern++;
+           }
+           if (*pattern != '\0') {
+               pattern++, str++;
+           }
+           break;
+       case '?':
+           pattern++;
+           str++;
+           break;
+       case OB:
+           pattern++;
+           while ((*pattern != CB) && (*pattern != '\0')) {
+               cp = str;
+               ok = TRUE;
+               while (ok && (*cp != '\0') && (*pattern != '\0')
+               &&  (*pattern != ',') && (*pattern != CB)) {
+                   if (*pattern == '\\')
+                       pattern++;
+                   ok = (*pattern++ == *cp++);
+               }
+               if (*pattern == '\0') {
+                   ok = FALSE;
+                   done = TRUE;
+                   break;
+               } else if (ok) {
+                   str = cp;
+                   while ((*pattern != CB) && (*pattern != '\0')) {
+                       if (*++pattern == '\\') {
+                           if (*++pattern == CB)
+                               pattern++;
+                       }
+                   }
+               } else {
+                   while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
+                       if (*++pattern == '\\') {
+                            if (*++pattern == CB || *pattern == ',')
+                               pattern++;
+                       }
+                   }
+               }
+               if (*pattern != '\0')
+                   pattern++;
+           }
+           break;
+       default:
+           if (*str == *pattern) {
+               str++, pattern++;
+           } else {
+               done = TRUE;
+           }
+       }
+    }
+    while (*pattern == '*')
+       pattern++;
+    return ((*str == '\0') && (*pattern == '\0'));
+};
+
+#endif
+
diff --git a/src/stubs.inc b/src/stubs.inc
new file mode 100644 (file)
index 0000000..2da8b44
--- /dev/null
@@ -0,0 +1,201 @@
+# needed for unactivated
+NONE =
+
+# define library name
+LIB_TARGET=wx_stubs
+LIB_MAJOR=1
+LIB_MINOR=0
+
+# define library sources
+
+LIB_CPP_SRC=\
+\
+ common/cmndata.cpp \
+ common/config.cpp \
+ common/date.cpp \
+ common/docmdi.cpp \
+ common/docview.cpp \
+ common/dynarray.cpp \
+ common/dynlib.cpp \
+ common/event.cpp \
+ common/file.cpp \
+ common/fileconf.cpp \
+ common/filefn.cpp \
+ common/gdicmn.cpp \
+ common/hash.cpp \
+ common/helpbase.cpp \
+ common/intl.cpp \
+ common/ipcbase.cpp \
+ common/layout.cpp \
+ common/list.cpp \
+ common/log.cpp \
+ common/matrix.cpp \
+ common/memory.cpp \
+ common/module.cpp \
+ common/object.cpp \
+ common/odbc.cpp \
+ common/postscrp.cpp \
+ common/prntbase.cpp \
+ common/resource.cpp \
+ common/serbase.cpp \
+ common/string.cpp \
+ common/textfile.cpp \
+ common/time.cpp \
+ common/timercmn.cpp \
+ common/utilscmn.cpp \
+ common/wincmn.cpp \
+ common/framecmn.cpp \
+ common/stream.cpp \
+ common/datstrm.cpp \
+ common/fstream.cpp \
+ common/mstream.cpp \
+ common/zstream.cpp \
+ common/objstrm.cpp \
+ common/sckstrm.cpp \
+ common/validate.cpp \
+ common/valtext.cpp \
+ common/variant.cpp \
+ common/wxexpr.cpp \
+ common/socket.cpp \
+ common/sckaddr.cpp \
+ common/sckipc.cpp \
+ common/protocol.cpp \
+ common/ftp.cpp \
+ common/http.cpp \
+ common/url.cpp \
+ common/tokenzr.cpp \
+\
+ stubs/accel.cpp \
+ stubs/app.cpp \
+ stubs/bitmap.cpp \
+ stubs/bmpbuttn.cpp \
+ stubs/brush.cpp \
+ stubs/button.cpp \
+ stubs/checkbox.cpp \
+ stubs/choice.cpp \
+ stubs/clipbrd.cpp \
+ stubs/colour.cpp \
+ stubs/colordlg.cpp \
+ stubs/control.cpp \
+ stubs/combobox.cpp \
+ stubs/cursor.cpp \
+ stubs/data.cpp \
+ stubs/dc.cpp \
+ stubs/dcclient.cpp \
+ stubs/dcmemory.cpp \
+ stubs/dcscreen.cpp \
+ stubs/dialog.cpp \
+ stubs/dirdlg.cpp \
+ stubs/dnd.cpp \
+ stubs/filedlg.cpp \
+ stubs/font.cpp \
+ stubs/fontdlg.cpp \
+ stubs/frame.cpp \
+ stubs/gauge.cpp \
+ stubs/gdiobj.cpp \
+ stubs/helpxxxx.cpp \
+ stubs/icon.cpp \
+ stubs/imaglist.cpp \
+ stubs/listbox.cpp \
+ stubs/joystick.cpp \
+ stubs/main.cpp \
+ stubs/mdi.cpp \
+ stubs/menu.cpp \
+ stubs/menuitem.cpp \
+ stubs/metafile.cpp \
+ stubs/minifram.cpp \
+ stubs/msgdlg.cpp \
+ stubs/notebook.cpp \
+ stubs/palette.cpp \
+ stubs/pen.cpp \
+ stubs/print.cpp \
+ stubs/radiobox.cpp \
+ stubs/radiobut.cpp \
+ stubs/region.cpp \
+ stubs/scrolbar.cpp \
+ stubs/settings.cpp \
+ stubs/slider.cpp \
+ stubs/spinbutt.cpp \
+ stubs/statbox.cpp \
+ stubs/statbmp.cpp \
+ stubs/stattext.cpp \
+ stubs/statusbr.cpp \
+ stubs/taskbar.cpp \
+ stubs/textctrl.cpp \
+ stubs/thread.cpp \
+ stubs/timer.cpp \
+ stubs/toolbar.cpp \
+ stubs/treectrl.cpp \
+ stubs/utils.cpp \
+ stubs/utilsexc.cpp \
+ stubs/wave.cpp \
+ stubs/window.cpp \
+\
+ generic/choicdgg.cpp \
+ generic/colrdlgg.cpp \
+ generic/fontdlgg.cpp \
+ generic/gridg.cpp \
+ generic/imaglist.cpp \
+ generic/listctrl.cpp \
+ generic/laywin.cpp \
+ generic/msgdlgg.cpp \
+ generic/panelg.cpp \
+ generic/printps.cpp \
+ generic/prntdlgg.cpp \
+ generic/sashwin.cpp \
+ generic/scrolwin.cpp \
+ generic/splitter.cpp \
+ generic/statusbr.cpp \
+ generic/tabg.cpp \
+ generic/textdlgg.cpp \
+ generic/treectrl.cpp
+LIB_C_SRC=\
+ common/extended.c \
+ png/png.c \
+ png/pngset.c \
+ png/pngget.c \
+ png/pngrutil.c \
+ png/pngtrans.c \
+ png/pngwutil.c \
+ png/pngread.c \
+ png/pngrio.c \
+ png/pngwio.c \
+ png/pngwrite.c \
+ png/pngrtran.c \
+ png/pngwtran.c \
+ png/pngmem.c \
+ png/pngerror.c \
+ png/pngpread.c \
+\
+ zlib/adler32.c \
+ zlib/compress.c \
+ zlib/crc32.c \
+ zlib/gzio.c \
+ zlib/uncompr.c \
+ zlib/deflate.c \
+ zlib/trees.c \
+ zlib/zutil.c \
+ zlib/inflate.c \
+ zlib/infblock.c \
+ zlib/inftrees.c \
+ zlib/infcodes.c \
+ zlib/infutil.c \
+ zlib/inffast.c \
+\
+  iodbc/dlf.c \
+  iodbc/dlproc.c \
+  iodbc/herr.c \
+  iodbc/henv.c \
+  iodbc/hdbc.c \
+  iodbc/hstmt.c \
+  iodbc/connect.c \
+  iodbc/prepare.c \
+  iodbc/result.c \
+  iodbc/execute.c \
+  iodbc/fetch.c \
+  iodbc/info.c \
+  iodbc/catalog.c \
+  iodbc/misc.c \
+  iodbc/itrace.c
index d879be671267196783a3333f91e08b6112c1cb1e..67271c4c3b0f4d19c2334674253c3f24d146fe9a 100644 (file)
@@ -95,6 +95,7 @@ void wxApp::CommonCleanUp()
   wxDeleteStockObjects() ;
 
   // Destroy all GDI lists, etc.
+
   delete wxTheBrushList;
   wxTheBrushList = NULL;
 
@@ -121,6 +122,10 @@ void wxApp::CommonCleanUp()
   delete[] wxBuffer;
   wxBuffer = NULL;
 
+  wxClassInfo::CleanUpClasses();
+
+  // do it as the very last thing because everything else can log messages
+  wxLog::DontCreateOnDemand();
   // do it as the very last thing because everything else can log messages
   delete wxLog::SetActiveTarget(NULL);
 }
@@ -177,12 +182,21 @@ int wxEntry( int argc, char *argv[] )
   int retValue = 0;
   
   if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun();
+
+  if (wxTheApp->GetTopWindow())
+  {
+    delete wxTheApp->GetTopWindow();
+    wxTheApp->SetTopWindow(NULL);
+  }
   
   wxTheApp->DeletePendingObjects();  
   
   wxTheApp->OnExit();
   
   wxApp::CommonCleanUp();
+
+  delete wxTheApp;
+  wxTheApp = NULL;
   
 #if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
   // At this point we want to check if there are any memory
index c278536c606e3baf6fe272be8f5f65b9b8d324e4..d29f2bbc8f7447b483b7ab7bf9ab70ac3d191a3b 100644 (file)
@@ -289,3 +289,6 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
   Refresh();
 }
 
+void wxDialog::Fit()
+{
+}
index ec82cb6dc1cffad94a8d43acde4d694817bd1ea0..50bfbd9162ab1f9ed9acb261dfe9f96d64c7ddae 100644 (file)
@@ -99,21 +99,21 @@ wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const
 wxDropSource::wxDropSource( wxWindow *win )
 {
     // TODO
-    m_window = win;
+  //    m_window = win;
     m_data = NULL;
 
-    m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
-    m_goaheadCursor = wxCursor( wxCURSOR_HAND );
+    //    m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
+    //    m_goaheadCursor = wxCursor( wxCURSOR_HAND );
 };
 
 wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
 {
     // TODO
-    m_window = win;
+  //    m_window = win;
     m_data = &data;
 
-    m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
-    m_goaheadCursor = wxCursor( wxCURSOR_HAND );
+    //    m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
+    //    m_goaheadCursor = wxCursor( wxCURSOR_HAND );
 };
 
 void wxDropSource::SetData( wxDataObject &data )
diff --git a/src/stubs/makefile.unx b/src/stubs/makefile.unx
new file mode 100644 (file)
index 0000000..6d6c5c4
--- /dev/null
@@ -0,0 +1,199 @@
+#
+# File:                makefile.unx
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+# Copyright:   (c) 1998
+#
+#
+# Makefile for wxStubs library, Unix
+
+EXTRACFLAGS=-DLEX_SCANNER
+
+include ../make.env
+
+LIB_CPP_SRC=\
+\
+ ../common/cmndata.cpp \
+ ../common/config.cpp \
+ ../common/date.cpp \
+ ../common/docmdi.cpp \
+ ../common/docview.cpp \
+ ../common/dynarray.cpp \
+ ../common/dynlib.cpp \
+ ../common/event.cpp \
+ ../common/file.cpp \
+ ../common/fileconf.cpp \
+ ../common/filefn.cpp \
+ ../common/gdicmn.cpp \
+ ../common/hash.cpp \
+ ../common/helpbase.cpp \
+ ../common/intl.cpp \
+ ../common/ipcbase.cpp \
+ ../common/layout.cpp \
+ ../common/list.cpp \
+ ../common/log.cpp \
+ ../common/matrix.cpp \
+ ../common/memory.cpp \
+ ../common/module.cpp \
+ ../common/object.cpp \
+ ../common/odbc.cpp \
+ ../common/postscrp.cpp \
+ ../common/prntbase.cpp \
+ ../common/resource.cpp \
+ ../common/serbase.cpp \
+ ../common/string.cpp \
+ ../common/textfile.cpp \
+ ../common/tbarbase.cpp \
+ ../common/tbarsmpl.cpp \
+ ../common/timercmn.cpp \
+ ../common/utilscmn.cpp \
+ ../common/wincmn.cpp \
+ ../common/framecmn.cpp \
+ ../common/stream.cpp \
+ ../common/datstrm.cpp \
+ ../common/fstream.cpp \
+ ../common/mstream.cpp \
+ ../common/zstream.cpp \
+ ../common/objstrm.cpp \
+ ../common/sckstrm.cpp \
+ ../common/validate.cpp \
+ ../common/valtext.cpp \
+ ../common/variant.cpp \
+ ../common/wxexpr.cpp \
+ ../common/socket.cpp \
+ ../common/sckaddr.cpp \
+ ../common/sckipc.cpp \
+ ../common/protocol.cpp \
+ ../common/ftp.cpp \
+ ../common/http.cpp \
+ ../common/url.cpp \
+ ../common/tokenzr.cpp \
+\
+ accel.cpp \
+ app.cpp \
+ bitmap.cpp \
+ bmpbuttn.cpp \
+ brush.cpp \
+ button.cpp \
+ checkbox.cpp \
+ choice.cpp \
+ clipbrd.cpp \
+ colour.cpp \
+ colordlg.cpp \
+ control.cpp \
+ combobox.cpp \
+ cursor.cpp \
+ data.cpp \
+ dc.cpp \
+ dcclient.cpp \
+ dcmemory.cpp \
+ dcscreen.cpp \
+ dialog.cpp \
+ dirdlg.cpp \
+ dnd.cpp \
+ filedlg.cpp \
+ font.cpp \
+ fontdlg.cpp \
+ frame.cpp \
+ gauge.cpp \
+ gdiobj.cpp \
+ helpxxxx.cpp \
+ icon.cpp \
+ listbox.cpp \
+ joystick.cpp \
+ main.cpp \
+ mdi.cpp \
+ menu.cpp \
+ menuitem.cpp \
+ metafile.cpp \
+ minifram.cpp \
+ msgdlg.cpp \
+ notebook.cpp \
+ palette.cpp \
+ pen.cpp \
+ print.cpp \
+ radiobox.cpp \
+ radiobut.cpp \
+ region.cpp \
+ scrolbar.cpp \
+ settings.cpp \
+ slider.cpp \
+ spinbutt.cpp \
+ statbox.cpp \
+ statbmp.cpp \
+ stattext.cpp \
+ taskbar.cpp \
+ textctrl.cpp \
+ thread.cpp \
+ timer.cpp \
+ toolbar.cpp \
+ utils.cpp \
+ utilsexc.cpp \
+ wave.cpp \
+ window.cpp \
+\
+ ../generic/choicdgg.cpp \
+ ../generic/colrdlgg.cpp \
+ ../generic/fontdlgg.cpp \
+ ../generic/gridg.cpp \
+ ../generic/imaglist.cpp \
+ ../generic/listctrl.cpp \
+ ../generic/laywin.cpp \
+ ../generic/msgdlgg.cpp \
+ ../generic/panelg.cpp \
+ ../generic/printps.cpp \
+ ../generic/prntdlgg.cpp \
+ ../generic/sashwin.cpp \
+ ../generic/scrolwin.cpp \
+ ../generic/splitter.cpp \
+ ../generic/statusbr.cpp \
+ ../generic/tabg.cpp \
+ ../generic/textdlgg.cpp \
+ ../generic/treectrl.cpp
+
+# If you're not using the generic ones, you
+# may wish to define platform-specific ones
+# treectrl.cpp \
+# listctrl.cpp \
+# imaglist.cpp \
+# statusbr.cpp \
+LIB_C_SRC=\
+\
+ ../common/y_tab.c \
+ ../common/extended.c
+
+all:    $(WXLIB)
+
+# Define library objects
+OBJECTS=\
+ $(LIB_CPP_SRC:.cpp=.o) $(LIB_C_SRC:.c=.o)
+
+$(WXLIB) : $(OBJECTS)
+       ar $(AROPTIONS) $@ $(OBJECTS)
+       $(RANLIB) $@
+
+../common/y_tab.$(OBJSUFF):    ../common/y_tab.c ../common/lex_yy.c
+       $(CCLEX) -c $(CFLAGS) -o $@ ../common/y_tab.c
+
+# Replace lex with flex if you run into compilation
+# problems with lex_yy.c. See also note about LEX_SCANNER
+# above.
+../common/lex_yy.c:    ../common/lexer.l
+       $(LEX) -o../common/lex.yy.c ../common/lexer.l 
+       sed -e "s/BUFSIZ/5000/g" < ../common/lex.yy.c | \
+       sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
+        sed -e "s/YYLMAX 200/YYLMAX 5000/g" > ../common/lex_yy.c
+       /bin/rm -f ../common/lex.yy.c
+
+# Replace yacc with bison if you run into compilation
+# problems with y_tab.c.
+../common/y_tab.c:     ../common/parser.y
+       $(YACC) ../common/parser.y
+       mv y.tab.c ../common/y_tab.c
+
+
+clean:
+       rm -f $(OBJECTS) $(WXLIB)
+
index cd85a27ad717989fabcf7d2dcda67f789866749f..233bc5639bdefcf428b1fe3f02596772538389ef 100644 (file)
@@ -277,8 +277,8 @@ void wxNotebook::OnSize(wxSizeEvent& event)
     int w, h;
     GetSize(&w, &h);
 
-    uint nCount = m_aPages.Count();
-    for ( uint nPage = 0; nPage < nCount; nPage++ ) {
+    unsigned int nCount = m_aPages.Count();
+    for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
         wxNotebookPage *pPage = m_aPages[nPage];
         pPage->SetSize(0, 0, w, h);
         if ( pPage->GetAutoLayout() )
index 1939136855356fff1b8158d060f84cc1bd47d522..61fd6e7e993835abbbd6d9bd7d9c27a7c9ca03c5 100644 (file)
@@ -42,13 +42,13 @@ bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
 
 bool wxPrinter::PrintDialog(wxWindow *parent)
 {
-    wxPrintDialog dialog(parent, & printData);
+    wxPrintDialog dialog(parent, & m_printData);
     return (dialog.ShowModal() == wxID_OK);
 }
 
 bool wxPrinter::Setup(wxWindow *parent)
 {
-    wxPrintDialog dialog(parent, & printData);
+    wxPrintDialog dialog(parent, & m_printData);
     dialog.GetPrintData().SetSetupDialog(TRUE);
     return (dialog.ShowModal() == wxID_OK);
 }
@@ -69,10 +69,10 @@ wxPrintPreview::~wxPrintPreview()
 
 bool wxPrintPreview::Print(bool interactive)
 {
-    if (!printPrintout)
+    if (!m_printPrintout)
         return FALSE;
-    wxPrinter printer(&printData);
-    return printer.Print(previewFrame, printPrintout, interactive);
+    wxPrinter printer(&m_printData);
+    return printer.Print(m_previewFrame, m_printPrintout, interactive);
 }
 
 void wxPrintPreview::DetermineScaling()
index 0be5a60de7d523fd7ce00d6bdb09edabb1a40c21..c9952342a968bc6f464811f2f05a047ee51d4028 100644 (file)
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
+
+BEGIN_EVENT_TABLE(wxSlider, wxControl)
+END_EVENT_TABLE()
 #endif
 
+
+
 // Slider
 wxSlider::wxSlider()
 {
index f4fbdd3bbb12dfd5cb495a63c3f524057d93a186..6083ace113eb3907d59ff34cb95513b1e75af78d 100644 (file)
@@ -34,9 +34,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
 
 BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
-       EVT_CHAR(wxTextCtrl::OnChar)
        EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
-       EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
 END_EVENT_TABLE()
 #endif