Commit Graph

635 Commits

Author SHA1 Message Date
Vadim Zeitlin
86d1a25624 Merge branch 'winsock-2'
Use WinSock 2 rather than 1.1 by default and also enable IPv6 support,
requiring WinSock 2, by default now that it can be done.

See https://github.com/wxWidgets/wxWidgets/pull/2335

Closes #15562.
2021-04-26 15:07:13 +01:00
Vadim Zeitlin
bf5090bcf3 Enable Winsock 2 and IPv6 build options by default
In addition to linking with Winsock 2, also use winsock2.h.

This allows to turn on IPv6 support on by default under MSW, so turn it
on under Unix too for consistency.

Predefine _WINSOCK_DEPRECATED_NO_WARNINGS to avoid warnings about
deprecated (but still available and very unlikely to be ever removed)
Winsock 1 functions that we still use.
2021-04-24 18:06:43 +01:00
Vadim Zeitlin
72500faf7c Add wxCursor ctor from XPM data to all ports
This just uses the existing wxImage ctor from XPM data and wxCursor ctor
from wxImage, but will allow the code creating cursors from XPM to still
work even when wxImage ctor from XPM is made explicit.

Add a trivial test just to check that the new ctor can be used.
2021-04-18 01:14:36 +01:00
Vadim Zeitlin
d1810b0dce Remove setup0.h files
Simplify things by putting setup.h files themselves under version
control and getting rid of setup0.h ones.

The initial motivation for using separate setup0.h files was to allow
having local changes to setup.h, but with Git there is a simple way to
do it by using "git update-index --skip-worktree include/wx/msw/setup.h"
for example, so we don't really need setup0.h any more and dropping them
makes things simpler.
2021-01-31 19:02:56 +01:00
Vadim Zeitlin
181be127a5 Simplify wxUSE_WEBREQUEST_XXX logic
Remove automatic definition of wxUSE_WEBREQUEST depending on whether
wxUSE_WEBREQUEST_XXX are defined and follow the same approach as with
wxUSE_GRAPHICS_XXX, i.e. define wxUSE_WEBREQUEST_XXX as wxUSE_WEBREQUEST
by default instead.

Move wxUSE_WEBREQUEST_WINHTTP to wxMSW-specific file, it doesn't need to
be in common one (unfortunately this can't be done for the Mac-specific
wxUSE_WEBREQUEST_URLSESSION yet, because macOS-specific settings are not
injected into setup.h.in currently).

Also fix test for winhttp.h availability: it seems to be present in all
MinGW64 distributions, but not in MinGW32, so test for this and not for
gcc version.

Finally remove the now unnecessary test for macOS 10.9, as we only
support 10.10+ anyhow by now.
2020-12-13 16:34:47 +01:00
Vadim Zeitlin
5c3db1574e Fix typo and slightly improve wxUSE_WEBREQUEST_CURL comment 2020-12-13 00:10:28 +01:00
Vadim Zeitlin
6bdab7b3c8 Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master.

Rebake to resolve conflicts in generated files.
2020-12-12 18:12:25 +01:00
Vadim Zeitlin
712c2d4004 Add possibility to create "Close" bitmap button from XRC
This requires refactoring NewCloseButton() in order to extract
CreateCloseButton() from it, as XRC relies on being able to use two-step
creation which was previously impossible for this kind of buttons.

CreateCloseButton() is rather unusual, as it has to be declared in the
derived, platform-specific class, in order to be able to call its
Create(), but is defined only once in common, platform-independent,
code. However the only alternative seems to be to have a static
function, e.g. InitCloseButton(), which wouldn't be very pretty neither.

Closes https://github.com/wxWidgets/wxWidgets/pull/2118
2020-11-19 15:44:54 +01:00
PB
6fbacb20d8 Remove checks for wxNEEDS_CHARPP
wxNEEDS_CHARPP was needed only for now unsupported GCC versions.
2020-10-19 20:07:16 +02:00
Vadim Zeitlin
bcb016613e Make wxRadioButtonBase a plain class, not template
Use a dirty hack to accommodate wxUniv by deriving wxRadioButtonBase
from wxCheckBox, rather than wxControl, there. This is not pretty, but
should be addressed by refactoring wxUniv code and in the meanwhile all
the other ports don't have to bother with using a template class
unnecessarily.
2020-09-21 18:01:37 +02:00
Stefan Csomor
92ea83f00b First implementation 2020-09-17 22:35:22 +02:00
Scott Talbert
7cd12a2bd6 Add EGL-based backend for wxGLCanvas
Among other things, this enables wxGLCanvas to be used natively on
Wayland.

Closes https://github.com/wxWidgets/wxWidgets/pull/2038

