From de03c7fec1d27e607136fa0b8c4680799079c3a9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 20 Sep 2012 15:46:40 +0000 Subject: [PATCH] Better documentation for wxRect::Set{Left,Top}(). These functions also change the rectangle right/bottom position, unlike Set{Right,Bottom}() that change its width/height respectively. This is not very logical but impossible to change for compatibility reasons, so at least document it clearly. Closes #14678. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/gdicmn.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/interface/wx/gdicmn.h b/interface/wx/gdicmn.h index 80b93b3be7..52a0fffe84 100644 --- a/interface/wx/gdicmn.h +++ b/interface/wx/gdicmn.h @@ -447,21 +447,35 @@ public: /** Set the left side of the rectangle. + + Notice that because the rectangle stores its left side and width, + calling SetLeft() changes the right side position too -- but does + preserve the width. */ void SetLeft(int left); /** Set the right side of the rectangle. + + Notice that this doesn't affect GetLeft() return value but changes the + rectangle width to set its right side to the given position. */ void SetRight(int right); /** Set the top edge of the rectangle. + + Notice that because the rectangle stores its top side and height, + calling SetTop() changes the bottom side position too -- but does + preserve the height. */ void SetTop(int top); /** - Set the bottome edge of th rectangle. + Set the bottom edge of the rectangle. + + Notice that this doesn't affect GetTop() return value but changes the + rectangle height to set its bottom side to the given position. */ void SetBottom(int bottom); -- 2.45.2