corrected warnings when compiling with -Wall -W

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-05-07 21:58:27 +00:00
parent 54380f29f0
commit d84afea9d1
87 changed files with 333 additions and 245 deletions

View File

@@ -52,7 +52,7 @@ name& name::operator=(const name& src) \
return *this; \ return *this; \
} \ } \
\ \
name::name(const name& src) \ name::name(const name& src) : wxArrayPtrVoid() \
{ \ { \
DoCopy(src); \ DoCopy(src); \
} \ } \

View File

@@ -27,7 +27,10 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
class WXDLLEXPORT wxBitmapButtonBase : public wxButton class WXDLLEXPORT wxBitmapButtonBase : public wxButton
{ {
public: public:
wxBitmapButtonBase() { m_marginX = m_marginY = 0; } wxBitmapButtonBase()
: m_bmpNormal(), m_bmpSelected(), m_bmpFocus(), m_bmpDisabled()
, m_marginX(0), m_marginY(0)
{ }
// set the bitmaps // set the bitmaps
void SetBitmapLabel(const wxBitmap& bitmap) void SetBitmapLabel(const wxBitmap& bitmap)

View File

@@ -39,7 +39,7 @@ public:
class WXDLLEXPORT wxStringClientData : public wxClientData class WXDLLEXPORT wxStringClientData : public wxClientData
{ {
public: public:
wxStringClientData() { } wxStringClientData() : m_data() { }
wxStringClientData( const wxString &data ) : m_data(data) { } wxStringClientData( const wxString &data ) : m_data(data) { }
void SetData( const wxString &data ) { m_data = data; } void SetData( const wxString &data ) { m_data = data; }
const wxString& GetData() const { return m_data; } const wxString& GetData() const { return m_data; }

View File

@@ -55,7 +55,7 @@ public:
wxDate(long j) : m_date((double)(j + 0.5)) { Init(); } wxDate(long j) : m_date((double)(j + 0.5)) { Init(); }
wxDate(int m, int d, int y) : m_date(d, (wxDateTime::Month)m, y) { Init(); } wxDate(int m, int d, int y) : m_date(d, (wxDateTime::Month)m, y) { Init(); }
wxDate(const wxString& dat) { Init(); (void)m_date.ParseDate(dat); } wxDate(const wxString& dat) { Init(); (void)m_date.ParseDate(dat); }
wxDate(const wxDate &date) { *this = date; } wxDate(const wxDate &date) : wxObject() { *this = date; }
wxDate(const wxDateTime& dt) { Init(); m_date = dt; } wxDate(const wxDateTime& dt) { Init(); m_date = dt; }

View File

@@ -103,7 +103,11 @@ struct WXDLLEXPORT wxNativeEncodingInfo
wxFontEncoding encoding; // so that we know what this struct represents wxFontEncoding encoding; // so that we know what this struct represents
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMAC__) #if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMAC__)
wxNativeEncodingInfo() { charset = 0; /* ANSI_CHARSET */ } wxNativeEncodingInfo()
: facename()
, encoding(wxFONTENCODING_SYSTEM)
, charset(0) /* ANSI_CHARSET */
{ }
int charset; int charset;
#elif defined(_WX_X_FONTLIKE) #elif defined(_WX_X_FONTLIKE)

View File

@@ -28,6 +28,7 @@ public:
virtual ~wxAcceleratorTable(); virtual ~wxAcceleratorTable();
wxAcceleratorTable(const wxAcceleratorTable& accel) wxAcceleratorTable(const wxAcceleratorTable& accel)
: wxObject()
{ Ref(accel); } { Ref(accel); }
wxAcceleratorTable& operator=(const wxAcceleratorTable& accel) wxAcceleratorTable& operator=(const wxAcceleratorTable& accel)
{ if ( m_refData != accel.m_refData ) Ref(accel); return *this; } { if ( m_refData != accel.m_refData ) Ref(accel); return *this; }

View File

@@ -40,7 +40,9 @@ public:
wxBrush( const wxBitmap &stippleBitmap ); wxBrush( const wxBitmap &stippleBitmap );
~wxBrush(); ~wxBrush();
wxBrush( const wxBrush &brush ) { Ref(brush); } wxBrush( const wxBrush &brush )
: wxGDIObject()
{ Ref(brush); }
wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
bool Ok() const { return m_refData != NULL; } bool Ok() const { return m_refData != NULL; }

View File

@@ -49,7 +49,9 @@ public:
wxColour( const wxString &colourName ) { InitFromName(colourName); } wxColour( const wxString &colourName ) { InitFromName(colourName); }
wxColour( const char *colourName ) { InitFromName(colourName); } wxColour( const char *colourName ) { InitFromName(colourName); }
wxColour( const wxColour& col ) { Ref(col); } wxColour( const wxColour& col )
: wxGDIObject()
{ Ref(col); }
wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; } wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; }
~wxColour(); ~wxColour();

View File

@@ -45,7 +45,9 @@ public:
wxPen( const wxColour &colour, int width, int style ); wxPen( const wxColour &colour, int width, int style );
~wxPen(); ~wxPen();
wxPen( const wxPen& pen ) { Ref(pen); } wxPen( const wxPen& pen )
: wxGDIObject()
{ Ref(pen); }
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; } wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
bool Ok() const { return m_refData != NULL; } bool Ok() const { return m_refData != NULL; }

View File

@@ -73,7 +73,9 @@ public:
wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE ); wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE );
~wxRegion(); ~wxRegion();
wxRegion( const wxRegion& region ) { Ref(region); } wxRegion( const wxRegion& region )
: wxGDIObject()
{ Ref(region); }
wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; } wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; }
bool Ok() const { return m_refData != NULL; } bool Ok() const { return m_refData != NULL; }

View File

@@ -40,7 +40,9 @@ public:
wxBrush( const wxBitmap &stippleBitmap ); wxBrush( const wxBitmap &stippleBitmap );
~wxBrush(); ~wxBrush();
wxBrush( const wxBrush &brush ) { Ref(brush); } wxBrush( const wxBrush &brush )
: wxGDIObject()
{ Ref(brush); }
wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
bool Ok() const { return m_refData != NULL; } bool Ok() const { return m_refData != NULL; }

View File

@@ -49,7 +49,9 @@ public:
wxColour( const wxString &colourName ) { InitFromName(colourName); } wxColour( const wxString &colourName ) { InitFromName(colourName); }
wxColour( const char *colourName ) { InitFromName(colourName); } wxColour( const char *colourName ) { InitFromName(colourName); }
wxColour( const wxColour& col ) { Ref(col); } wxColour( const wxColour& col )
: wxGDIObject()
{ Ref(col); }
wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; } wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; }
~wxColour(); ~wxColour();

View File

