CW Win32 and Mac adaptions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -49,6 +49,8 @@
|
||||
#endif // Sun CC
|
||||
#endif
|
||||
#endif // Sun
|
||||
#elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) )
|
||||
// MacOS
|
||||
#else // Windows
|
||||
#ifndef __WINDOWS__
|
||||
#define __WINDOWS__
|
||||
|
@@ -29,12 +29,14 @@
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
#if defined(__VISUALC__) || defined(__MWERKS__)
|
||||
#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined( __INTEL__) )
|
||||
typedef _off_t off_t;
|
||||
#elif defined(__BORLANDC__) && defined(__WIN16__)
|
||||
typedef long off_t;
|
||||
#elif defined(__SC__)
|
||||
typedef long off_t;
|
||||
#elif defined(__MWERKS__) && !defined(__INTEL__)
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
const off_t wxInvalidOffset = (off_t)-1;
|
||||
|
@@ -141,6 +141,27 @@ public:
|
||||
protected:
|
||||
bool m_keepGoing ;
|
||||
|
||||
// mac specifics
|
||||
|
||||
public :
|
||||
|
||||
void MacDoOneEvent() ;
|
||||
|
||||
void MacHandleOneEvent( EventRecord *ev ) ;
|
||||
void MacHandleNullEvent( EventRecord *ev ) ;
|
||||
void MacHandleHighLevelEvent( EventRecord *ev ) ;
|
||||
void MacHandleMouseDownEvent( EventRecord *ev ) ;
|
||||
void MacHandleMouseUpEvent( EventRecord *ev ) ;
|
||||
void MacHandleKeyDownEvent( EventRecord *ev ) ;
|
||||
void MacHandleKeyUpEvent( EventRecord *ev ) ;
|
||||
void MacHandleAutoKeyEvent( EventRecord *ev ) ;
|
||||
void MacHandleActivateEvent( EventRecord *ev ) ;
|
||||
void MacHandleUpdateEvent( EventRecord *ev ) ;
|
||||
void MacHandleDiskEvent( EventRecord *ev ) ;
|
||||
void MacHandleOSEvent( EventRecord *ev ) ;
|
||||
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@@ -67,7 +67,6 @@ public:
|
||||
#define wxHIDE_READONLY 0x0008
|
||||
#define wxFILE_MUST_EXIST 0x0010
|
||||
|
||||
/*
|
||||
// File selector - backward compatibility
|
||||
WXDLLEXPORT wxString wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||
const char *default_filename = NULL, const char *default_extension = NULL,
|
||||
@@ -86,7 +85,5 @@ WXDLLEXPORT wxString wxLoadFileSelector(const char *what, const char *extension,
|
||||
// Generic file save dialog
|
||||
WXDLLEXPORT wxString wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||
|
||||
*/
|
||||
|
||||
#endif
|
||||
// _WX_FILEDLG_H_
|
||||
|
@@ -32,42 +32,42 @@
|
||||
|
||||
#define wxUSE_AUTOTRANS 0
|
||||
// Define wxTString
|
||||
#define wxUSE_POSTSCRIPT 1
|
||||
#define wxUSE_POSTSCRIPT 0
|
||||
// 0 for no PostScript device context
|
||||
#define wxUSE_AFM_FOR_POSTSCRIPT 0
|
||||
// 1 to use font metric files in GetTextExtent
|
||||
#define wxUSE_METAFILE 1
|
||||
#define wxUSE_METAFILE 0
|
||||
// 0 for no Metafile and metafile device context
|
||||
#define wxUSE_FORM 0
|
||||
// 0 for no wxForm
|
||||
#define wxUSE_IPC 1
|
||||
#define wxUSE_IPC 0
|
||||
// 0 for no interprocess comms
|
||||
#define wxUSE_HELP 1
|
||||
#define wxUSE_HELP 0
|
||||
// 0 for no help facility
|
||||
#define wxUSE_RESOURCES 1
|
||||
#define wxUSE_RESOURCES 0
|
||||
// 0 for no wxGetResource/wxWriteResource
|
||||
#define wxUSE_CLIPBOARD 1
|
||||
#define wxUSE_CLIPBOARD 0
|
||||
// 0 for no clipboard functions
|
||||
#define wxUSE_SPLINES 1
|
||||
#define wxUSE_SPLINES 0
|
||||
// 0 for no splines
|
||||
#define wxUSE_XFIG_SPLINE_CODE 1
|
||||
#define wxUSE_XFIG_SPLINE_CODE 0
|
||||
// 1 for XFIG spline code, 0 for AIAI spline code.
|
||||
// AIAI spline code is slower, but freer of copyright issues.
|
||||
// 0 for no splines
|
||||
|
||||
#define wxUSE_TOOLBAR 1
|
||||
#define wxUSE_TOOLBAR 0
|
||||
// Use toolbars
|
||||
#define wxUSE_DRAG_AND_DROP 1
|
||||
#define wxUSE_DRAG_AND_DROP 0
|
||||
// 0 for no drag and drop
|
||||
|
||||
#define wxUSE_WX_RESOURCES 1
|
||||
#define wxUSE_WX_RESOURCES 0
|
||||
// Use .wxr resource mechanism (requires PrologIO library)
|
||||
|
||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 1
|
||||
// Set to 0 to disable document/view architecture
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 0
|
||||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0
|
||||
// Set to 0 to disable PostScript print/preview architecture code
|
||||
// under Windows (just use Windows printing).
|
||||
#define wxUSE_DYNAMIC_CLASSES 1
|
||||
@@ -111,7 +111,7 @@
|
||||
// but you can't mix them. Set to 1 for <iostream.h>,
|
||||
// 0 for <iostream>
|
||||
|
||||
#define wxUSE_WXCONFIG 1
|
||||
#define wxUSE_WXCONFIG 0
|
||||
// if enabled, compiles built-in OS independent wxConfig
|
||||
// class and it's file (any platform) and registry (Win)
|
||||
// based implementations
|
||||
|
@@ -189,26 +189,49 @@ public:
|
||||
|
||||
// Get overall window size
|
||||
virtual void GetSize(int *width, int *height) const;
|
||||
wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
|
||||
|
||||
// Get window position, relative to parent (or screen if no parent)
|
||||
virtual void GetPosition(int *x, int *y) const;
|
||||
wxPoint GetPosition() const
|
||||
{ int x, y; GetPosition(&x, &y); return wxPoint(x, y); }
|
||||
|
||||
// Get size and position
|
||||
wxRect GetRect() const
|
||||
{ int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
|
||||
|
||||
// Get client (application-useable) size
|
||||
virtual void GetClientSize(int *width, int *height) const;
|
||||
wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
|
||||
|
||||
// Set overall size and position
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
|
||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||
{ SetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
|
||||
|
||||
// set size only
|
||||
void SetSize(int width, int height)
|
||||
{ SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
void SetSize(const wxSize& size)
|
||||
{ SetSize(-1, -1, size.x, size.y, wxSIZE_USE_EXISTING); }
|
||||
|
||||
// set position only
|
||||
virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
|
||||
void Move(const wxPoint& pt) { SetSize(pt.x, pt.y, -1, -1, wxSIZE_USE_EXISTING); }
|
||||
|
||||
// Set client size
|
||||
virtual void SetClientSize(int width, int size);
|
||||
virtual void SetClientSize(int width, int height);
|
||||
void SetClientSize(const wxSize& sz) { SetClientSize(sz.x, sz.y); }
|
||||
|
||||
// Convert client to screen coordinates
|
||||
virtual void ClientToScreen(int *x, int *y) const;
|
||||
wxPoint ClientToScreen(const wxPoint& pt) const
|
||||
{ int x = pt.x; int y = pt.y; ClientToScreen(& x, & y); return wxPoint(x, y); }
|
||||
|
||||
// Convert screen to client coordinates
|
||||
virtual void ScreenToClient(int *x, int *y) const;
|
||||
wxPoint ScreenToClient(const wxPoint& pt) const
|
||||
{ int x = pt.x; int y = pt.y; ScreenToClient(& x, & y); return wxPoint(x, y); }
|
||||
|
||||
// Set the focus to this window
|
||||
virtual void SetFocus();
|
||||
|
@@ -79,7 +79,7 @@ inline size_t WXDLLEXPORT Strlen(const char *psz)
|
||||
// portable strcasecmp/_stricmp
|
||||
inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2)
|
||||
{
|
||||
#if defined(__VISUALC__) || defined(__MWERKS__)
|
||||
#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined(__INTEL__) )
|
||||
return _stricmp(psz1, psz2);
|
||||
#elif defined(__SC__)
|
||||
return _stricmp(psz1, psz2);
|
||||
@@ -91,7 +91,7 @@ inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2)
|
||||
return stricmp(psz1, psz2);
|
||||
#elif defined(__UNIX__) || defined(__GNUWIN32__)
|
||||
return strcasecmp(psz1, psz2);
|
||||
#elif defined(__MWERKS__) && !defined(_MSC_VER)
|
||||
#elif defined(__MWERKS__) && !defined(__INTEL__)
|
||||
register char c1, c2;
|
||||
do {
|
||||
c1 = tolower(*psz1++);
|
||||
|
Reference in New Issue
Block a user