Oh well, I'll just stuff in the rest of the Unicode changes I have made

so far here. You may start complaining now.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven
1999-04-12 22:20:19 +00:00
parent 9e3d3318dc
commit 9d2f3c71d8
23 changed files with 183 additions and 183 deletions

View File

@@ -73,7 +73,7 @@ extern wxString wxExpandEnvVars(const wxString &sz);
/* /*
Split path into parts removing '..' in progress Split path into parts removing '..' in progress
*/ */
extern void wxSplitPath(wxArrayString& aParts, const char *sz); extern void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// abstract base class wxConfigBase which defines the interface for derived // abstract base class wxConfigBase which defines the interface for derived

View File

@@ -540,7 +540,7 @@ class WXDLLEXPORT wxFileHistory: public wxObject
protected: protected:
// Last n files // Last n files
char** m_fileHistory; wxChar** m_fileHistory;
// Number of files saved // Number of files saved
int m_fileHistoryN; int m_fileHistoryN;
// Menus to maintain (may need several for an MDI app) // Menus to maintain (may need several for an MDI app)

View File

@@ -197,9 +197,9 @@ public: \
void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \ void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \
void Remove(T Item) \ void Remove(T Item) \
{ int iIndex = Index(Item); \ { int iIndex = Index(Item); \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
"removing inexisting element in wxArray::Remove" ); \ _T("removing inexisting element in wxArray::Remove") ); \
wxBaseArray::Remove((size_t)iIndex); } \ wxBaseArray::Remove((size_t)iIndex); } \
\ \
void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \ void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \
} }
@@ -254,8 +254,8 @@ public: \
void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \ void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \
void Remove(T Item) \ void Remove(T Item) \
{ int iIndex = Index(Item); \ { int iIndex = Index(Item); \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
"removing inexisting element in wxArray::Remove" ); \ _T("removing inexisting element in wxArray::Remove") ); \
wxBaseArray::Remove((size_t)iIndex); } \ wxBaseArray::Remove((size_t)iIndex); } \
\ \
private: \ private: \

View File

@@ -778,7 +778,7 @@ public:
{ {
// GetVeto() will return FALSE anyhow... // GetVeto() will return FALSE anyhow...
wxCHECK_RET( m_canVeto, wxCHECK_RET( m_canVeto,
"call to Veto() ignored (can't veto this event)" ); _T("call to Veto() ignored (can't veto this event)") );
m_veto = veto; m_veto = veto;
} }

View File

@@ -63,26 +63,26 @@ public:
// static functions // static functions
// ---------------- // ----------------
// check whether a regular file by this name exists // check whether a regular file by this name exists
static bool Exists(const char *name); static bool Exists(const wxChar *name);
// check whetther we can access the given file in given mode // check whetther we can access the given file in given mode
// (only read and write make sense here) // (only read and write make sense here)
static bool Access(const char *name, OpenMode mode); static bool Access(const wxChar *name, OpenMode mode);
// ctors // ctors
// ----- // -----
// def ctor // def ctor
wxFile() { m_fd = fd_invalid; } wxFile() { m_fd = fd_invalid; }
// open specified file (may fail, use IsOpened()) // open specified file (may fail, use IsOpened())
wxFile(const char *szFileName, OpenMode mode = read); wxFile(const wxChar *szFileName, OpenMode mode = read);
// attach to (already opened) file // attach to (already opened) file
wxFile(int fd) { m_fd = fd; } wxFile(int fd) { m_fd = fd; }
// open/close // open/close
// create a new file (with the default value of bOverwrite, it will fail if // create a new file (with the default value of bOverwrite, it will fail if
// the file already exists, otherwise it will overwrite it and succeed) // the file already exists, otherwise it will overwrite it and succeed)
bool Create(const char *szFileName, bool bOverwrite = FALSE, bool Create(const wxChar *szFileName, bool bOverwrite = FALSE,
int access = wxS_DEFAULT); int access = wxS_DEFAULT);
bool Open(const char *szFileName, OpenMode mode = read, bool Open(const wxChar *szFileName, OpenMode mode = read,
int access = wxS_DEFAULT); int access = wxS_DEFAULT);
bool Close(); // Close is a NOP if not opened bool Close(); // Close is a NOP if not opened
@@ -97,7 +97,7 @@ public:
// returns true on success // returns true on success
size_t Write(const void *pBuf, size_t nCount); size_t Write(const void *pBuf, size_t nCount);
// returns true on success // returns true on success
bool Write(const wxString& s) { return Write(s.c_str(), s.Len()) != 0; } bool Write(const wxString& s) { return Write(s.c_str(), s.Len()*sizeof(wxChar)) != 0; }
// flush data not yet written // flush data not yet written
bool Flush(); bool Flush();

View File

@@ -140,16 +140,16 @@ public:
// //
// where file is the basename of szFile, ext is it's extension // where file is the basename of szFile, ext is it's extension
// or .conf (Unix) or .ini (Win) if it has none // or .conf (Unix) or .ini (Win) if it has none
static wxString GetGlobalFileName(const char *szFile); static wxString GetGlobalFileName(const wxChar *szFile);
static wxString GetLocalFileName(const char *szFile); static wxString GetLocalFileName(const wxChar *szFile);
// ctor & dtor // ctor & dtor
// New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or // New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or
// wxCONFIG_USE_GLOBAL_FILE to say which files should be used. // wxCONFIG_USE_GLOBAL_FILE to say which files should be used.
wxFileConfig(const wxString& appName, wxFileConfig(const wxString& appName,
const wxString& vendorName = "", const wxString& vendorName = _T(""),
const wxString& localFilename = "", const wxString& localFilename = _T(""),
const wxString& globalFilename = "", const wxString& globalFilename = _T(""),
long style = wxCONFIG_USE_LOCAL_FILE); long style = wxCONFIG_USE_LOCAL_FILE);
// dtor will save unsaved data // dtor will save unsaved data
@@ -318,12 +318,12 @@ public:
bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); } bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
// find entry/subgroup (NULL if not found) // find entry/subgroup (NULL if not found)
ConfigGroup *FindSubgroup(const char *szName) const; ConfigGroup *FindSubgroup(const wxChar *szName) const;
ConfigEntry *FindEntry (const char *szName) const; ConfigEntry *FindEntry (const wxChar *szName) const;
// delete entry/subgroup, return FALSE if doesn't exist // delete entry/subgroup, return FALSE if doesn't exist
bool DeleteSubgroupByName(const char *szName); bool DeleteSubgroupByName(const wxChar *szName);
bool DeleteEntry(const char *szName); bool DeleteEntry(const wxChar *szName);
// create new entry/subgroup returning pointer to newly created element // create new entry/subgroup returning pointer to newly created element
ConfigGroup *AddSubgroup(const wxString& strName); ConfigGroup *AddSubgroup(const wxString& strName);