Closes #17702.
2020-09-01 15:03:30 +02:00
Vadim Zeitlin
9c2cf91223 Don't remove const-ness using C-style cast
Avoid another -Wcast-qual from gcc.
2020-08-31 01:25:45 +02:00
Vadim Zeitlin
9c48b0e8e7 Remove redundant wxSetCursor() declarations
Avoid -Wredundant-decls from gcc by not duplicating the declaration from
wx/gdicmn.h in wx/*/cursor.h.
2020-08-31 01:25:45 +02:00
Arrigo Marchiori
c86bcf962d Use wxASCII_STR() on string literals
Fix the build with wxNO_IMPLICIT_WXSTRING_ENCODING.
2020-07-17 17:52:16 +02:00
Stefan Csomor
f80ac025ba added wxUSE_MENUBAR
for platforms like iOS where menus are available but menubars are not we need a finter level of control
2020-06-28 22:59:00 +02:00
Vadim Zeitlin
d7f19ee610 Fix spelling in comments and documentation using codespell
Apply the utility from https://github.com/codespell-project/codespell/
to fix spelling issues in the headers under both include and interface
directories and add a file with a couple of exceptions.

The exact command line used was:

    $ codespell -w -I misc/scripts/codespell.ignore -i 3 in*
2020-06-27 22:56:22 +02:00
Paul Cornett
896512c732 Change fractional point size from float to double
There doesn't seem to be any compelling reason to use float. Using double
is simpler, and avoids otherwise unnecessary float<->double conversions.
2020-04-21 09:00:04 -07:00
Vadim Zeitlin
767c07c040 Merge branch 'webview-edge'
Add support for (optionally) using Edge-based wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/1700
2020-01-22 03:38:00 +01:00
Tobias Taschner
21cc8a4e49
Update setup.h files 2020-01-15 15:58:30 +01:00
Tobias Taschner
1afeaa324d
Added new build option wxUSE_WEBVIEW_EDGE 2020-01-10 21:42:18 +01:00
Vadim Zeitlin
52ae67ef86 Replace dynamic casts with virtual wxWindow::WXGetTextEntry()
Instead of checking for all text-like controls one by one in
wxCommandEvent::GetString(), call a virtual function checking for this.

This is simpler, less error-prone and faster -- at the cost of
increasing the vtbl size of all wxWindow-derived classes.

Closes https://github.com/wxWidgets/wxWidgets/pull/1696
2020-01-09 23:25:49 +01:00
Vadim Zeitlin
89be9ac316 Fix comment for wxUSE_NATIVE_DATAVIEWCTRL in setup.h
The values of the option in the comment were inversed when it was added
in 028afa194a, fix this now.
2020-01-03 18:05:02 +01:00
Vadim Zeitlin
028afa194a Add wxUSE_NATIVE_DATAVIEWCTRL build option
It defaults to 1, but can be set to 0 to force using the generic version
of the control even under GTK or Mac, where the native version is used
by default.

This can, unfortunately, be useful to work around various but multiple
native control limitations.
2019-12-15 16:23:47 +01:00
Vadim Zeitlin
d7a640933d Remove wxUSE_WCHAR_T, it must always be 1 anyhow
This is not really an option as building requires it to be 1, so don't
make it one in setup.h/configure/cmake and just hardcode it as 1 for
compatibility.

Closes #18558.
2019-10-31 02:16:19 +01:00
Vadim Zeitlin
fc711f869f Remove obsolete wxUSE_IOSTREAMH option
This is always 0 for any still supported compiler, so remove the option
and configure checks for it.

Still define it as 0 for compatibility, just in case it's used outside
of the library.
2019-10-21 20:46:21 +02:00
Vadim Zeitlin
b53e9e2006 Rename wxStaticText::Do[SG]etLabel() to WX[SG]etVisibleLabel()
The names of these methods were confusing because they implied that they
were the actual implementations of the public [SG]etLabel(), while this
wasn't at all the case.

Give them then ames describing what they really do and also update the
comments to hopefully be more clear.

No real changes.
2019-06-19 18:15:57 +02:00
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00
Tobias Taschner
5f3dc058aa
Prepare additional wxWebRequest backends 2018-12-10 19:37:33 +01:00
Tobias Taschner
d756159f5d
Add common dialog wxCredentialEntryDialog
Prompting for user name and password is a common task.
At least windows provides these dialogs native but this
is just a generic implementation for now.
2018-12-10 19:37:29 +01:00
Tobias Taschner
2c8fcf2584
Add wxUSE_WEBREQUEST preprocessor constant 2018-12-10 19:37:17 +01:00
Maarten Bent
86d586222d Add missing wxFont constructor to wxMotif 2018-09-19 22:02:47 +02:00
Vadim Zeitlin
18d7801346 Fix wxMotif build after wxFont API changes
Run-time seems to be totally broken, but fonts are probably not the most
important problem in this port, so don't bother fixing it.
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
71cef5f3be Stop using wxBU_AUTODRAW in wxWidgets code
This style bit is obsolete and doesn't do anything, so remove confusing
references to it.
2018-07-21 14:42:06 +02:00
Vadim Zeitlin
311b2aee5f Check for liblzma headers in configure too and add wxUSE_LIBLZMA
Prepare for using liblzma in wxWidgets code by adding the necessary
option and updating the configure check for it (which had been already
present due to libtiff possible dependency on liblzma).

No real changes yet.
2018-04-06 15:39:39 +02:00
Vadim Zeitlin
f4af243e5c Enable wxUSE_GRAPHICS_CONTEXT for MinGW >= 4.8
It seems that MinGW-w32 started distributing GDI+ headers since this
version and MinGW-w64 might have supported them for even longer, but
it's difficult to test for the MinGW distribution used in this header,
as it is included before wx/msw/gccpriv.h which defines
__MINGW32_TOOLCHAIN__ and __MINGW64_TOOLCHAIN__ symbols and changing
this is tricky due to relative order of defining UNICODE and
wxUSE_UNICODE and including MinGW headers, which can only be included
once UNICODE is set properly.

But while the fully correct solution is difficult, just checking for the
compiler version should solve the problem in 99.99% of the cases in
practice as there should be vanishingly few people using MinGW-w64 with
gcc < 4.8 currently, so this simple solution is good enough.

Closes #17973.
2017-12-08 19:42:21 +01:00
Vadim Zeitlin
b040dab0ca Add wxUSE_PRIVATE_FONTS and drop wxHAS_PRIVATE_FONTS
Handle this feature as all the other ones and provide a configure switch
and a setup.h option to disable it if necessary, as it may be desirable
to do it, especially under Linux, to avoid extra dependency on pangoft2
if this functionality is unnecessary.
2017-11-24 22:56:17 +01:00
Paul Cornett
65cc4c1624 Avoid ifdef-ed override specification
Instead, add the base class functions so the derived class always
overrides. If/when wxX11 and wxMotif are removed there won't be an
ifdef that no one ever notices isn't needed anymore.
2017-11-12 09:33:37 -08:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Vadim Zeitlin
e125c3b657 Allow disabling unsafe implicit conversions in wxString
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.

Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.

Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.

Closes #11830.
2017-02-12 02:29:30 +01:00
Vadim Zeitlin
4cc45797a1 Fix wxUSE_DC_TRANSFORM_MATRIX comment in wx/setup_inc.h
Propagate the change done in 49000defcf to the
generated include/wx/msw/setup0.h file to wx/setup_inc.h, so that this change
won't be lost during future regenerations.
2017-02-12 02:27:22 +01:00
Václav Slavík
8b5387bc3d Enable wxUSE_ACCESSIBILITY by default (MSW)
Compile accessibility support on Windows by default now that the generic
wxDataViewCtrl control implements accessible interface. After the
changes from 7dab555f71, accessibility
support is much more lightweight and doesn't interfere with normal win32
behavior, so this change shouldn't affect accessibility-unaware code in
any way.
2016-12-13 18:56:20 +01:00
Vadim Zeitlin
675d9d779d Add wxSecretStore
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.

Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
2016-06-04 18:29:15 +02:00
Vadim Zeitlin
52a4fac626 Add proper support for wxUSE_NATIVE_PROGRESSDLG
This symbol was wrongly added to include/wx/msw/setup0.h directly in
075ef6551e, so it didn't work when
cross-compiling from Unix (which doesn't use this file) and would have been
lost after any future modification of include/wx/setup_inc.h where it should
have been added in the first place.

Do this now and also make the check for this symbol in wx/progdlg.h a bit more
readable.
2015-12-30 18:54:35 +01:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
6d92f45385 Remove all mentions of wxGauge shadow width and bezel face.
The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
2015-04-20 18:46:55 +02:00
Vadim Zeitlin
3f84cb17ca Add wxActivityIndicator control.
This is a simple animated control indicating some program activity.

Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.

Update the sample and the documentation.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
453897149f Add wxAddRemoveCtrl class.
This is a simple high level helper combining an arbitrary control showing
multiple items with the buttons allowing to add items to and remove items from
this control, but using the buttons and the layout appropriate for the current
platform.

Add the implementation itself, an example of using it to the dialogs sample
and the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 00:26:11 +00:00
Vadim Zeitlin
e737363e6b Introduce wxCursorBase class defining common wxCursor API.
This is done in preparation for adding a new wxCursor method and will allow us
to define it in a single place by default instead of having to provide stubs
for all ports.

See #16539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:45 +00:00