removed @NULL,@true,@false tags from the function prototypes; fixed * and & displacing in the prototypes; changed @param as discussed on wx-dev; use @see instead of @sa; better indentation for @returns,@remarks,@see paragraphs; other misc fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-09 12:33:59 +00:00
parent 0aaf0255e4
commit 4cc4bfafe5
256 changed files with 8880 additions and 10701 deletions

View File

@@ -43,27 +43,22 @@ public:
/**
Creates a bitmap from the given data, which can be of arbitrary type. The
wxBitmap object @e bitmap is
wxBitmap object @a bitmap is
manipulated by this function.
@param bitmap
The wxBitmap object.
The wxBitmap object.
@param width
The width of the bitmap in pixels.
The width of the bitmap in pixels.
@param height
The height of the bitmap in pixels.
The height of the bitmap in pixels.
@param depth
The depth of the bitmap in pixels. If this is -1, the screen depth is used.
The depth of the bitmap in pixels. If this is -1, the screen depth is used.
@param data
Data whose type depends on the value of type.
Data whose type depends on the value of type.
@param type
A bitmap type identifier - see wxBitmapHandler() for a list
of possible values.
A bitmap type identifier - see wxBitmapHandler() for a list
of possible values.
@returns @true if the call succeeded, @false otherwise (the default).
*/
@@ -92,18 +87,16 @@ public:
bitmap.
@param bitmap
The bitmap object which is to be affected by this operation.
The bitmap object which is to be affected by this operation.
@param name
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
@param type
See wxBitmap::wxBitmap for values this can take.
See wxBitmap::wxBitmap for values this can take.
@returns @true if the operation succeeded, @false otherwise.
@sa wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile()
@see wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile()
*/
bool LoadFile(wxBitmap* bitmap, const wxString& name, long type);
@@ -111,29 +104,26 @@ public:
Saves a bitmap in the named file.
@param bitmap
The bitmap object which is to be affected by this operation.
The bitmap object which is to be affected by this operation.
@param name
A filename. The meaning of name is determined by the type parameter.
A filename. The meaning of name is determined by the type parameter.
@param type
See wxBitmap::wxBitmap for values this can take.
See wxBitmap::wxBitmap for values this can take.
@param palette
An optional palette used for saving the bitmap.
An optional palette used for saving the bitmap.
@returns @true if the operation succeeded, @false otherwise.
@sa wxBitmap::LoadFile, wxBitmap::SaveFile, LoadFile()
@see wxBitmap::LoadFile, wxBitmap::SaveFile, LoadFile()
*/
bool SaveFile(wxBitmap* bitmap, const wxString& name, int type,
wxPalette* palette = @NULL);
wxPalette* palette = NULL);
/**
Sets the handler extension.
@param extension
Handler extension.
Handler extension.
*/
void SetExtension(const wxString& extension);
@@ -141,7 +131,7 @@ public:
Sets the handler name.
@param name
Handler name.
Handler name.
*/
void SetName(const wxString& name);
@@ -149,7 +139,7 @@ public:
Sets the handler type.
@param name
Handler type.
Handler type.
*/
void SetType(long type);
};
@@ -183,92 +173,127 @@ public:
The resulting bitmap will use the provided colour depth (or that of the
current system if depth is -1) which entails that a colour reduction has
to take place.
When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube
created
on program start-up to look up colors. This ensures a very fast conversion, but
the image quality won't be perfect (and could be better for photo images using
more
sophisticated dithering algorithms).
On Windows, if there is a palette present (set with SetPalette), it will be
used when
creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
the palette is currently ignored.
@param bits
Specifies an array of pixel values.
Specifies an array of pixel values.
@param width
Specifies the width of the bitmap.
Specifies the width of the bitmap.
@param height
Specifies the height of the bitmap.
Specifies the height of the bitmap.
@param depth
Specifies the depth of the bitmap. If this is omitted, the display depth of the
screen is used.
Specifies the depth of the bitmap. If this is omitted, the display depth of
the
screen is used.
@param name
This can refer to a resource name under MS Windows, or a filename under MS
This can refer to a resource name under MS Windows, or a filename under MS
Windows and X.
Its meaning is determined by the type parameter.
Its meaning is determined by the type parameter.
@param type
May be one of the following:
May be one of the following:
wxBITMAP_TYPE_BMP
Load a Windows bitmap file.
wxBITMAP_TYPE_BMP_RESOURCE
Load a Windows bitmap resource from the executable. Windows only.
wxBITMAP_TYPE_PICT_RESOURCE
wxBITMAP_TYPE_BMP
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file.
wxBITMAP_TYPE_XBM
Load a Windows bitmap file.
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets configuration.
If all possible wxWidgets settings are used, the Windows platform supports BMP
file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data,
XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
wxBITMAP_TYPE_BMP_RESOURCE
In addition, wxBitmap can read all formats that wxImage can, which currently
include
wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_TIF, wxBITMAP_TYPE_PNG, wxBITMAP_TYPE_GIF,
wxBITMAP_TYPE_PCX,
and wxBITMAP_TYPE_PNM. Of course, you must have wxImage handlers loaded.
Load a Windows bitmap resource from the executable. Windows only.
wxBITMAP_TYPE_PICT_RESOURCE
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file.
wxBITMAP_TYPE_XBM
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets
configuration.
If all possible wxWidgets settings are used, the Windows platform supports
BMP file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM
data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM
file.
In addition, wxBitmap can read all formats that wxImage can, which
currently include
wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_TIF, wxBITMAP_TYPE_PNG,
wxBITMAP_TYPE_GIF, wxBITMAP_TYPE_PCX,
and wxBITMAP_TYPE_PNM. Of course, you must have wxImage handlers loaded.
@param img
Platform-independent wxImage object.
Platform-independent wxImage object.
@remarks The first form constructs a bitmap object with no data; an
assignment or another member function such as Create
or LoadFile must be called subsequently.
assignment or another member function such as Create or
LoadFile must be called subsequently.
@sa LoadFile()
@see LoadFile()
*/
wxBitmap();
wxBitmap(const wxBitmap& bitmap);
@@ -286,10 +311,8 @@ public:
Destructor.
See @ref overview_refcountdestruct "reference-counted object destruction" for
more info.
If the application omits to delete the bitmap explicitly, the bitmap will be
destroyed automatically by wxWidgets when the application exits.
Do not delete a bitmap that is selected into a memory device context.
*/
~wxBitmap();
@@ -298,16 +321,15 @@ public:
Adds a handler to the end of the static list of format handlers.
@param handler
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
@sa wxBitmapHandler
@see wxBitmapHandler
*/
static void AddHandler(wxBitmapHandler* handler);
/**
Deletes all bitmap handlers.
This function is called by wxWidgets on exit.
*/
static void CleanUpHandlers();
@@ -329,27 +351,23 @@ public:
Creates a bitmap from the given data, which can be of arbitrary type.
@param width
The width of the bitmap in pixels.
The width of the bitmap in pixels.
@param height
The height of the bitmap in pixels.
The height of the bitmap in pixels.
@param depth
The depth of the bitmap in pixels. If this is -1, the screen depth is used.
The depth of the bitmap in pixels. If this is -1, the screen depth is used.
@param data
Data whose type depends on the value of type.
Data whose type depends on the value of type.
@param type
A bitmap type identifier - see wxBitmap() for a list
of possible values.
A bitmap type identifier - see wxBitmap() for a list
of possible values.
@returns @true if the call succeeded, @false otherwise.
@remarks The first form works on all platforms. The portability of the
second form depends on the type of data.
second form depends on the type of data.
@sa wxBitmap()
@see wxBitmap()
*/
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(const void* data, int type, int width,
@@ -362,17 +380,15 @@ public:
Finds the handler associated with the given bitmap type.
@param name
The handler name.
The handler name.
@param extension
The file extension, such as "bmp".
The file extension, such as "bmp".
@param bitmapType
The bitmap type, such as wxBITMAP_TYPE_BMP.
The bitmap type, such as wxBITMAP_TYPE_BMP.
@returns A pointer to the handler if found, @NULL otherwise.
@sa wxBitmapHandler
@see wxBitmapHandler
*/
static wxBitmapHandler* FindHandler(const wxString& name);
static wxBitmapHandler* FindHandler(const wxString& extension,
@@ -389,7 +405,7 @@ public:
/**
Returns the static list of bitmap format handlers.
@sa wxBitmapHandler
@see wxBitmapHandler
*/
static wxList GetHandlers();
@@ -402,7 +418,7 @@ public:
Gets the associated mask (if any) which may have been loaded from a file
or set for the bitmap.
@sa SetMask(), wxMask
@see SetMask(), wxMask
*/
wxMask* GetMask();
@@ -410,7 +426,7 @@ public:
Gets the associated palette (if any) which may have been loaded from a file
or set for the bitmap.
@sa wxPalette
@see wxPalette
*/
wxPalette* GetPalette();
@@ -423,7 +439,7 @@ public:
/**
Gets the width of the bitmap in pixels.
@sa GetHeight()
@see GetHeight()
*/
int GetWidth();
@@ -431,10 +447,9 @@ public:
Adds the standard bitmap format handlers, which, depending on wxWidgets
configuration, can be handlers for Windows bitmap, Windows bitmap resource, and
XPM.
This function is called by wxWidgets on startup.
@sa wxBitmapHandler
@see wxBitmapHandler
*/
static void InitStandardHandlers();
@@ -442,74 +457,114 @@ public:
Adds a handler at the start of the static list of format handlers.
@param handler
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
@sa wxBitmapHandler
@see wxBitmapHandler
*/
static void InsertHandler(wxBitmapHandler* handler);
/**
Returns @true if bitmap data is present.
*/
#define bool IsOk() /* implementation is private */
bool IsOk();
/**
Loads a bitmap from a file or resource.
@param name
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
@param type
One of the following values:
One of the following values:
wxBITMAP_TYPE_BMP
Load a Windows bitmap file.
wxBITMAP_TYPE_BMP_RESOURCE
Load a Windows bitmap resource from the executable.
wxBITMAP_TYPE_PICT_RESOURCE
wxBITMAP_TYPE_BMP
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file.
wxBITMAP_TYPE_XBM
Load a Windows bitmap file.
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets configuration.
wxBITMAP_TYPE_BMP_RESOURCE
In addition, wxBitmap can read all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG, wxBITMAP_TYPE_GIF, wxBITMAP_TYPE_PCX,
wxBITMAP_TYPE_PNM).
(Of course you must have wxImage handlers loaded.)
Load a Windows bitmap resource from the executable.
wxBITMAP_TYPE_PICT_RESOURCE
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file.
wxBITMAP_TYPE_XBM
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets
configuration.
In addition, wxBitmap can read all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG, wxBITMAP_TYPE_GIF,
wxBITMAP_TYPE_PCX, wxBITMAP_TYPE_PNM).
(Of course you must have wxImage handlers loaded.)
@returns @true if the operation succeeded, @false otherwise.
@remarks A palette may be associated with the bitmap if one exists
(especially for colour Windows bitmaps), and if the
code supports it. You can check if one has been
created by using the GetPalette member.
(especially for colour Windows bitmaps), and if the
code supports it. You can check if one has been created
by using the GetPalette member.
@sa SaveFile()
@see SaveFile()
*/
bool LoadFile(const wxString& name, wxBitmapType type);
@@ -518,11 +573,11 @@ public:
is not deleted.
@param name
The handler name.
The handler name.
@returns @true if the handler was found and removed, @false otherwise.
@sa wxBitmapHandler
@see wxBitmapHandler
*/
static bool RemoveHandler(const wxString& name);
@@ -530,56 +585,83 @@ public:
Saves a bitmap in the named file.
@param name
A filename. The meaning of name is determined by the type parameter.
A filename. The meaning of name is determined by the type parameter.
@param type
One of the following values:
One of the following values:
wxBITMAP_TYPE_BMP
Save a Windows bitmap file.
wxBITMAP_TYPE_GIF
Save a GIF bitmap file.
wxBITMAP_TYPE_XBM
wxBITMAP_TYPE_BMP
Save an X bitmap file.
wxBITMAP_TYPE_XPM
Save an XPM bitmap file.
Save a Windows bitmap file.
The validity of these flags depends on the platform and wxWidgets configuration.
In addition, wxBitmap can save all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG).
(Of course you must have wxImage handlers loaded.)
wxBITMAP_TYPE_GIF
Save a GIF bitmap file.
wxBITMAP_TYPE_XBM
Save an X bitmap file.
wxBITMAP_TYPE_XPM
Save an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets
configuration.
In addition, wxBitmap can save all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG).
(Of course you must have wxImage handlers loaded.)
@param palette
An optional palette used for saving the bitmap.
An optional palette used for saving the bitmap.
@returns @true if the operation succeeded, @false otherwise.
@remarks Depending on how wxWidgets has been configured, not all formats
may be available.
may be available.
@sa LoadFile()
@see LoadFile()
*/
bool SaveFile(const wxString& name, wxBitmapType type,
wxPalette* palette = @NULL);
wxPalette* palette = NULL);
/**
Sets the depth member (does not affect the bitmap data).
@param depth
Bitmap depth.
Bitmap depth.
*/
void SetDepth(int depth);
@@ -587,7 +669,7 @@ public:
Sets the height member (does not affect the bitmap data).
@param height
Bitmap height in pixels.
Bitmap height in pixels.
*/
void SetHeight(int height);
@@ -596,7 +678,7 @@ public:
@remarks The bitmap object owns the mask once this has been called.
@sa GetMask(), wxMask
@see GetMask(), wxMask
*/
void SetMask(wxMask* mask);
@@ -604,9 +686,9 @@ public:
Sets the associated palette. (Not implemented under GTK+).
@param palette
The palette to set.
The palette to set.
@sa wxPalette
@see wxPalette
*/
void SetPalette(const wxPalette& palette);
@@ -614,7 +696,7 @@ public:
Sets the width member (does not affect the bitmap data).
@param width
Bitmap width in pixels.
Bitmap width in pixels.
*/
void SetWidth(int width);
@@ -622,7 +704,7 @@ public:
Assignment operator, using @ref overview_trefcount "reference counting".
@param bitmap
Bitmap to assign.
Bitmap to assign.
*/
wxBitmap operator =(const wxBitmap& bitmap);
};
@@ -655,13 +737,11 @@ public:
yet implemented for GTK.
@param bitmap
A valid bitmap.
A valid bitmap.
@param colour
A colour specifying the transparency RGB values.
A colour specifying the transparency RGB values.
@param index
Index into a palette, specifying the transparency colour.
Index into a palette, specifying the transparency colour.
*/
wxMask();
wxMask(const wxBitmap& bitmap);
@@ -682,13 +762,11 @@ public:
yet implemented for GTK.
@param bitmap
A valid bitmap.
A valid bitmap.
@param colour
A colour specifying the transparency RGB values.
A colour specifying the transparency RGB values.
@param index
Index into a palette, specifying the transparency colour.
Index into a palette, specifying the transparency colour.
*/
bool Create(const wxBitmap& bitmap);
bool Create(const wxBitmap& bitmap, const wxColour& colour);