Commit graph

7882 commits

Author SHA1 Message Date
Vadim Zeitlin
a89577e8a4 Deprecate useless wxWindow::GetDefaultBorderForControl()
This function was added back in a047aff270 (Added wxBORDER_THEME,
wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder(),
2007-08-07) but seems to have been made completely unnecessary by
dc797d8e1b (More border rationalisation. GetDefaultBorder is now mostly
defined in base class files., 2007-11-13) soon afterwards and never did
anything other than returning wxBORDER_THEME, with no explanation as to
when it might be useful to override it not to do it.

It also doesn't seem to be really used anywhere outside wxWidgets and
has never been documented, so make it non-virtual and deprecate it to
avoid confusion and simplify things.
2023-06-16 15:55:35 +01:00
PB
81ce7edb75 Improve documentation about parallel builds with MinGW makefile
In the note about building wxWidgets with MinGW makefile and using
parallel build, explain that "-jN" option cannot be used when building
"setup_h" target.

Closes #23642.
2023-06-16 00:01:39 +02:00
Vadim Zeitlin
3d13e77b01 Merge branch 'env-wxlog-time-format'
Add support for WXLOG_TIME_FORMAT and docs improvements.

See #23576.
2023-06-02 19:07:55 +02:00
Vadim Zeitlin
674592719f Allow customizing wxLog timestamp format via environment variable
Call wxLog::SetTimestamp() with WXLOG_TIME_FORMAT value if it's defined.
2023-05-28 22:35:34 +02:00
Vadim Zeitlin
21daae3435 Improve WXTRACE documentation
Link to wxLogTrace() documentation and don't speak about "debug build"
any more.
2023-05-28 22:18:28 +02:00
Vadim Zeitlin
f2f2868de5 Add support for dark mode colours to XRC
Allow specifying a different colour to use in the dark mode in XRC
colour properties.

Closes #23571.
2023-05-27 21:51:51 +02:00
Vadim Zeitlin
20b3c887f5 Improve wxUSE_STD_IOSTREAM documentation
Clarify that it is 1 by default in the documentation, instead of
implying that it's off by default and needs to be enabled.

Improve the description of this option in setup.h files.

And also document this compilation option in the summary page.
2023-04-28 15:26:46 +02:00
Vadim Zeitlin
7824391f64 Merge branch 'use-std-containers'
Remove avoidable uses of legacy container classes by replacing them with
the standard containers.

See #23440.
2023-04-17 17:02:27 +02:00
Vadim Zeitlin
889845fbc4 Add support for wxNO_IMPLICIT_WXSTRING_CONV_TO_PTR to wxString
This symbol is similar to the existing wxNO_IMPLICIT_WXSTRING_ENCODING
and can be defined when building the application (as opposed to when
building the library) to disable implicit wxString conversions to
pointer types, i.e. char*, wchat_t* and void*.

This makes the just added wxUSE_CHAR_CONV_IN_WXSTRING library build
option unnecessary, so remove it.
2023-04-16 01:16:56 +02:00
Vadim Zeitlin
330303e078 Update wxString overview and documentation
Avoid overlap between the two pages.

Remove obsolete information.

Document wxNO_IMPLICIT_WXSTRING_ENCODING.

Don't mention wxUSE_STL any longer.
2023-04-15 20:34:24 +02:00
Vadim Zeitlin
35c35c235e Remove wxUSE_STL which is not really used any longer
wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.

The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.

Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.

Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
2023-04-15 17:22:09 +02:00
Vadim Zeitlin
d65eed50fa Replace some occurrences of wxUSE_STL with wxUSE_STD_CONTAINERS
The latter option will remain, while the former one won't be used at all
any longer soon, so prefer using the latter whenever possible.
2023-04-15 15:14:41 +01:00
Vadim Zeitlin
fb17a5ac38 Merge branch 'use-std-cont-1'
Set wxUSE_STD_CONTAINERS=1 by default.

See #23439.
2023-04-15 15:46:08 +02:00
Vadim Zeitlin
030dd6d79b Document that applications are always DPI-aware with wxGTK
Also mention that fractional scaling is not currently supported under
this platform.

See #23441.
2023-04-13 14:57:16 +02:00
Vadim Zeitlin
4f075139c3 Briefly describe the changes to private container classes
This is intentionally not very detailed, as we might find more container
classes to change in the future and listing all of the affected ones
here would require updating this list later.
2023-04-12 18:15:46 +01:00
Vadim Zeitlin
89e4f51f62 Update documentation after setting wxUSE_STD_CONTAINERS=1
Explain that the legacy container classes now inherit from the standard
classes by default and also how to update the existing code to compile
when using standard library-based implementations.
2023-04-10 20:39:50 +01:00
PB
d378444010 Remove most occurrences of wxT() from the docs
wxT() macro rarely needed now, so do not use it in the docs
unless it is required.
2023-04-09 20:35:49 +02:00
Vadim Zeitlin
435efa8b5a Mark new language constants as being new since wx 3.3.1
Add a convenient @since_wx alias which is more appropriate for
single-line comments than the standard @since, which would expand into
two paragraphs.

