final revision of prototypes for b*h (and few others)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
It is used within wxBitmap and is not normally seen by the application.
|
It is used within wxBitmap and is not normally seen by the application.
|
||||||
|
|
||||||
If you wish to extend the capabilities of wxBitmap, derive a class from
|
If you wish to extend the capabilities of wxBitmap, derive a class from
|
||||||
wxBitmapHandler and add the handler using wxBitmap::AddHandler in your
|
wxBitmapHandler and add the handler using wxBitmap::AddHandler() in your
|
||||||
application initialisation.
|
application initialisation.
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
@returns @true if the call succeeded, @false otherwise (the default).
|
@returns @true if the call succeeded, @false otherwise (the default).
|
||||||
*/
|
*/
|
||||||
virtual bool Create(wxBitmap* bitmap, const void* data, wxBitmapType type,
|
virtual bool Create(wxBitmap* bitmap, const void* data, wxBitmapType type,
|
||||||
int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
|
int width, int height, int depth = 1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets the file extension associated with this handler.
|
Gets the file extension associated with this handler.
|
||||||
@@ -100,7 +100,8 @@ public:
|
|||||||
|
|
||||||
@see wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile()
|
@see wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile()
|
||||||
*/
|
*/
|
||||||
virtual bool LoadFile(wxBitmap* bitmap, const wxString& name, wxBitmapType type);
|
virtual bool LoadFile(wxBitmap* bitmap, const wxString& name, wxBitmapType type,
|
||||||
|
int desiredWidth, int desiredHeight);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Saves a bitmap in the named file.
|
Saves a bitmap in the named file.
|
||||||
@@ -118,8 +119,8 @@ public:
|
|||||||
|
|
||||||
@see wxBitmap::LoadFile, wxBitmap::SaveFile, LoadFile()
|
@see wxBitmap::LoadFile, wxBitmap::SaveFile, LoadFile()
|
||||||
*/
|
*/
|
||||||
bool SaveFile(wxBitmap* bitmap, const wxString& name, wxBitmapType type,
|
virtual bool SaveFile(const wxBitmap* bitmap, const wxString& name, wxBitmapType type,
|
||||||
wxPalette* palette = NULL);
|
wxPalette* palette = NULL) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the handler extension.
|
Sets the handler extension.
|
||||||
@@ -218,7 +219,7 @@ public:
|
|||||||
wxBitmap(const void* data, int type, int width, int height, int depth = -1);
|
wxBitmap(const void* data, int type, int width, int height, int depth = -1);
|
||||||
|
|
||||||
|
|
||||||
NOTE: this ctor is not implemented by all port, is somewhat useless
|
NOTE: this ctor is not implemented by all ports, is somewhat useless
|
||||||
without further description of the "data" supported formats and
|
without further description of the "data" supported formats and
|
||||||
uses 'int type' instead of wxBitmapType, so don't document it.
|
uses 'int type' instead of wxBitmapType, so don't document it.
|
||||||
*/
|
*/
|
||||||
@@ -249,6 +250,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Creates a new bitmap. A depth of ::wxBITMAP_SCREEN_DEPTH indicates the
|
Creates a new bitmap. A depth of ::wxBITMAP_SCREEN_DEPTH indicates the
|
||||||
depth of the current screen or visual.
|
depth of the current screen or visual.
|
||||||
|
|
||||||
Some platforms only support 1 for monochrome and ::wxBITMAP_SCREEN_DEPTH for
|
Some platforms only support 1 for monochrome and ::wxBITMAP_SCREEN_DEPTH for
|
||||||
the current colour setting.
|
the current colour setting.
|
||||||
|
|
||||||
@@ -335,12 +337,12 @@ public:
|
|||||||
mask information so that bitmaps and images can be converted back
|
mask information so that bitmaps and images can be converted back
|
||||||
and forth without loss in that respect.
|
and forth without loss in that respect.
|
||||||
*/
|
*/
|
||||||
wxImage ConvertToImage();
|
virtual wxImage ConvertToImage() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Creates the bitmap from an icon.
|
Creates the bitmap from an icon.
|
||||||
*/
|
*/
|
||||||
bool CopyFromIcon(const wxIcon& icon);
|
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Creates a fresh bitmap.
|
Creates a fresh bitmap.
|
||||||
@@ -348,7 +350,7 @@ public:
|
|||||||
|
|
||||||
This overload works on all platforms.
|
This overload works on all platforms.
|
||||||
*/
|
*/
|
||||||
bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
|
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Creates a bitmap from the given data, which can be of arbitrary type.
|
Creates a bitmap from the given data, which can be of arbitrary type.
|
||||||
@@ -412,7 +414,7 @@ public:
|
|||||||
Gets the colour depth of the bitmap.
|
Gets the colour depth of the bitmap.
|
||||||
A value of 1 indicates a monochrome bitmap.
|
A value of 1 indicates a monochrome bitmap.
|
||||||
*/
|
*/
|
||||||
int GetDepth() const;
|
virtual int GetDepth() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the static list of bitmap format handlers.
|
Returns the static list of bitmap format handlers.
|
||||||
@@ -424,7 +426,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Gets the height of the bitmap in pixels.
|
Gets the height of the bitmap in pixels.
|
||||||
*/
|
*/
|
||||||
int GetHeight() const;
|
virtual int GetHeight() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets the associated mask (if any) which may have been loaded from a file
|
Gets the associated mask (if any) which may have been loaded from a file
|
||||||
@@ -432,7 +434,7 @@ public:
|
|||||||
|
|
||||||
@see SetMask(), wxMask
|
@see SetMask(), wxMask
|
||||||
*/
|
*/
|
||||||
wxMask* GetMask() const;
|
virtual wxMask* GetMask() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets the associated palette (if any) which may have been loaded from a file
|
Gets the associated palette (if any) which may have been loaded from a file
|
||||||
@@ -440,20 +442,20 @@ public:
|
|||||||
|
|
||||||
@see wxPalette
|
@see wxPalette
|
||||||
*/
|
*/
|
||||||
wxPalette* GetPalette() const;
|
virtual wxPalette* GetPalette() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a sub bitmap of the current one as long as the rect belongs entirely to
|
Returns a sub bitmap of the current one as long as the rect belongs entirely to
|
||||||
the bitmap. This function preserves bit depth and mask information.
|
the bitmap. This function preserves bit depth and mask information.
|
||||||
*/
|
*/
|
||||||
wxBitmap GetSubBitmap(const wxRect& rect) const;
|
virtual wxBitmap GetSubBitmap(const wxRect& rect) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets the width of the bitmap in pixels.
|
Gets the width of the bitmap in pixels.
|
||||||
|
|
||||||
@see GetHeight()
|
@see GetHeight()
|
||||||
*/
|
*/
|
||||||
int GetWidth() const;
|
virtual int GetWidth() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds the standard bitmap format handlers, which, depending on wxWidgets
|
Adds the standard bitmap format handlers, which, depending on wxWidgets
|
||||||
@@ -501,7 +503,7 @@ public:
|
|||||||
|
|
||||||
@see SaveFile()
|
@see SaveFile()
|
||||||
*/
|
*/
|
||||||
bool LoadFile(const wxString& name, wxBitmapType type);
|
virtual bool LoadFile(const wxString& name, wxBitmapType type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Finds the handler with the given name, and removes it.
|
Finds the handler with the given name, and removes it.
|
||||||
@@ -534,8 +536,8 @@ public:
|
|||||||
|
|
||||||
@see LoadFile()
|
@see LoadFile()
|
||||||
*/
|
*/
|
||||||
bool SaveFile(const wxString& name, wxBitmapType type,
|
virtual bool SaveFile(const wxString& name, wxBitmapType type,
|
||||||
const wxPalette* palette = NULL);
|
const wxPalette* palette = NULL) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the depth member (does not affect the bitmap data).
|
Sets the depth member (does not affect the bitmap data).
|
||||||
@@ -546,7 +548,7 @@ public:
|
|||||||
@param depth
|
@param depth
|
||||||
Bitmap depth.
|
Bitmap depth.
|
||||||
*/
|
*/
|
||||||
void SetDepth(int depth);
|
virtual void SetDepth(int depth);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the height member (does not affect the bitmap data).
|
Sets the height member (does not affect the bitmap data).
|
||||||
@@ -554,7 +556,7 @@ public:
|
|||||||
@param height
|
@param height
|
||||||
Bitmap height in pixels.
|
Bitmap height in pixels.
|
||||||
*/
|
*/
|
||||||
void SetHeight(int height);
|
virtual void SetHeight(int height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the mask for this bitmap.
|
Sets the mask for this bitmap.
|
||||||
@@ -563,7 +565,7 @@ public:
|
|||||||
|
|
||||||
@see GetMask(), wxMask
|
@see GetMask(), wxMask
|
||||||
*/
|
*/
|
||||||
void SetMask(wxMask* mask);
|
virtual void SetMask(wxMask* mask);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the associated palette. (Not implemented under GTK+).
|
Sets the associated palette. (Not implemented under GTK+).
|
||||||
@@ -573,7 +575,7 @@ public:
|
|||||||
|
|
||||||
@see wxPalette
|
@see wxPalette
|
||||||
*/
|
*/
|
||||||
void SetPalette(const wxPalette& palette);
|
virtual void SetPalette(const wxPalette& palette);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the width member (does not affect the bitmap data).
|
Sets the width member (does not affect the bitmap data).
|
||||||
@@ -581,15 +583,7 @@ public:
|
|||||||
@param width
|
@param width
|
||||||
Bitmap width in pixels.
|
Bitmap width in pixels.
|
||||||
*/
|
*/
|
||||||
void SetWidth(int width);
|
virtual void SetWidth(int width);
|
||||||
|
|
||||||
/**
|
|
||||||
Assignment operator, using @ref overview_refcount "reference counting".
|
|
||||||
|
|
||||||
@param bitmap
|
|
||||||
Bitmap to assign.
|
|
||||||
*/
|
|
||||||
wxBitmap operator =(const wxBitmap& bitmap);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -180,7 +180,7 @@ public:
|
|||||||
|
|
||||||
@see SetBitmapSelected()
|
@see SetBitmapSelected()
|
||||||
*/
|
*/
|
||||||
wxBitmap& GetBitmapSelected() const;
|
const wxBitmap& GetBitmapSelected() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the bitmap for the disabled button appearance.
|
Sets the bitmap for the disabled button appearance.
|
||||||
|
@@ -157,12 +157,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
Returns size of bitmaps used in the list.
|
Returns size of bitmaps used in the list.
|
||||||
*/
|
*/
|
||||||
wxSize GetBitmapSize() const;
|
virtual wxSize GetBitmapSize() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the bitmap of the item with the given index.
|
Returns the bitmap of the item with the given index.
|
||||||
*/
|
*/
|
||||||
wxBitmap GetItemBitmap(unsigned int n) const;
|
virtual wxBitmap GetItemBitmap(unsigned int n) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Inserts the item into the list before @a pos.
|
Inserts the item into the list before @a pos.
|
||||||
@@ -189,6 +189,6 @@ public:
|
|||||||
/**
|
/**
|
||||||
Sets the bitmap for the given item.
|
Sets the bitmap for the given item.
|
||||||
*/
|
*/
|
||||||
void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
|
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
enum wxBrushStyle
|
enum wxBrushStyle
|
||||||
{
|
{
|
||||||
|
wxBRUSHSTYLE_INVALID = -1,
|
||||||
|
|
||||||
wxBRUSHSTYLE_SOLID = wxSOLID,
|
wxBRUSHSTYLE_SOLID = wxSOLID,
|
||||||
/**< Solid. */
|
/**< Solid. */
|
||||||
|
|
||||||
@@ -46,7 +48,6 @@ enum wxBrushStyle
|
|||||||
|
|
||||||
wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH,
|
wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH,
|
||||||
wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH,
|
wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH,
|
||||||
wxBRUSHSTYLE_MAX
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -105,19 +106,7 @@ public:
|
|||||||
@param style
|
@param style
|
||||||
One of the ::wxBrushStyle enumeration values.
|
One of the ::wxBrushStyle enumeration values.
|
||||||
*/
|
*/
|
||||||
wxBrush(const wxColour& colour, wxBrushStyle style = wxSOLID);
|
wxBrush(const wxColour& colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
|
|
||||||
/**
|
|
||||||
Constructs a brush from a colour name and @a style.
|
|
||||||
|
|
||||||
@param colourName
|
|
||||||
Colour name. The name will be looked up in the colour database.
|
|
||||||
@param style
|
|
||||||
One of the ::wxBrushStyle enumeration values.
|
|
||||||
|
|
||||||
@see wxColourDatabase
|
|
||||||
*/
|
|
||||||
wxBrush(const wxString& colourName, wxBrushStyle style);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructs a stippled brush using a bitmap.
|
Constructs a stippled brush using a bitmap.
|
||||||
@@ -163,7 +152,7 @@ public:
|
|||||||
|
|
||||||
@see SetStyle(), SetColour(), SetStipple()
|
@see SetStyle(), SetColour(), SetStipple()
|
||||||
*/
|
*/
|
||||||
wxBrushStyle GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns @true if the style of the brush is any of hatched fills.
|
Returns @true if the style of the brush is any of hatched fills.
|
||||||
@@ -187,8 +176,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetColour(wxColour& colour);
|
void SetColour(wxColour& colour);
|
||||||
void SetColour(const wxString& colourName);
|
void SetColour(const wxString& colourName);
|
||||||
void SetColour(unsigned char red, unsigned char green,
|
void SetColour(unsigned char red, unsigned char green, unsigned char blue);
|
||||||
unsigned char blue);
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -219,18 +207,13 @@ public:
|
|||||||
Inequality operator.
|
Inequality operator.
|
||||||
See @ref overview_refcount_equality for more info.
|
See @ref overview_refcount_equality for more info.
|
||||||
*/
|
*/
|
||||||
bool operator !=(const wxBrush& brush);
|
bool operator !=(const wxBrush& brush) const;
|
||||||
|
|
||||||
/**
|
|
||||||
Assignment operator, using @ref overview_refcount "reference counting".
|
|
||||||
*/
|
|
||||||
wxBrush operator =(const wxBrush& brush);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Equality operator.
|
Equality operator.
|
||||||
See @ref overview_refcount_equality for more info.
|
See @ref overview_refcount_equality for more info.
|
||||||
*/
|
*/
|
||||||
bool operator ==(const wxBrush& brush);
|
bool operator ==(const wxBrush& brush) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -296,6 +279,9 @@ wxBrush* wxRED_BRUSH;
|
|||||||
|
|
||||||
A brush list is a list containing all brushes which have been created.
|
A brush list is a list containing all brushes which have been created.
|
||||||
|
|
||||||
|
The application should not construct its own brush list: it should use the
|
||||||
|
object pointer ::wxTheBrushList.
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{gdi}
|
@category{gdi}
|
||||||
|
|
||||||
@@ -304,12 +290,6 @@ wxBrush* wxRED_BRUSH;
|
|||||||
class wxBrushList : public wxList
|
class wxBrushList : public wxList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
Constructor. The application should not construct its own brush list:
|
|
||||||
use the object pointer ::wxTheBrushList.
|
|
||||||
*/
|
|
||||||
wxBrushList();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Finds a brush with the specified attributes and returns it, else creates a new
|
Finds a brush with the specified attributes and returns it, else creates a new
|
||||||
brush, adds it to the brush list, and returns it.
|
brush, adds it to the brush list, and returns it.
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
enum wxPenStyle
|
enum wxPenStyle
|
||||||
{
|
{
|
||||||
|
wxPENSTYLE_INVALID = -1,
|
||||||
|
|
||||||
wxPENSTYLE_SOLID,
|
wxPENSTYLE_SOLID,
|
||||||
/**< Solid style. */
|
/**< Solid style. */
|
||||||
|
|
||||||
@@ -60,8 +62,7 @@ enum wxPenStyle
|
|||||||
/**< Vertical hatch. */
|
/**< Vertical hatch. */
|
||||||
|
|
||||||
wxPENSTYLE_FIRST_HATCH = wxPENSTYLE_BDIAGONAL_HATCH,
|
wxPENSTYLE_FIRST_HATCH = wxPENSTYLE_BDIAGONAL_HATCH,
|
||||||
wxPENSTYLE_LAST_HATCH = wxPENSTYLE_VERTICAL_HATCH,
|
wxPENSTYLE_LAST_HATCH = wxPENSTYLE_VERTICAL_HATCH
|
||||||
wxPENSTYLE_MAX
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,12 +146,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Constructs a pen from a colour object, pen width and style.
|
Constructs a pen from a colour object, pen width and style.
|
||||||
*/
|
*/
|
||||||
wxPen(const wxColour& colour, int width = 1, wxPenStyle style = wxSOLID);
|
wxPen(const wxColour& colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
|
||||||
|
|
||||||
/**
|
|
||||||
Constructs a pen from a colour name, pen width and style.
|
|
||||||
*/
|
|
||||||
wxPen(const wxString& colourName, int width, wxPenStyle style);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructs a stippled pen from a stipple bitmap and a width.
|
Constructs a stippled pen from a stipple bitmap and a width.
|
||||||
|
Reference in New Issue
Block a user