#endif
#endif
-#if !USE_SHARED_LIBRARY
- IMPLEMENT_CLASS(wxColourDatabase, wxList)
- IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList)
- IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList)
- IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList)
- IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList)
- IMPLEMENT_DYNAMIC_CLASS(wxResourceCache, wxList)
-
- IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
-#endif
+IMPLEMENT_CLASS(wxColourDatabase, wxList)
+IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList)
+IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList)
+IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList)
+IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList)
+IMPLEMENT_DYNAMIC_CLASS(wxResourceCache, wxList)
+
+IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight)
{
(height == rect.height));
}
-const wxRect& wxRect::operator += (const wxRect& rect)
+wxRect& wxRect::operator += (const wxRect& rect)
{
- *this = (*this + rect);
- return ( *this ) ;
+ *this = (*this + rect);
+ return ( *this ) ;
}
wxRect wxRect::operator + (const wxRect& rect) const
{
- int x1 = wxMin(this->x, rect.x);
- int y1 = wxMin(this->y, rect.y);
- int y2 = wxMax(y+height, rect.height+rect.y);
- int x2 = wxMax(x+width, rect.width+rect.x);
- return wxRect(x1, y1, x2-x1, y2-y1);
+ int x1 = wxMin(this->x, rect.x);
+ int y1 = wxMin(this->y, rect.y);
+ int y2 = wxMax(y+height, rect.height+rect.y);
+ int x2 = wxMax(x+width, rect.width+rect.x);
+ return wxRect(x1, y1, x2-x1, y2-y1);
}
bool wxRect::Inside(int cx, int cy) const
{
- return ( (cx >= x) && (cy >= y)
- && ((cy - y) < height)
- && ((cx - x) < width)
- );
+ return ( (cx >= x) && (cy >= y)
+ && ((cy - y) < height)
+ && ((cx - x) < width)
+ );
}
wxColourDatabase::wxColourDatabase (int type) : wxList (type)
// wxFontPool = new XFontPool;
#endif
- wxNORMAL_FONT = new wxFont (12, wxMODERN, wxNORMAL, wxNORMAL);
- wxSMALL_FONT = new wxFont (10, wxSWISS, wxNORMAL, wxNORMAL);
- wxITALIC_FONT = new wxFont (12, wxROMAN, wxITALIC, wxNORMAL);
- wxSWISS_FONT = new wxFont (12, wxSWISS, wxNORMAL, wxNORMAL);
+ // why under MSW fonts shouldn't have the standard system size?
+#ifdef __WXMSW__
+ static const int sizeFont = 10;
+#else
+ static const int sizeFont = 12;
+#endif
+
+ wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL);
+ wxSMALL_FONT = new wxFont (sizeFont - 2, wxSWISS, wxNORMAL, wxNORMAL);
+ wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
+ wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL);
wxRED_PEN = new wxPen ("RED", 1, wxSOLID);
wxCYAN_PEN = new wxPen ("CYAN", 1, wxSOLID);
wxBitmapList::~wxBitmapList ()
{
-#if defined(__WXMSW__) || defined(__WXMOTIF__)
wxNode *node = First ();
while (node)
{
delete bitmap;
node = next;
}
-#endif
}
// Pen and Brush lists
wxPenList::~wxPenList ()
{
-#if defined(__WXMSW__) || defined(__WXMOTIF__)
wxNode *node = First ();
while (node)
{
delete pen;
node = next;
}
-#endif
}
void wxPenList::AddPen (wxPen * pen)
wxBrushList::~wxBrushList ()
{
-#if defined(__WXMSW__) || defined(__WXMOTIF__)
wxNode *node = First ();
while (node)
{
delete brush;
node = next;
}
-#endif
}
void wxBrushList::AddBrush (wxBrush * brush)