]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/pen.h
Don't duplicate event sending code in wxGTK wxListBox.
[wxWidgets.git] / include / wx / pen.h
index 479a9668ea0bb7edd2ed4bba52d35859128da80d..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__)