View File

@@ -48,7 +48,7 @@ enum wxSeekMode
wxFromEnd wxFromEnd
}; };
WXDLLEXPORT_DATA(extern const char*) wxEmptyString; WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// functions // functions
@@ -57,7 +57,7 @@ WXDLLEXPORT bool wxFileExists(const wxString& filename);
#define FileExists wxFileExists #define FileExists wxFileExists
// does the path exist? (may have or not '/' or '\\' at the end) // does the path exist? (may have or not '/' or '\\' at the end)
WXDLLEXPORT bool wxPathExists(const char *pszPathName); WXDLLEXPORT bool wxPathExists(const wxChar *pszPathName);
#define wxDirExists wxPathExists #define wxDirExists wxPathExists
#define DirExists wxDirExists #define DirExists wxDirExists
@@ -66,7 +66,7 @@ WXDLLEXPORT bool wxIsAbsolutePath(const wxString& filename);
#define IsAbsolutePath wxIsAbsolutePath #define IsAbsolutePath wxIsAbsolutePath
// Get filename // Get filename
WXDLLEXPORT char* wxFileNameFromPath(char *path); WXDLLEXPORT wxChar* wxFileNameFromPath(wxChar *path);
WXDLLEXPORT wxString wxFileNameFromPath(const wxString& path); WXDLLEXPORT wxString wxFileNameFromPath(const wxString& path);
#define FileNameFromPath wxFileNameFromPath #define FileNameFromPath wxFileNameFromPath
@@ -77,46 +77,46 @@ WXDLLEXPORT wxString wxPathOnly(const wxString& path);
// wxString version // wxString version
WXDLLEXPORT wxString wxRealPath(const wxString& path); WXDLLEXPORT wxString wxRealPath(const wxString& path);
WXDLLEXPORT void wxDos2UnixFilename(char *s); WXDLLEXPORT void wxDos2UnixFilename(wxChar *s);
#define Dos2UnixFilename wxDos2UnixFilename #define Dos2UnixFilename wxDos2UnixFilename
WXDLLEXPORT void wxUnix2DosFilename(char *s); WXDLLEXPORT void wxUnix2DosFilename(wxChar *s);
#define Unix2DosFilename wxUnix2DosFilename #define Unix2DosFilename wxUnix2DosFilename
#ifdef __WXMAC__ #ifdef __WXMAC__
WXDLLEXPORT void wxMacPathToFSSpec( const char *path , FSSpec *spec ) ; WXDLLEXPORT void wxMacPathToFSSpec( const wxChar *path , FSSpec *spec ) ;
WXDLLEXPORT void wxMac2UnixFilename(char *s); WXDLLEXPORT void wxMac2UnixFilename(wxChar *s);
WXDLLEXPORT void wxUnix2MacFilename(char *s); WXDLLEXPORT void wxUnix2MacFilename(wxChar *s);
#endif #endif
// Strip the extension, in situ // Strip the extension, in situ
WXDLLEXPORT void wxStripExtension(char *buffer); WXDLLEXPORT void wxStripExtension(wxChar *buffer);
WXDLLEXPORT void wxStripExtension(wxString& buffer); WXDLLEXPORT void wxStripExtension(wxString& buffer);
// Get a temporary filename, opening and closing the file. // Get a temporary filename, opening and closing the file.
WXDLLEXPORT char* wxGetTempFileName(const wxString& prefix, char *buf = (char *) NULL); WXDLLEXPORT wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL);
// Expand file name (~/ and ${OPENWINHOME}/ stuff) // Expand file name (~/ and ${OPENWINHOME}/ stuff)
WXDLLEXPORT char* wxExpandPath(char *dest, const char *path); WXDLLEXPORT wxChar* wxExpandPath(wxChar *dest, const wxChar *path);
// Contract w.r.t environment (</usr/openwin/lib, OPENWHOME> -> ${OPENWINHOME}/lib) // Contract w.r.t environment (</usr/openwin/lib, OPENWHOME> -> ${OPENWINHOME}/lib)
// and make (if under the home tree) relative to home // and make (if under the home tree) relative to home
// [caller must copy-- volatile] // [caller must copy-- volatile]
WXDLLEXPORT char* wxContractPath(const wxString& filename, WXDLLEXPORT wxChar* wxContractPath(const wxString& filename,
const wxString& envname = wxEmptyString, const wxString& envname = wxEmptyString,
const wxString& user = wxEmptyString); const wxString& user = wxEmptyString);
// Destructive removal of /./ and /../ stuff // Destructive removal of /./ and /../ stuff
WXDLLEXPORT char* wxRealPath(char *path); WXDLLEXPORT wxChar* wxRealPath(wxChar *path);
// Allocate a copy of the full absolute path // Allocate a copy of the full absolute path
WXDLLEXPORT char* wxCopyAbsolutePath(const wxString& path); WXDLLEXPORT wxChar* wxCopyAbsolutePath(const wxString& path);
// Get first file name matching given wild card. // Get first file name matching given wild card.
// Flags are reserved for future use. // Flags are reserved for future use.
#define wxFILE 1 #define wxFILE 1
#define wxDIR 2 #define wxDIR 2
WXDLLEXPORT wxString wxFindFirstFile(const char *spec, int flags = wxFILE); WXDLLEXPORT wxString wxFindFirstFile(const wxChar *spec, int flags = wxFILE);
WXDLLEXPORT wxString wxFindNextFile(); WXDLLEXPORT wxString wxFindNextFile();
// Does the pattern contain wildcards? // Does the pattern contain wildcards?
@@ -144,7 +144,7 @@ WXDLLEXPORT bool wxRenameFile(const wxString& file1, const wxString& file2);
// copies into buf. // copies into buf.
// IMPORTANT NOTE getcwd is know not to work under some releases // IMPORTANT NOTE getcwd is know not to work under some releases
// of Win32s 1.3, according to MS release notes! // of Win32s 1.3, according to MS release notes!
WXDLLEXPORT char* wxGetWorkingDirectory(char *buf = (char *) NULL, int sz = 1000); WXDLLEXPORT wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000);
// new and preferred version of wxGetWorkingDirectory // new and preferred version of wxGetWorkingDirectory
// NB: can't have the same name because of overloading ambiguity // NB: can't have the same name because of overloading ambiguity
WXDLLEXPORT wxString wxGetCwd(); WXDLLEXPORT wxString wxGetCwd();
@@ -159,15 +159,15 @@ WXDLLEXPORT bool wxMkdir(const wxString& dir, int perm = 0777);
WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0); WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0);
// separators in file names // separators in file names
#define wxFILE_SEP_EXT '.' #define wxFILE_SEP_EXT _T('.')
#define wxFILE_SEP_DSK ':' #define wxFILE_SEP_DSK _T(':')
#define wxFILE_SEP_PATH_DOS '\\' #define wxFILE_SEP_PATH_DOS _T('\\')
#define wxFILE_SEP_PATH_UNIX '/' #define wxFILE_SEP_PATH_UNIX _T('/')
// separator in the path list (as in PATH environment variable) // separator in the path list (as in PATH environment variable)
// NB: these are strings and not characters on purpose! // NB: these are strings and not characters on purpose!
#define wxPATH_SEP_DOS ";" #define wxPATH_SEP_DOS _T(";")
#define wxPATH_SEP_UNIX ":" #define wxPATH_SEP_UNIX _T(":")
// platform independent versions // platform independent versions
#ifdef __UNIX__ #ifdef __UNIX__
@@ -187,21 +187,21 @@ WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0);
#endif // Unix/Windows #endif // Unix/Windows
// is the char a path separator? // is the char a path separator?
inline bool wxIsPathSeparator(char c) inline bool wxIsPathSeparator(wxChar c)
{ return c == wxFILE_SEP_PATH_DOS || c == wxFILE_SEP_PATH_UNIX; } { return c == wxFILE_SEP_PATH_DOS || c == wxFILE_SEP_PATH_UNIX; }
// does the string ends with path separator? // does the string ends with path separator?
WXDLLEXPORT bool wxEndsWithPathSeparator(const char *pszFileName); WXDLLEXPORT bool wxEndsWithPathSeparator(const wxChar *pszFileName);
// split the full path into path (including drive for DOS), name and extension // split the full path into path (including drive for DOS), name and extension
// (understands both '/' and '\\') // (understands both '/' and '\\')
WXDLLEXPORT void wxSplitPath(const char *pszFileName, WXDLLEXPORT void wxSplitPath(const wxChar *pszFileName,
wxString *pstrPath, wxString *pstrPath,
wxString *pstrName, wxString *pstrName,
wxString *pstrExt); wxString *pstrExt);
// find a file in a list of directories, returns false if not found // find a file in a list of directories, returns false if not found
WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile); WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile);
// Get the OS directory if appropriate (such as the Windows directory). // Get the OS directory if appropriate (such as the Windows directory).
// On non-Windows platform, probably just return the empty string. // On non-Windows platform, probably just return the empty string.
@@ -220,7 +220,7 @@ public:
void Add(const wxString& path); void Add(const wxString& path);
// Avoid compiler warning // Avoid compiler warning
wxNode *Add(const char *s) { return wxStringList::Add(s); } wxNode *Add(const wxChar *s) { return wxStringList::Add(s); }
// Find the first full path for which the file exists // Find the first full path for which the file exists
wxString FindValidPath(const wxString& filename); wxString FindValidPath(const wxString& filename);
// Find the first full path for which the file exists; ensure it's an // Find the first full path for which the file exists; ensure it's an
@@ -237,4 +237,3 @@ private:
#endif #endif
// _WX_FILEFN_H_ // _WX_FILEFN_H_

