#include "wx/list.h"
#include "wx/string.h"
#include "wx/fontenc.h"
+#include "wx/hashmap.h"
// ---------------------------------------------------------------------------
// forward declarations
// ---------------------------------------------------------------------------
-class WXDLLEXPORT wxBitmap;
-class WXDLLEXPORT wxBrush;
-class WXDLLEXPORT wxColour;
-class WXDLLEXPORT wxCursor;
-class WXDLLEXPORT wxFont;
-class WXDLLEXPORT wxIcon;
-class WXDLLEXPORT wxPalette;
-class WXDLLEXPORT wxPen;
-class WXDLLEXPORT wxRegion;
-class WXDLLEXPORT wxString;
+class WXDLLIMPEXP_CORE wxBitmap;
+class WXDLLIMPEXP_CORE wxBrush;
+class WXDLLIMPEXP_CORE wxColour;
+class WXDLLIMPEXP_CORE wxCursor;
+class WXDLLIMPEXP_CORE wxFont;
+class WXDLLIMPEXP_CORE wxIcon;
+class WXDLLIMPEXP_CORE wxPalette;
+class WXDLLIMPEXP_CORE wxPen;
+class WXDLLIMPEXP_CORE wxRegion;
+class WXDLLIMPEXP_BASE wxString;
// ---------------------------------------------------------------------------
// constants
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
#if defined(__WXMSW__) || defined(__WXPM__)
#define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE)
-#elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXCOCOA__)
+#elif defined(__WXGTK__) || \
+ defined(__WXMOTIF__) || \
+ defined(__WXX11__) || \
+ defined(__WXMAC__) || \
+ defined(__WXMGL__) || \
+ defined(__WXCOCOA__)
// Initialize from an included XPM
#define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
#else // other platforms
// 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); }
-
+
void IncTo(const wxSize& sz)
{ if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
void DecTo(const wxSize& sz)
int GetWidth() const { return x; }
int GetHeight() const { return y; }
+ bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
+
+ // combine this size with the other one replacing the default (i.e. equal
+ // to wxDefaultCoord) components of this object with those of the other
+ void SetDefaults(const wxSize& size)
+ {
+ if ( x == wxDefaultCoord )
+ x = size.x;
+ if ( y == wxDefaultCoord )
+ y = size.y;
+ }
+
// compatibility
int GetX() const { return x; }
int GetY() const { return y; }
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 wxStringToColourHashMap;
+WX_DECLARE_STRING_HASH_MAP( wxColour *, wxStringToColourHashMap );
class WXDLLEXPORT wxColourDatabase
{