]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 871014 ] Adding size of control to its position
authorJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 15:05:38 +0000 (15:05 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 15:05:38 +0000 (15:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/gdicmn.h

index 9fbd7a7f3cf8cc1a1e61d536d3ef096fc6de14a3..4e88793b0b9f71e351ac0acb674314ee15c59615 100644 (file)
@@ -87,6 +87,8 @@ All:
 - Added some extra convenience functions to wxRect such as
   GetBottomRight (Hajo Kirchhoff)
 - Changed built-in regex library to a unicode-compatible one (Ryan Norton)
+- Added extra convenience functions to wxPoint for adding a
+  wxSize (Wlodzimierz Skiba)
 
 All (GUI):
 
@@ -119,6 +121,9 @@ wxMSW:
 - fixed enumerating of entries/groups under '/' in wxRegConfig
 - added wxSYS_ICONTITLE_FONT (Andreas Pflug)
 - added wxPATH_NORM_SHORTCUT to wxFileName
+- wxComboBox::GetValue within a wxEVT_COMMAND_TEXT_UPDATED event
+  should now pass the correct value even if the handler for
+  wxEVT_COMMAND_COMBOBOX_SELECTED changed the selection
 
 wxGTK:
 
index 9f81bff7d47ffe633cf68722e183e0f57c7e2e5d..7be6d7bcb4b2ef6ac38fdc676d10876252b512ae 100644 (file)
@@ -273,6 +273,12 @@ public:
 
     wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
     wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
+
+    wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
+    wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
+
+    wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
+    wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }
 };
 
 // ---------------------------------------------------------------------------