]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/bmpbase.cpp
Allow user code to override key events in generic wxListCtrl.
[wxWidgets.git] / src / common / bmpbase.cpp
index 2f0776eaca602728e3182ce17156e382e44cf172..eebf56e5f93bfac760cafd99f26033f82e7db3cb 100644 (file)
@@ -51,12 +51,12 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxObject)
 
 wxList wxBitmapBase::sm_handlers;
 
-void wxBitmapBase::AddHandler(wxBitmapHandlerBase *handler)
+void wxBitmapBase::AddHandler(wxBitmapHandler *handler)
 {
     sm_handlers.Append(handler);
 }
 
-void wxBitmapBase::InsertHandler(wxBitmapHandlerBase *handler)
+void wxBitmapBase::InsertHandler(wxBitmapHandler *handler)
 {
     sm_handlers.Insert(handler);
 }
@@ -135,6 +135,16 @@ public:
     void OnExit() { wxBitmap::CleanUpHandlers(); }
 };
 
+wxBitmap wxBitmapBase::ConvertToDisabled(unsigned char brightness) const
+{
+    wxBitmap bmp;
+#if wxUSE_IMAGE
+    wxImage image = ConvertToImage();
+    bmp = wxBitmap(image.ConvertToDisabled(brightness));
+#endif
+    return bmp;
+}
+
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapBaseModule, wxModule)
 
 #endif // wxUSE_BITMAP_BASE
@@ -155,7 +165,7 @@ wxBitmap::wxBitmap(const char* const* bits)
 
     *this = wxBitmap(image);
 #else
-    wxFAIL_MSG(_T("creating bitmaps from XPMs not supported"));
+    wxFAIL_MSG(wxT("creating bitmaps from XPMs not supported"));
 #endif // wxUSE_IMAGE && wxUSE_XPM
 }
 #endif // !(defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__))