Apply suggestions from code review
Co-Authored-By: VZ <vadim@wxwidgets.org>
This commit is contained in:
@@ -69,8 +69,8 @@ protected:
|
|||||||
class WXDLLIMPEXP_CORE wxAnimation : public wxObject
|
class WXDLLIMPEXP_CORE wxAnimation : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxAnimation(wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
|
explicit wxAnimation(wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
|
||||||
wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY,
|
explicit wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY,
|
||||||
wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
|
wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
|
||||||
wxAnimation(const wxAnimation& other);
|
wxAnimation(const wxAnimation& other);
|
||||||
|
|
||||||
@@ -173,13 +173,6 @@ private:
|
|||||||
: wxGenericAnimationCtrl(parent, id, anim, pos, size, style, name)
|
: wxGenericAnimationCtrl(parent, id, anim, pos, size, style, name)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
|
||||||
const wxAnimation& anim = wxNullAnimation,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize,
|
|
||||||
long style = wxAC_DEFAULT_STYLE,
|
|
||||||
const wxString& name = wxAnimationCtrlNameStr)
|
|
||||||
{ return wxGenericAnimationCtrl::Create(parent, id, anim, pos, size, style, name); }
|
|
||||||
|
|
||||||
static wxAnimationImpl* CreateAnimationImpl(wxAnimationImplType WXUNUSED(implType))
|
static wxAnimationImpl* CreateAnimationImpl(wxAnimationImplType WXUNUSED(implType))
|
||||||
{
|
{
|
||||||
|
@@ -30,7 +30,6 @@ public:
|
|||||||
: m_pixbuf(NULL) {}
|
: m_pixbuf(NULL) {}
|
||||||
~wxAnimationGTKImpl() { UnRef(); }
|
~wxAnimationGTKImpl() { UnRef(); }
|
||||||
|
|
||||||
// wxAnimation& operator= (const wxAnimation&);
|
|
||||||
|
|
||||||
virtual wxAnimationImplType GetImplType() wxOVERRIDE
|
virtual wxAnimationImplType GetImplType() wxOVERRIDE
|
||||||
{ return wxANIMATION_IMPL_TYPE_NATIVE; }
|
{ return wxANIMATION_IMPL_TYPE_NATIVE; }
|
||||||
|
@@ -452,7 +452,7 @@ public:
|
|||||||
@class wxAnimation
|
@class wxAnimation
|
||||||
|
|
||||||
The @c wxAnimation class handles the interface between the animation
|
The @c wxAnimation class handles the interface between the animation
|
||||||
control and the deails of the animation image or data.
|
control and the details of the animation image or data.
|
||||||
|
|
||||||
@stdobjects
|
@stdobjects
|
||||||
::wxNullAnimation
|
::wxNullAnimation
|
||||||
@@ -488,4 +488,3 @@ public:
|
|||||||
An empty animation object.
|
An empty animation object.
|
||||||
*/
|
*/
|
||||||
wxAnimation wxNullAnimation;
|
wxAnimation wxNullAnimation;
|
||||||
|
|
||||||
|
@@ -450,7 +450,8 @@ void wxAnimationCtrl::OnTimer(wxTimerEvent& WXUNUSED(ev))
|
|||||||
// static
|
// static
|
||||||
wxAnimationImpl* wxAnimationCtrl::CreateAnimationImpl(wxAnimationImplType implType)
|
wxAnimationImpl* wxAnimationCtrl::CreateAnimationImpl(wxAnimationImplType implType)
|
||||||
{
|
{
|
||||||
switch (implType) {
|
switch (implType)
|
||||||
|
{
|
||||||
case wxANIMATION_IMPL_TYPE_GENERIC:
|
case wxANIMATION_IMPL_TYPE_GENERIC:
|
||||||
return new wxAnimationGenericImpl();
|
return new wxAnimationGenericImpl();
|
||||||
|
|
||||||
@@ -463,7 +464,7 @@ wxAnimationImpl* wxAnimationCtrl::CreateAnimationImpl(wxAnimationImplType implTy
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// helpers to safely access wxAnimationGenericImpl methods
|
// helpers to safely access wxAnimationGTKImpl methods
|
||||||
#define ANIMATION (static_cast<wxAnimationGTKImpl*>(m_animation.GetImpl()))
|
#define ANIMATION (static_cast<wxAnimationGTKImpl*>(m_animation.GetImpl()))
|
||||||
|
|
||||||
GdkPixbufAnimation* wxAnimationCtrl::animation_GetPixbuf() const
|
GdkPixbufAnimation* wxAnimationCtrl::animation_GetPixbuf() const
|
||||||
|
Reference in New Issue
Block a user