More documentation updates

This commit is contained in:
Robin Dunn
2020-04-01 15:27:34 -07:00
parent fb69a2975f
commit 6039be5291

View File

@@ -26,10 +26,14 @@ enum wxAnimationType
#define wxAC_NO_AUTORESIZE (0x0010) #define wxAC_NO_AUTORESIZE (0x0010)
#define wxAC_DEFAULT_STYLE (wxBORDER_NONE) #define wxAC_DEFAULT_STYLE (wxBORDER_NONE)
/**
Animation implementation types
*/
enum wxAnimationImplType enum wxAnimationImplType
{ {
/** With this flag wxAnimation will use a native implemetation if available. */
wxANIMATION_IMPL_TYPE_NATIVE, wxANIMATION_IMPL_TYPE_NATIVE,
/** Using this flag will cause wxAnimation to use a generic implementation. */
wxANIMATION_IMPL_TYPE_GENERIC wxANIMATION_IMPL_TYPE_GENERIC
}; };
@@ -188,24 +192,21 @@ public:
Specify whether the animation's background colour is to be shown (the default), Specify whether the animation's background colour is to be shown (the default),
or whether the window background should show through or whether the window background should show through
@note This method is only available when using the generic version of @note This method is only effective when using the generic version of the control.
@c wxAnimation and @c wxAnimationCtrl.
*/ */
void SetUseWindowBackgroundColour(bool useWinBackground = true); void SetUseWindowBackgroundColour(bool useWinBackground = true);
/** /**
Returns @c true if the window's background colour is being used. Returns @c true if the window's background colour is being used.
@note This method is only available when using the generic version of @note This method is only effective when using the generic version of the control.
@c wxAnimation and @c wxAnimationCtrl.
*/ */
bool IsUsingWindowBackgroundColour() const; bool IsUsingWindowBackgroundColour() const;
/** /**
This overload of Play() lets you specify if the animation must loop or not This overload of Play() lets you specify if the animation must loop or not
@note This method is only available when using the generic version of @note This method is only effective when using the generic version of the control.
@c wxAnimation and @c wxAnimationCtrl.
*/ */
bool Play(bool looped); bool Play(bool looped);
@@ -213,8 +214,7 @@ public:
Draw the current frame of the animation into given DC. Draw the current frame of the animation into given DC.
This is fast as current frame is always cached. This is fast as current frame is always cached.
@note This method is only available when using the generic version of @note This method is only effective when using the generic version of the control.
@c wxAnimation and @c wxAnimationCtrl.
*/ */
void DrawCurrentFrame(wxDC& dc); void DrawCurrentFrame(wxDC& dc);
@@ -222,8 +222,7 @@ public:
/** /**
Returns a wxBitmap with the current frame drawn in it. Returns a wxBitmap with the current frame drawn in it.
@note This method is only available when using the generic version of @note This method is only effective when using the generic version of the control.
@c wxAnimation and @c wxAnimationCtrl.
*/ */
wxBitmap& GetBackingStore(); wxBitmap& GetBackingStore();
}; };
@@ -235,6 +234,14 @@ public:
If the platform supports a native animation control (currently just wxGTK) If the platform supports a native animation control (currently just wxGTK)
then this class implements the control via the native widget. then this class implements the control via the native widget.
Otherwise it is virtually the same as @c wxGenericAnimationCtrl. Otherwise it is virtually the same as @c wxGenericAnimationCtrl.
Note that on wxGTK wxAnimationCtrl by default is capable of loading the
formats supported by the internally-used @c gdk-pixbuf library (typically
this means only @c wxANIMATION_TYPE_GIF). See @c wxGenericAnimationCtrl if
you need to support additional file types.
@library{wxcore}
@category{gdi}
*/ */
class wxAnimationCtrl : public wxGenericAnimationCtrl class wxAnimationCtrl : public wxGenericAnimationCtrl
@@ -256,8 +263,6 @@ public:
long style = wxAC_DEFAULT_STYLE, long style = wxAC_DEFAULT_STYLE,
const wxString& name = wxAnimationCtrlNameStr); const wxString& name = wxAnimationCtrlNameStr);
void SetAnimation(const wxAnimation &anim);
wxAnimation GetAnimation() const;
}; };
@@ -266,9 +271,9 @@ public:
Abstract base class for native and generic animation classes. An instance 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 of one of these classes is used by @c wxAnimation to handle the details of
the animation file. the interface between the animation file and the animation control.
@See wxAnimationGenericImpl, wxAnimationGTKImpl @See wxAnimationGenericImpl
*/ */
class wxAnimationImpl : public wxObject, public wxRefCounter class wxAnimationImpl : public wxObject, public wxRefCounter
{ {
@@ -296,26 +301,23 @@ public:
/** /**
@class wxAnimationGenericImpl @class wxAnimationGenericImpl
This class encapsulates the concept of a platform-dependent animation. This class provides a generic implementation for the @c wxAnimation
An animation is a sequence of frames of the same size. class. It can be used all platforms even if the platform provides a native
Sound is not supported by wxAnimation. implementation.
Note that on wxGTK wxAnimation by default is capable of loading the It is unlikely that an application developer would explicitly create
formats supported by the internally-used @c gdk-pixbuf library (typically instances of this class, instead the @c wxAnimation class will create its
this means only @c wxANIMATION_TYPE_GIF). To use the generic version of own instance of an implementation when it is created.
wxAnimation and wxAnimationCtrl instead, use the --disable-nativeanimation
configure option when buildign wxWidgets.
On other platforms wxAnimation is always capable of loading both GIF and ANI @c wxAnimationGenericImpl supports animated GIF and ANI files out of the
formats (i.e. both @c wxANIMATION_TYPE_GIF and @c wxANIMATION_TYPE_ANI). box. Additional file types can be supported by implementing a class
derived from @c wxAnimationDecoder and adding an instance of it to the
handlers managed by this class.
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @see wxAnimationCtrl, wxAnimation @sample{animate}
::wxNullAnimation
@see wxAnimationCtrl, @sample{animate}
*/ */
class wxAnimationGenericImpl : public wxAnimationImpl class wxAnimationGenericImpl : public wxAnimationImpl
{ {
@@ -452,7 +454,8 @@ public:
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 deails of the animation image or data.
@stdobjects
::wxNullAnimation
*/ */
class WXDLLIMPEXP_CORE wxAnimation : public wxObject class WXDLLIMPEXP_CORE wxAnimation : public wxObject
{ {