wxJOIN_BEVEL = 120,
wxJOIN_MITER,
- wxJOIN_ROUND,
+ wxJOIN_ROUND
};
enum wxPenCap
};
-class WXDLLEXPORT wxPenBase : public wxGDIObject
+class WXDLLIMPEXP_CORE wxPenBase : public wxGDIObject
{
public:
virtual ~wxPenBase() { }
virtual void SetJoin(wxPenJoin join) = 0;
virtual void SetCap(wxPenCap cap) = 0;
- virtual wxColour& GetColour() const = 0;
+ virtual wxColour GetColour() const = 0;
virtual wxBitmap *GetStipple() const = 0;
virtual wxPenStyle GetStyle() const = 0;
virtual wxPenJoin GetJoin() const = 0;
#endif
};
-extern WXDLLEXPORT_DATA(wxPenList*) wxThePenList;
+extern WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList;
-#endif
- // _WX_PEN_H_BASE_
+// provide comparison operators to allow code such as
+//
+// if ( pen.GetStyle() == wxTRANSPARENT )
+//
+// to compile without warnings which it would otherwise provoke from some
+// compilers as it compares elements of different enums
+#if FUTURE_WXWIN_COMPATIBILITY_3_0
+
+inline bool operator==(wxPenStyle s, wxDeprecatedGUIConstants t)
+{
+ return wx_static_cast(int, s) == wx_static_cast(int, t);
+}
+
+inline bool operator!=(wxPenStyle s, wxDeprecatedGUIConstants t)
+{
+ return !(s == t);
+}
+
+#endif // FUTURE_WXWIN_COMPATIBILITY_3_0
+
+#endif // _WX_PEN_H_BASE_