Update docs
This commit is contained in:
@@ -27,6 +27,14 @@ enum wxAnimationType
|
|||||||
#define wxAC_DEFAULT_STYLE (wxBORDER_NONE)
|
#define wxAC_DEFAULT_STYLE (wxBORDER_NONE)
|
||||||
|
|
||||||
|
|
||||||
|
enum wxAnimationImplType
|
||||||
|
{
|
||||||
|
wxANIMATION_IMPL_TYPE_NATIVE,
|
||||||
|
wxANIMATION_IMPL_TYPE_GENERIC
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxGenericAnimationCtrl
|
@class wxGenericAnimationCtrl
|
||||||
|
|
||||||
@@ -65,7 +73,7 @@ public:
|
|||||||
all the parameters.
|
all the parameters.
|
||||||
*/
|
*/
|
||||||
wxGenericAnimationCtrl(wxWindow* parent, wxWindowID id,
|
wxGenericAnimationCtrl(wxWindow* parent, wxWindowID id,
|
||||||
const wxGenericAnimation& anim = wxNullGenericAnimation,
|
const wxAnimation& anim = wxNullAnimation,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxAC_DEFAULT_STYLE,
|
long style = wxAC_DEFAULT_STYLE,
|
||||||
@@ -97,7 +105,7 @@ public:
|
|||||||
creation failed.
|
creation failed.
|
||||||
*/
|
*/
|
||||||
bool Create(wxWindow* parent, wxWindowID id,
|
bool Create(wxWindow* parent, wxWindowID id,
|
||||||
const wxGenericAnimation& anim = wxNullGenericAnimation,
|
const wxAnimation& anim = wxNullAnimation,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxAC_DEFAULT_STYLE,
|
long style = wxAC_DEFAULT_STYLE,
|
||||||
@@ -106,7 +114,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Returns the animation associated with this control.
|
Returns the animation associated with this control.
|
||||||
*/
|
*/
|
||||||
virtual wxGenericAnimation GetAnimation() const;
|
virtual wxAnimation GetAnimation() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the inactive bitmap shown in this control when the;
|
Returns the inactive bitmap shown in this control when the;
|
||||||
@@ -150,7 +158,7 @@ public:
|
|||||||
animation or the background colour will be shown
|
animation or the background colour will be shown
|
||||||
(see SetInactiveBitmap() for more info).
|
(see SetInactiveBitmap() for more info).
|
||||||
*/
|
*/
|
||||||
virtual void SetAnimation(const wxGenericAnimation& anim);
|
virtual void SetAnimation(const wxAnimation& anim);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the bitmap to show on the control when it's not playing an animation.
|
Sets the bitmap to show on the control when it's not playing an animation.
|
||||||
@@ -254,16 +262,20 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxAnimationBase
|
@class wxAnimationImpl
|
||||||
|
|
||||||
Abstract base class for native and generic animation classes.
|
Abstract base class for native and generic animation classes. An instance
|
||||||
|
of one of these classes is used by @c wxAnimation to handle the details of
|
||||||
|
the animation file.
|
||||||
|
|
||||||
@See wxGenericAnimation, wxAnimation
|
@See wxAnimationGenericImpl, wxAnimationGTKImpl
|
||||||
*/
|
*/
|
||||||
class wxAnimationBase : public wxObject
|
class wxAnimationImpl : public wxObject, public wxRefCounter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxAnimationBase();
|
wxAnimationImpl();
|
||||||
|
|
||||||
|
virtual wxAnimationImplType GetImplType() = 0;
|
||||||
|
|
||||||
virtual bool IsOk() const = 0;
|
virtual bool IsOk() const = 0;
|
||||||
|
|
||||||
@@ -278,16 +290,11 @@ public:
|
|||||||
virtual bool Load(wxInputStream& stream,
|
virtual bool Load(wxInputStream& stream,
|
||||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||||
|
|
||||||
virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
|
|
||||||
virtual wxSize GetFrameSize(unsigned int frame) const = 0;
|
|
||||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
|
|
||||||
virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
|
|
||||||
virtual wxColour GetBackgroundColour() const = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxGenericAnimation
|
@class wxAnimationGenericImpl
|
||||||
|
|
||||||
This class encapsulates the concept of a platform-dependent animation.
|
This class encapsulates the concept of a platform-dependent animation.
|
||||||
An animation is a sequence of frames of the same size.
|
An animation is a sequence of frames of the same size.
|
||||||
@@ -310,30 +317,15 @@ public:
|
|||||||
|
|
||||||
@see wxAnimationCtrl, @sample{animate}
|
@see wxAnimationCtrl, @sample{animate}
|
||||||
*/
|
*/
|
||||||
class wxGenericAnimation : public wxAnimationBase
|
class wxAnimationGenericImpl : public wxAnimationImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Default ctor.
|
Default ctor.
|
||||||
*/
|
*/
|
||||||
wxGenericAnimation();
|
wxAnimationGenericImpl();
|
||||||
|
|
||||||
/**
|
virtual wxAnimationImplType GetImplType();
|
||||||
Loads an animation from a file.
|
|
||||||
|
|
||||||
@param name
|
|
||||||
The name of the file to load.
|
|
||||||
@param type
|
|
||||||
See LoadFile() for more info.
|
|
||||||
*/
|
|
||||||
wxGenericAnimation(const wxString& name,
|
|
||||||
wxAnimationType type = wxANIMATION_TYPE_ANY);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Destructor.
|
|
||||||
See @ref overview_refcount_destruct for more info.
|
|
||||||
*/
|
|
||||||
virtual ~wxGenericAnimation();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the delay for the i-th frame in milliseconds.
|
Returns the delay for the i-th frame in milliseconds.
|
||||||
@@ -457,39 +449,34 @@ public:
|
|||||||
/**
|
/**
|
||||||
@class wxAnimation
|
@class wxAnimation
|
||||||
|
|
||||||
If the platform supports a native animation control (currently just wxGTK)
|
The @c wxAnimation class handles the interface between the animation
|
||||||
then this is the animation class that should be used with @c wxAnimationCtrl.
|
control and the deails of the animation image or data.
|
||||||
Otherwise it is virtually the same as @c wxGenericAnimation.
|
|
||||||
|
|
||||||
@see wxGenericAnimation
|
|
||||||
*/
|
*/
|
||||||
class wxAnimation : public wxAnimationBase
|
class WXDLLIMPEXP_CORE wxAnimation : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxAnimation();
|
wxAnimation(wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
|
||||||
wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY,
|
||||||
|
wxAnimationImplType implType = wxANIMATION_IMPL_TYPE_NATIVE);
|
||||||
|
wxAnimation(const wxAnimation& other);
|
||||||
|
|
||||||
virtual bool IsOk() const;
|
wxAnimationImpl* GetImpl() const;
|
||||||
|
|
||||||
virtual int GetDelay(unsigned int frame) const;
|
bool IsOk() const;
|
||||||
virtual unsigned int GetFrameCount() const;
|
|
||||||
virtual wxImage GetFrame(unsigned int frame) const;
|
|
||||||
virtual wxSize GetSize() const;
|
|
||||||
|
|
||||||
virtual bool LoadFile(const wxString& name,
|
int GetDelay(unsigned int frame) const;
|
||||||
wxAnimationType type = wxANIMATION_TYPE_ANY);
|
unsigned int GetFrameCount() const;
|
||||||
virtual bool Load(wxInputStream& stream,
|
wxImage GetFrame(unsigned int frame);
|
||||||
wxAnimationType type = wxANIMATION_TYPE_ANY);
|
wxSize GetSize() const;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
bool LoadFile(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||||
|
bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Global functions/macros
|
// Global functions/macros
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -498,5 +485,4 @@ public:
|
|||||||
An empty animation object.
|
An empty animation object.
|
||||||
*/
|
*/
|
||||||
wxAnimation wxNullAnimation;
|
wxAnimation wxNullAnimation;
|
||||||
wxGenericAnimation wxNullGenericAnimation;
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user