@@ -45,7 +45,9 @@ public:
wxPen( const wxColour &colour, int width, int style ); wxPen( const wxColour &colour, int width, int style );
~wxPen(); ~wxPen();
wxPen( const wxPen& pen ) { Ref(pen); } wxPen( const wxPen& pen )
: wxGDIObject()
{ Ref(pen); }
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; } wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
bool Ok() const { return m_refData != NULL; } bool Ok() const { return m_refData != NULL; }

View File

@@ -73,7 +73,9 @@ public:
wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE ); wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE );
~wxRegion(); ~wxRegion();
wxRegion( const wxRegion& region ) { Ref(region); } wxRegion( const wxRegion& region )
: wxGDIObject()
{ Ref(region); }
wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; } wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; }
bool Ok() const { return m_refData != NULL; } bool Ok() const { return m_refData != NULL; }

View File

@@ -79,7 +79,8 @@ private:
class WXDLLEXPORT wxHashTableLong : public wxObject class WXDLLEXPORT wxHashTableLong : public wxObject
{ {
public: public:
wxHashTableLong(size_t size = wxHASH_SIZE_DEFAULT) { Init(size); } wxHashTableLong(size_t size = wxHASH_SIZE_DEFAULT)
{ Init(size); }
virtual ~wxHashTableLong(); virtual ~wxHashTableLong();
void Create(size_t size = wxHASH_SIZE_DEFAULT); void Create(size_t size = wxHASH_SIZE_DEFAULT);
@@ -158,7 +159,8 @@ public:
~wxHashTable(); ~wxHashTable();
// copy ctor and assignment operator // copy ctor and assignment operator
wxHashTable(const wxHashTable& table) : wxObject() { DoCopy(table); } wxHashTable(const wxHashTable& table) : wxObject()
{ DoCopy(table); }
wxHashTable& operator=(const wxHashTable& table) wxHashTable& operator=(const wxHashTable& table)
{ Clear(); DoCopy(table); return *this; } { Clear(); DoCopy(table); return *this; }

View File

@@ -32,16 +32,16 @@ class WXDLLEXPORT wxIconBundle
{ {
public: public:
// default constructor // default constructor
wxIconBundle() {} wxIconBundle() : m_icons() {}
// initializes the bundle with the icon(s) found in the file // initializes the bundle with the icon(s) found in the file
wxIconBundle( const wxString& file, long type ) wxIconBundle( const wxString& file, long type ) : m_icons()
{ AddIcon( file, type ); } { AddIcon( file, type ); }
// initializes the bundle with a single icon // initializes the bundle with a single icon
wxIconBundle( const wxIcon& icon ) wxIconBundle( const wxIcon& icon ) : m_icons()
{ AddIcon( icon ); } { AddIcon( icon ); }
const wxIconBundle& operator =( const wxIconBundle& ic ); const wxIconBundle& operator =( const wxIconBundle& ic );
wxIconBundle( const wxIconBundle& ic ) wxIconBundle( const wxIconBundle& ic ) : m_icons()
{ *this = ic; } { *this = ic; }
~wxIconBundle() { DeleteIcons(); } ~wxIconBundle() { DeleteIcons(); }

View File

@@ -43,7 +43,9 @@ class WXDLLEXPORT wxImage;
class WXDLLEXPORT wxImageHandler: public wxObject class WXDLLEXPORT wxImageHandler: public wxObject
{ {
public: public:
wxImageHandler() { m_name = ""; m_extension = ""; m_type = 0; } wxImageHandler()
: m_name(""), m_extension(""), m_mime(), m_type(0)
{ }
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );

View File

@@ -27,14 +27,20 @@ public:
wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array
// Copy constructors // Copy constructors
inline wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); } wxAcceleratorTable(const wxAcceleratorTable& accel)
inline wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); } : wxObject()
{ Ref(accel); }
wxAcceleratorTable(const wxAcceleratorTable* accel)
{ if (accel) Ref(*accel); }
~wxAcceleratorTable(); ~wxAcceleratorTable();
inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; } wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
inline bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; } { if (*this == accel) return (*this); Ref(accel); return *this; }
inline bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; } bool operator == (const wxAcceleratorTable& accel)
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
{ return m_refData != accel.m_refData; }
bool Ok() const; bool Ok() const;

View File

@@ -39,7 +39,9 @@ public:
wxBrush(short macThemeBrush ) ; wxBrush(short macThemeBrush ) ;
wxBrush(const wxColour& col, int style); wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple); wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); } wxBrush(const wxBrush& brush)
: wxGDIObject()
{ Ref(brush); }
~wxBrush(); ~wxBrush();
virtual void SetColour(const wxColour& col) ; virtual void SetColour(const wxColour& col) ;
@@ -49,9 +51,12 @@ public:
virtual void SetMacTheme(short macThemeBrush) ; virtual void SetMacTheme(short macThemeBrush) ;
virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ; virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } wxBrush& operator = (const wxBrush& brush)
inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } { if (*this == brush) return (*this); Ref(brush); return *this; }
inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } bool operator == (const wxBrush& brush)
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ; wxMacBrushKind MacGetBrushKind() const ;

View File

