Don't define wxUSE_FSWATCHER as 1 in configure if we can't implement it.
Also add a check to wx/unix/chkconf.h to verify that we didn't end up with an
inconsistent configuration somehow.
Closes#11670.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMenuItem in wxUniv doesn't even use wxOwnerDrawn but linking in
ownerdrwcmn.cpp is enough to break the DLL build of wxUniv at least under MSW
as it references symbols normally defined in msw/ownerdrw.cpp which is not
part of wxUniv.
Fix this by simply disabling wxUSE_OWNER_DRAWN under wxUniv for now as it's
unused anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Peek() is not expected to block so ensure that it doesn't, independently of
the currently used socket flags, by using wxSOCKET_NOWAIT.
See #11528.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document that some of the standard cursors are defined in this file.
Also add a (hopefully) helpful assert if loading one of such cursors failed.
Closes#11424.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This results in an assert in DoLogText() which is not implemented in the base
class but ends up being called as DoLogTextAtLevel() doesn't know how to
handle non-standard log levels otherwise. This assert happened if you simply
called wxLogMessage(wxLOG_User, ...) in the program.
Just ignore messages at unknown log levels instead in wxLogGui, by definition
it can't handle them anyhow.
See also r63167.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Forward declare more classes, in particular use tagRECT which can be forward
declared, instead of RECT typedef in public headers.
Also include more header in #ifndef WX_PRECOMP case.
See #11595.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxFONTFAMILY_UNKNOWN case to the switch as it will allow us to be warned
if we add a new family in the future and forget to update this code to take it
into account.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
g++ warns about initialized extern variables so separate the declaration from
the initialization to avoid this warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use HDC in public headers, it may not be declared there. Use WXHDC
instead even if this means having ugly casts.
This fixed mingw32 compilation (see #11595).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The computation is now identical to Windows native one. To achieve this,
MSDN-recommended GetTextExtent() call is used instead of GetCharWidth().
wxMulDivInt32() is used instead of integer arithmetics to achieve
correct rounding.
Use toplevel parent's font instead of window's own. This makes more
sense, as dialog units are defined for TLWs, not individual subcontrols.
Also fixed wxMSW's wxButton::GetDefaultSize() to compute dialog units
correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We wrote an extra NUL byte to the stream and, unsurprisingly, contents of its
buffer didn't match the original string resulting in the test failure.
Also get rid of a #if wxUSE_UNICODE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These streams are seekable but somehow IsSeekable() was never overridden for
them resulting in test failures in Input_SeekI().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently these functions generate events in both of the existing
implementations (GTK and MSW) so it is simpler to let them to continue to do
it but this must at least be documented as this is probably unexpected by
users.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
On the fly detection of the BOM was wrongly implemented for UTF-32BE in
r63064 and returned BOM_None for it if we tried to read exactly 2 bytes.
Fix this by returning BOM_Unknown if the first 2 bytes are NUL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since the changes of r63064 we could return 0 when asked to convert a
non-empty buffer containing only a BOM. This confused the logic in
wxTextInputStream::NextChar() and was generally unexpected so now return
wxCONV_FAILED in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The logic in this function depends on ToWChar() working correctly so check
that it doesn't return obviously wrong results, e.g. 0 output length for
non-empty input. This was mostly done to detect the problem in wxConvAuto
currently but it could also be useful with user-defined conversions and
shouldn't have a big performance effect on wxTextInputStream so leave these
checks in to facilitate debugging in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This incidentally fixes compilation when not using PCH as wx/log.h was not
included but is also more correct as the messages meant for the programmer,
and not the user, should be given using asserts and not wxLog.
Also correct some asserts messages. In particular, don't mention the function
name in the message itself as it's already shown by the assert and using it in
the string itself isn't useful and simply introduces the risk of forgetting to
update it after refactoring, as happened here in r63105.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775