wxOS2 updates for 10/5/99

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-10-05 22:10:56 +00:00
parent f7a11f8c8e
commit f0a56ab0c3
13 changed files with 137 additions and 94 deletions

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dc.h // Name: dc.h
// Purpose: wxDC class // Purpose: wxDC class
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 08/26/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DC_H_ #ifndef _WX_DC_H_

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dcclient.h // Name: dcclient.h
// Purpose: wxClientDC class // Purpose: wxClientDC class
// Author: Julian Smart // Author: David Webster
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 09/12/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem // Copyright: (c) David Webster
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -16,10 +16,6 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __GNUG__
#pragma interface "dcclient.h"
#endif
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dcmemory.h // Name: dcmemory.h
// Purpose: wxMemoryDC class // Purpose: wxMemoryDC class
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 09/09/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCMEMORY_H_ #ifndef _WX_DCMEMORY_H_

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dcprint.h // Name: dcprint.h
// Purpose: wxPrinterDC class // Purpose: wxPrinterDC class
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 09/12/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCPRINT_H_ #ifndef _WX_DCPRINT_H_

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: filedlg.h // Name: filedlg.h
// Purpose: wxFileDialog class // Purpose: wxFileDialog class
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 10/05/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -28,15 +28,6 @@ WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr;
class WXDLLEXPORT wxFileDialog: public wxDialog class WXDLLEXPORT wxFileDialog: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS(wxFileDialog) 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: public:
wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
@@ -59,6 +50,16 @@ public:
inline int GetFilterIndex() const { return m_filterIndex ; } inline int GetFilterIndex() const { return m_filterIndex ; }
int ShowModal(); 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 #define wxOPEN 0x0001
@@ -68,22 +69,42 @@ public:
#define wxFILE_MUST_EXIST 0x0010 #define wxFILE_MUST_EXIST 0x0010
// File selector - backward compatibility // File selector - backward compatibility
WXDLLEXPORT wxString wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, WXDLLEXPORT wxString wxFileSelector( const char *message = wxFileSelectorPromptStr
const char *default_filename = NULL, const char *default_extension = NULL, ,const char *default_path = NULL
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, ,const char *default_filename = NULL
wxWindow *parent = NULL, int x = -1, int y = -1); ,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 // An extended version of wxFileSelector
WXDLLEXPORT wxString wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, WXDLLEXPORT wxString wxFileSelectorEx( const char *message = wxFileSelectorPromptStr
const char *default_filename = NULL, int *indexDefaultExtension = NULL, ,const char *default_path = NULL
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, ,const char *default_filename = NULL
wxWindow *parent = NULL, int x = -1, int y = -1); ,int *indexDefaultExtension = NULL
,const char *wildcard = wxFileSelectorDefaultWildcardStr
,int flags = 0
,wxWindow *parent = NULL
,int x = -1
,int y = -1
);
// Generic file load dialog // 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 // 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 #endif
// _WX_FILEDLG_H_ // _WX_FILEDLG_H_

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: setup.h // Name: setup.h
// Purpose: Configuration for the library // Purpose: Configuration for the library
// Author: Julian Smart // Author: David Webster
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 04/02/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -45,12 +45,12 @@
#include "wx/socket.h" #include "wx/socket.h"
#if defined(__WXMSW__) #if defined(__WXMSW__) || defined(__WXPM__)
#define PROCESS_EVENTS() wxYield() #define PROCESS_EVENTS() wxYield()
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include <gtk/gtk.h> #include <gtk/gtk.h>
#define PROCESS_EVENTS() gtk_main_iteration() #define PROCESS_EVENTS() gtk_main_iteration()
#endif #endif
// -------------------------------------------------------------- // --------------------------------------------------------------
@@ -188,7 +188,7 @@ wxUint32 wxSocketBase::DeferRead(char *buffer, wxUint32 nbytes)
DoDefer(); DoDefer();
} }
// Wait for buffer completion. // Wait for buffer completion.
while (m_defer_buffer != NULL) while (m_defer_buffer != NULL)
PROCESS_EVENTS(); 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 // If the socket is not connected, or we have got the whole
// needed buffer, return immedately // needed buffer, return immedately
if (!m_connected || !m_socket || !nbytes) if (!m_connected || !m_socket || !nbytes)
return total; return total;
// Possible combinations (they are checked in this order) // Possible combinations (they are checked in this order)
// NOWAIT // NOWAIT
// SPEED | WAITALL // SPEED | WAITALL
// SPEED // SPEED
// WAITALL // WAITALL
// NONE // NONE
// //
@@ -442,7 +442,7 @@ wxUint32 wxSocketBase::DeferWrite(const char *buffer, wxUint32 nbytes)
DoDefer(); DoDefer();
} }
// Wait for buffer completion. // Wait for buffer completion.
while (m_defer_buffer != NULL) while (m_defer_buffer != NULL)
PROCESS_EVENTS(); PROCESS_EVENTS();
@@ -490,7 +490,7 @@ wxUint32 wxSocketBase::_Write(const char *buffer, wxUint32 nbytes)
// Possible combinations (they are checked in this order) // Possible combinations (they are checked in this order)
// NOWAIT // NOWAIT
// SPEED | WAITALL // SPEED | WAITALL
// SPEED // SPEED
// WAITALL // WAITALL
// NONE // NONE
// //
@@ -686,7 +686,7 @@ wxSocketBase& wxSocketBase::Discard()
// TODO: TriggerRead // TODO: TriggerRead
return *this; return *this;
#undef MAX_BUFSIZE #undef MAX_BUFSIZE
} }
@@ -901,7 +901,7 @@ void wxSocketBase::SetFlags(wxSockFlags _flags)
{ {
m_flags = _flags; m_flags = _flags;
} }
// -------------------------------------------------------------- // --------------------------------------------------------------
// wxSocketBase callback management // wxSocketBase callback management
// -------------------------------------------------------------- // --------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
# #
# File: Makeva.env # File: Makeva.env
# Author: Ulrich Leodolter # Author: David Webster
# Created: Wed May 17 08:36:42 1995 # Created: Wed Apr 17 08:36:42 1999
# Updated: # Updated:
# #
# VisualAge C++ V3.0 makefile include file # VisualAge C++ V3.0 makefile include file
@@ -17,7 +17,7 @@ OS2LIBFLAGS=/NOL /NOE
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
# Change this to your WXWIN directory # Change this to your WXWIN directory
WXDIR=j:\dev\Wx2\wxwindows WXDIR=h:\dev\Wx2\wxwindows
WXSRC=$(WXDIR)\src\os2 WXSRC=$(WXDIR)\src\os2
WXINC=$(WXDIR)\include WXINC=$(WXDIR)\include

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: bitmap.cpp // Name: bitmap.cpp
// Purpose: wxBitmap // Purpose: wxBitmap
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 08/08/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dcclient.cpp // Name: dcclient.cpp
// Purpose: wxClientDC class // Purpose: wxClientDC class
// Author: Julian Smart // Author: David Webster
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 09/21/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -1,18 +1,14 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: filedlg.cpp // Name: filedlg.cpp
// Purpose: wxFileDialog // Purpose: wxFileDialog
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 10/05/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "filedlg.h"
#endif
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
@@ -23,10 +19,16 @@
IMPLEMENT_CLASS(wxFileDialog, wxDialog) IMPLEMENT_CLASS(wxFileDialog, wxDialog)
#endif #endif
wxString wxFileSelector(const char *title, wxString wxFileSelector( const char* title
const char *defaultDir, const char *defaultFileName, ,const char* defaultDir
const char *defaultExtension, const char *filter, int flags, ,const char* defaultFileName
wxWindow *parent, int x, int y) ,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 // If there's a default extension specified but no filter, we create a suitable
// filter. // filter.
@@ -59,16 +61,16 @@ wxString wxFileSelector(const char *title,
return wxEmptyString; return wxEmptyString;
} }
wxString wxFileSelectorEx(const char *title, wxString wxFileSelectorEx( const char* title
const char *defaultDir, ,const char* defaultDir
const char *defaultFileName, ,const char* defaultFileName
int* defaultFilterIndex, ,int* defaultFilterIndex
const char *filter, ,const char* filter
int flags, ,int flags
wxWindow* parent, ,wxWindow* parent
int x, ,int x
int y) ,int y
)
{ {
wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "", wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "",
defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y)); defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y));
@@ -82,9 +84,14 @@ wxString wxFileSelectorEx(const char *title,
return wxEmptyString; return wxEmptyString;
} }
wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, wxFileDialog::wxFileDialog( wxWindow* parent
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, ,const wxString& message
long style, const wxPoint& pos) ,const wxString& defaultDir
,const wxString& defaultFileName
,const wxString& wildCard
,long style
,const wxPoint& pos
)
{ {
m_message = message; m_message = message;
m_dialogStyle = style; m_dialogStyle = style;
@@ -103,10 +110,15 @@ int wxFileDialog::ShowModal()
} }
// Generic file load/save dialog // 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 *ext = (char *)extension;
char prompt[50]; char prompt[50];
wxString str; wxString str;
if (load) if (load)
@@ -123,14 +135,22 @@ static wxString wxDefaultFileSelector(bool load, const char *what, const char *e
} }
// Generic file load dialog // 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); return wxDefaultFileSelector(TRUE, what, extension, default_name, parent);
} }
// Generic file save dialog // 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); return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
} }

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: frame.cpp // Name: frame.cpp
// Purpose: wxFrame // Purpose: wxFrame
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 08/12/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -306,6 +306,8 @@ OS2OBJS = \
..\os2\$D\dcscreen.obj \ ..\os2\$D\dcscreen.obj \
..\os2\$D\dialog.obj \ ..\os2\$D\dialog.obj \
..\os2\$D\dirdlg.obj \ ..\os2\$D\dirdlg.obj \
..\os2\$D\dnd.obj \
..\os2\$D\filedlg.obj \
..\os2\$D\frame.obj \ ..\os2\$D\frame.obj \
..\os2\$D\window.obj ..\os2\$D\window.obj
@@ -333,6 +335,8 @@ OS2LIBOBJS = \
dcscreen.obj \ dcscreen.obj \
dialog.obj \ dialog.obj \
dirdlg.obj \ dirdlg.obj \
dnd.obj \
filedlg.obj \
frame.obj \ frame.obj \
window.obj window.obj
@@ -345,7 +349,7 @@ HTMLOBJS = \
..\html\$D\htmltag.obj \ ..\html\$D\htmltag.obj \
..\html\$D\htmlwin.obj \ ..\html\$D\htmlwin.obj \
..\html\$D\htmlwinparser.obj \ ..\html\$D\htmlwinparser.obj \
..\html\$D\mod_fonts.obj \ s ..\html\$D\mod_fonts.obj \
..\html\$D\mod_hline.obj \ ..\html\$D\mod_hline.obj \
..\html\$D\mod_image.obj \ ..\html\$D\mod_image.obj \
..\html\$D\mod_layout.obj \ ..\html\$D\mod_layout.obj \
@@ -504,6 +508,8 @@ $(OS2LIBOBJS):
copy ..\os2\$D\dcscreen.obj copy ..\os2\$D\dcscreen.obj
copy ..\os2\$D\dialog.obj copy ..\os2\$D\dialog.obj
copy ..\os2\$D\dirdlg.obj copy ..\os2\$D\dirdlg.obj
copy ..\os2\$D\dnd.obj
copy ..\os2\$D\filedlg.obj
copy ..\os2\$D\frame.obj copy ..\os2\$D\frame.obj
copy ..\os2\$D\window.obj copy ..\os2\$D\window.obj