correct SetFont() documentation: at least wxMSW and wxGTK do allow the user to pass wxNullFont (or another invalid font instance) (see #10475)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-04-27 18:44:42 +00:00
parent 5e1d513ea3
commit ac55e6b01e

View File

@@ -751,10 +751,11 @@ public:
int GetBackgroundMode() const; int GetBackgroundMode() const;
/** /**
Gets the current font. Notice that even although each device context Gets the current font.
object has some default font after creation, this method would return a
::wxNullFont initially and only after calling SetFont() a valid font is Notice that even although each device context object has some default font
returned. after creation, this method would return a ::wxNullFont initially and only
after calling SetFont() a valid font is returned.
*/ */
const wxFont& GetFont() const; const wxFont& GetFont() const;
@@ -783,14 +784,19 @@ public:
const wxColour& GetTextForeground() const; const wxColour& GetTextForeground() const;
/** /**
@a mode may be one of wxSOLID and wxTRANSPARENT. This setting @a mode may be one of @c wxSOLID and @c wxTRANSPARENT.
determines whether text will be drawn with a background colour or not.
This setting determines whether text will be drawn with a background
colour or not.
*/ */
void SetBackgroundMode(int mode); void SetBackgroundMode(int mode);
/** /**
Sets the current font for the DC. It must be a valid font, in Sets the current font for the DC.
particular you should not pass wxNullFont to this method.
If the argument is ::wxNullFont (or another invalid font; see wxFont::IsOk),
the current font is selected out of the device context (leaving wxDC without
any valid font), allowing the current font to be destroyed safely.
@see wxFont @see wxFont
*/ */
@@ -810,9 +816,11 @@ public:
void SetTextForeground(const wxColour& colour); void SetTextForeground(const wxColour& colour);
/** /**
Sets the current layout direction for the device context. @a dir may be Sets the current layout direction for the device context.
either @c wxLayout_Default, @c wxLayout_LeftToRight or
@c wxLayout_RightToLeft. @param dir
May be either @c wxLayout_Default, @c wxLayout_LeftToRight or
@c wxLayout_RightToLeft.
@see GetLayoutDirection() @see GetLayoutDirection()
*/ */
@@ -1083,9 +1091,9 @@ public:
/** /**
Sets the current brush for the DC. Sets the current brush for the DC.
If the argument is wxNullBrush, the current brush is selected out of If the argument is ::wxNullBrush (or another invalid brush; see wxBrush::IsOk),
the device context (leaving wxDC without any valid brush), allowing the the current brush is selected out of the device context (leaving wxDC without
current brush to be destroyed safely. any valid brush), allowing the current brush to be destroyed safely.
@see wxBrush, wxMemoryDC (for the interpretation of colours when @see wxBrush, wxMemoryDC (for the interpretation of colours when
drawing into a monochrome bitmap) drawing into a monochrome bitmap)
@@ -1093,9 +1101,11 @@ public:
void SetBrush(const wxBrush& brush); void SetBrush(const wxBrush& brush);
/** /**
Sets the current pen for the DC. If the argument is wxNullPen, the Sets the current pen for the DC.
current pen is selected out of the device context (leaving wxDC without
any valid pen), allowing the current brush to be destroyed safely. If the argument is ::wxNullPen (or another invalid pen; see wxPen::IsOk),
the current pen is selected out of the device context (leaving wxDC without any
valid pen), allowing the current pen to be destroyed safely.
@see wxMemoryDC for the interpretation of colours when drawing into a @see wxMemoryDC for the interpretation of colours when drawing into a
monochrome bitmap. monochrome bitmap.