View File

@@ -219,7 +219,7 @@ class WXDLLEXPORT wxBrushList: public wxList
wxBrush *FindOrCreateBrush(const wxColour& colour, int style); wxBrush *FindOrCreateBrush(const wxColour& colour, int style);
}; };
WXDLLEXPORT_DATA(extern const char*) wxEmptyString; WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
class WXDLLEXPORT wxFontList: public wxList class WXDLLEXPORT wxFontList: public wxList
{ {

View File

@@ -29,20 +29,20 @@ class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog
DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog) DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog)
public: public:
wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); int n, const wxString *choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); const wxStringList& choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
bool Create(wxWindow *parent, const wxString& message, const wxString& caption, bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); int n, const wxString *choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
bool Create(wxWindow *parent, const wxString& message, const wxString& caption, bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); const wxStringList& choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
void SetSelection(int sel) ; void SetSelection(int sel) ;
inline int GetSelection(void) const { return m_selection; } inline int GetSelection(void) const { return m_selection; }
inline wxString GetStringSelection(void) const { return m_stringSelection; } inline wxString GetStringSelection(void) const { return m_stringSelection; }
inline char *GetSelectionClientData(void) const { return m_clientData; } inline wxChar *GetSelectionClientData(void) const { return m_clientData; }
void OnOK(wxCommandEvent& event); void OnOK(wxCommandEvent& event);
void OnListBoxDClick(wxCommandEvent& event); void OnListBoxDClick(wxCommandEvent& event);
@@ -53,7 +53,7 @@ protected:
long m_dialogStyle; long m_dialogStyle;
int m_selection; int m_selection;
wxString m_stringSelection; wxString m_stringSelection;
char* m_clientData; wxChar* m_clientData;
}; };
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption, WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
@@ -62,7 +62,7 @@ WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString&
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption, WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
int n, char *choices[], wxWindow *parent = (wxWindow *) NULL, int n, wxChar *choices[], wxWindow *parent = (wxWindow *) NULL,
int x = -1, int y = -1, bool centre = TRUE, int x = -1, int y = -1, bool centre = TRUE,
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
@@ -74,19 +74,19 @@ WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString&
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
int n, char *choices[], wxWindow *parent = (wxWindow *) NULL, int n, wxChar *choices[], wxWindow *parent = (wxWindow *) NULL,
int x = -1, int y = -1, bool centre = TRUE, int x = -1, int y = -1, bool centre = TRUE,
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
// Return client data instead // Return client data instead
WXDLLEXPORT char* wxGetSingleChoiceData(const wxString& message, const wxString& caption, WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
int n, const wxString *choices, char **client_data, int n, const wxString *choices, wxChar **client_data,
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
bool centre = TRUE, bool centre = TRUE,
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
WXDLLEXPORT char* wxGetSingleChoiceData(const wxString& message, const wxString& caption, WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
int n, char *choices[], char **client_data, int n, wxChar *choices[], wxChar **client_data,
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
bool centre = TRUE, bool centre = TRUE,
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);

View File

@@ -62,7 +62,7 @@
// data // data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// classes // classes

View File

@@ -20,8 +20,8 @@
#include "wx/dialog.h" #include "wx/dialog.h"
// Handy dialog functions (will be converted into classes at some point) // Handy dialog functions (will be converted into classes at some point)
WXDLLEXPORT_DATA(extern const char*) wxGetTextFromUserPromptStr; WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
WXDLLEXPORT_DATA(extern const char*) wxEmptyString; WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#define wxID_TEXT 3000 #define wxID_TEXT 3000

View File

@@ -32,7 +32,7 @@ class wxComboBox;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
extern const char* wxComboBoxNameStr; extern const char* wxComboBoxNameStr;
extern const char* wxEmptyString; extern const wxChar* wxEmptyString;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxComboBox // wxComboBox

View File

@@ -21,8 +21,8 @@
// File selector // File selector
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
extern const char *wxFileSelectorPromptStr; extern const wxChar *wxFileSelectorPromptStr;
extern const char *wxFileSelectorDefaultWildcardStr; extern const wxChar *wxFileSelectorDefaultWildcardStr;
class wxFileDialog: public wxDialog class wxFileDialog: public wxDialog
{ {
@@ -75,38 +75,38 @@ protected:
// File selector - backward compatibility // File selector - backward compatibility
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxFileSelector(const char *message = wxFileSelectorPromptStr, wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
const char *default_path = NULL, const wxChar *default_path = NULL,
const char *default_filename = NULL, const wxChar *default_filename = NULL,
const char *default_extension = NULL, const wxChar *default_extension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
int flags = 0, int flags = 0,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1); int x = -1, int y = -1);
// An extended version of wxFileSelector // An extended version of wxFileSelector
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
const char *default_path = NULL, const wxChar *default_path = NULL,
const char *default_filename = NULL, const wxChar *default_filename = NULL,
int *indexDefaultExtension = NULL, int *indexDefaultExtension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
int flags = 0, int flags = 0,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1); int x = -1, int y = -1);
// Ask for filename to load // Ask for filename to load
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxLoadFileSelector(const char *what, wxLoadFileSelector(const wxChar *what,
const char *extension, const wxChar *extension,
const char *default_name = (const char *)NULL, const wxChar *default_name = (const wxChar *)NULL,
wxWindow *parent = (wxWindow *) NULL); wxWindow *parent = (wxWindow *) NULL);
// Ask for filename to save // Ask for filename to save
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxSaveFileSelector(const char *what, wxSaveFileSelector(const wxChar *what,
const char *extension, const wxChar *extension,
const char *default_name = (const char *) NULL, const wxChar *default_name = (const wxChar *) NULL,
wxWindow *parent = (wxWindow *) NULL); wxWindow *parent = (wxWindow *) NULL);
#endif #endif

