corrected warnings when compiling with -Wall -W
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3475a005d6
commit
f2af4afb82
@ -92,14 +92,14 @@ class WXDLLEXPORT wxListKey
|
||||
{
|
||||
public:
|
||||
// implicit ctors
|
||||
wxListKey()
|
||||
{ m_keyType = wxKEY_NONE; }
|
||||
wxListKey(long i)
|
||||
{ m_keyType = wxKEY_INTEGER; m_key.integer = i; }
|
||||
wxListKey(const wxChar *s)
|
||||
{ m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s); }
|
||||
wxListKey(const wxString& s)
|
||||
{ m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s.c_str()); }
|
||||
wxListKey() : m_keyType(wxKEY_NONE)
|
||||
{ }
|
||||
wxListKey(long i) : m_keyType(wxKEY_INTEGER)
|
||||
{ m_key.integer = i; }
|
||||
wxListKey(const wxChar *s) : m_keyType(wxKEY_STRING)
|
||||
{ m_key.string = wxStrdup(s); }
|
||||
wxListKey(const wxString& s) : m_keyType(wxKEY_STRING)
|
||||
{ m_key.string = wxStrdup(s.c_str()); }
|
||||
|
||||
// accessors
|
||||
wxKeyType GetKeyType() const { return m_keyType; }
|
||||
@ -183,6 +183,8 @@ private:
|
||||
*m_previous;
|
||||
|
||||
wxListBase *m_list; // list we belong to
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxNodeBase)
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -198,7 +200,8 @@ private:
|
||||
void Init(wxKeyType keyType = wxKEY_NONE); // Must be declared before it's used (for VC++ 1.5)
|
||||
public:
|
||||
// default ctor & dtor
|
||||
wxListBase(wxKeyType keyType = wxKEY_NONE) { Init(keyType); }
|
||||
wxListBase(wxKeyType keyType = wxKEY_NONE)
|
||||
{ Init(keyType); }
|
||||
virtual ~wxListBase();
|
||||
|
||||
// accessors
|
||||
@ -399,7 +402,7 @@ private:
|
||||
: wxListBase(count, (void **)elements) { } \
|
||||
\
|
||||
name& operator=(const name& list) \
|
||||
{ return (name&)wxListBase::operator=(list); } \
|
||||
{ (void) wxListBase::operator=(list); return *this; } \
|
||||
\
|
||||
nodetype *GetFirst() const \
|
||||
{ return (nodetype *)wxListBase::GetFirst(); } \
|
||||
@ -506,7 +509,7 @@ public:
|
||||
~wxList() { }
|
||||
|
||||
wxList& operator=(const wxList& list)
|
||||
{ return (wxList&)wxListBase::operator=(list); }
|
||||
{ (void) wxListBase::operator=(list); return *this; }
|
||||
|
||||
// compatibility methods
|
||||
void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }
|
||||
|
@ -21,20 +21,40 @@ class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
friend class WXDLLEXPORT wxFont;
|
||||
public:
|
||||
wxFontRefData()
|
||||
: m_fontId(0)
|
||||
, m_pointSize(10)
|
||||
, m_family(wxDEFAULT)
|
||||
, m_style(wxNORMAL)
|
||||
, m_weight(wxNORMAL)
|
||||
, m_underlined(FALSE)
|
||||
, m_faceName("Geneva")
|
||||
, m_encoding(wxFONTENCODING_DEFAULT)
|
||||
, m_macFontNum(0)
|
||||
, m_macFontSize(0)
|
||||
, m_macFontStyle(0)
|
||||
, m_macATSUFontID()
|
||||
{
|
||||
Init(10, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE,
|
||||
"Geneva", wxFONTENCODING_DEFAULT);
|
||||
}
|
||||
|
||||
wxFontRefData(const wxFontRefData& data)
|
||||
: wxGDIRefData()
|
||||
, m_fontId(data.m_fontId)
|
||||
, m_pointSize(data.m_pointSize)
|
||||
, m_family(data.m_family)
|
||||
, m_style(data.m_style)
|
||||
, m_weight(data.m_weight)
|
||||
, m_underlined(data.m_underlined)
|
||||
, m_faceName(data.m_faceName)
|
||||
, m_encoding(data.m_encoding)
|
||||
, m_macFontNum(data.m_macFontNum)
|
||||
, m_macFontSize(data.m_macFontSize)
|
||||
, m_macFontStyle(data.m_macFontStyle)
|
||||
, m_macATSUFontID(data.m_macATSUFontID)
|
||||
{
|
||||
Init(data.m_pointSize, data.m_family, data.m_style, data.m_weight,
|
||||
data.m_underlined, data.m_faceName, data.m_encoding);
|
||||
|
||||
m_macFontNum = data.m_macFontNum ;
|
||||
m_macFontSize = data.m_macFontSize;
|
||||
m_macFontStyle = data.m_macFontStyle;
|
||||
m_fontId = data.m_fontId;
|
||||
}
|
||||
|
||||
wxFontRefData(int size,
|
||||
@ -44,6 +64,18 @@ public:
|
||||
bool underlined,
|
||||
const wxString& faceName,
|
||||
wxFontEncoding encoding)
|
||||
: m_fontId(0)
|
||||
, m_pointSize(size)
|
||||
, m_family(family)
|
||||
, m_style(style)
|
||||
, m_weight(weight)
|
||||
, m_underlined(underlined)
|
||||
, m_faceName(faceName)
|
||||
, m_encoding(encoding)
|
||||
, m_macFontNum(0)
|
||||
, m_macFontSize(0)
|
||||
, m_macFontStyle(0)
|
||||
, m_macATSUFontID(0)
|
||||
{
|
||||
Init(size, family, style, weight, underlined, faceName, encoding);
|
||||
}
|
||||
@ -60,22 +92,22 @@ protected:
|
||||
wxFontEncoding encoding);
|
||||
|
||||
// font characterstics
|
||||
int m_fontId;
|
||||
int m_pointSize;
|
||||
int m_family;
|
||||
int m_style;
|
||||
int m_weight;
|
||||
bool m_underlined;
|
||||
wxString m_faceName;
|
||||
int m_fontId;
|
||||
int m_pointSize;
|
||||
int m_family;
|
||||
int m_style;
|
||||
int m_weight;
|
||||
bool m_underlined;
|
||||
wxString m_faceName;
|
||||
wxFontEncoding m_encoding;
|
||||
|
||||
public :
|
||||
short m_macFontNum ;
|
||||
short m_macFontSize ;
|
||||
unsigned char m_macFontStyle ;
|
||||
wxUint32 m_macATSUFontID ;
|
||||
public :
|
||||
void MacFindFont() ;
|
||||
public:
|
||||
short m_macFontNum;
|
||||
short m_macFontSize;
|
||||
unsigned char m_macFontStyle;
|
||||
wxUint32 m_macATSUFontID;
|
||||
public:
|
||||
void MacFindFont() ;
|
||||
};
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFont
|
||||
@ -86,7 +118,12 @@ class WXDLLEXPORT wxFont : public wxFontBase
|
||||
public:
|
||||
// ctors and such
|
||||
wxFont() { Init(); }
|
||||
wxFont(const wxFont& font) { Init(); Ref(font); }
|
||||
wxFont(const wxFont& font)
|
||||
: wxFontBase()
|
||||
{
|
||||
Init();
|
||||
Ref(font);
|
||||
}
|
||||
|
||||
wxFont(int size,
|
||||
int family,
|
||||
|
@ -28,22 +28,26 @@ WXDLLEXPORT_DATA(extern const char*) wxMessageBoxCaptionStr;
|
||||
|
||||
class WXDLLEXPORT wxMessageDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
|
||||
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
|
||||
|
||||
protected:
|
||||
wxString m_caption;
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
public:
|
||||
wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
wxMessageDialog(wxWindow *parent,
|
||||
const wxString& message,
|
||||
const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE,
|
||||
const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
int ShowModal();
|
||||
|
||||
// not supported for message dialog, RR
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) {}
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
|
||||
};
|
||||
|
||||
|
@ -30,6 +30,8 @@ public:
|
||||
wxPenRefData(const wxPenRefData& data);
|
||||
~wxPenRefData();
|
||||
|
||||
wxPenRefData& operator=(const wxPenRefData& data);
|
||||
|
||||
protected:
|
||||
int m_width;
|
||||
int m_style;
|
||||
@ -54,7 +56,9 @@ public:
|
||||
wxPen();
|
||||
wxPen(const wxColour& col, int width, int style);
|
||||
wxPen(const wxBitmap& stipple, int width);
|
||||
inline wxPen(const wxPen& pen) { Ref(pen); }
|
||||
wxPen(const wxPen& pen)
|
||||
: wxGDIObject()
|
||||
{ Ref(pen); }
|
||||
~wxPen();
|
||||
|
||||
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
|
||||
|
@ -61,7 +61,7 @@ void wxCheckBox::Command (wxCommandEvent & event)
|
||||
ProcessCommand (event);
|
||||
}
|
||||
|
||||
void wxCheckBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||
void wxCheckBox::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 WXUNUSED(controlpart) )
|
||||
{
|
||||
SetValue( !GetValue() ) ;
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId );
|
||||
@ -71,11 +71,12 @@ void wxCheckBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||
}
|
||||
|
||||
// Bitmap checkbox
|
||||
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
@ -490,8 +490,9 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
|
||||
return(noErr);
|
||||
}
|
||||
|
||||
pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow, void *handlerRefCon,
|
||||
DragReference theDrag)
|
||||
pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow,
|
||||
void *handlerRefCon,
|
||||
DragReference theDrag)
|
||||
{
|
||||
MacTrackingGlobals* trackingGlobals = (MacTrackingGlobals*) handlerRefCon;
|
||||
if ( trackingGlobals->m_currentTarget )
|
||||
|
@ -61,7 +61,7 @@ void wxCheckBox::Command (wxCommandEvent & event)
|
||||
ProcessCommand (event);
|
||||
}
|
||||
|
||||
void wxCheckBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||
void wxCheckBox::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 WXUNUSED(controlpart) )
|
||||
{
|
||||
SetValue( !GetValue() ) ;
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId );
|
||||
@ -71,11 +71,12 @@ void wxCheckBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||
}
|
||||
|
||||
// Bitmap checkbox
|
||||
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
@ -490,8 +490,9 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
|
||||
return(noErr);
|
||||
}
|
||||
|
||||
pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow, void *handlerRefCon,
|
||||
DragReference theDrag)
|
||||
pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow,
|
||||
void *handlerRefCon,
|
||||
DragReference theDrag)
|
||||
{
|
||||
MacTrackingGlobals* trackingGlobals = (MacTrackingGlobals*) handlerRefCon;
|
||||
if ( trackingGlobals->m_currentTarget )
|
||||
|
Loading…
Reference in New Issue
Block a user