Make wxAnimationImpl private and get rid of wxAnimationImplType
Simplify and streamline animation classes relationship: wxAnimation is the only public class representing an animation and it can be created by both the native wxAnimationCtrl and wxGenericAnimationCtrl using the new public CreateAnimation() method. Replace wxAnimationImplType enum with more flexible type info based check.
This commit is contained in:
@@ -316,14 +316,7 @@ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString filename(dialog.GetPath());
|
||||
|
||||
wxAnimation temp
|
||||
#ifdef wxHAS_NATIVE_ANIMATIONCTRL
|
||||
(GetMenuBar()->IsChecked(ID_USE_GENERIC)
|
||||
? wxANIMATION_IMPL_TYPE_GENERIC
|
||||
: wxANIMATION_IMPL_TYPE_NATIVE)
|
||||
#endif // wxHAS_NATIVE_ANIMATIONCTRL
|
||||
;
|
||||
|
||||
wxAnimation temp(m_animationCtrl->CreateAnimation());
|
||||
if (!temp.LoadFile(filename))
|
||||
{
|
||||
wxLogError("Sorry, this animation is not a valid format for wxAnimation.");
|
||||
|
Reference in New Issue
Block a user