See #23426.
2023-04-08 14:50:47 +02:00
Vadim Zeitlin
c4fc9d3444 Improve "Hello world" documentation page
Try to explain important things better, notably mention that all
pointers are owned by wxWidgets and why is wxIMPLEMENT_APP() macro
needed.
2023-04-06 22:07:32 +02:00
Vadim Zeitlin
d5b61a16bf Merge branch 'propgrid-improve-and-test-compat'
Improve and test 3.0 compatibility in wxPG.

See #23369, #23375.
2023-03-30 19:48:01 +02:00
Vadim Zeitlin
eb4e75f8c3 Document that range for can be used for wxString iteration
This is simpler and better than using iterators.
2023-03-26 17:56:55 +01:00
Vadim Zeitlin
cb03ddf63f Restore compatibility with 3.0-like DrawCaptionSelectionRect()
This function was not called any longer after 35a8d0f908 (Fix building
wxPropertyGrid with v3.0 compatibility enabled, 2023-03-22), which
silently broke any applications resulting on this to happen, so call it
again, even if it's rather painful and ugly to do.

Also add wxDEPRECATED_BUT_USED_INTERNALLY_MSG() and use it instead of the
plain wxDEPRECATED_MSG() for the deprecated overload of this function to
avoid warnings when calling it from wxWidgets itself.

Finally, document the change to DrawCaptionSelectionRect() as this
wasn't done back in c63b1604b3 (Use native renderer to draw rectangle
indicating that wxPG category property is selected., 2015-08-30) when
its signature was changed.
2023-03-23 13:29:30 +01:00
Maarten Bent
ea56496e0a
CMake: Update documentation of wxWidgets_USE_FILE
This is not defined in CONFIG mode, so check its availability before using.
2023-03-09 23:59:13 +01:00
Vadim Zeitlin
fdef316f40 Update wxAboutDialog screenshot under MSW after recent changes 2023-02-24 00:42:13 +00:00
Vadim Zeitlin
95f16e63d2 Consistently use @see in Doxygen documentation
Although @see was used predominantly, a few places used @sa which is
equivalent to it but less readable, so switch to using @see everywhere.

No real changes.
2023-02-20 23:02:18 +01:00
Vadim Zeitlin
46857a73ba Don't use multi-sampling in wxGLAttributes::Defaults()
This prevents wxGLCanvas from working on limited OpenGL implementations
not providing it, such as VMWare OpenGL driver, and doesn't seem to be
really necessary as multi-sampling can always be explicitly requested if
the application does want to use it.

Closes #23121.
2023-02-14 15:40:04 +00:00
Vadim Zeitlin
1cf59d345b Remove fallback on locale using different region under Unix
Historically, we used to fall back on any locale using the same
language, if the exactly requested locale was unavailable. This doesn't
seem such a great idea, and results in unexpected behaviour, such as
returning true from wxUILocale::IsSupported() for locales such as
"en-FR" that are not really supported at all.

Remove this fallback and just return false if the locale with the
specified region is not supported.

Still choose any supported region if the region is omitted entirely,
however.
2023-02-07 00:23:31 +01:00
Vadim Zeitlin
0a1b0fbe01 Merge branch 'msw-about'
Improve generic and MSW "About" dialog appearance.

See #23196.
2023-02-03 15:11:48 +01:00
Vadim Zeitlin
05e49f7989 Add "About" dialog screenshots under different platforms
Show both "simple" and "fancy" (which just means with the web site
link specified here) forms from the dialogs sample.
2023-01-30 21:11:42 +01:00
Vadim Zeitlin
3fdebc96cd Add support for XRC "feature" attribute
This is a generalization of the existing "platform" attribute and allows
to only include some XRC elements if and only if an arbitrary "feature"
is enabled by the application before loading the XRC document.
2023-01-29 00:54:42 +00:00
Vadim Zeitlin
e5380e739b Remove Alpha architecture detection
This architecture doesn't exist and is not supported since a very long
time, so stop testing for it and defining __ALPHA__ which was never used
anyhow.
2023-01-26 17:31:05 +01:00
Vadim Zeitlin
15e556e027 Remove vestiges of PowerPC support
It may still be supported for wxGTK, but we don't need to do anything
special for it, so we don't need to define __POWERPC__, which was never
used anyhow, neither.
2023-01-26 17:27:48 +01:00
Vadim Zeitlin
bed3896189 Allow, and even require, semicolon after wxTEST_DIALOG() macro
This macro was documented (in its comment) and even used with a
semicolon after it, but it didn't require one and using one after it
resulted in a warning with gcc in pedantic mode.

