From f0a56ab0c38aac05101593488c7e0972c36c38b7 Mon Sep 17 00:00:00 2001 From: David Webster Date: Tue, 5 Oct 1999 22:10:56 +0000 Subject: [PATCH] wxOS2 updates for 10/5/99 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/os2/dc.h | 8 ++--- include/wx/os2/dcclient.h | 10 ++---- include/wx/os2/dcmemory.h | 8 ++--- include/wx/os2/dcprint.h | 8 ++--- include/wx/os2/filedlg.h | 65 +++++++++++++++++++++------------ include/wx/os2/setup.h | 6 ++-- src/common/socket.cpp | 18 +++++----- src/makeva.env | 6 ++-- src/os2/bitmap.cpp | 6 ++-- src/os2/dcclient.cpp | 6 ++-- src/os2/filedlg.cpp | 76 ++++++++++++++++++++++++--------------- src/os2/frame.cpp | 6 ++-- src/os2/makefile.va | 8 ++++- 13 files changed, 137 insertions(+), 94 deletions(-) diff --git a/include/wx/os2/dc.h b/include/wx/os2/dc.h index 8c0bd11552..3f9cbaec2b 100644 --- a/include/wx/os2/dc.h +++ b/include/wx/os2/dc.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dc.h // Purpose: wxDC class -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 08/26/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) David Webster +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DC_H_ diff --git a/include/wx/os2/dcclient.h b/include/wx/os2/dcclient.h index 45d2ee1088..e7219e22c1 100644 --- a/include/wx/os2/dcclient.h +++ b/include/wx/os2/dcclient.h @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dcclient.h // Purpose: wxClientDC class -// Author: Julian Smart +// Author: David Webster // Modified by: -// Created: 01/02/97 +// Created: 09/12/99 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) David Webster // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -16,10 +16,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma interface "dcclient.h" -#endif - #include "wx/dc.h" #include "wx/dynarray.h" diff --git a/include/wx/os2/dcmemory.h b/include/wx/os2/dcmemory.h index 7ee412ee16..f2db0f212c 100644 --- a/include/wx/os2/dcmemory.h +++ b/include/wx/os2/dcmemory.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dcmemory.h // Purpose: wxMemoryDC class -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 09/09/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) David Webster +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DCMEMORY_H_ diff --git a/include/wx/os2/dcprint.h b/include/wx/os2/dcprint.h index faeaf40180..9bc20098bc 100644 --- a/include/wx/os2/dcprint.h +++ b/include/wx/os2/dcprint.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dcprint.h // Purpose: wxPrinterDC class -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 09/12/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) David Webster +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DCPRINT_H_ diff --git a/include/wx/os2/filedlg.h b/include/wx/os2/filedlg.h index bd6075eb15..5fc4836b57 100644 --- a/include/wx/os2/filedlg.h +++ b/include/wx/os2/filedlg.h @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: filedlg.h // Purpose: wxFileDialog class -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 10/05/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,15 +28,6 @@ WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr; class WXDLLEXPORT wxFileDialog: public wxDialog { DECLARE_DYNAMIC_CLASS(wxFileDialog) -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_dir; - wxString m_path; // Full path - wxString m_fileName; - wxString m_wildCard; - int m_filterIndex; public: wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, @@ -59,6 +50,16 @@ public: inline int GetFilterIndex() const { return m_filterIndex ; } int ShowModal(); + +protected: + wxString m_message; + long m_dialogStyle; + wxWindow * m_parent; + wxString m_dir; + wxString m_path; // Full path + wxString m_fileName; + wxString m_wildCard; + int m_filterIndex; }; #define wxOPEN 0x0001 @@ -68,22 +69,42 @@ public: #define wxFILE_MUST_EXIST 0x0010 // File selector - backward compatibility -WXDLLEXPORT wxString wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, const char *default_extension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); +WXDLLEXPORT wxString wxFileSelector( const char *message = wxFileSelectorPromptStr + ,const char *default_path = NULL + ,const char *default_filename = NULL + ,const char *default_extension = NULL + ,const char *wildcard = wxFileSelectorDefaultWildcardStr + ,int flags = 0 + ,wxWindow *parent = NULL + ,int x = -1 + ,int y = -1 + ); // An extended version of wxFileSelector -WXDLLEXPORT wxString wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, int *indexDefaultExtension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); +WXDLLEXPORT wxString wxFileSelectorEx( const char *message = wxFileSelectorPromptStr + ,const char *default_path = NULL + ,const char *default_filename = NULL + ,int *indexDefaultExtension = NULL + ,const char *wildcard = wxFileSelectorDefaultWildcardStr + ,int flags = 0 + ,wxWindow *parent = NULL + ,int x = -1 + ,int y = -1 + ); // Generic file load dialog -WXDLLEXPORT wxString wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); +WXDLLEXPORT wxString wxLoadFileSelector( const char *what + ,const char *extension + ,const char *default_name = NULL + ,wxWindow *parent = NULL + ); // Generic file save dialog -WXDLLEXPORT wxString wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); +WXDLLEXPORT wxString wxSaveFileSelector( const char *what + ,const char *extension + ,const char *default_name = NULL + ,wxWindow *parent = NULL + ); #endif // _WX_FILEDLG_H_ diff --git a/include/wx/os2/setup.h b/include/wx/os2/setup.h index 1069663d97..f1deadd054 100644 --- a/include/wx/os2/setup.h +++ b/include/wx/os2/setup.h @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: setup.h // Purpose: Configuration for the library -// Author: Julian Smart +// Author: David Webster // Modified by: -// Created: 01/02/97 +// Created: 04/02/99 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart +// Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/common/socket.cpp b/src/common/socket.cpp index f66313eaf1..5f23f76f9c 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -45,12 +45,12 @@ #include "wx/socket.h" -#if defined(__WXMSW__) +#if defined(__WXMSW__) || defined(__WXPM__) #define PROCESS_EVENTS() wxYield() #elif defined(__WXGTK__) #include #define PROCESS_EVENTS() gtk_main_iteration() -#endif +#endif // -------------------------------------------------------------- @@ -188,7 +188,7 @@ wxUint32 wxSocketBase::DeferRead(char *buffer, wxUint32 nbytes) DoDefer(); } - // Wait for buffer completion. + // Wait for buffer completion. while (m_defer_buffer != NULL) PROCESS_EVENTS(); @@ -235,13 +235,13 @@ wxUint32 wxSocketBase::_Read(char* buffer, wxUint32 nbytes) // If the socket is not connected, or we have got the whole // needed buffer, return immedately - if (!m_connected || !m_socket || !nbytes) + if (!m_connected || !m_socket || !nbytes) return total; // Possible combinations (they are checked in this order) // NOWAIT // SPEED | WAITALL - // SPEED + // SPEED // WAITALL // NONE // @@ -442,7 +442,7 @@ wxUint32 wxSocketBase::DeferWrite(const char *buffer, wxUint32 nbytes) DoDefer(); } - // Wait for buffer completion. + // Wait for buffer completion. while (m_defer_buffer != NULL) PROCESS_EVENTS(); @@ -490,7 +490,7 @@ wxUint32 wxSocketBase::_Write(const char *buffer, wxUint32 nbytes) // Possible combinations (they are checked in this order) // NOWAIT // SPEED | WAITALL - // SPEED + // SPEED // WAITALL // NONE // @@ -686,7 +686,7 @@ wxSocketBase& wxSocketBase::Discard() // TODO: TriggerRead return *this; - + #undef MAX_BUFSIZE } @@ -901,7 +901,7 @@ void wxSocketBase::SetFlags(wxSockFlags _flags) { m_flags = _flags; } - + // -------------------------------------------------------------- // wxSocketBase callback management // -------------------------------------------------------------- diff --git a/src/makeva.env b/src/makeva.env index af5011b340..976e9eb3d8 100644 --- a/src/makeva.env +++ b/src/makeva.env @@ -1,7 +1,7 @@ # # File: Makeva.env -# Author: Ulrich Leodolter -# Created: Wed May 17 08:36:42 1995 +# Author: David Webster +# Created: Wed Apr 17 08:36:42 1999 # Updated: # # VisualAge C++ V3.0 makefile include file @@ -17,7 +17,7 @@ OS2LIBFLAGS=/NOL /NOE OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB # Change this to your WXWIN directory -WXDIR=j:\dev\Wx2\wxwindows +WXDIR=h:\dev\Wx2\wxwindows WXSRC=$(WXDIR)\src\os2 WXINC=$(WXDIR)\include diff --git a/src/os2/bitmap.cpp b/src/os2/bitmap.cpp index 036eb640ed..7b8c21c2d7 100644 --- a/src/os2/bitmap.cpp +++ b/src/os2/bitmap.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: bitmap.cpp // Purpose: wxBitmap -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 08/08/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/os2/dcclient.cpp b/src/os2/dcclient.cpp index 2f5bb9e32a..0a0226b279 100644 --- a/src/os2/dcclient.cpp +++ b/src/os2/dcclient.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dcclient.cpp // Purpose: wxClientDC class -// Author: Julian Smart +// Author: David Webster // Modified by: -// Created: 01/02/97 +// Created: 09/21/99 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/os2/filedlg.cpp b/src/os2/filedlg.cpp index 8832598af4..20e3c39cde 100644 --- a/src/os2/filedlg.cpp +++ b/src/os2/filedlg.cpp @@ -1,18 +1,14 @@ ///////////////////////////////////////////////////////////////////////////// // Name: filedlg.cpp // Purpose: wxFileDialog -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 10/05/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "filedlg.h" -#endif - #include "wx/defs.h" #include "wx/utils.h" #include "wx/dialog.h" @@ -23,10 +19,16 @@ IMPLEMENT_CLASS(wxFileDialog, wxDialog) #endif -wxString wxFileSelector(const char *title, - const char *defaultDir, const char *defaultFileName, - const char *defaultExtension, const char *filter, int flags, - wxWindow *parent, int x, int y) +wxString wxFileSelector( const char* title + ,const char* defaultDir + ,const char* defaultFileName + ,const char* defaultExtension + ,const char* filter + ,int flags + ,wxWindow* parent + ,int x + ,int y + ) { // If there's a default extension specified but no filter, we create a suitable // filter. @@ -59,16 +61,16 @@ wxString wxFileSelector(const char *title, return wxEmptyString; } -wxString wxFileSelectorEx(const char *title, - const char *defaultDir, - const char *defaultFileName, - int* defaultFilterIndex, - const char *filter, - int flags, - wxWindow* parent, - int x, - int y) - +wxString wxFileSelectorEx( const char* title + ,const char* defaultDir + ,const char* defaultFileName + ,int* defaultFilterIndex + ,const char* filter + ,int flags + ,wxWindow* parent + ,int x + ,int y + ) { wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "", defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y)); @@ -82,9 +84,14 @@ wxString wxFileSelectorEx(const char *title, return wxEmptyString; } -wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, - const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, - long style, const wxPoint& pos) +wxFileDialog::wxFileDialog( wxWindow* parent + ,const wxString& message + ,const wxString& defaultDir + ,const wxString& defaultFileName + ,const wxString& wildCard + ,long style + ,const wxPoint& pos + ) { m_message = message; m_dialogStyle = style; @@ -103,10 +110,15 @@ int wxFileDialog::ShowModal() } // Generic file load/save dialog -static wxString wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent) +static wxString wxDefaultFileSelector( bool load + ,const char* what + ,const char* extension + ,const char* default_name + ,wxWindow* parent + ) { char *ext = (char *)extension; - + char prompt[50]; wxString str; if (load) @@ -123,14 +135,22 @@ static wxString wxDefaultFileSelector(bool load, const char *what, const char *e } // Generic file load dialog -wxString wxLoadFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) +wxString wxLoadFileSelector( const char* what + ,const char* extension + ,const char* default_name + ,wxWindow* parent + ) { return wxDefaultFileSelector(TRUE, what, extension, default_name, parent); } // Generic file save dialog -wxString wxSaveFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) +wxString wxSaveFileSelector( const char* what + ,const char* extension + ,const char* default_name + ,wxWindow* parent + ) { return wxDefaultFileSelector(FALSE, what, extension, default_name, parent); } diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index e84c30b9d2..4c6fb21326 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: frame.cpp // Purpose: wxFrame -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 08/12/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/os2/makefile.va b/src/os2/makefile.va index 66474dcdad..815f0dd161 100644 --- a/src/os2/makefile.va +++ b/src/os2/makefile.va @@ -306,6 +306,8 @@ OS2OBJS = \ ..\os2\$D\dcscreen.obj \ ..\os2\$D\dialog.obj \ ..\os2\$D\dirdlg.obj \ + ..\os2\$D\dnd.obj \ + ..\os2\$D\filedlg.obj \ ..\os2\$D\frame.obj \ ..\os2\$D\window.obj @@ -333,6 +335,8 @@ OS2LIBOBJS = \ dcscreen.obj \ dialog.obj \ dirdlg.obj \ + dnd.obj \ + filedlg.obj \ frame.obj \ window.obj @@ -345,7 +349,7 @@ HTMLOBJS = \ ..\html\$D\htmltag.obj \ ..\html\$D\htmlwin.obj \ ..\html\$D\htmlwinparser.obj \ - ..\html\$D\mod_fonts.obj \ +s ..\html\$D\mod_fonts.obj \ ..\html\$D\mod_hline.obj \ ..\html\$D\mod_image.obj \ ..\html\$D\mod_layout.obj \ @@ -504,6 +508,8 @@ $(OS2LIBOBJS): copy ..\os2\$D\dcscreen.obj copy ..\os2\$D\dialog.obj copy ..\os2\$D\dirdlg.obj + copy ..\os2\$D\dnd.obj + copy ..\os2\$D\filedlg.obj copy ..\os2\$D\frame.obj copy ..\os2\$D\window.obj -- 2.45.2