When scrolling down, make the item being scrolled into view completely visible
instead of just showing its top part.
The fix was already used for wxOSX but not for the other ports for some
reason, do use it everywhere as this code is generic and behaves in the same
way in all ports.
Also fix the wrong comments about scrolling direction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes the behaviour of different menu commands working with the "last
item" consistent as some of them used the last root child while others used
the really last item (i.e. the last child of the last child).
This should have been part of r75987.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use pixel size which is scaled correctly by GDI+ itself instead of the size in
points which is currently not scaled correctly by wx.
Closes#3566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just add a helper to allow replacing the HBITMAP stored in
wxBitmapRefData without changing anything else, this is going to be used in
another place soon.
See #12762.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace wxASSERT_MSG()s with wxCHECK_MSG()s to ensure that we don't crash even
if we are passed a NULL pointer, saying "Warning: Null pointer is about to be
used" and crashing just isn't very useful in the grand scheme of things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The singleton dtor shouldn't delete the global singleton object, if this were
ever really possible, it would result in an infinite recursion. And even
though it was not (because ms_instance was reset to NULL before destroying the
object pointed by it), this delete was still confusing and unnecessary, so
remove it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code was buggy (e.g. it didn't update the last item correctly after
executing "Append many items" menu command) and seems to be unnecessary.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't override HAVE_TR1_TYPE_TRAITS detected by configure with
HAVE_TYPE_TRAITS detected by clang __has_include() as the latter is less
reliable and can return true even when the header is not actually usable, as
it happens with g++ 4.8 <type_traits> in non C++11 mode.
Closes#15915.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.
And also allow to define custom handlers to make the behaviour even more
flexible.
Closes#15968.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Loss of precision when converting floating point numbers to text and back
could result in several problems, notably comparing a valid value with the
minimum could fail after a round trip through wxSpinCtrl.
Fix this by using a specialization of NumericValidation() handling floating
point values specially and correctly.
Closes#15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.
See #15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document the somewhat counter intuitive (but difficult to change) behaviour of
the splitter when both sash position and gravity are set.
See #15996.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Memory allocated by wxFindFirstFile() was only freed when no more files could
be found by wxFindNextFile(), resulting in a memory leak if the iteration was
never finished.
Closes#4631.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxPGProperty::GetItemAtY() uses its input/output "nextItem" parameter, so it
must be initialized before calling it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace wxASSERT() with wxCHECK_MSG() to ensure that we don't read beyond the
end of the array even if we are given an invalid index.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Delete the pointer before returning from the function if we don't pass its
ownership to CGDataProviderCreateWithData().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxScopedPtr to make memory management simpler and to ensure that all
pointers allocated in this function are deleted: this wasn't the case when we
returned false earlier due to the MO file being invalid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code was written to use the default resolution if getting it from the
printer failed but only handled failure of PMPrinterGetOutputResolution() and
not of PMSessionGetCurrentPrinter() itself.
Use default resolution if obtaining it failed for any reason (alternative
could be to return error if obtaining it failed for any return...).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775