*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
{
|
||||
wxODDrawAll = 0x0001, // redraw entire control
|
||||
wxODSelectChanged = 0x0002, // selection changed (see Status.Select)
|
||||
wxODFocusChanged = 0x0004, // keyboard focus changed (see Status.Focus)
|
||||
wxODFocusChanged = 0x0004 // keyboard focus changed (see Status.Focus)
|
||||
};
|
||||
|
||||
enum wxODStatus
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
wxODDisabled = 0x0004, // item is to be drawn as disabled
|
||||
wxODChecked = 0x0008, // item is to be checked
|
||||
wxODHasFocus = 0x0010, // item has the keyboard focus
|
||||
wxODDefault = 0x0020, // item is the default item
|
||||
wxODDefault = 0x0020 // item is the default item
|
||||
};
|
||||
|
||||
// virtual functions to implement drawing (return TRUE if processed)
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include "wx/generic/prntdlgg.h"
|
||||
#endif
|
||||
|
||||
#if !defined(__WXMSW__) && !defined(__WXMAC__)
|
||||
#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXPM__)
|
||||
#define wxPrintDialog wxGenericPrintDialog
|
||||
#define sm_classwxPrintDialog sm_classwxGenericPrintDialog
|
||||
|
||||
|
@@ -32,11 +32,6 @@
|
||||
#include "wx/msw/winundef.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WXPM__
|
||||
#define INCL_OS2
|
||||
#include <os2.h>
|
||||
#endif
|
||||
|
||||
#include "wx/wx.h"
|
||||
|
||||
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "wx/intl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include "wx/mdi.h"
|
||||
#endif
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_DYNLIB_CLASS
|
||||
|
||||
#include "wx/dynlib.h"
|
||||
@@ -66,6 +65,14 @@
|
||||
# endif // Win32/16
|
||||
# define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
|
||||
# define wxDllClose ::FreeLibrary
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
||||
# define INCL_DOS
|
||||
# include <os2.h>
|
||||
# define wxDllOpen(error, lib, handle) DosLoadModule(error, sizeof(error), lib, &handle)
|
||||
# define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr)
|
||||
# define wxDllClose(handle) DosFreeModule(handle)
|
||||
#else
|
||||
# error "Don't know how to load shared libraries on this platform."
|
||||
#endif // OS
|
||||
@@ -92,7 +99,7 @@ static wxString ConstructLibraryName(const wxString& basename)
|
||||
# else //__HPUX__
|
||||
fullname << ".so";
|
||||
# endif //__HPUX__
|
||||
#elif defined(__WINDOWS__)
|
||||
#elif defined(__WINDOWS__) || defined(__OS2__)
|
||||
fullname << ".dll";
|
||||
#endif
|
||||
|
||||
@@ -179,7 +186,7 @@ wxDllLoader::GetProgramHandle(void)
|
||||
#ifdef __UNIX__
|
||||
return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
|
||||
#else
|
||||
wxFAIL_MSG(_("This method is not implemented under Windows"));
|
||||
wxFAIL_MSG(_("This method is not implemented under Windows or OS/2"));
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
@@ -204,6 +211,9 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
|
||||
wxASSERT_MSG( 1 , (char*)myErrName ) ;
|
||||
return NULL ;
|
||||
}
|
||||
#elif defined(__OS2__)
|
||||
char zError[256] = "";
|
||||
wxDllOpen(zError, libname, handle);
|
||||
#else // !Mac
|
||||
handle = wxDllOpen(libname);
|
||||
#endif // OS
|
||||
@@ -245,6 +255,8 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
|
||||
|
||||
if ( FindSymbol( dllHandle , symName , &symAddress , &symClass ) == noErr )
|
||||
symbol = (void *)symAddress ;
|
||||
#elif defined( __OS2__ )
|
||||
wxDllGetSymbol(dllHandle, symbol);
|
||||
#else
|
||||
symbol = wxDllGetSymbol(dllHandle, name);
|
||||
#endif
|
||||
@@ -283,9 +295,14 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
|
||||
wxLibrary *lib;
|
||||
wxClassInfo *old_sm_first;
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
node = m_loaded.Find(name.GetData());
|
||||
if (node != NULL)
|
||||
return ((wxLibrary *)node->Data());
|
||||
#else // !OS/2
|
||||
if ( (node = m_loaded.Find(name.GetData())) )
|
||||
return ((wxLibrary *)node->Data());
|
||||
|
||||
#endif
|
||||
// If DLL shares data, this is necessary.
|
||||
old_sm_first = wxClassInfo::sm_first;
|
||||
wxClassInfo::sm_first = NULL;
|
||||
|
@@ -60,6 +60,11 @@
|
||||
#ifdef __GNUWIN32__
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#elif (defined(__WXPM__))
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#define W_OK 2
|
||||
#define R_OK 4
|
||||
#elif (defined(__WXSTUBS__))
|
||||
// Have to ifdef this for different environments
|
||||
#include <io.h>
|
||||
@@ -479,6 +484,13 @@ bool wxTempFile::Open(const wxString& strName)
|
||||
static const wxChar *szMktempSuffix = _T("XXXXXX");
|
||||
m_strTemp << strName << szMktempSuffix;
|
||||
mktemp(MBSTRINGCAST m_strTemp.mb_str()); // will do because length doesn't change
|
||||
#elif defined(__WXPM__)
|
||||
// for now just create a file
|
||||
// future enhancements can be to set some extended attributes for file systems
|
||||
// OS/2 supports that have them (HPFS, FAT32) and security (HPFS386)
|
||||
static const wxChar *szMktempSuffix = _T("XXX");
|
||||
m_strTemp << strName << szMktempSuffix;
|
||||
mkdir(m_strTemp.GetWriteBuf(MAX_PATH));
|
||||
#else // Windows
|
||||
wxString strPath;
|
||||
wxSplitPath(strName, &strPath, NULL, NULL);
|
||||
|
@@ -46,6 +46,13 @@
|
||||
#if defined(__WXMSW__) && !defined(_WINDOWS_)
|
||||
#include <windows.h>
|
||||
#endif //windows.h
|
||||
#if defined(__WXPM__)
|
||||
#define INCL_DOS
|
||||
#include <os2.h>
|
||||
#define LINKAGEMODE _Optlink
|
||||
#else
|
||||
#define LINKAGEMODE
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -67,8 +74,8 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// compare functions for sorting the arrays
|
||||
static int CompareEntries(ConfigEntry *p1, ConfigEntry *p2);
|
||||
static int CompareGroups(ConfigGroup *p1, ConfigGroup *p2);
|
||||
static int LINKAGEMODE CompareEntries(ConfigEntry *p1, ConfigEntry *p2);
|
||||
static int LINKAGEMODE CompareGroups(ConfigGroup *p1, ConfigGroup *p2);
|
||||
|
||||
// filter strings
|
||||
static wxString FilterInValue(const wxString& str);
|
||||
@@ -93,6 +100,97 @@ wxString wxFileConfig::GetGlobalDir()
|
||||
|
||||
#ifdef __UNIX__
|
||||
strDir = _T("/etc/");
|
||||
#elif defined(__WXPM__)
|
||||
ULONG aulSysInfo[QSV_MAX] = {0};
|
||||
UINT drive;
|
||||
APIRET rc;
|
||||
|
||||
rc = DosQuerySysInfo( 1L, QSV_MAX, (PVOID)aulSysInfo, sizeof(ULONG)*QSV_MAX);
|
||||
if (rc == 0)
|
||||
{
|
||||
drive = aulSysInfo[QSV_BOOT_DRIVE - 1];
|
||||
switch(drive)
|
||||
{
|
||||
case 1:
|
||||
strDir = "A:\\OS2\\";
|
||||
break;
|
||||
case 2:
|
||||
strDir = "B:\\OS2\\";
|
||||
break;
|
||||
case 3:
|
||||
strDir = "C:\\OS2\\";
|
||||
break;
|
||||
case 4:
|
||||
strDir = "D:\\OS2\\";
|
||||
break;
|
||||
case 5:
|
||||
strDir = "E:\\OS2\\";
|
||||
break;
|
||||
case 6:
|
||||
strDir = "F:\\OS2\\";
|
||||
break;
|
||||
case 7:
|
||||
strDir = "G:\\OS2\\";
|
||||
break;
|
||||
case 8:
|
||||
strDir = "H:\\OS2\\";
|
||||
break;
|
||||
case 9:
|
||||
strDir = "I:\\OS2\\";
|
||||
break;
|
||||
case 10:
|
||||
strDir = "J:\\OS2\\";
|
||||
break;
|
||||
case 11:
|
||||
strDir = "K:\\OS2\\";
|
||||
break;
|
||||
case 12:
|
||||
strDir = "L:\\OS2\\";
|
||||
break;
|
||||
case 13:
|
||||
strDir = "M:\\OS2\\";
|
||||
break;
|
||||
case 14:
|
||||
strDir = "N:\\OS2\\";
|
||||
break;
|
||||
case 15:
|
||||
strDir = "O:\\OS2\\";
|
||||
break;
|
||||
case 16:
|
||||
strDir = "P:\\OS2\\";
|
||||
break;
|
||||
case 17:
|
||||
strDir = "Q:\\OS2\\";
|
||||
break;
|
||||
case 18:
|
||||
strDir = "R:\\OS2\\";
|
||||
break;
|
||||
case 19:
|
||||
strDir = "S:\\OS2\\";
|
||||
break;
|
||||
case 20:
|
||||
strDir = "T:\\OS2\\";
|
||||
break;
|
||||
case 21:
|
||||
strDir = "U:\\OS2\\";
|
||||
break;
|
||||
case 22:
|
||||
strDir = "V:\\OS2\\";
|
||||
break;
|
||||
case 23:
|
||||
strDir = "W:\\OS2\\";
|
||||
break;
|
||||
case 24:
|
||||
strDir = "X:\\OS2\\";
|
||||
break;
|
||||
case 25:
|
||||
strDir = "Y:\\OS2\\";
|
||||
break;
|
||||
case 26:
|
||||
strDir = "Z:\\OS2\\";
|
||||
break;
|
||||
}
|
||||
}
|
||||
#elif defined(__WXSTUBS__)
|
||||
wxASSERT_MSG( FALSE, _T("TODO") ) ;
|
||||
#elif defined(__WXMAC__)
|
||||
|
@@ -58,6 +58,10 @@
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OS2__
|
||||
#include <direct.h>
|
||||
#include <process.h>
|
||||
#endif
|
||||
#ifdef __WINDOWS__
|
||||
#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
|
||||
#include <direct.h>
|
||||
@@ -471,6 +475,23 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
#endif
|
||||
|
||||
/* Expand inline environment variables */
|
||||
#ifdef __VISAGECPP__
|
||||
while (*d)
|
||||
{
|
||||
*d++ = *s;
|
||||
if(*s == _T('\\'))
|
||||
{
|
||||
*(d - 1) = *++s;
|
||||
if (*d)
|
||||
{
|
||||
s++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
else
|
||||
#else
|
||||
while ((*d++ = *s)) {
|
||||
# ifndef __WXMSW__
|
||||
if (*s == _T('\\')) {
|
||||
@@ -481,6 +502,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
break;
|
||||
} else
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
if (*s++ == _T('$') && (*s == _T('{') || *s == _T(')')))
|
||||
#else
|
||||
@@ -490,7 +512,13 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
register wxChar *start = d;
|
||||
register int braces = (*s == _T('{') || *s == _T('('));
|
||||
register wxChar *value;
|
||||
#ifdef __VISAGECPP__
|
||||
// VA gives assignment in logical expr warning
|
||||
while (*d)
|
||||
*d++ = *s;
|
||||
#else
|
||||
while ((*d++ = *s))
|
||||
#endif
|
||||
if (braces ? (*s == _T('}') || *s == _T(')')) : !(wxIsalnum(*s) || *s == _T('_')) )
|
||||
break;
|
||||
else
|
||||
@@ -498,7 +526,12 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
*--d = 0;
|
||||
value = wxGetenv(braces ? start + 1 : start);
|
||||
if (value) {
|
||||
#ifdef __VISAGECPP__
|
||||
// VA gives assignment in logical expr warning
|
||||
for ((d = start - 1); (*d); *d++ = *value++);
|
||||
#else
|
||||
for ((d = start - 1); (*d++ = *value++););
|
||||
#endif
|
||||
d--;
|
||||
if (braces && *s)
|
||||
s++;
|
||||
@@ -550,8 +583,13 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
*(d - 1) = SEP;
|
||||
}
|
||||
s = nm;
|
||||
#ifdef __VISAGECPP__
|
||||
// VA gives assignment in logical expr warning
|
||||
while (*d)
|
||||
*d++ = *s++;
|
||||
#else
|
||||
while ((*d++ = *s++));
|
||||
|
||||
#endif
|
||||
delete[] nm_tmp; // clean up alloc
|
||||
/* Now clean up the buffer */
|
||||
return wxRealPath(buf);
|
||||
@@ -632,7 +670,7 @@ wxChar *wxFileNameFromPath (wxChar *path)
|
||||
#endif
|
||||
return tcp + 1;
|
||||
} /* while */
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
if (wxIsalpha (*path) && *(path + 1) == _T(':'))
|
||||
return path + 2;
|
||||
#endif
|
||||
@@ -659,7 +697,7 @@ wxString wxFileNameFromPath (const wxString& path1)
|
||||
#endif
|
||||
return wxString(tcp + 1);
|
||||
} /* while */
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
if (wxIsalpha (*path) && *(path + 1) == _T(':'))
|
||||
return wxString(path + 2);
|
||||
#endif
|
||||
@@ -703,7 +741,7 @@ wxPathOnly (wxChar *path)
|
||||
else i --;
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
// Try Drive specifier
|
||||
if (wxIsalpha (buf[0]) && buf[1] == _T(':'))
|
||||
{
|
||||
@@ -751,7 +789,7 @@ wxString wxPathOnly (const wxString& path)
|
||||
else i --;
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
// Try Drive specifier
|
||||
if (wxIsalpha (buf[0]) && buf[1] == _T(':'))
|
||||
{
|
||||
@@ -830,7 +868,7 @@ wxDos2UnixFilename (wxChar *s)
|
||||
{
|
||||
if (*s == _T('\\'))
|
||||
*s = _T('/');
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
else
|
||||
*s = wxTolower(*s); // Case INDEPENDENT
|
||||
#endif
|
||||
@@ -839,14 +877,14 @@ wxDos2UnixFilename (wxChar *s)
|
||||
}
|
||||
|
||||
void
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
wxUnix2DosFilename (wxChar *s)
|
||||
#else
|
||||
wxUnix2DosFilename (wxChar *WXUNUSED(s))
|
||||
#endif
|
||||
{
|
||||
// Yes, I really mean this to happen under DOS only! JACS
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
if (s)
|
||||
while (*s)
|
||||
{
|
||||
@@ -992,12 +1030,12 @@ bool wxMkdir(const wxString& dir, int perm)
|
||||
const wxChar *dirname = dir.c_str();
|
||||
#endif // Mac/!Mac
|
||||
|
||||
// assume mkdir() has 2 args on non Windows platforms and on Windows too
|
||||
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
|
||||
// for the GNU compiler
|
||||
#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
|
||||
#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
|
||||
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
||||
#else // MSW
|
||||
if ( mkdir(wxFNCONV(dirname)) != 0 )
|
||||
#else // MSW and OS/2
|
||||
if ( mkdir((char*)wxFNCONV(dirname)) != 0 )
|
||||
#endif // !MSW/MSW
|
||||
{
|
||||
wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
|
||||
@@ -1464,8 +1502,8 @@ wxString wxGetCwd()
|
||||
|
||||
bool wxSetWorkingDirectory(const wxString& d)
|
||||
{
|
||||
#if defined( __UNIX__ ) || defined( __WXMAC__ )
|
||||
return (chdir(d.fn_str()) == 0);
|
||||
#if defined( __UNIX__ ) || defined( __WXMAC__ ) || defined(__WXPM__)
|
||||
return (chdir((char*)d.fn_str()) == 0);
|
||||
#elif defined(__WINDOWS__)
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
Reference in New Issue
Block a user