wxCURSOR_DEFAULT, // standard X11 cursor
#endif
#ifdef __WXMAC__
- wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
+ wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
#endif
#ifdef __X__
// Not yet implemented for Windows
bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; }
- // FIXME are these really useful? If they're, we should have += &c as well
wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
+ wxSize operator/(const int i) { return wxSize(x / i, y / i); }
+ wxSize operator*(const int i) { return wxSize(x * i, y * i); }
+
+ wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; }
+ wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }
+ wxSize& operator/=(const int i) { x /= i; y /= i; return *this; }
+ wxSize& operator*=(const int i) { x *= i; y *= i; return *this; }
void IncTo(const wxSize& sz)
{ if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
int GetWidth() const { return x; }
int GetHeight() const { return y; }
- bool IsFullySpecified() const { return x != -1 && y != -1; }
+ bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
// combine this size with the other one replacing the default (i.e. equal
- // to -1) components of this object with those of the other
+ // to wxDefaultCoord) components of this object with those of the other
void SetDefaults(const wxSize& size)
{
- if ( x == -1 )
+ if ( x == wxDefaultCoord )
x = size.x;
- if ( y == -1 )
+ if ( y == wxDefaultCoord )
y = size.y;
}
{ }
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
wxRect(const wxPoint& pos, const wxSize& size);
+ wxRect(const wxSize& size);
// default copy ctor and assignment operators ok
bool operator==(const wxRect& rect) const;
bool operator!=(const wxRect& rect) const { return !(*this == rect); }
- // return TRUE if the point is (not strcitly) inside the rect
+ // return true if the point is (not strcitly) inside the rect
bool Inside(int x, int y) const;
bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
- // return TRUE if the rectangles have a non empty intersection
+ // return true if the rectangles have a non empty intersection
bool Intersects(const wxRect& rect) const;
public:
void AddFont(wxFont *font);
void RemoveFont(wxFont *font);
wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
- bool underline = FALSE,
+ bool underline = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
};
class WXDLLEXPORT wxBitmapList : public wxList
{
public:
- wxBitmapList();
+ wxBitmapList(){}
~wxBitmapList();
void AddBitmap(wxBitmap *bitmap);