View File

@@ -41,7 +41,7 @@ class wxFontNameDirectory;
/* /*
extern wxFontNameDirectory *wxTheFontNameDirectory; extern wxFontNameDirectory *wxTheFontNameDirectory;
*/ */
extern const char* wxEmptyString; extern const wxChar* wxEmptyString;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxFont // wxFont

View File

@@ -32,7 +32,7 @@ class wxComboBox;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
extern const char* wxComboBoxNameStr; extern const char* wxComboBoxNameStr;
extern const char* wxEmptyString; extern const wxChar* wxEmptyString;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxComboBox // wxComboBox

View File

@@ -21,8 +21,8 @@
// File selector // File selector
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
extern const char *wxFileSelectorPromptStr; extern const wxChar *wxFileSelectorPromptStr;
extern const char *wxFileSelectorDefaultWildcardStr; extern const wxChar *wxFileSelectorDefaultWildcardStr;
class wxFileDialog: public wxDialog class wxFileDialog: public wxDialog
{ {
@@ -75,38 +75,38 @@ protected:
// File selector - backward compatibility // File selector - backward compatibility
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxFileSelector(const char *message = wxFileSelectorPromptStr, wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
const char *default_path = NULL, const wxChar *default_path = NULL,
const char *default_filename = NULL, const wxChar *default_filename = NULL,
const char *default_extension = NULL, const wxChar *default_extension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
int flags = 0, int flags = 0,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1); int x = -1, int y = -1);
// An extended version of wxFileSelector // An extended version of wxFileSelector
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
const char *default_path = NULL, const wxChar *default_path = NULL,
const char *default_filename = NULL, const wxChar *default_filename = NULL,
int *indexDefaultExtension = NULL, int *indexDefaultExtension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
int flags = 0, int flags = 0,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1); int x = -1, int y = -1);
// Ask for filename to load // Ask for filename to load
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxLoadFileSelector(const char *what, wxLoadFileSelector(const wxChar *what,
const char *extension, const wxChar *extension,
const char *default_name = (const char *)NULL, const wxChar *default_name = (const wxChar *)NULL,
wxWindow *parent = (wxWindow *) NULL); wxWindow *parent = (wxWindow *) NULL);
// Ask for filename to save // Ask for filename to save
WXDLLEXPORT wxString WXDLLEXPORT wxString
wxSaveFileSelector(const char *what, wxSaveFileSelector(const wxChar *what,
const char *extension, const wxChar *extension,
const char *default_name = (const char *) NULL, const wxChar *default_name = (const wxChar *) NULL,
wxWindow *parent = (wxWindow *) NULL); wxWindow *parent = (wxWindow *) NULL);
#endif #endif

View File

