corrections for final release of Mac OS X

applied patches proposed by Mark Newsam


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2001-04-01 20:42:05 +00:00
parent 67bd5bad04
commit 5fde6fcc9b
73 changed files with 1242 additions and 872 deletions

View File

@@ -77,6 +77,9 @@ protected:
int m_min;
int m_max;
private:
DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
};
#endif // _WX_GENERIC_SPINCTRL_H_

View File

@@ -32,7 +32,7 @@
#define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c )
#elif defined( __WXMAC__ )
#ifdef __WXMAC_X__
#include <CarbonCore/Math64.h>
#include <CoreServices/CoreServices.h>
#else
#include "Math64.h"
#endif

View File

@@ -44,6 +44,7 @@ See mod_*.cpp and htmlwin.cpp for example :-)
// This must be part of the module you want to force:
#define FORCE_LINK_ME(module_name) \
int _link_dummy_func_##module_name (); \
int _link_dummy_func_##module_name () \
{ \
return 1; \

View File

@@ -61,6 +61,7 @@ public:
bool Create(const wxBitmap& bitmap);
// Implementation
bool PointMasked(int x, int y);
inline WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; }
inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; }
protected:
@@ -153,28 +154,33 @@ public:
wxBitmap(int width, int height, int depth = -1);
~wxBitmap();
// get the given part of bitmap
wxBitmap GetSubBitmap( const wxRect& rect ) const;
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE);
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
inline int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); }
inline int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); }
inline int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); }
inline int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); }
bool Ok() const;
int GetWidth() const;
int GetHeight() const;
int GetDepth() const;
int GetQuality() const;
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetQuality(int q);
void SetOk(bool isOk);
inline wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : (wxPalette*) NULL); }
wxPalette* GetPalette() const;
void SetPalette(const wxPalette& palette);
inline wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : (wxMask*) NULL); }
wxMask *GetMask() const;
void SetMask(wxMask *mask) ;
int GetBitmapType() const;
inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
inline bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; }
inline bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; }
@@ -196,8 +202,10 @@ protected:
// TODO: Implementation
public:
void SetHBITMAP(WXHBITMAP bmp);
inline WXHBITMAP GetHBITMAP() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hBitmap : 0); }
WXHBITMAP GetHBITMAP() const;
PicHandle GetPict() const;
bool FreeResource(bool force = FALSE);
};
#endif

View File

@@ -31,7 +31,7 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
public:
wxChoice() {}
~wxChoice() ;
virtual ~wxChoice() ;
wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
@@ -52,12 +52,15 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
virtual int DoAppend(const wxString& item);
// implement base class pure virtuals
virtual int DoAppend(const wxString& item);
virtual void Delete(int n);
virtual void Clear();
virtual int GetCount() const ;
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual void SetString( int , const wxString& s ) ;
@@ -73,9 +76,9 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
virtual wxString GetStringSelection() const ;
virtual bool SetStringSelection(const wxString& sel);
virtual inline int Number() const { return m_strings.GetCount(); }
virtual inline int GetCount() const { return m_strings.GetCount(); }
// Mac specific
virtual void Command(wxCommandEvent& event);
void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ;
virtual inline int GetColumns() const { return 1 ; };
*/

View File

@@ -156,7 +156,7 @@ class WXDLLEXPORT wxDropTarget: public wxObject
virtual void OnEnter() { }
virtual void OnLeave() { }
virtual bool OnDrop( long x, long y, const void *pData ) = 0;
virtual bool OnDrop( wxCoord x, wxCoord y, const void *pData ) = 0;
// protected:
@@ -178,8 +178,8 @@ class WXDLLEXPORT wxTextDropTarget: public wxDropTarget
public:
wxTextDropTarget() {};
virtual bool OnDrop( long x, long y, const void *pData );
virtual bool OnDropText( long x, long y, const char *psz );
virtual bool OnDrop( wxCoord x, wxCoord y, const void *pData );
virtual bool OnDropText( wxCoord x, wxCoord y, const char *psz );
protected:
@@ -197,8 +197,8 @@ class WXDLLEXPORT wxFileDropTarget: public wxDropTarget
wxFileDropTarget() {};
virtual bool OnDrop(long x, long y, const void *pData);
virtual bool OnDropFiles( long x, long y,
virtual bool OnDrop(wxCoord x, wxCoord y, const void *pData);
virtual bool OnDropFiles( wxCoord x, wxCoord y,
size_t nFiles, const char * const aszFiles[]);
protected:

View File

@@ -20,7 +20,7 @@
#include "wx/gdiobj.h"
#if wxUSE_DRAG_AND_DROP
#include "wx/dataobj.h" wx/defs.h
#include "wx/dataobj.h"
#endif
/*

View File

@@ -63,7 +63,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
// for compatibility with wxMSW
void SetIcon(const wxIcon& icon)
{
SetBitmap( icon );
SetBitmap( (const wxBitmap&) icon );
}
// overriden base class virtuals

View File

@@ -17,8 +17,6 @@
#pragma interface "statbar.h"
#endif
#include "wx/generic/statusbr.h"
class WXDLLEXPORT wxStatusBarMac : public wxStatusBarGeneric
{
DECLARE_DYNAMIC_CLASS(wxStatusBarMac);
@@ -50,4 +48,4 @@ protected:
};
#endif
// _WX_STATBAR_H_
// _WX_STATBAR_H_

View File

@@ -270,7 +270,6 @@ public :
virtual void MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin) ;
virtual void MacDoGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin) ;
MacWindowData* MacGetWindowData() { return m_macWindowData ; }
static WindowRef MacGetWindowInUpdate() { return s_macWindowInUpdate ; }
bool MacIsWindowScrollbar( const wxScrollBar* sb ) { return (m_hScrollBar == sb || m_vScrollBar == sb) ; }
static wxWindow* s_lastMouseWindow ;
private:
@@ -278,7 +277,6 @@ private:
protected:
MacWindowData* m_macWindowData ;
static WindowRef s_macWindowInUpdate ;
RgnHandle m_macUpdateRgn ;
int m_x ;

View File

@@ -115,6 +115,7 @@ WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream );
// Single inheritance with one base class
#define IMPLEMENT_DYNAMIC_CLASS(name, basename) \
wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void); \
wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
{ return new name; }\
wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename), (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name);

View File

@@ -13,9 +13,9 @@
#define _WX_SPINBUTT_H_BASE_
#ifdef __GNUG__
#ifndef __WXMOTIF__ // because there is no matching .cpp for Motif
#if !defined(__WXMOTIF__) && !defined(__WXMAC__) // because there is no matching .cpp
#pragma interface "spinbutbase.h"
#endif // Motif
#endif
#endif
// ----------------------------------------------------------------------------

View File

@@ -54,7 +54,8 @@ protected:
#include "wx/msw/statbr95.h"
typedef wxStatusBar95 wxStatusBarReal;
#elif defined(__WXMAC__) && !defined(__UNIX__)
#elif defined(__WXMAC__) /* && !defined(__UNIX__) */
#include "wx/generic/statusbr.h"
#include "wx/mac/statusbr.h"
typedef wxStatusBarMac wxStatusBarReal;

View File

@@ -256,6 +256,7 @@ protected:
wxEVT_COMMAND_TREE_KEY_DOWN
*/
#ifndef __WXMAC_X__
class WXDLLEXPORT wxTreeEvent: public wxCommandEvent
{
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
@@ -275,6 +276,7 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent
};
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
#endif
#endif
// _WX_TREECTRL_H_