This is a combination of running clang-tidy with modernize-use-nullptr check for some ports (GTK, X11, OSX) and manual changes to the ports for which it couldn't be used easily (MSW, DFB) and also manually updating the docs. Also replace NULL with null or nullptr in the comments as this is more consistent with the use of nullptr in the code and makes it simpler to grep for the remaining occurrences of NULL itself. And also use null in the assert messages. Only a few occurrences of "NULL" are still left in non-C files, mostly corresponding to unclear comments or string output which it might not be safe to change.
56 lines
2.1 KiB
C++
56 lines
2.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/generic/private/animate.h
|
|
// Purpose: wxAnimationGenericImpl
|
|
// Author: Julian Smart and Guillermo Rodriguez Garcia
|
|
// Modified by: Francesco Montorsi
|
|
// Created: 13/8/99
|
|
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_GENERIC_PRIVATE_ANIMATEH__
|
|
#define _WX_GENERIC_PRIVATE_ANIMATEH__
|
|
|
|
#include "wx/private/animate.h"
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxAnimationGenericImpl
|
|
// ----------------------------------------------------------------------------
|
|
|
|
class WXDLLIMPEXP_ADV wxAnimationGenericImpl : public wxAnimationImpl
|
|
{
|
|
public:
|
|
wxAnimationGenericImpl() : m_decoder(nullptr) {}
|
|
virtual ~wxAnimationGenericImpl() { UnRef(); }
|
|
|
|
virtual bool IsOk() const override
|
|
{ return m_decoder != nullptr; }
|
|
virtual bool IsCompatibleWith(wxClassInfo* ci) const override;
|
|
|
|
virtual unsigned int GetFrameCount() const override;
|
|
virtual int GetDelay(unsigned int i) const override;
|
|
virtual wxImage GetFrame(unsigned int i) const override;
|
|
virtual wxSize GetSize() const override;
|
|
|
|
virtual bool LoadFile(const wxString& filename,
|
|
wxAnimationType type = wxANIMATION_TYPE_ANY) override;
|
|
virtual bool Load(wxInputStream& stream,
|
|
wxAnimationType type = wxANIMATION_TYPE_ANY) override;
|
|
|
|
// extended interface used only by the generic implementation of wxAnimationCtrl
|
|
virtual wxPoint GetFramePosition(unsigned int frame) const;
|
|
virtual wxSize GetFrameSize(unsigned int frame) const;
|
|
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
|
|
virtual wxColour GetTransparentColour(unsigned int frame) const;
|
|
virtual wxColour GetBackgroundColour() const;
|
|
|
|
private:
|
|
void UnRef();
|
|
|
|
wxAnimationDecoder* m_decoder;
|
|
|
|
wxDECLARE_NO_COPY_CLASS(wxAnimationGenericImpl);
|
|
};
|
|
|
|
|
|
#endif // _WX_GENERIC_PRIVATE_ANIMATEH__
|