This ensures that the files created by wxTextCtrl::SaveFile() can be read back
by wxTextCtrl::LoadFile() as previously the files were saved using the current
locale encoding but read back using Latin1 (after first trying, and failing,
to read them as UTF-8).
This is a backwards incompatible change but it ensures that wxTextCtrl can
load its own files and is also consistent with the use of UTF-8 by default in
other places. Finally, and perhaps most importantly, this ensures that the
file contents can always be saved, i.e. there is no risk of conversion errors
any more.
Closes#15611.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use colour names which can't be used to successfully initialize
wxColour.
This is not the best solution, we probably should add these names to the
colour database instead, but for now it's better than getting errors when
trying to use these colours for colour properties in wxPropertyGrid.
See #15597.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The segments should only be drawn if we're filling the arc, i.e. drawing a
pie, but not if we're just drawing its outline.
Add a test of this to the printing sample.
Closes#15609.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It didn't count the angles correctly when they were equal to 90 degrees.
Also simplify the code by avoiding special cases for 90 degrees anyhow, just
call atan2() directly. And also avoid converting the angles to degrees just to
convert them back to radians immediately afterwards.
See #15609.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The existing documentation was flat out wrong as it is simply impossible to
pass a circle through any two arbitrary points while also fixing its centre,
explain what this function really does and also use this as an opportunity to
point people to DrawEllipticArc() which is much less confusing.
Also clarify the segments drawing logic of DrawArc() as it is quite
counterintuitive too as it depends on the brush being used and is also
different from DrawEllipticArc() which uses a simpler logic.
See #15609.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This check was replaced with a check for WS_EX_CONTROLPARENT in r74732 to
avoid using ::IsDialogMessage() when WS_EX_CONTROLPARENT is not set, but it
also resulted in using it when WS_EX_CONTROLPARENT is set but wxTAB_TRAVERSAL
is not.
Check for both of them now so that we only use IsDialogMessage() when we need
it (wxTAB_TRAVERSAL) and when it is safe to do it (WS_EX_CONTROLPARENT).
Closes#15565.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't work with simple vararg functions and the real solution would be
to use WX_DEFINE_VARARG_FUNC for wxCrashReport::Output() but for now just add
a cast to make the code compile and work with minimal changes.
Closes#15598.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This header uses wxScopedPtr<> but didn't include the corresponding header, do
it now as we can't always rely on this happening via the other headers as it
does in the default build config.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While it doesn't matter when exactly do we call it with the generic or GTK
native implementations, under OS X we must update the internal model first and
call this method afterwards because it refreshes the control contents
immediately and so was calling back to the model and getting the pointer to
the item about to be deleted, which resulted in a crash when this pointer was
dereferences later.
Closes#15575.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide defaults for all properties in the spec. In XRC schema, make
all properties optional. The previously required ones are annotated as
"important" (read: should be set unless you know what you're doing), but
aren't enforced.
The code already behaved like this, so this just synchronizes the
specification with the reality.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Validating all style flags strictly would be unmaintainable mess of
verbose regular expressions that would quickly get out of sync. But we
can validate at least wxSizerItem flags, which are both stable and so
frequently used that it is worth the effort.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Incredibly, there were bugs, inaccuracies or missing content in all
three of them, but each one had its own unique problems. Fix them all
to be in sync with the implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For consistency with all other wxSizer kinds, use the default of
wxHORIZONTAL instead of 0 (which has no meaning here) for wxWrapSizer
too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
An extra "&&" was left in the preprocessor check, remove it.
Also remove the check for __WXMAC_OSX__ as it's unneeded as
USE_NATIVE_FONT_DIALOG_FOR_MACOSX is only defined as 1 under wxOSX and,
actually, wrong, as __WXMAC_OSX__ is never defined anywhere and was probably a
corruption of __WXOSX_MAC__ in the first place.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As 10.5 is the minimal supported version, it doesn't make sense to check for
it (or even earlier versions) during the build or run-time.
Closes#15580.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The return value of gestaltSystemVersion() represents the version as
"four hexadecimal digits in the low-order word of the return value", to quote
Apple documentation, not as a floating point number.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't support so old versions of OS X any more anyhow, so simplify the code
by using dlopen() &c directly instead of using our own wx_dlopen() with custom
implementation for OS X.
See #15580.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't provide our own (not fully functional) definitions of them and always
use the system versions as we don't support OS X 10.2 which was the last
platform where these functions didn't exist/work.
See #15580.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775