Fix and improve wxDC background mode documentation

Use wxBRUSHSTYLE_SOLID/TRANSPARENT constants instead of wxPENSTYLE_XXX
ones, as even though they have the same values, using brush style for
the background makes more sense.

Also document that the default background mode is transparent.
This commit is contained in:
Vadim Zeitlin
2020-08-13 23:08:58 +02:00
parent d3cab1bd54
commit e96155fece

View File

@@ -997,7 +997,7 @@ public:
//@{ //@{
/** /**
Returns the current background mode: @c wxPENSTYLE_SOLID or @c wxPENSTYLE_TRANSPARENT. Returns the current background mode: @c wxBRUSHSTYLE_SOLID or @c wxBRUSHSTYLE_TRANSPARENT.
@see SetBackgroundMode() @see SetBackgroundMode()
*/ */
@@ -1037,10 +1037,15 @@ public:
const wxColour& GetTextForeground() const; const wxColour& GetTextForeground() const;
/** /**
@a mode may be one of @c wxPENSTYLE_SOLID and @c wxPENSTYLE_TRANSPARENT. Change the current background mode.
This setting determines whether text will be drawn with a background This setting determines whether text will be drawn with a background
colour or not. colour or not.
Default is @c wxBRUSHSTYLE_TRANSPARENT, i.e. text background is not
drawn.
@param mode one of @c wxBRUSHSTYLE_SOLID and @c wxBRUSHSTYLE_TRANSPARENT.
*/ */
void SetBackgroundMode(int mode); void SetBackgroundMode(int mode);
@@ -1980,7 +1985,8 @@ public:
@param dc @param dc
The DC where the mode must be temporary set. The DC where the mode must be temporary set.
@param mode @param mode
The background mode to set. The background mode to set, one of @c wxBRUSHSTYLE_SOLID or @c
wxBRUSHSTYLE_TRANSPARENT.
*/ */
wxDCBgModeChanger(wxDC& dc, int mode); wxDCBgModeChanger(wxDC& dc, int mode);