@@ -29,8 +29,11 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
{ {
DECLARE_DYNAMIC_CLASS(wxChoice) DECLARE_DYNAMIC_CLASS(wxChoice)
public: public:
wxChoice() {} wxChoice()
: m_strings(), m_datas(), m_macPopUpMenuHandle(NULL)
{}
virtual ~wxChoice() ; virtual ~wxChoice() ;
wxChoice(wxWindow *parent, wxWindowID id, wxChoice(wxWindow *parent, wxWindowID id,

View File

@@ -28,11 +28,17 @@ public:
wxColour(); wxColour();
// from RGB // from RGB
wxColour( unsigned char red, unsigned char green, unsigned char blue ); wxColour( unsigned char red, unsigned char green, unsigned char blue );
wxColour( unsigned long colRGB ) { Set(colRGB); } wxColour( unsigned long colRGB )
: m_isInit(FALSE), m_red(0), m_blue(0), m_green(0)
{ Set(colRGB); }
// implicit conversion from the colour name // implicit conversion from the colour name
wxColour( const wxString &colourName ) { InitFromName(colourName); } wxColour( const wxString &colourName )
wxColour( const char *colourName ) { InitFromName(colourName); } : m_isInit(FALSE), m_red(0), m_blue(0), m_green(0)
{ InitFromName(colourName); }
wxColour( const char *colourName )
: m_isInit(FALSE), m_red(0), m_blue(0), m_green(0)
{ InitFromName(colourName); }
// copy ctors and assignment operators // copy ctors and assignment operators
wxColour( const wxColour& col ); wxColour( const wxColour& col );

View File

@@ -65,9 +65,9 @@ public:
int ShowModal(); int ShowModal();
// not supported for file dialog, RR // not supported for file dialog, RR
virtual void DoSetSize(int x, int y, virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int width, int height, int WXUNUSED(width), int WXUNUSED(height),
int sizeFlags = wxSIZE_AUTO) {} int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
}; };

View File

@@ -37,7 +37,9 @@
class wxMacPortStateHelper class wxMacPortStateHelper
{ {
public : DECLARE_NO_COPY_CLASS(wxMacPortStateHelper)
public:
wxMacPortStateHelper( GrafPtr newport) ; wxMacPortStateHelper( GrafPtr newport) ;
wxMacPortStateHelper() ; wxMacPortStateHelper() ;
~wxMacPortStateHelper() ; ~wxMacPortStateHelper() ;
@@ -47,7 +49,7 @@ public :
bool IsCleared() { return m_clip == NULL ; } bool IsCleared() { return m_clip == NULL ; }
GrafPtr GetCurrentPort() { return m_currentPort ; } GrafPtr GetCurrentPort() { return m_currentPort ; }
private : private:
GrafPtr m_currentPort ; GrafPtr m_currentPort ;
GrafPtr m_oldPort ; GrafPtr m_oldPort ;
RgnHandle m_clip ; RgnHandle m_clip ;
@@ -60,17 +62,21 @@ private :
class WXDLLEXPORT wxMacPortSetter class WXDLLEXPORT wxMacPortSetter
{ {
public : DECLARE_NO_COPY_CLASS(wxMacPortSetter)
public:
wxMacPortSetter( const wxDC* dc ) ; wxMacPortSetter( const wxDC* dc ) ;
~wxMacPortSetter() ; ~wxMacPortSetter() ;
private : private:
wxMacPortStateHelper m_ph ; wxMacPortStateHelper m_ph ;
const wxDC* m_dc ; const wxDC* m_dc ;
} ; } ;
class wxMacDrawingHelper class wxMacDrawingHelper
{ {
public : DECLARE_NO_COPY_CLASS(wxMacDrawingHelper)
public:
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ; wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
~wxMacDrawingHelper() ; ~wxMacDrawingHelper() ;
bool Ok() { return m_ok ; } bool Ok() { return m_ok ; }
@@ -78,7 +84,7 @@ public :
void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; } void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; }
void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; } void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; }
const Point& GetOrigin() { return m_origin ; } const Point& GetOrigin() { return m_origin ; }
private : private:
Point m_origin ; Point m_origin ;
GrafPtr m_formerPort ; GrafPtr m_formerPort ;
GrafPtr m_currentPort ; GrafPtr m_currentPort ;

View File

@@ -27,7 +27,7 @@ class WXDLLEXPORT wxStaticLine : public wxStaticLineBase
public: public:
// constructors and pseudo-constructors // constructors and pseudo-constructors
wxStaticLine() { } wxStaticLine() : m_statbox(NULL) { }
wxStaticLine( wxWindow *parent, wxStaticLine( wxWindow *parent,
wxWindowID id, wxWindowID id,
@@ -35,6 +35,7 @@ public:
const wxSize &size = wxDefaultSize, const wxSize &size = wxDefaultSize,
long style = wxLI_HORIZONTAL, long style = wxLI_HORIZONTAL,
const wxString &name = wxStaticTextNameStr ) const wxString &name = wxStaticTextNameStr )
: m_statbox(NULL)
{ {
Create(parent, id, pos, size, style, name); Create(parent, id, pos, size, style, name);
} }

View File

@@ -20,7 +20,7 @@ class WXDLLEXPORT wxStaticText: public wxStaticTextBase
{ {
DECLARE_DYNAMIC_CLASS(wxStaticText) DECLARE_DYNAMIC_CLASS(wxStaticText)
public: public:
inline wxStaticText() { } inline wxStaticText() : m_label() { }
inline wxStaticText(wxWindow *parent, wxWindowID id, inline wxStaticText(wxWindow *parent, wxWindowID id,
const wxString& label, const wxString& label,

View File

@@ -31,12 +31,14 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
* Public interface * Public interface
*/ */
wxToolBar() { Init(); } wxToolBar() : m_macToolHandles() { Init(); }
inline wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, inline wxToolBar(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER|wxTB_HORIZONTAL, long style = wxNO_BORDER|wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr) const wxString& name = wxToolBarNameStr)
: m_macToolHandles()
{ {
Init(); Init();
Create(parent, id, pos, size, style, name); Create(parent, id, pos, size, style, name);

View File

@@ -58,7 +58,8 @@ public:
virtual void SetIcons(const wxIconBundle& icons) { SetIcon( icons.GetIcon( -1 ) ); } virtual void SetIcons(const wxIconBundle& icons) { SetIcon( icons.GetIcon( -1 ) ); }
virtual void Restore(); virtual void Restore();
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) { return FALSE; } virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style) = wxFULLSCREEN_ALL)
{ return FALSE; }
virtual bool IsFullScreen() const { return FALSE; } virtual bool IsFullScreen() const { return FALSE; }
// implementation from now on // implementation from now on

View File

@@ -30,18 +30,18 @@ protected:
virtual bool OnExists() const virtual bool OnExists() const
{ return FALSE; } { return FALSE; }
virtual bool OnOpen(const wxString &strBufferName, virtual bool OnOpen(const wxString & WXUNUSED(strBufferName),
wxTextBufferOpenMode OpenMode) wxTextBufferOpenMode WXUNUSED(OpenMode))
{ return TRUE; } { return TRUE; }
virtual bool OnClose() virtual bool OnClose()
{ return TRUE; } { return TRUE; }
virtual bool OnRead(wxMBConv& conv) virtual bool OnRead(wxMBConv& WXUNUSED(conv))
{ return TRUE; } { return TRUE; }
virtual bool OnWrite(wxTextFileType typeNew, virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
wxMBConv& conv = wxConvLibc) wxMBConv& WXUNUSED(conv) = wxConvLibc)
{ return TRUE; } { return TRUE; }
}; };

View File

@@ -42,7 +42,8 @@ DECLARE_DYNAMIC_CLASS(wxQuantize)
//// Constructor //// Constructor
wxQuantize() {}; wxQuantize() {}
~wxQuantize() {}
//// Operations //// Operations

View File

@@ -47,7 +47,7 @@ public:
wxTime() : m_time(wxDateTime::Now()) { } wxTime() : m_time(wxDateTime::Now()) { }
wxTime(clockTy s) : m_time((time_t)(s - wxTIME_EPOCH_DIFF)) { } wxTime(clockTy s) : m_time((time_t)(s - wxTIME_EPOCH_DIFF)) { }
void operator=(const wxTime& t) { m_time = t.m_time; } void operator=(const wxTime& t) { m_time = t.m_time; }
wxTime(const wxTime& t) { *this = t; } wxTime(const wxTime& t) : wxObject() { *this = t; }
wxTime(hourTy h, minuteTy m, secondTy s = 0, bool WXUNUSED(dst) = FALSE) wxTime(hourTy h, minuteTy m, secondTy s = 0, bool WXUNUSED(dst) = FALSE)
: m_time(h, m, s) { } : m_time(h, m, s) { }

View File

@@ -169,7 +169,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxDefaultArtProviderModule, wxModule)
wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id, wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id,
const wxArtClient& client, const wxArtClient& client,
const wxSize& size) const wxSize& WXUNUSED(size))
{ {
// wxMessageBox icons: // wxMessageBox icons:
ART_MSGBOX(wxART_ERROR, wxICON_ERROR, error) ART_MSGBOX(wxART_ERROR, wxICON_ERROR, error)

View File

@@ -81,6 +81,7 @@ wxGenericValidator::wxGenericValidator(wxArrayInt *val)
} }
wxGenericValidator::wxGenericValidator(const wxGenericValidator& val) wxGenericValidator::wxGenericValidator(const wxGenericValidator& val)
: wxValidator()
{ {
Copy(val); Copy(val);
} }

