diff --git a/include/wx/withimages.h b/include/wx/withimages.h index a93ee65be3..d8a60ac94a 100644 --- a/include/wx/withimages.h +++ b/include/wx/withimages.h @@ -102,25 +102,6 @@ public: // Get pointer (may be NULL) to the associated image list. wxImageList* GetImageList() const { return m_imageList; } -protected: - // This function is called when the images associated with the control - // change, due to either SetImages() or SetImageList() being called. - // - // It ought to be pure virtual, but isn't because there could be existing - // application code inheriting from this class and not overriding it - // (because this function hadn't existed when this code was written). - virtual void OnImagesChanged() { } - - // This function can be used as event handle for wxEVT_DPI_CHANGED event - // and simply calls OnImagesChanged() to refresh the images when it happens. - void WXHandleDPIChanged(wxDPIChangedEvent& event) - { - if ( HasImages() ) - OnImagesChanged(); - - event.Skip(); - } - // This helper function can be used from OnImagesChanged() if the derived // class actually needs to use wxImageList: it ensures that m_imageList is // updated from m_images, if the latter is not empty, using the images of @@ -141,6 +122,25 @@ protected: return m_imageList; } +protected: + // This function is called when the images associated with the control + // change, due to either SetImages() or SetImageList() being called. + // + // It ought to be pure virtual, but isn't because there could be existing + // application code inheriting from this class and not overriding it + // (because this function hadn't existed when this code was written). + virtual void OnImagesChanged() { } + + // This function can be used as event handle for wxEVT_DPI_CHANGED event + // and simply calls OnImagesChanged() to refresh the images when it happens. + void WXHandleDPIChanged(wxDPIChangedEvent& event) + { + if ( HasImages() ) + OnImagesChanged(); + + event.Skip(); + } + // Return true if we have a valid image list. bool HasImageList() const { return m_imageList != NULL; }