@@ -41,7 +41,7 @@ class wxFontNameDirectory;
/* /*
extern wxFontNameDirectory *wxTheFontNameDirectory; extern wxFontNameDirectory *wxTheFontNameDirectory;
*/ */
extern const char* wxEmptyString; extern const wxChar* wxEmptyString;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxFont // wxFont

View File

@@ -59,30 +59,30 @@ class WXDLLEXPORT wxHashTable: public wxObject
// key and value are NOT necessarily the same // key and value are NOT necessarily the same
void Put(long key, long value, wxObject *object); void Put(long key, long value, wxObject *object);
void Put(long key, const char *value, wxObject *object); void Put(long key, const wxChar *value, wxObject *object);
// key and value are the same // key and value are the same
void Put(long value, wxObject *object); void Put(long value, wxObject *object);
void Put(const char *value, wxObject *object); void Put(const wxChar *value, wxObject *object);
// key and value not the same // key and value not the same
wxObject *Get(long key, long value) const; wxObject *Get(long key, long value) const;
wxObject *Get(long key, const char *value) const; wxObject *Get(long key, const wxChar *value) const;
// key and value are the same // key and value are the same
wxObject *Get(long value) const; wxObject *Get(long value) const;
wxObject *Get(const char *value) const; wxObject *Get(const wxChar *value) const;
// Deletes entry and returns data if found // Deletes entry and returns data if found
wxObject *Delete(long key); wxObject *Delete(long key);
wxObject *Delete(const char *key); wxObject *Delete(const wxChar *key);
wxObject *Delete(long key, int value); wxObject *Delete(long key, int value);
wxObject *Delete(long key, const char *value); wxObject *Delete(long key, const wxChar *value);
// Construct your own integer key from a string, e.g. in case // Construct your own integer key from a string, e.g. in case
// you need to combine it with something // you need to combine it with something
long MakeKey(const char *string) const; long MakeKey(const wxChar *string) const;
// Way of iterating through whole hash table (e.g. to delete everything) // Way of iterating through whole hash table (e.g. to delete everything)
// Not necessary, of course, if you're only storing pointers to // Not necessary, of course, if you're only storing pointers to

View File

@@ -53,15 +53,15 @@ class WXDLLEXPORT wxConnectionBase: public wxObject
inline ~wxConnectionBase(void) {} inline ~wxConnectionBase(void) {}
// Calls that CLIENT can make // Calls that CLIENT can make
virtual bool Execute(char *data, int size = -1, wxIPCFormat format = wxIPC_TEXT ) = 0; virtual bool Execute(wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT ) = 0;
virtual bool Execute(const wxString& str) { return Execute((char *)(const char *)str, -1, wxIPC_TEXT); } virtual bool Execute(const wxString& str) { return Execute(WXSTRINGCAST str, -1, wxIPC_TEXT); }
virtual char *Request(const wxString& item, int *size = (int *) NULL, wxIPCFormat format = wxIPC_TEXT) = 0; virtual char *Request(const wxString& item, int *size = (int *) NULL, wxIPCFormat format = wxIPC_TEXT) = 0;
virtual bool Poke(const wxString& item, char *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0; virtual bool Poke(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0;
virtual bool StartAdvise(const wxString& item) = 0; virtual bool StartAdvise(const wxString& item) = 0;
virtual bool StopAdvise(const wxString& item) = 0; virtual bool StopAdvise(const wxString& item) = 0;
// Calls that SERVER can make // Calls that SERVER can make
virtual bool Advise(const wxString& item, char *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0; virtual bool Advise(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0;
// Calls that both can make // Calls that both can make
virtual bool Disconnect(void) = 0; virtual bool Disconnect(void) = 0;
@@ -69,9 +69,9 @@ class WXDLLEXPORT wxConnectionBase: public wxObject
// Callbacks to SERVER - override at will // Callbacks to SERVER - override at will
virtual bool OnExecute( const wxString& WXUNUSED(topic), char *WXUNUSED(data), int WXUNUSED(size), virtual bool OnExecute( const wxString& WXUNUSED(topic), char *WXUNUSED(data), int WXUNUSED(size),
int WXUNUSED(format) ) { return FALSE; }; int WXUNUSED(format) ) { return FALSE; };
virtual char *OnRequest( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), virtual wxChar *OnRequest( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item),
int *WXUNUSED(size), int WXUNUSED(format) ) { return (char *) NULL; }; int *WXUNUSED(size), int WXUNUSED(format) ) { return (wxChar *) NULL; };
virtual bool OnPoke( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), char *WXUNUSED(data), virtual bool OnPoke( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), wxChar *WXUNUSED(data),
int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; }; int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; };
virtual bool OnStartAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) ) virtual bool OnStartAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) )
{ return FALSE; }; { return FALSE; };
@@ -79,7 +79,7 @@ class WXDLLEXPORT wxConnectionBase: public wxObject
{ return FALSE; }; { return FALSE; };
// Callbacks to CLIENT - override at will // Callbacks to CLIENT - override at will
virtual bool OnAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), char *WXUNUSED(data), virtual bool OnAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), wxChar *WXUNUSED(data),
int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; }; int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; };
// Callbacks to BOTH // Callbacks to BOTH

View File