Change the macro definition to use wxSTATEMENT_MACRO_BEGIN/END to
require (and, trivially, also allow to be used without warnings) a
semicolon after it now.
2023-01-13 17:27:53 +01:00
Vadim Zeitlin
1830c37550 Fix a link in the installation documentation
Using quotes isn't needed and doesn't seem seem to work here.
2023-01-09 23:22:17 +00:00
Vadim Zeitlin
e7297592cb Move manifest explanation in the main wxMSW install docs
This is important enough to be described directly there, especially now
when a manifest is required.
2023-01-09 23:22:17 +00:00
Vadim Zeitlin
fc9ade48b9 Fix hierarchy in the MSW build instructions documentation
Don't make "Make Parameters" and "Advanced Configurations" top level
sections, they're not as important as the other ones.
2023-01-07 18:23:47 +00:00
Vadim Zeitlin
e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Vadim Zeitlin
d74c9e51da Remove memcheck sample
This sample wasn't really useful and demonstrated functionality which
was disabled by default since many years and will be completely removed
soon.
2023-01-05 18:24:57 +01:00
Vadim Zeitlin
b7ed2c8376 Merge branch 'cirrus-ci-arm'
Add ARM task to Cirrus CI.

See #23104.
2023-01-03 04:20:19 +01:00
Vadim Zeitlin
ab08e17bf2 Use libtiff-dev instead of deprecated libtiff5-dev package
No real changes, just use the real, instead of the transitional, package
name.

Co-Authored-By: Scott Talbert <swt@techie.net>
2023-01-03 04:18:26 +01:00
Vadim Zeitlin
f5daf28932 Update copyright years to 2023
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-01-03 04:15:08 +01:00
Vadim Zeitlin
06f5267582 Use named links in Markdown instead of numbered ones
This is more clear and avoids problems with mis-numbering.

Closes #23090.
2022-12-31 17:14:26 +01:00
Vadim Zeitlin
2bca8c405d Fix documentation of the arch suffix in the DLL names
Mention that it's only used when building with MSVC.
2022-12-29 18:39:46 +01:00
Vadim Zeitlin
e0db72d80e Include arch-specific suffix in the DLLs names in makefile.vc too
This is similar to edcfeab29d (Include arch-specific suffix in the DLL
names in CMake builds too, 2022-12-23).

See #23053.
2022-12-28 22:06:41 +01:00
Vadim Zeitlin
208142c14a Merge branch 'msw-dark-mode'
Add experimental support for dark mode for wxMSW.

See #23028.
2022-12-27 22:20:34 +01:00
Vadim Zeitlin
7ce2ba9b0c Add wxSystemAppearance::AreAppsDark() and IsSystemDark()
This allows to determine if dark mode is enabled (for the applications
and/or the system UI itself, respectively) system-wide which is useful
now that IsDark() returns false unless MSWEnableDarkMode() is called.

Also document the incompatible change to IsDark().
2022-12-26 22:02:11 +00:00
PB
e67532085b Improve wxWidgets naming conventions docs
Fix swapped names for static and shared build folder on Windows
in "type" description.

Also provide more details in some paragraphs.

Closes #23053.
2022-12-23 20:07:50 +01:00
ali kettab
2578ffb54a Assert if wxListCtrl::EditLabel() is used without wxLC_EDIT_LABELS
Since wxListCtrl under wxMSW cannot edit labels without the presence of
this flag, and an assertion failure triggered if the flag is missing to
it and also all the other ports for consistency.

Also document that wxLC_EDIT_LABELS flag is required in EditLabel()
description.

See #23024.
2022-12-10 12:57:46 +01:00
Vadim Zeitlin
d737d98d27 Consistently include trailing NUL in wxMSW wxTextDataObject size
Fix a long-standing bug in wxMSW wxTextDataObject which returned the
size including the trailing NUL from its GetDataSize() and used the same
convention in GetData(), but didn't account for this NUL being included
into the buffer passed to SetData().

This was partially compensated by also passing the wrong (too small)
buffer size when calling SetData() from wxIDataObject, but still
resulted in problems when using SetData() with the length returned from
GetDataSize(), as done in wxDataViewCtrl code.

Fix this by now always considering NUL part of the buffer (as this is
the platform convention, i.e. all CF_TEXT data on the system clipboard
must include the trailing NUL) and taking it into account when
determining the buffer size in wxIDataObject.

This change is not fully backwards-compatible as it breaks any code
calling SetData() directly, as e.g. wxURLDataObject in wxMSW itself did,
so document it as such, but it's still worth making it as there doesn't
seem to be any other way of fixing the problem described in the linked
issue and direct calls to SetData() should be rare as simpler SetText()
should be used instead.

Also add a unit test for wxTextDataObject and extend the existing test
of wxURLDataObject.

Closes #22928.
2022-12-06 02:25:44 +01:00
Vadim Zeitlin
20bbc43a20 Redefine wxTRANSPARENT_WINDOW as 0 and stop using it
This style never did anything useful in wxMSW and did nothing at all in
all the other ports, so always was rather useless, but became actively
harmful not that WS_EX_COMPOSITED is used in wxMSW because using it and
WS_EX_TRANSPARENT, enabled by wxTRANSPARENT_WINDOW, together doesn't
work and results in an endless stream of WM_PAINT messages being sent to
the _siblings_ of the window with wxTRANSPARENT_WINDOW style.
2022-11-28 19:04:56 +00:00