]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/pen.h
Add XRC handler for wxCommandLinkButton.
[wxWidgets.git] / include / wx / pen.h
index ec705d9e40cbcb93036d424f3201e2d828354289..101b8be2de5fc37e35c47f9bbe8cf34a9c62442c 100644 (file)
@@ -84,6 +84,19 @@ public:
     virtual wxPenCap GetCap() const = 0;
     virtual int GetWidth() const = 0;
     virtual int GetDashes(wxDash **ptr) const = 0;
+
+    // Convenient helpers for testing whether the pen is a transparent one:
+    // unlike GetStyle() == wxPENSTYLE_TRANSPARENT, they work correctly even if
+    // the pen is invalid (they both return false in this case).
+    bool IsTransparent() const
+    {
+        return IsOk() && GetStyle() == wxPENSTYLE_TRANSPARENT;
+    }
+
+    bool IsNonTransparent() const
+    {
+        return IsOk() && GetStyle() != wxPENSTYLE_TRANSPARENT;
+    }
 };
 
 #if defined(__WXPALMOS__)
@@ -137,7 +150,7 @@ extern WXDLLIMPEXP_DATA_CORE(wxPenList*)   wxThePenList;
 
 inline bool operator==(wxPenStyle s, wxDeprecatedGUIConstants t)
 {
-    return wx_static_cast(int, s) == wx_static_cast(int, t);
+    return static_cast<int>(s) == static_cast<int>(t);
 }
 
 inline bool operator!=(wxPenStyle s, wxDeprecatedGUIConstants t)