Improve wxPropertyGrid::DoGetBestSize() to correctly determine the window
width by using the sum of columns widths.
Also correct wxPropertyGridPageState::GetColumnFitWidth() to account for the
bitmaps.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxIMAGE_QUALITY_BILINEAR in addition to the existing wxIMAGE_QUALITY_BICUBIC,
it is supposed to be much faster yet yield almost the same results.
Closes#11034.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
DEFAULT_GUI_FONT is a misnomer, not only is it not a default (and never was)
but it shouldn't be used at all. Instead use lfMessageFont from the
NONCLIENTMETRICS structure as it seems to correspond to the font used by
the native controls under 2000, XP and Vista and respects Vista global DPI
setting unlike DEFAULT_GUI_FONT.
Closes#11008.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code in CFSTR_SHELLURLDataObject::GetDataHere() was confused by
ANSI/Unicode and ended up overwriting output buffer because of it. Moreover,
this function was actually completely unnecessary as the base class version
did work correctly.
Closes#11102 (thanks to Tim Kosse).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxTextDataObject::SetData() adds the terminating NUL automatically so there is
no need to add it to the length when calling it from wxURLDataObject::SetURL().
This change is necessary to fix the unit test in the upcoming fix for #11102.
See #11102.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After the changes in r50710 wxString numeric conversion functions didn't
update their output parameter any more if the conversion failed because not
entire string was converted. This was incompatible with the old behaviour
which some existing code did rely on, so restore it and now always return the
number which was extracted from the beginning of the string if we found
anything at all, even if the function returns false.
Add unit test for the correct behaviour and updated the documentation.
Closes#11126.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call GetBestSize() from wxWindowMSW::DoSetSize() so that it works correctly
for the classes which only override DoGetBestClientSize() and not
DoGetBestSize() itself, such as wxStaticText.
Closes#11096.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only deselect the items when the mouse is released if really necessary: add a
flag indicating when it is instead of trying to deduce it in the mouse up
handler.
Closes#11099 (thanks to Jonathan Liu).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In multiple selection mode we process mouse events manually in wxTreeCtrl
itself and already take care of mouse clicks on the buttons there so don't
pass them on to the base class which would generate another event.
Closes#11098 (thanks to Jonathan Liu).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
IMPLEMENT_CLASS(wxProtoInfo) wasn't compiled in in this build configuration
because it was in url.cpp instead of protocol.cpp and so was guarded by
wxUSE_URL and not wxUSE_PROTOCOL as it should have been.
Closes#11151.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No need to check whether the pointer is NULL before deleting it nor to assign
NULL to it if it's going to be immediately reassigned on the next line.
Closes#11149.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
DAYS_PER_400_YEARS was erroneously used instead of DAYS_PER_WEEK which
resulted in creation of much larger object file than needed as the array is
initialized.
Closes#11143.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Reset wxXmlParsingContext::lastAsText flag when CDATA section ends to avoid
appending the text following it to its node. Instead new text nodes should be
created for it.
Also update the unit test to not work around the bug any more.
Closes#10552.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only restrict input to wxMSW wxSpinCtrl to digits only if it doesn't support
negative values, otherwise the user can't enter any negative numbers. As there
is no built in support for entering digits and minus sign only, simply allow
all characters to be used if the negative numbers must indeed be possible to
enter.
Closes#11082.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't write extra NUL bytes obtained by decoding the padding at the end of
input into the output buffer as there may be not enough place in it for them.
And in any case the buffer is not (always) NUL-terminated as no NUL bytes are
obtained in absence of padding, so it's better to never terminate it for
consistency.
Closes#11101.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions return the number of columns or rows being currently used and
not 0, unlike the existing Get{Cols,Rows}(), if the corresponding number is
determined dynamically.
Closes#10254.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The explanation of event handlers chaining was too big and distracted from the
main point of the event processing section which was to explain in which order
different handlers are looked up.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to test whether a given key belongs to the category of e.g. arrow
keys or navigation keys in a more concise and more readable manner.
Closes#10268.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The angles passed to it are measured clockwise from the horizontal axis,
contrary to the usual mathematical convention so take care to mention this in
the documentation.
Closes#11112.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code returned immediately from wxSocketBase::DoWait() if it wasn't
connected but it only made sense for the client sockets, not server ones which
could be calling this function precisely in order to wait until a connection
is made.
Also added a test for this bug in the sockets/server sample.
Closes#11107.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If wxWindow is hidden before being really created, we must create the native
control hidden too. Not only this allows to create the controls initially
hidden, as intended, but it also avoids the wx and native visibility flags
from getting out of sync which results in many other problems.
Closes#11131.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is huge but there are no non-white-space changes in it.
Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxBitmapType instead of long for the type parameter and made SaveFile()
methods const to follow the base class changes.
Now that the signatures are the same as in the base class these handlers have
a chance to work again while their methods couldn't be called at all before
this change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This change fixes multiple g++ 4 warnings about unsafe expressions with
bit-wise operators (completely justified, for once, as the expressions were
absolutely incomprehensible and almost certainly incorrect too) and refactors
the determination of where to draw the slider labels in a single function
instead of triplicating it.
Also reformat to follow wxWidgets conventions and use more clear variable
names.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775