View File

@@ -61,6 +61,7 @@ wxTextValidator::wxTextValidator(long style, wxString *val)
} }
wxTextValidator::wxTextValidator(const wxTextValidator& val) wxTextValidator::wxTextValidator(const wxTextValidator& val)
: wxValidator()
{ {
Copy(val); Copy(val);
} }

View File

@@ -1390,6 +1390,7 @@ wxVariant::wxVariant(const wxArrayString& val, const wxString& name) // Strings
} }
wxVariant::wxVariant(const wxVariant& variant) wxVariant::wxVariant(const wxVariant& variant)
: wxObject()
{ {
if (!variant.IsNull()) if (!variant.IsNull())
{ {

View File

@@ -59,6 +59,7 @@ public:
} }
wxAccelRefData(const wxAccelRefData& data) wxAccelRefData(const wxAccelRefData& data)
: wxObjectRefData()
{ {
m_accels.DeleteContents(TRUE); m_accels.DeleteContents(TRUE);
m_accels = data.m_accels; m_accels = data.m_accels;

View File

@@ -251,22 +251,22 @@ void wxGenericFindReplaceDialog::SendEvent(const wxEventType& evtType)
// event handlers // event handlers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void wxGenericFindReplaceDialog::OnFind(wxCommandEvent& event) void wxGenericFindReplaceDialog::OnFind(wxCommandEvent& WXUNUSED(event))
{ {
SendEvent(wxEVT_COMMAND_FIND_NEXT); SendEvent(wxEVT_COMMAND_FIND_NEXT);
} }
void wxGenericFindReplaceDialog::OnReplace(wxCommandEvent& event) void wxGenericFindReplaceDialog::OnReplace(wxCommandEvent& WXUNUSED(event))
{ {
SendEvent(wxEVT_COMMAND_FIND_REPLACE); SendEvent(wxEVT_COMMAND_FIND_REPLACE);
} }
void wxGenericFindReplaceDialog::OnReplaceAll(wxCommandEvent& event) void wxGenericFindReplaceDialog::OnReplaceAll(wxCommandEvent& WXUNUSED(event))
{ {
SendEvent(wxEVT_COMMAND_FIND_REPLACE_ALL); SendEvent(wxEVT_COMMAND_FIND_REPLACE_ALL);
} }
void wxGenericFindReplaceDialog::OnCancel(wxCommandEvent& event) void wxGenericFindReplaceDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{ {
SendEvent(wxEVT_COMMAND_FIND_CLOSE); SendEvent(wxEVT_COMMAND_FIND_CLOSE);

View File

@@ -579,7 +579,7 @@ void wxFileData::MakeItem( wxListItem &item )
// wxFileCtrl // wxFileCtrl
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxFileCtrl,wxListCtrl); IMPLEMENT_DYNAMIC_CLASS(wxFileCtrl,wxListCtrl)
BEGIN_EVENT_TABLE(wxFileCtrl,wxListCtrl) BEGIN_EVENT_TABLE(wxFileCtrl,wxListCtrl)
EVT_LIST_DELETE_ITEM(-1, wxFileCtrl::OnListDeleteItem) EVT_LIST_DELETE_ITEM(-1, wxFileCtrl::OnListDeleteItem)

View File

@@ -814,6 +814,7 @@ wxImage wxBitmap::ConvertToImage() const
} }
wxBitmap::wxBitmap( const wxBitmap& bmp ) wxBitmap::wxBitmap( const wxBitmap& bmp )
: wxGDIObject()
{ {
Ref( bmp ); Ref( bmp );
} }

View File

@@ -28,6 +28,7 @@ public:
} }
wxBrushRefData( const wxBrushRefData& data ) wxBrushRefData( const wxBrushRefData& data )
: wxObjectRefData()
{ {
m_style = data.m_style; m_style = data.m_style;
m_stipple = data.m_stipple; m_stipple = data.m_stipple;

View File

@@ -36,6 +36,7 @@ public:
} }
wxColourRefData(const wxColourRefData& data) wxColourRefData(const wxColourRefData& data)
: wxObjectRefData()
{ {
m_color = data.m_color; m_color = data.m_color;
m_colormap = data.m_colormap; m_colormap = data.m_colormap;

View File

@@ -142,6 +142,7 @@ wxCursor::wxCursor(const char bits[], int width, int height,
wxCursor::wxCursor( const wxCursor &cursor ) wxCursor::wxCursor( const wxCursor &cursor )
: wxObject()
{ {
Ref( cursor ); Ref( cursor );
} }

View File

@@ -174,6 +174,7 @@ void wxFontRefData::Init(int pointSize,
} }
wxFontRefData::wxFontRefData( const wxFontRefData& data ) wxFontRefData::wxFontRefData( const wxFontRefData& data )
: wxObjectRefData()
{ {
m_pointSize = data.m_pointSize; m_pointSize = data.m_pointSize;
m_family = data.m_family; m_family = data.m_family;

View File

@@ -34,6 +34,7 @@ public:
} }
wxPenRefData( const wxPenRefData& data ) wxPenRefData( const wxPenRefData& data )
: wxObjectRefData()
{ {
m_style = data.m_style; m_style = data.m_style;
m_width = data.m_width; m_width = data.m_width;

View File

@@ -39,6 +39,7 @@ public:
} }
wxRegionRefData(const wxRegionRefData& refData) wxRegionRefData(const wxRegionRefData& refData)
: wxObjectRefData()
{ {
#ifdef __WXGTK20__ #ifdef __WXGTK20__
m_region = gdk_region_copy(refData.m_region); m_region = gdk_region_copy(refData.m_region);
@@ -66,8 +67,8 @@ public:
#define M_REGIONDATA ((wxRegionRefData *)m_refData) #define M_REGIONDATA ((wxRegionRefData *)m_refData)
#define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData)) #define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData))
IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject); IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject); IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxRegion construction // wxRegion construction

View File

@@ -814,6 +814,7 @@ wxImage wxBitmap::ConvertToImage() const
} }
wxBitmap::wxBitmap( const wxBitmap& bmp ) wxBitmap::wxBitmap( const wxBitmap& bmp )
: wxGDIObject()
{ {
Ref( bmp ); Ref( bmp );
} }

View File

@@ -28,6 +28,7 @@ public:
} }
wxBrushRefData( const wxBrushRefData& data ) wxBrushRefData( const wxBrushRefData& data )
: wxObjectRefData()
{ {
m_style = data.m_style; m_style = data.m_style;
m_stipple = data.m_stipple; m_stipple = data.m_stipple;

View File

@@ -36,6 +36,7 @@ public:
} }
wxColourRefData(const wxColourRefData& data) wxColourRefData(const wxColourRefData& data)
: wxObjectRefData()
{ {
m_color = data.m_color; m_color = data.m_color;
m_colormap = data.m_colormap; m_colormap = data.m_colormap;

View File

@@ -142,6 +142,7 @@ wxCursor::wxCursor(const char bits[], int width, int height,
wxCursor::wxCursor( const wxCursor &cursor ) wxCursor::wxCursor( const wxCursor &cursor )
: wxObject()
{ {
Ref( cursor ); Ref( cursor );
} }

View File

@@ -174,6 +174,7 @@ void wxFontRefData::Init(int pointSize,
} }
wxFontRefData::wxFontRefData( const wxFontRefData& data ) wxFontRefData::wxFontRefData( const wxFontRefData& data )
: wxObjectRefData()
{ {
m_pointSize = data.m_pointSize; m_pointSize = data.m_pointSize;
m_family = data.m_family; m_family = data.m_family;

View File

@@ -34,6 +34,7 @@ public:
} }
wxPenRefData( const wxPenRefData& data ) wxPenRefData( const wxPenRefData& data )
: wxObjectRefData()
{ {
m_style = data.m_style; m_style = data.m_style;
m_width = data.m_width; m_width = data.m_width;

View File

@@ -39,6 +39,7 @@ public:
} }
wxRegionRefData(const wxRegionRefData& refData) wxRegionRefData(const wxRegionRefData& refData)
: wxObjectRefData()
{ {
#ifdef __WXGTK20__ #ifdef __WXGTK20__
m_region = gdk_region_copy(refData.m_region); m_region = gdk_region_copy(refData.m_region);
@@ -66,8 +67,8 @@ public:
#define M_REGIONDATA ((wxRegionRefData *)m_refData) #define M_REGIONDATA ((wxRegionRefData *)m_refData)
#define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData)) #define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData))
IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject); IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject); IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxRegion construction // wxRegion construction

View File

@@ -46,8 +46,8 @@ public:
#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData) #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
wxAcceleratorRefData::wxAcceleratorRefData() wxAcceleratorRefData::wxAcceleratorRefData()
: m_accels()
{ {
m_accels.DeleteContents( TRUE );
} }
wxAcceleratorRefData::~wxAcceleratorRefData() wxAcceleratorRefData::~wxAcceleratorRefData()

View File

@@ -46,14 +46,15 @@ protected:
#define M_BRUSHDATA ((wxBrushRefData *)m_refData) #define M_BRUSHDATA ((wxBrushRefData *)m_refData)
wxBrushRefData::wxBrushRefData() wxBrushRefData::wxBrushRefData()
: m_style(wxSOLID)
{ {
m_style = wxSOLID;
m_macBrushKind = kwxMacBrushColour ; m_macBrushKind = kwxMacBrushColour ;
} }
wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) wxBrushRefData::wxBrushRefData(const wxBrushRefData& data)
: wxGDIRefData()
, m_style(data.m_style)
{ {
m_style = data.m_style;
m_stipple = data.m_stipple; m_stipple = data.m_stipple;
m_colour = data.m_colour; m_colour = data.m_colour;
m_macBrushKind = data.m_macBrushKind ; m_macBrushKind = data.m_macBrushKind ;

View File

@@ -46,8 +46,8 @@ public:
#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData) #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
wxAcceleratorRefData::wxAcceleratorRefData() wxAcceleratorRefData::wxAcceleratorRefData()
: m_accels()
{ {
m_accels.DeleteContents( TRUE );
} }
wxAcceleratorRefData::~wxAcceleratorRefData() wxAcceleratorRefData::~wxAcceleratorRefData()

View File

@@ -46,14 +46,15 @@ protected:
#define M_BRUSHDATA ((wxBrushRefData *)m_refData) #define M_BRUSHDATA ((wxBrushRefData *)m_refData)
wxBrushRefData::wxBrushRefData() wxBrushRefData::wxBrushRefData()
: m_style(wxSOLID)
{ {
m_style = wxSOLID;
m_macBrushKind = kwxMacBrushColour ; m_macBrushKind = kwxMacBrushColour ;
} }
wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) wxBrushRefData::wxBrushRefData(const wxBrushRefData& data)
: wxGDIRefData()
, m_style(data.m_style)
{ {
m_style = data.m_style;
m_stipple = data.m_stipple; m_stipple = data.m_stipple;
m_colour = data.m_colour; m_colour = data.m_colour;
m_macBrushKind = data.m_macBrushKind ; m_macBrushKind = data.m_macBrushKind ;

View File

@@ -52,6 +52,7 @@ wxColour::wxColour (unsigned char r, unsigned char g, unsigned char b)
} }
wxColour::wxColour (const wxColour& col) wxColour::wxColour (const wxColour& col)
: wxObject()
{ {
m_red = col.m_red; m_red = col.m_red;
m_green = col.m_green; m_green = col.m_green;

View File

@@ -1201,7 +1201,6 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
if ( LockPixels(bmappixels) ) if ( LockPixels(bmappixels) )
{ {
wxMacPortSetter helper(this) ; wxMacPortSetter helper(this) ;
RGBColor tempColor ;
if ( source->GetDepth() == 1 ) if ( source->GetDepth() == 1 )
{ {

View File

@@ -23,6 +23,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
wxMemoryDC::wxMemoryDC(void) wxMemoryDC::wxMemoryDC(void)
: m_selected()
{ {
m_ok = TRUE; m_ok = TRUE;
SetBackground(*wxWHITE_BRUSH); SetBackground(*wxWHITE_BRUSH);
@@ -32,6 +33,7 @@ wxMemoryDC::wxMemoryDC(void)
}; };
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
: m_selected()
{ {
m_ok = TRUE; m_ok = TRUE;
SetBackground(*wxWHITE_BRUSH); SetBackground(*wxWHITE_BRUSH);

View File

@@ -1650,10 +1650,12 @@ void _GSocket_Internal_Proc(unsigned long e , void* d )
/* Hack added for Mac OS X */ /* Hack added for Mac OS X */
GSocketError GAddress_UNIX_GetPath(GAddress *addr, char *path, size_t buf) GSocketError GAddress_UNIX_GetPath(GAddress *addr, char *path, size_t buf)
{ {
return GSOCK_INVADDR;
} }
GSocketError GAddress_UNIX_SetPath(GAddress *addr, const char *path) GSocketError GAddress_UNIX_SetPath(GAddress *addr, const char *path)
{ {
return GSOCK_INVADDR;
} }
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */ #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */

View File

@@ -31,24 +31,23 @@ wxIcon::wxIcon()
} }
wxIcon::wxIcon(const char bits[], int width, int height) : wxIcon::wxIcon(const char bits[], int width, int height) :
wxBitmap(bits,width,height ) wxBitmap(bits, width, height)
{ {
} }
wxIcon::wxIcon( const char **bits ) : wxIcon::wxIcon( const char **bits ) :
wxBitmap(bits ) wxBitmap(bits)
{ {
} }
wxIcon::wxIcon( char **bits ) : wxIcon::wxIcon( char **bits ) :
wxBitmap(bits ) wxBitmap(bits)
{ {
} }
wxIcon::wxIcon(const wxString& icon_file, int flags, wxIcon::wxIcon(const wxString& icon_file, int flags,
int desiredWidth, int desiredHeight) int desiredWidth, int desiredHeight)
{ {
LoadFile(icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight); LoadFile(icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight);
} }

View File

@@ -27,7 +27,7 @@
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent); IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
#endif #endif
wxSpinButton::wxSpinButton() wxSpinButton::wxSpinButton()

View File

@@ -164,7 +164,6 @@ void wxStaticText::OnPaint( wxPaintEvent &event )
wxSize wxStaticText::DoGetBestSize() const wxSize wxStaticText::DoGetBestSize() const
{ {
int x,y ;
int widthTextMax = 0, widthLine, int widthTextMax = 0, widthLine,
heightTextTotal = 0, heightLineDefault = 0, heightLine = 0; heightTextTotal = 0, heightLineDefault = 0, heightLine = 0;

View File

@@ -253,7 +253,6 @@ bool wxTextCtrl::CanPaste() const
if (!IsEditable()) if (!IsEditable())
return FALSE; return FALSE;
long offset ;
#if TARGET_CARBON #if TARGET_CARBON
OSStatus err = noErr; OSStatus err = noErr;
ScrapRef scrapRef; ScrapRef scrapRef;
@@ -275,6 +274,7 @@ bool wxTextCtrl::CanPaste() const
return FALSE; return FALSE;
#else #else
long offset ;
if ( GetScrap( NULL , 'TEXT' , &offset ) > 0 ) if ( GetScrap( NULL , 'TEXT' , &offset ) > 0 )
{ {
return TRUE ; return TRUE ;
@@ -304,7 +304,7 @@ void wxTextCtrl::SetInsertionPointEnd()
long wxTextCtrl::GetInsertionPoint() const long wxTextCtrl::GetInsertionPoint() const
{ {
ControlEditTextSelectionRec selection ; // ControlEditTextSelectionRec selection ;
TEHandle teH ; TEHandle teH ;
long size ; long size ;
@@ -315,7 +315,7 @@ long wxTextCtrl::GetInsertionPoint() const
long wxTextCtrl::GetLastPosition() const long wxTextCtrl::GetLastPosition() const
{ {
ControlEditTextSelectionRec selection ; // ControlEditTextSelectionRec selection ;
TEHandle teH ; TEHandle teH ;
long size ; long size ;

View File

@@ -146,7 +146,6 @@ wxMutexError wxMutex::TryLock()
wxMacStCritical critical ; wxMacStCritical critical ;
if ( UMASystemIsInitialized() ) if ( UMASystemIsInitialized() )
{ {
OSErr err ;
ThreadID current = kNoThreadID; ThreadID current = kNoThreadID;
::MacGetCurrentThread(&current); ::MacGetCurrentThread(&current);
// if we are not the owner, give an error back // if we are not the owner, give an error back
@@ -285,7 +284,7 @@ void wxCondition::Broadcast()
// this works because all these threads are already waiting and so each // this works because all these threads are already waiting and so each
// SetEvent() inside Signal() is really a PulseEvent() because the event // SetEvent() inside Signal() is really a PulseEvent() because the event
// state is immediately returned to non-signaled // state is immediately returned to non-signaled
for ( int i = 0; i < m_internal->m_waiters.Count(); i++ ) for ( size_t i = 0; i < m_internal->m_waiters.Count(); i++ )
{ {
Signal(); Signal();
} }
@@ -477,7 +476,7 @@ wxThread *wxThread::This()
err = MacGetCurrentThread( &current ) ; err = MacGetCurrentThread( &current ) ;
for ( int i = 0 ; i < s_threads.Count() ; ++i ) for ( size_t i = 0 ; i < s_threads.Count() ; ++i )
{ {
if ( ( (wxThread*) s_threads[i] )->GetId() == current ) if ( ( (wxThread*) s_threads[i] )->GetId() == current )
return (wxThread*) s_threads[i] ; return (wxThread*) s_threads[i] ;

View File

@@ -169,9 +169,9 @@ bool wxToolBar::Realize()
return FALSE; return FALSE;
Point localOrigin ; Point localOrigin ;
Rect clipRect ; // Rect clipRect ;
WindowRef window = (WindowRef) MacGetRootWindow() ; WindowRef window = (WindowRef) MacGetRootWindow() ;
wxWindow *win ; // wxWindow *win ;
int lx , ly ; int lx , ly ;
lx = ly = 0 ; lx = ly = 0 ;
@@ -360,9 +360,9 @@ void wxToolBar::MacSuperChangedPosition()
{ {
Point localOrigin ; Point localOrigin ;
Rect clipRect ; // Rect clipRect ;
WindowRef window ; // WindowRef window ;
wxWindow *win ; // wxWindow *win ;
int lx , ly ; int lx , ly ;
lx = ly = 0 ; lx = ly = 0 ;
MacWindowToRootWindow( &lx , &ly ) ; MacWindowToRootWindow( &lx , &ly ) ;

View File

@@ -35,7 +35,7 @@ long wxExecute(const wxString& command, int flags, wxProcess *handler)
#ifdef __DARWIN__ #ifdef __DARWIN__
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
{ {
wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready")); wxFAIL_MSG( _T("wxAddProcessCallback() function not yet implemented") );
return 0; return 0;
} }
#endif #endif

View File

@@ -124,6 +124,8 @@ void wxWindowMac::Init()
m_hScrollBar = NULL ; m_hScrollBar = NULL ;
m_vScrollBar = NULL ; m_vScrollBar = NULL ;
m_label = wxEmptyString;
} }
// Destructor // Destructor
@@ -676,12 +678,12 @@ wxPoint wxWindowMac::GetClientAreaOrigin() const
return wxPoint(MacGetLeftBorderSize( ) , MacGetTopBorderSize( ) ); return wxPoint(MacGetLeftBorderSize( ) , MacGetTopBorderSize( ) );
} }
void wxWindow::SetTitle(const wxString& title) void wxWindowMac::SetTitle(const wxString& title)
{ {
m_label = title ; m_label = title ;
} }
wxString wxWindow::GetTitle() const wxString wxWindowMac::GetTitle() const
{ {
return m_label ; return m_label ;
} }

View File

@@ -52,6 +52,7 @@ wxColour::wxColour (unsigned char r, unsigned char g, unsigned char b)
} }
wxColour::wxColour (const wxColour& col) wxColour::wxColour (const wxColour& col)
: wxObject()
{ {
m_red = col.m_red; m_red = col.m_red;
m_green = col.m_green; m_green = col.m_green;

View File

@@ -1201,7 +1201,6 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
if ( LockPixels(bmappixels) ) if ( LockPixels(bmappixels) )
{ {
wxMacPortSetter helper(this) ; wxMacPortSetter helper(this) ;
RGBColor tempColor ;
if ( source->GetDepth() == 1 ) if ( source->GetDepth() == 1 )
{ {

View File

@@ -23,6 +23,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
wxMemoryDC::wxMemoryDC(void) wxMemoryDC::wxMemoryDC(void)
: m_selected()
{ {
m_ok = TRUE; m_ok = TRUE;
SetBackground(*wxWHITE_BRUSH); SetBackground(*wxWHITE_BRUSH);
@@ -32,6 +33,7 @@ wxMemoryDC::wxMemoryDC(void)
}; };
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
: m_selected()
{ {
m_ok = TRUE; m_ok = TRUE;
SetBackground(*wxWHITE_BRUSH); SetBackground(*wxWHITE_BRUSH);

View File

@@ -1650,10 +1650,12 @@ void _GSocket_Internal_Proc(unsigned long e , void* d )
/* Hack added for Mac OS X */ /* Hack added for Mac OS X */
GSocketError GAddress_UNIX_GetPath(GAddress *addr, char *path, size_t buf) GSocketError GAddress_UNIX_GetPath(GAddress *addr, char *path, size_t buf)
{ {
return GSOCK_INVADDR;
} }
GSocketError GAddress_UNIX_SetPath(GAddress *addr, const char *path) GSocketError GAddress_UNIX_SetPath(GAddress *addr, const char *path)
{ {
return GSOCK_INVADDR;
} }
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */ #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */

View File

@@ -31,24 +31,23 @@ wxIcon::wxIcon()
} }
wxIcon::wxIcon(const char bits[], int width, int height) : wxIcon::wxIcon(const char bits[], int width, int height) :
wxBitmap(bits,width,height ) wxBitmap(bits, width, height)
{ {
} }
wxIcon::wxIcon( const char **bits ) : wxIcon::wxIcon( const char **bits ) :
wxBitmap(bits ) wxBitmap(bits)
{ {
} }
wxIcon::wxIcon( char **bits ) : wxIcon::wxIcon( char **bits ) :
wxBitmap(bits ) wxBitmap(bits)
{ {
} }
wxIcon::wxIcon(const wxString& icon_file, int flags, wxIcon::wxIcon(const wxString& icon_file, int flags,
int desiredWidth, int desiredHeight) int desiredWidth, int desiredHeight)
{ {
LoadFile(icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight); LoadFile(icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight);
} }

View File

@@ -27,7 +27,7 @@
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent); IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
#endif #endif
wxSpinButton::wxSpinButton() wxSpinButton::wxSpinButton()

View File

@@ -164,7 +164,6 @@ void wxStaticText::OnPaint( wxPaintEvent &event )
wxSize wxStaticText::DoGetBestSize() const wxSize wxStaticText::DoGetBestSize() const
{ {
int x,y ;
int widthTextMax = 0, widthLine, int widthTextMax = 0, widthLine,
heightTextTotal = 0, heightLineDefault = 0, heightLine = 0; heightTextTotal = 0, heightLineDefault = 0, heightLine = 0;

View File

@@ -253,7 +253,6 @@ bool wxTextCtrl::CanPaste() const
if (!IsEditable()) if (!IsEditable())
return FALSE; return FALSE;
long offset ;
#if TARGET_CARBON #if TARGET_CARBON
OSStatus err = noErr; OSStatus err = noErr;
ScrapRef scrapRef; ScrapRef scrapRef;
@@ -275,6 +274,7 @@ bool wxTextCtrl::CanPaste() const
return FALSE; return FALSE;
#else #else
long offset ;
if ( GetScrap( NULL , 'TEXT' , &offset ) > 0 ) if ( GetScrap( NULL , 'TEXT' , &offset ) > 0 )
{ {
return TRUE ; return TRUE ;
@@ -304,7 +304,7 @@ void wxTextCtrl::SetInsertionPointEnd()
long wxTextCtrl::GetInsertionPoint() const long wxTextCtrl::GetInsertionPoint() const
{ {
ControlEditTextSelectionRec selection ; // ControlEditTextSelectionRec selection ;
TEHandle teH ; TEHandle teH ;
long size ; long size ;
@@ -315,7 +315,7 @@ long wxTextCtrl::GetInsertionPoint() const
long wxTextCtrl::GetLastPosition() const long wxTextCtrl::GetLastPosition() const
{ {
ControlEditTextSelectionRec selection ; // ControlEditTextSelectionRec selection ;
TEHandle teH ; TEHandle teH ;
long size ; long size ;

View File

@@ -146,7 +146,6 @@ wxMutexError wxMutex::TryLock()
wxMacStCritical critical ; wxMacStCritical critical ;
if ( UMASystemIsInitialized() ) if ( UMASystemIsInitialized() )
{ {
OSErr err ;
ThreadID current = kNoThreadID; ThreadID current = kNoThreadID;
::MacGetCurrentThread(&current); ::MacGetCurrentThread(&current);
// if we are not the owner, give an error back // if we are not the owner, give an error back
@@ -285,7 +284,7 @@ void wxCondition::Broadcast()
// this works because all these threads are already waiting and so each // this works because all these threads are already waiting and so each
// SetEvent() inside Signal() is really a PulseEvent() because the event // SetEvent() inside Signal() is really a PulseEvent() because the event
// state is immediately returned to non-signaled // state is immediately returned to non-signaled
for ( int i = 0; i < m_internal->m_waiters.Count(); i++ ) for ( size_t i = 0; i < m_internal->m_waiters.Count(); i++ )
{ {
Signal(); Signal();
} }
@@ -477,7 +476,7 @@ wxThread *wxThread::This()
err = MacGetCurrentThread( &current ) ; err = MacGetCurrentThread( &current ) ;
for ( int i = 0 ; i < s_threads.Count() ; ++i ) for ( size_t i = 0 ; i < s_threads.Count() ; ++i )
{ {
if ( ( (wxThread*) s_threads[i] )->GetId() == current ) if ( ( (wxThread*) s_threads[i] )->GetId() == current )
return (wxThread*) s_threads[i] ; return (wxThread*) s_threads[i] ;

View File

@@ -169,9 +169,9 @@ bool wxToolBar::Realize()
return FALSE; return FALSE;
Point localOrigin ; Point localOrigin ;
Rect clipRect ; // Rect clipRect ;
WindowRef window = (WindowRef) MacGetRootWindow() ; WindowRef window = (WindowRef) MacGetRootWindow() ;
wxWindow *win ; // wxWindow *win ;
int lx , ly ; int lx , ly ;
lx = ly = 0 ; lx = ly = 0 ;
@@ -360,9 +360,9 @@ void wxToolBar::MacSuperChangedPosition()
{ {
Point localOrigin ; Point localOrigin ;
Rect clipRect ; // Rect clipRect ;
WindowRef window ; // WindowRef window ;
wxWindow *win ; // wxWindow *win ;
int lx , ly ; int lx , ly ;
lx = ly = 0 ; lx = ly = 0 ;
MacWindowToRootWindow( &lx , &ly ) ; MacWindowToRootWindow( &lx , &ly ) ;

View File

@@ -35,7 +35,7 @@ long wxExecute(const wxString& command, int flags, wxProcess *handler)
#ifdef __DARWIN__ #ifdef __DARWIN__
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
{ {
wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready")); wxFAIL_MSG( _T("wxAddProcessCallback() function not yet implemented") );
return 0; return 0;
} }
#endif #endif

View File

@@ -124,6 +124,8 @@ void wxWindowMac::Init()
m_hScrollBar = NULL ; m_hScrollBar = NULL ;
m_vScrollBar = NULL ; m_vScrollBar = NULL ;
m_label = wxEmptyString;
} }
// Destructor // Destructor
@@ -676,12 +678,12 @@ wxPoint wxWindowMac::GetClientAreaOrigin() const
return wxPoint(MacGetLeftBorderSize( ) , MacGetTopBorderSize( ) ); return wxPoint(MacGetLeftBorderSize( ) , MacGetTopBorderSize( ) );
} }
void wxWindow::SetTitle(const wxString& title) void wxWindowMac::SetTitle(const wxString& title)
{ {
m_label = title ; m_label = title ;
} }
wxString wxWindow::GetTitle() const wxString wxWindowMac::GetTitle() const
{ {
return m_label ; return m_label ;
} }

View File

@@ -1042,10 +1042,10 @@ GSocketError _GSocket_Input_Timeout(GSocket *socket)
if (ret == -1) if (ret == -1)
{ {
GSocket_Debug(( "GSocket_Input_Timeout, select returned -1\n" )); GSocket_Debug(( "GSocket_Input_Timeout, select returned -1\n" ));
if (errno == EBADF) GSocket_Debug(( "Invalid file descriptor\n" )); if (errno == EBADF) { GSocket_Debug(( "Invalid file descriptor\n" )); }
if (errno == EINTR) GSocket_Debug(( "A non blocked signal was caught\n" )); if (errno == EINTR) { GSocket_Debug(( "A non blocked signal was caught\n" )); }
if (errno == EINVAL) GSocket_Debug(( "The highest number descriptor is negative\n" )); if (errno == EINVAL) { GSocket_Debug(( "The highest number descriptor is negative\n" )); }
if (errno == ENOMEM) GSocket_Debug(( "Not enough memory\n" )); if (errno == ENOMEM) { GSocket_Debug(( "Not enough memory\n" )); }
socket->m_error = GSOCK_TIMEDOUT; socket->m_error = GSOCK_TIMEDOUT;
return GSOCK_TIMEDOUT; return GSOCK_TIMEDOUT;
} }
@@ -1083,18 +1083,20 @@ GSocketError _GSocket_Output_Timeout(GSocket *socket)
if (ret == -1) if (ret == -1)
{ {
GSocket_Debug(( "GSocket_Output_Timeout, select returned -1\n" )); GSocket_Debug(( "GSocket_Output_Timeout, select returned -1\n" ));
if (errno == EBADF) GSocket_Debug(( "Invalid file descriptor\n" )); if (errno == EBADF) { GSocket_Debug(( "Invalid file descriptor\n" )); }
if (errno == EINTR) GSocket_Debug(( "A non blocked signal was caught\n" )); if (errno == EINTR) { GSocket_Debug(( "A non blocked signal was caught\n" )); }
if (errno == EINVAL) GSocket_Debug(( "The highest number descriptor is negative\n" )); if (errno == EINVAL) { GSocket_Debug(( "The highest number descriptor is negative\n" )); }
if (errno == ENOMEM) GSocket_Debug(( "Not enough memory\n" )); if (errno == ENOMEM) { GSocket_Debug(( "Not enough memory\n" )); }
socket->m_error = GSOCK_TIMEDOUT; socket->m_error = GSOCK_TIMEDOUT;
return GSOCK_TIMEDOUT; return GSOCK_TIMEDOUT;
} }
if ( ! FD_ISSET(socket->m_fd, &writefds) ) if ( ! FD_ISSET(socket->m_fd, &writefds) ) {
GSocket_Debug(( "GSocket_Output_Timeout is buggy!\n" )); GSocket_Debug(( "GSocket_Output_Timeout is buggy!\n" ));
else }
else {
GSocket_Debug(( "GSocket_Output_Timeout seems correct\n" )); GSocket_Debug(( "GSocket_Output_Timeout seems correct\n" ));
} }
}
else else
{ {
GSocket_Debug(( "GSocket_Output_Timeout, didn't try select!\n" )); GSocket_Debug(( "GSocket_Output_Timeout, didn't try select!\n" ));

View File

@@ -1238,7 +1238,7 @@ bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions)
// overwriteprompt is TRUE, but this is currently ignored as *Associate* has // overwriteprompt is TRUE, but this is currently ignored as *Associate* has
// no overwrite prompt // no overwrite prompt
bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt /*= TRUE*/) bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt /*= TRUE*/)
{ {
wxArrayString strExtensions; wxArrayString strExtensions;
wxString strDesc, strIcon ; wxString strDesc, strIcon ;
@@ -1258,11 +1258,11 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool
} }
return Ok; return Ok;
} }
// ignore index on the grouds that we only have one icon in a Unix file // ignore index on the grouds that we only have one icon in a Unix file
bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/, int /*index = 0*/) bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/, int /*index = 0*/)
{ {
if (strIcon.IsEmpty()) return FALSE; if (strIcon.IsEmpty()) return FALSE;
wxArrayString strExtensions; wxArrayString strExtensions;
wxString strDesc; wxString strDesc;
@@ -1282,7 +1282,8 @@ bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/,
} }
return Ok; return Ok;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxMimeTypesManagerImpl (Unix) // wxMimeTypesManagerImpl (Unix)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------