{
public:
wxBitmapHandlerBase()
- {
- m_type = wxBITMAP_TYPE_INVALID;
- }
+ : m_name()
+ , m_extension()
+ , m_type(wxBITMAP_TYPE_INVALID)
+ { }
virtual ~wxBitmapHandlerBase() { }
{
public:
wxCharBuffer(const char *str)
+ : m_str(NULL)
{
wxASSERT_MSG( str, wxT("NULL string in wxCharBuffer") );
m_str = str ? strdup(str) : (char *)NULL;
}
wxCharBuffer(size_t len)
+ : m_str(NULL)
{
m_str = (char *)malloc(len+1);
m_str[len] = '\0';
~wxCharBuffer() { free(m_str); }
wxCharBuffer(const wxCharBuffer& src)
+ : m_str(src.m_str)
{
- m_str = src.m_str;
- // no reference count yet...
- ((wxCharBuffer*)&src)->m_str = (char *)NULL;
+ // no reference count yet...
+ ((wxCharBuffer*)&src)->m_str = (char *)NULL;
}
wxCharBuffer& operator=(const wxCharBuffer& src)
{
- m_str = src.m_str;
- // no reference count yet...
- ((wxCharBuffer*)&src)->m_str = (char *)NULL;
- return *this;
+ m_str = src.m_str;
+ // no reference count yet...
+ ((wxCharBuffer*)&src)->m_str = (char *)NULL;
+ return *this;
}
const char *data() const { return m_str; }
{
public:
wxWCharBuffer(const wchar_t *wcs)
+ : m_wcs((wchar_t *)NULL)
{
wxASSERT_MSG( wcs, wxT("NULL string in wxWCharBuffer") );
m_wcs = (wchar_t *)malloc(siz);
memcpy(m_wcs, wcs, siz);
}
- else m_wcs = (wchar_t *)NULL;
}
wxWCharBuffer(size_t len)
+ : m_wcs((wchar_t *)NULL)
{
m_wcs = (wchar_t *)malloc((len+1)*sizeof(wchar_t));
m_wcs[len] = L'\0';
~wxWCharBuffer() { free(m_wcs); }
wxWCharBuffer(const wxWCharBuffer& src)
+ : m_wcs(src.m_wcs)
{
- m_wcs = src.m_wcs;
- // no reference count yet...
- ((wxWCharBuffer*)&src)->m_wcs = (wchar_t *)NULL;
+ // no reference count yet...
+ ((wxWCharBuffer*)&src)->m_wcs = (wchar_t *)NULL;
}
wxWCharBuffer& operator=(const wxWCharBuffer& src)
{
- m_wcs = src.m_wcs;
- // no reference count yet...
- ((wxWCharBuffer*)&src)->m_wcs = (wchar_t *)NULL;
- return *this;
+ m_wcs = src.m_wcs;
+ // no reference count yet...
+ ((wxWCharBuffer*)&src)->m_wcs = (wchar_t *)NULL;
+ return *this;
}
const wchar_t *data() const { return m_wcs; }
public:
enum { BLOCK_SIZE = 1024 };
wxMemoryBuffer(size_t size=wxMemoryBuffer::BLOCK_SIZE)
+ : m_data(NULL), m_size(0), m_len(0)
{
wxASSERT(size > 0);
m_data = malloc(size);
wxASSERT(m_data != NULL);
m_size = size;
- m_len = 0;
}
~wxMemoryBuffer() { free(m_data); }
// Copy and assignment
wxMemoryBuffer(const wxMemoryBuffer& src)
+ : m_data(src.m_data), m_size(src.m_size), m_len(src.m_len)
{
- m_data = src.m_data;
- m_size = src.m_size;
- m_len = src.m_len;
-
// no reference count yet...
((wxMemoryBuffer*)&src)->m_data = NULL;
((wxMemoryBuffer*)&src)->m_size = 0;
m_data = src.m_data;
m_size = src.m_size;
m_len = src.m_len;
-
+
// no reference count yet...
((wxMemoryBuffer*)&src)->m_data = NULL;
((wxMemoryBuffer*)&src)->m_size = 0;
int x, y;
// constructors
- wxSize() { x = y = 0; }
- wxSize(int xx, int yy) { Set(xx, yy); }
+ wxSize() : x(0), y(0) { }
+ wxSize(int xx, int yy) : x(xx), y(yy) { }
// no copy ctor or assignment operator - the defaults are ok
double x;
double y;
- wxRealPoint() { x = y = 0.0; };
- wxRealPoint(double xx, double yy) { x = xx; y = yy; };
+ wxRealPoint() : x(0.0), y(0.0) { }
+ wxRealPoint(double xx, double yy) : x(xx), y(yy) { }
wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); }
wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); }
public:
int x, y;
- wxPoint() { x = y = 0; };
- wxPoint(int xx, int yy) { x = xx; y = yy; };
+ wxPoint() : x(0), y(0) { }
+ wxPoint(int xx, int yy) : x(xx), y(yy) { }
// no copy ctor or assignment operator - the defaults are ok
class WXDLLEXPORT wxRect
{
public:
- wxRect() { x = y = width = height = 0; }
+ wxRect()
+ : x(0), y(0), width(0), height(0)
+ { }
wxRect(int xx, int yy, int ww, int hh)
- { x = xx; y = yy; width = ww; height = hh; }
+ : x(xx), y(yy), width(ww), height(hh)
+ { }
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
wxRect(const wxPoint& pos, const wxSize& size);
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
{
- DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
+ DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
- public:
- int checkWidth ;
- int checkHeight ;
+public:
+ int checkWidth ;
+ int checkHeight ;
- inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
- inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxCheckBoxNameStr)
+ wxBitmapCheckBox()
+ : checkWidth(-1), checkHeight(-1)
+ { }
+
+ wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
virtual bool GetValue() const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetLabel(const wxBitmap *bitmap);
- virtual void SetLabel( const wxString &name ) {}
+ virtual void SetLabel( const wxString & WXUNUSED(name) ) {}
};
#endif
// _WX_CHECKBOX_H_
{
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public:
- inline wxGDIObject() { m_visible = FALSE; };
- inline ~wxGDIObject() {};
+ wxGDIObject() : m_visible(FALSE) { }
+ ~wxGDIObject() { }
- inline bool IsNull() const { return (m_refData == 0); }
+ bool IsNull() const { return (m_refData == 0); }
virtual bool GetVisible() { return m_visible; }
virtual void SetVisible(bool v) { m_visible = v; }
wxIcon();
// Copy constructors
- inline wxIcon(const wxIcon& icon) { Ref(icon); }
+ wxIcon(const wxIcon& icon)
+ : wxBitmap()
+ { Ref(icon); }
wxIcon(const char **data);
wxIcon(char **data);
DECLARE_DYNAMIC_CLASS(wxMetafile)
public:
// Copy constructor
- inline wxMetafile(const wxMetafile& metafile)
+ wxMetafile(const wxMetafile& metafile)
+ : wxGDIObject()
{ Ref(metafile); }
wxMetafile(const wxString& file = "");
public:
wxTextUrlEvent(int id, const wxMouseEvent& evtMouse,
long start, long end)
- : wxCommandEvent(wxEVT_COMMAND_TEXT_URL, id),
- m_evtMouse(evtMouse)
- { m_start = start; m_end = end; }
+ : wxCommandEvent(wxEVT_COMMAND_TEXT_URL, id)
+ , m_evtMouse(evtMouse), m_start(start), m_end(end)
+ { }
// get the mouse event which happend over the URL
const wxMouseEvent& GetMouseEvent() const { return m_evtMouse; }
public:
// for wxWin RTTI only, don't use
- wxTextUrlEvent() { }
+ wxTextUrlEvent() : m_evtMouse(), m_start(0), m_end(0) { }
};
typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&);