Use GetAnimation() in wxAnimationCtrlXmlHandler again
This function basically only exists in order to be used in this handler, so extend it to allow doing it by adding wxAnimationCtrlBase argument to it, allowing it to create wxAnimation object compatible with the given control. This reduces code duplication and, incidentally, makes GetAnimation() more useful for any user-defined XRC handlers.
This commit is contained in:
@@ -591,8 +591,10 @@ public:
|
||||
wxImageList *GetImageList(const wxString& param = wxT("imagelist")) wxOVERRIDE;
|
||||
|
||||
#if wxUSE_ANIMATIONCTRL
|
||||
// Gets an animation.
|
||||
wxAnimation* GetAnimation(const wxString& param = wxT("animation")) wxOVERRIDE;
|
||||
// Gets an animation creating it using the provided control (so that it
|
||||
// will be compatible with it) if any.
|
||||
wxAnimation* GetAnimation(const wxString& param = wxT("animation"),
|
||||
wxAnimationCtrlBase* ctrl = NULL) wxOVERRIDE;
|
||||
#endif
|
||||
|
||||
// Gets a font.
|
||||
|
Reference in New Issue
Block a user