@@ -40,7 +40,7 @@
// due to circular header dependencies this function has to be declared here // due to circular header dependencies this function has to be declared here
// (normally it's found in utils.h which includes itself list.h...) // (normally it's found in utils.h which includes itself list.h...)
extern WXDLLEXPORT char* copystring(const char *s); extern WXDLLEXPORT wxChar* copystring(const wxChar *s);
class WXDLLEXPORT wxObjectListNode; class WXDLLEXPORT wxObjectListNode;
typedef wxObjectListNode wxNode; typedef wxObjectListNode wxNode;
@@ -77,7 +77,7 @@ typedef int (*wxListIterateFunction)(void *current);
union wxListKeyValue union wxListKeyValue
{ {
long integer; long integer;
char *string; wxChar *string;
}; };
// a struct which may contain both types of keys // a struct which may contain both types of keys
@@ -94,14 +94,14 @@ public:
{ m_keyType = wxKEY_NONE; } { m_keyType = wxKEY_NONE; }
wxListKey(long i) wxListKey(long i)
{ m_keyType = wxKEY_INTEGER; m_key.integer = i; } { m_keyType = wxKEY_INTEGER; m_key.integer = i; }
wxListKey(const char *s) wxListKey(const wxChar *s)
{ m_keyType = wxKEY_STRING; m_key.string = strdup(s); } { m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s); }
wxListKey(const wxString& s) wxListKey(const wxString& s)
{ m_keyType = wxKEY_STRING; m_key.string = strdup(s.c_str()); } { m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s.c_str()); }
// accessors // accessors
wxKeyType GetKeyType() const { return m_keyType; } wxKeyType GetKeyType() const { return m_keyType; }
const char *GetString() const const wxChar *GetString() const
{ wxASSERT( m_keyType == wxKEY_STRING ); return m_key.string; } { wxASSERT( m_keyType == wxKEY_STRING ); return m_key.string; }
long GetNumber() const long GetNumber() const
{ wxASSERT( m_keyType == wxKEY_INTEGER ); return m_key.integer; } { wxASSERT( m_keyType == wxKEY_INTEGER ); return m_key.integer; }
@@ -143,11 +143,11 @@ public:
virtual ~wxNodeBase(); virtual ~wxNodeBase();
// @@ no check is done that the list is really keyed on strings // @@ no check is done that the list is really keyed on strings
const char *GetKeyString() const { return m_key.string; } const wxChar *GetKeyString() const { return m_key.string; }
long GetKeyInteger() const { return m_key.integer; } long GetKeyInteger() const { return m_key.integer; }
// Necessary for some existing code // Necessary for some existing code
void SetKeyString(char* s) { m_key.string = s; } void SetKeyString(wxChar* s) { m_key.string = s; }
void SetKeyInteger(long i) { m_key.integer = i; } void SetKeyInteger(long i) { m_key.integer = i; }
#ifdef wxLIST_COMPATIBILITY #ifdef wxLIST_COMPATIBILITY
@@ -272,7 +272,7 @@ protected:
// keyed append // keyed append
wxNodeBase *Append(long key, void *object); wxNodeBase *Append(long key, void *object);
wxNodeBase *Append(const char *key, void *object); wxNodeBase *Append(const wxChar *key, void *object);
// removes node from the list but doesn't delete it (returns pointer // removes node from the list but doesn't delete it (returns pointer
// to the node or NULL if it wasn't found in the list) // to the node or NULL if it wasn't found in the list)
@@ -399,7 +399,7 @@ private:
\ \
nodetype *Append(long key, void *object) \ nodetype *Append(long key, void *object) \
{ return (nodetype *)wxListBase::Append(key, object); } \ { return (nodetype *)wxListBase::Append(key, object); } \
nodetype *Append(const char *key, void *object) \ nodetype *Append(const wxChar *key, void *object) \
{ return (nodetype *)wxListBase::Append(key, object); } \ { return (nodetype *)wxListBase::Append(key, object); } \
\ \
nodetype *DetachNode(nodetype *node) \ nodetype *DetachNode(nodetype *node) \
@@ -474,7 +474,7 @@ public:
// wxStringList class for compatibility with the old code // wxStringList class for compatibility with the old code
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
WX_DECLARE_LIST_2(char, wxStringListBase, wxStringListNode); WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode);
class WXDLLEXPORT wxStringList : public wxStringListBase class WXDLLEXPORT wxStringList : public wxStringListBase
{ {
@@ -482,7 +482,7 @@ public:
// ctors and such // ctors and such
// default // default
wxStringList() { DeleteContents(TRUE); } wxStringList() { DeleteContents(TRUE); }
wxStringList(const char *first ...); wxStringList(const wxChar *first ...);
// copying the string list: the strings are copied, too (extremely // copying the string list: the strings are copied, too (extremely
// inefficient!) // inefficient!)
@@ -492,13 +492,13 @@ public:
// operations // operations
// makes a copy of the string // makes a copy of the string
wxNode *Add(const char *s) wxNode *Add(const wxChar *s)
{ return (wxNode *)wxStringListBase::Append(copystring(s)); } { return (wxNode *)wxStringListBase::Append(copystring(s)); }
bool Delete(const char *s); bool Delete(const wxChar *s);
char **ListToArray(bool new_copies = FALSE) const; wxChar **ListToArray(bool new_copies = FALSE) const;
bool Member(const char *s) const; bool Member(const wxChar *s) const;
// alphabetic sort // alphabetic sort
void Sort(); void Sort();

View File

@@ -59,13 +59,13 @@ typedef wxObject * (*wxObjectConstructorFn) (void);
class WXDLLEXPORT wxClassInfo class WXDLLEXPORT wxClassInfo
{ {
public: public:
wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz, wxObjectConstructorFn fn); wxClassInfo(wxChar *cName, wxChar *baseName1, wxChar *baseName2, int sz, wxObjectConstructorFn fn);
wxObject *CreateObject(void); wxObject *CreateObject(void);
inline char *GetClassName(void) const { return m_className; } inline wxChar *GetClassName(void) const { return m_className; }
inline char *GetBaseClassName1(void) const { return m_baseClassName1; } inline wxChar *GetBaseClassName1(void) const { return m_baseClassName1; }
inline char *GetBaseClassName2(void) const { return m_baseClassName2; } inline wxChar *GetBaseClassName2(void) const { return m_baseClassName2; }
inline wxClassInfo* GetBaseClass1() const { return m_baseInfo1; } inline wxClassInfo* GetBaseClass1() const { return m_baseInfo1; }
inline wxClassInfo* GetBaseClass2() const { return m_baseInfo2; } inline wxClassInfo* GetBaseClass2() const { return m_baseInfo2; }
inline int GetSize(void) const { return m_objectSize; } inline int GetSize(void) const { return m_objectSize; }
@@ -74,7 +74,7 @@ class WXDLLEXPORT wxClassInfo
inline wxClassInfo* GetNext() const { return m_next; } inline wxClassInfo* GetNext() const { return m_next; }
bool IsKindOf(wxClassInfo *info) const; bool IsKindOf(wxClassInfo *info) const;
static wxClassInfo *FindClass(char *c); static wxClassInfo *FindClass(wxChar *c);
// Initializes parent pointers and hash table for fast searching. // Initializes parent pointers and hash table for fast searching.
static void InitializeClasses(void); static void InitializeClasses(void);
@@ -83,9 +83,9 @@ class WXDLLEXPORT wxClassInfo
static void CleanUpClasses(void); static void CleanUpClasses(void);
public: public:
char* m_className; wxChar* m_className;
char* m_baseClassName1; wxChar* m_baseClassName1;
char* m_baseClassName2; wxChar* m_baseClassName2;
int m_objectSize; int m_objectSize;
wxObjectConstructorFn m_objectConstructor; wxObjectConstructorFn m_objectConstructor;
@@ -100,7 +100,7 @@ public:
static wxHashTable* sm_classTable; static wxHashTable* sm_classTable;
}; };
WXDLLEXPORT wxObject* wxCreateDynamicObject(const char *name); WXDLLEXPORT wxObject* wxCreateDynamicObject(const wxChar *name);
#if wxUSE_SERIAL #if wxUSE_SERIAL
WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream ); WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream );
@@ -123,13 +123,13 @@ WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream );
#define IMPLEMENT_DYNAMIC_CLASS(name, basename) \ #define IMPLEMENT_DYNAMIC_CLASS(name, basename) \
wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
{ return new name; }\ { return new name; }\
wxClassInfo name::sm_class##name((char *) #name, (char *) #basename, (char *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); wxClassInfo name::sm_class##name((wxChar *) _T(#name), (wxChar *) _T(#basename), (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name);
// Multiple inheritance with two base classes // Multiple inheritance with two base classes
#define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ #define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \
wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
{ return new name; }\ { return new name; }\
wxClassInfo name::sm_class##name((char *) #name, (char *) #basename1, (char *) #basename2, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); wxClassInfo name::sm_class##name((wxChar *) _T(#name), (wxChar *) _T(#basename1), (wxChar *) _T(#basename2), (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name);
////// //////
////// for abstract classes ////// for abstract classes
@@ -137,12 +137,13 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
// Single inheritance with one base class // Single inheritance with one base class
#define IMPLEMENT_ABSTRACT_CLASS(name, basename) \ #define IMPLEMENT_ABSTRACT_CLASS(name, basename) \
wxClassInfo name::sm_class##name((char *) #name, (char *) #basename, \ wxClassInfo name::sm_class##name((wxChar *) _T(#name), (wxChar *) _T(#basename), \
(char *) NULL, (int) sizeof(name), (wxObjectConstructorFn) NULL); (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) NULL);
// Multiple inheritance with two base classes // Multiple inheritance with two base classes
#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ #define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \
wxClassInfo name::sm_class##name((char *) #name, (char *) #basename1, (char *) #basename2, (int) sizeof(name), (wxObjectConstructorFn) NULL); wxClassInfo name::sm_class##name((wxChar *) _T(#name), (wxChar *) _T(#basename1), \
(wxChar *) _T(#basename2), (int) sizeof(name), (wxObjectConstructorFn) NULL);
#define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS
#define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2

View File

@@ -94,7 +94,7 @@ public:
// guess the type of file (m_file is supposed to be opened) // guess the type of file (m_file is supposed to be opened)
wxTextFileType GuessType() const; wxTextFileType GuessType() const;
// get the name of the file // get the name of the file
const char *GetName() const { return m_strFile.c_str(); } const wxChar *GetName() const { return m_strFile.c_str(); }
// add/remove lines // add/remove lines
// add a line to the end // add a line to the end
@@ -114,7 +114,7 @@ public:
// get the file termination string // get the file termination string
// Note: implementation moved to textfile to prevent warning due to switch. // Note: implementation moved to textfile to prevent warning due to switch.
static const char *GetEOL(wxTextFileType type = typeDefault); static const wxChar *GetEOL(wxTextFileType type = typeDefault);
// dtor // dtor
~wxTextFile(); ~wxTextFile();

View File

@@ -60,16 +60,16 @@ class WXDLLEXPORT wxFrame;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Useful buffer (FIXME VZ: yeah, that is. To be removed!) // Useful buffer (FIXME VZ: yeah, that is. To be removed!)
WXDLLEXPORT_DATA(extern char*) wxBuffer; WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
// Make a copy of this string using 'new' // Make a copy of this string using 'new'
WXDLLEXPORT char* copystring(const char *s); WXDLLEXPORT wxChar* copystring(const wxChar *s);
// Matches string one within string two regardless of case // Matches string one within string two regardless of case
WXDLLEXPORT bool StringMatch(char *one, char *two, bool subString = TRUE, bool exact = FALSE); WXDLLEXPORT bool StringMatch(wxChar *one, wxChar *two, bool subString = TRUE, bool exact = FALSE);
// A shorter way of using strcmp // A shorter way of using strcmp
#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0)) #define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Miscellaneous functions // Miscellaneous functions
@@ -107,23 +107,23 @@ WXDLLEXPORT long wxGetCurrentId();
// Various conversions // Various conversions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT_DATA(extern const char*) wxFloatToStringStr; WXDLLEXPORT_DATA(extern const wxChar*) wxFloatToStringStr;
WXDLLEXPORT_DATA(extern const char*) wxDoubleToStringStr; WXDLLEXPORT_DATA(extern const wxChar*) wxDoubleToStringStr;
WXDLLEXPORT void StringToFloat(char *s, float *number); WXDLLEXPORT void StringToFloat(wxChar *s, float *number);
WXDLLEXPORT char* FloatToString(float number, const char *fmt = wxFloatToStringStr); WXDLLEXPORT wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr);
WXDLLEXPORT void StringToDouble(char *s, double *number); WXDLLEXPORT void StringToDouble(wxChar *s, double *number);
WXDLLEXPORT char* DoubleToString(double number, const char *fmt = wxDoubleToStringStr); WXDLLEXPORT wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr);
WXDLLEXPORT void StringToInt(char *s, int *number); WXDLLEXPORT void StringToInt(wxChar *s, int *number);
WXDLLEXPORT void StringToLong(char *s, long *number); WXDLLEXPORT void StringToLong(wxChar *s, long *number);
WXDLLEXPORT char* IntToString(int number); WXDLLEXPORT wxChar* IntToString(int number);
WXDLLEXPORT char* LongToString(long number); WXDLLEXPORT wxChar* LongToString(long number);
// Convert 2-digit hex number to decimal // Convert 2-digit hex number to decimal
WXDLLEXPORT int wxHexToDec(const wxString& buf); WXDLLEXPORT int wxHexToDec(const wxString& buf);
// Convert decimal integer to 2-character hex string // Convert decimal integer to 2-character hex string
WXDLLEXPORT void wxDecToHex(int dec, char *buf); WXDLLEXPORT void wxDecToHex(int dec, wxChar *buf);
WXDLLEXPORT wxString wxDecToHex(int dec); WXDLLEXPORT wxString wxDecToHex(int dec);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -131,7 +131,7 @@ WXDLLEXPORT wxString wxDecToHex(int dec);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Execute another program. Returns 0 if there was an error, a PID otherwise. // Execute another program. Returns 0 if there was an error, a PID otherwise.
WXDLLEXPORT long wxExecute(char **argv, bool sync = FALSE, WXDLLEXPORT long wxExecute(wxChar **argv, bool sync = FALSE,
wxProcess *process = (wxProcess *) NULL); wxProcess *process = (wxProcess *) NULL);
WXDLLEXPORT long wxExecute(const wxString& command, bool sync = FALSE, WXDLLEXPORT long wxExecute(const wxString& command, bool sync = FALSE,
wxProcess *process = (wxProcess *) NULL); wxProcess *process = (wxProcess *) NULL);
@@ -182,36 +182,36 @@ WXDLLEXPORT long wxGetFreeMemory();
// NB: "char *" functions are deprecated, use wxString ones! // NB: "char *" functions are deprecated, use wxString ones!
// Get eMail address // Get eMail address
WXDLLEXPORT bool wxGetEmailAddress(char *buf, int maxSize); WXDLLEXPORT bool wxGetEmailAddress(wxChar *buf, int maxSize);
WXDLLEXPORT wxString wxGetEmailAddress(); WXDLLEXPORT wxString wxGetEmailAddress();
// Get hostname. // Get hostname.
WXDLLEXPORT bool wxGetHostName(char *buf, int maxSize); WXDLLEXPORT bool wxGetHostName(wxChar *buf, int maxSize);
WXDLLEXPORT wxString wxGetHostName(); WXDLLEXPORT wxString wxGetHostName();
// Get FQDN // Get FQDN
WXDLLEXPORT wxString wxGetFullHostName(); WXDLLEXPORT wxString wxGetFullHostName();
// Get user ID e.g. jacs (this is known as login name under Unix) // Get user ID e.g. jacs (this is known as login name under Unix)
WXDLLEXPORT bool wxGetUserId(char *buf, int maxSize); WXDLLEXPORT bool wxGetUserId(wxChar *buf, int maxSize);
WXDLLEXPORT wxString wxGetUserId(); WXDLLEXPORT wxString wxGetUserId();
// Get user name e.g. Julian Smart // Get user name e.g. Julian Smart
WXDLLEXPORT bool wxGetUserName(char *buf, int maxSize); WXDLLEXPORT bool wxGetUserName(wxChar *buf, int maxSize);
WXDLLEXPORT wxString wxGetUserName(); WXDLLEXPORT wxString wxGetUserName();
// Get current Home dir and copy to dest (returns pstr->c_str()) // Get current Home dir and copy to dest (returns pstr->c_str())
WXDLLEXPORT const char* wxGetHomeDir(wxString *pstr); WXDLLEXPORT const wxChar* wxGetHomeDir(wxString *pstr);
// Get the user's home dir (caller must copy --- volatile) // Get the user's home dir (caller must copy --- volatile)
// returns NULL is no HOME dir is known // returns NULL is no HOME dir is known
WXDLLEXPORT char* wxGetUserHome(const wxString& user = wxEmptyString); WXDLLEXPORT wxChar* wxGetUserHome(const wxString& user = wxEmptyString);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Strip out any menu codes // Strip out any menu codes
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT char* wxStripMenuCodes(char *in, char *out = (char *) NULL); WXDLLEXPORT wxChar* wxStripMenuCodes(wxChar *in, wxChar *out = (wxChar *) NULL);
WXDLLEXPORT wxString wxStripMenuCodes(const wxString& str); WXDLLEXPORT wxString wxStripMenuCodes(const wxString& str);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -277,14 +277,14 @@ public:
// Format a message on the standard error (UNIX) or the debugging // Format a message on the standard error (UNIX) or the debugging
// stream (Windows) // stream (Windows)
WXDLLEXPORT void wxDebugMsg(const char *fmt ...) ; WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...) ;
// Non-fatal error (continues) // Non-fatal error (continues)
WXDLLEXPORT_DATA(extern const char*) wxInternalErrorStr; WXDLLEXPORT_DATA(extern const wxChar*) wxInternalErrorStr;
WXDLLEXPORT void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr); WXDLLEXPORT void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr);
// Fatal error (exits) // Fatal error (exits)
WXDLLEXPORT_DATA(extern const char*) wxFatalErrorStr; WXDLLEXPORT_DATA(extern const wxChar*) wxFatalErrorStr;
WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr); WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -297,7 +297,7 @@ WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry,
WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file = wxEmptyString); WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file = wxEmptyString);
WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file = wxEmptyString); WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file = wxEmptyString);
WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file = wxEmptyString); WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, wxChar **value, const wxString& file = wxEmptyString);
WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file = wxEmptyString); WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file = wxEmptyString);
WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file = wxEmptyString); WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file = wxEmptyString);
WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file = wxEmptyString); WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file = wxEmptyString);
@@ -308,8 +308,8 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y );
// MSW only: get user-defined resource from the .res file. // MSW only: get user-defined resource from the .res file.
// Returns NULL or newly-allocated memory, so use delete[] to clean up. // Returns NULL or newly-allocated memory, so use delete[] to clean up.
#ifdef __WXMSW__ #ifdef __WXMSW__
WXDLLEXPORT extern const char* wxUserResourceStr; WXDLLEXPORT extern const wxChar* wxUserResourceStr;
WXDLLEXPORT char* wxLoadUserResource(const wxString& resourceName, const wxString& resourceType = wxUserResourceStr); WXDLLEXPORT wxChar* wxLoadUserResource(const wxString& resourceName, const wxString& resourceType = wxUserResourceStr);
// Implemented in utils.cpp: VC++, Win95 only. Sets up a console for standard // Implemented in utils.cpp: VC++, Win95 only. Sets up a console for standard
// input/output // input/output