6581 Commits

Author SHA1 Message Date
7ffb268d70 Revert "Add VS2017 solution and project to auidemo sample"
This reverts commit 64e0e752f8.
2021-12-13 09:40:15 +01:00
5136db1fcc Merge commit '63f83c096ccf7b16ed96d60e56d08caacaaa6771' 2021-11-29 14:55:52 +01:00
42aca544b3 Add all dependency libraries to wxAui sample workspace
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-29 14:54:58 +01:00
972904ed5b Provide Visual Studio 2019 project files for wxAui sample
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-29 14:54:58 +01:00
9cd8cc04dd Mark MSVS *.vcxproj.filters files as using CR LF as well
For consistency with *.vcxproj and *.sln and for making
check_mixed_eol.sh happy.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-24 14:49:46 +01:00
Vadim Zeitlin
63f83c096c Merge branch 'webview_runscript_improvements' of https://github.com/TcT2k/wxWidgets
Add WebView::RunScriptAsync() for running scripts asynchronously.

See https://github.com/wxWidgets/wxWidgets/pull/2316
2021-11-16 17:30:55 +01:00
dafe3d11bf Merge remote-tracking branch 'remotes/upstream/master'
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-15 10:27:47 +01:00
Vadim Zeitlin
37dbf9f03a Merge branch 'threadname' of https://github.com/lanurmi/wxWidgets
Add wxThread::SetName for naming threads for debugging purposes.

See https://github.com/wxWidgets/wxWidgets/pull/2572
2021-11-12 17:05:12 +01:00
Lauri Nurmi
fc756d06a6 Add wxThread::SetName for naming threads for debugging purposes
Such thread names can be shown by some debuggers, and depending on
the OS and compiler versions used, they can be visible in process
lists and crash dumps.

Co-authored-by: PB <PBforDev@gmail.com>
2021-11-05 16:11:55 +02:00
Tobias Taschner
d31f1dc400 Add wxWebViewEvent::IsError() 2021-11-03 13:35:24 +01:00
Tobias Taschner
47833a6d24 Add RunScriptAsync() to webview sample 2021-11-03 11:19:09 +01:00
Dominique Martinet
61d835d8b3 wxKeyCode: add WXK_LAUNCH_[0-9A-F] for gtk bindings
X11 defines Xf86Launch[0-9a-f], which are then also defined as
GDK_KEY_Launch[0-9A-F].

Unfortunately, keys which are not mapped are just plain ignored and the
application is then not able to receive these keyboard events at all.

The original PR https://github.com/wxWidgets/wxWidgets/pull/157 mapped
only LaunchA/B to WXK_LAUNCH_APP1/2, this patch adds the whole range of
keys and keeps LAUNCH_A/B as aliases for WXK_LAUNCH_APP1/2
2021-11-02 10:18:02 +09:00
Vadim Zeitlin
5341bf5b60 Remove unnecessary win32-res tags from samples bakefiles
Don't specify sample.rc as the resource file for the samples, it is used
by default anyhow, so this is unnecessary.
2021-10-20 17:47:47 +02:00
Vadim Zeitlin
16f2c7bb89 Remove unused samples resource files
These resource files didn't appear in the .bkl ones and so were not used
at all and were not worth being used anyhow, as they didn't differ
significantly from sample.rc.
2021-10-20 16:34:38 +01:00
Vadim Zeitlin
aa2780b472 Set wxUSE_DPI_AWARE_MANIFEST=2 for all samples, not just toolbar
This is required for high resolution bitmaps support and it will be
needed in other samples too, so use it for all of them.

This probably will result in some problems due to remaining bugs with
high DPI support, but it should make them more noticeable and so should
help with finding and fixing them.
2021-10-20 16:19:41 +01:00
Vadim Zeitlin
b20552116c Allow wxBitmapBundle to specify its preferred bitmap size
Using bitmaps of preferred size avoids scaling and results in much
better appearance, so add methods allowing querying the bundle about the
bitmaps it supports and implement them in the various implementations.

This is not actually used anywhere yet, but will be soon.
2021-10-19 02:20:26 +01:00
Vadim Zeitlin
4e5d2d97e2 Allow using wxBitmapBundle for wxButton bitmaps
Take wxBitmapBundle in wxButton::SetBitmapLabel() and related functions
in order to be able to associate several bitmaps to be used in different
resolutions with the button, instead of just a single bitmap.
2021-10-18 11:50:10 +02:00
Vadim Zeitlin
e8a15050d2 Add missing references to wxSize parameters in wxBitmapBundle
Pass wxSize by const reference instead of "const" value.

Note that passing wxSize by value might be not such a bad thing,
actually, but we use const reference for it everywhere else, so do it
here as well for consistency (and the original intention was to do it
like this, missing "&" was just a typo subsequently propagated through
copy-pasting).

No real changes.
2021-10-16 15:56:40 +02:00
Vadim Zeitlin
fb4e188cea Add wxHAS_SVG feature test macro
This is more clear and future-proof than using wxHAS_RAW_BITMAP for
checking for SVG availability.
2021-10-05 16:12:01 +01:00
Vadim Zeitlin
0216654272 Make wxBitmapBundleImpl public and show how to use it
Show how a custom implementation of wxBitmapBundleImpl can be defined in
the toolbar sample.
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
ab619010bd Add FromSVG() overload taking const data
Passing non-const data is inconvenient and error-prone, as data can't be
used again after it was modified by Nano SVG, which resulted in the
button using SVG bitmap not working any longer in the toolbar sample
after recreating the toolbar.

So make it easier to do the right thing, while still keeping the
overload taking non-const data for the situations when avoiding an extra
copy is worth it.
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
ac02ae877f Add simple wxBitmapBundle::FromSVG() implementation using NanoSVG
Add nanosvg submodule and use it in the generic implementation of this
function.

This is incomplete yet and, notably, doesn't cache the rasterized
images, but already shows that using SVG images works (at least in the
toolbar sample).
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
043461077e Use wxBitmapBundle::GetDefaultSize() in the toolbar sample
This actually reverts the sample to the version in master, which used
wxBitmap::Get{Width,Height}(), but just replaces "w" and "h" variables
with a single "sizeBitmap" one.
2021-10-05 15:49:44 +01:00
Vadim Zeitlin
15e35a5e7c Document that FromDIP() is not needed with SetToolBitmapSize()
wxMSW wxToolBar adjusts the bitmap size to DPI automatically.
2021-10-05 15:49:44 +01:00
Vadim Zeitlin
24df75a27f Simplify frame construction in the toolbar sample
Also stop hard-coding (100, 100) position for it, there is no real need
for it and it's better to let the window be positioned automatically.

No real changes.
2021-10-05 15:49:44 +01:00
Vadim Zeitlin
9a578b9c8f Update bitmap size automatically on DPI change in wxMSW wxToolBar
Remove the now unnecessary wxEVT_DPI_CHANGED event handler in the
sample.
2021-10-05 15:49:44 +01:00
Vadim Zeitlin
b33df7360a Implement loading resource bundle from Windows resources
This allows to use resources defined in the .rc files under MSW instead
of embedding them in the program text as arrays.
2021-10-05 15:49:43 +01:00
Vadim Zeitlin
97f6c85d9b Add first version of wxBitmapBundle and use it in wxToolBar
This first version provides only a generic implementation of
wxBitmapBundle using a collection of bitmaps and only supports using it
in wxToolBar in wxMSW and wxGTK.

More methods of creating wxBitmapBundle will be provided later and more
functions taking wxBitmap will be changed to take wxBitmapBundle later
too and, of course, all the other ports will be updated to use the new
API too.
2021-10-05 15:49:43 +01:00
Vadim Zeitlin
7043963831 Add wxHAS_IMAGE_RESOURCES defined under MSW and Mac
Unlike the existing wxHAS_IMAGES_IN_RESOURCES constant defined only
under MSW, the new one is also defined under Mac and could be defined
for the other platforms/ports later (e.g. wxQt could probably support it
too).

It's unfortunate that two very similar constants are needed, but it
doesn't seem wise to change the meaning of the existing constant, as
this would change how the commonly used wxICON() and wxBITMAP() macros
behave and would break all our own samples that use them for their frame
icon but don't embed this icon into the bundle resources under Mac.

Do change the toolbar sample to use the new constant however, as this
one does include the bitmaps it uses in its bundle under Mac.
2021-09-22 23:24:32 +01:00
Vadim Zeitlin
19002a54ad Regenerate toolbar sample bitmaps in 32 and 64 pixel sizes
They're more appropriate than 16 and 32 pixels nowadays.

Also add SVG versions of the icons, from which these bitmaps were
created.
2021-09-21 23:45:09 +02:00
Vadim Zeitlin
47211fa520 Show how to use higher resolution toolbar bitmaps in high DPI
Update the toolbar sample to show how to use bigger images for the
toolbar in high DPI.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
d6f1f79cef Remove unnecessary calls to wxToolBar::SetToolBitmapSize()
This is unnecessary, just as an existing comment said, so don't bother
doing it.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
fe615bdeea Get rid of INIT_TOOL_BMP() macro in the toolbar sample
It isn't really useful any more now that all ports use wxBITMAP_PNG()
and just obfuscates the code.

No real changes.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
8a337fcdd9 Use PNG icons instead of BMP and XPM ones in the toolbar sample
Update the sample for the 21st century (with just a bit of delay) and
use PNGs under all platforms instead of using BMPs under MSW and XPMs
elsewhere.

Copy PNG icons from Tango, even if we already have almost of them in
art/tango because we plan to also use "2x" versions of them in this
sample soon.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
3840b0b1c4 Merge branch 'combo-non-text'
Allow using non-text control as main window of wxComboCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/2515
2021-09-11 14:03:02 +02:00
Iwbnwif Yiw
5ba2461fd1 Switch to using GSpell for wxTextCtrl proof checker in wxGTK
Use GSpell rather than GtkSpell because GSpell also allows to check
single line text controls.

Closes https://github.com/wxWidgets/wxWidgets/pull/2516
2021-09-11 14:02:13 +02:00
Vadim Zeitlin
573e4fa0ec Allow using custom main window in wxComboCtrl
Add wxComboCtrl::SetMainControl() which can be used to use some other
window instead of the default wxTextCtrl as the main window of the
combo control.

Update the sample and the documentation to show the new function.
2021-09-08 20:44:34 +02:00
Vadim Zeitlin
50493a920f Remove "fall through" comments from the samples
Use wxFALLTHROUGH when appropriate and just remove the useless "fall
through" comment from a "default" branch.

No real changes.
2021-09-07 19:24:30 +02:00
Blake Madden
1380b1914c Fix typos in sample comments
Closes https://github.com/wxWidgets/wxWidgets/pull/2513
2021-09-07 19:23:31 +02:00
Vadim Zeitlin
61340fcc82 Merge branch 'textctrl-spellcheck'
Add wxTextCtrl::EnableProofCheck() to use native spell checking support.

See https://github.com/wxWidgets/wxWidgets/pull/2473
2021-08-27 21:58:32 +02:00
Vadim Zeitlin
5216d97f08 Use arch suffix consistently in all directories names
For some reason, we used "vc_x64_lib" as the output directory for the
libraries, but "vc_mswu_x64" as the output directory for the samples.

Place the arch suffix, i.e. "_x64" part, always after the compiler
prefix (possibly including version), for consistency with both the
library output directories and with MSBuild project files, as
build/msw/wx_setup.props uses $(wxCompilerPrefix)$(wxArchSuffix)_...
as wxIntRootDir value.
2021-08-26 23:12:40 +02:00
Vadim Zeitlin
91ae4e2f8a Merge branch 'update-xcode-builds' of https://github.com/discnl/wxWidgets
Update Xcode projects to correspond to the latest makefiles and use ARM
architecture instead of i386.

See https://github.com/wxWidgets/wxWidgets/pull/2484
2021-08-26 15:53:16 +02:00
Vadim Zeitlin
e307945170 Merge branch 'ui-locale'
Add wxUILocale class providing functionality which can be implemented
portably for all major platforms, including macOS, and doesn't force
the change of the global C locale, unlike wxLocale.

See https://github.com/wxWidgets/wxWidgets/pull/2464
2021-08-26 15:49:57 +02:00
Vadim Zeitlin
c868088a49 Add MSVS 2019 solutions for the minimal sample and the tests
It seems inconsistent to have MSVS 2019 solution for the main library
itself, but only MSVS 2017 (and earlier) one(s) for the sample and the
tests, so add MSVS 2019 solution to them too.
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
79fe43c22d Don't show message box in text sample unnecessarily
This is going to be just annoying on the platforms where spell checking
is not supported, so show the message inside the text control itself
rather than popping up a message box.

Also put a misspelled word in the control from the very beginning to
show that it is highlighted.
2021-08-23 14:18:38 +02:00
Vadim Zeitlin
2bb3083a93 Use wxTextProofOptions itself to enable or disable the checks
Remove a separate "bool enable" argument of EnableProofCheck() and use
wxTextProofOptions::IsSpellCheckingEnabled() to decide whether the
checks should be enabled or disabled.

Also remove wxTextProofOptions ctor and provide named static factory
functions for creating the objects of this class with clearly defined
meaning.
2021-08-23 14:18:19 +02:00
iwbnwif
472aec2d7e Add support for using native spell checking in wxTextCtrl
Add wxTextCtrl::EnableSpellCheck() and implement it for wxMSW and
wxGTK3.

Closes #17544.
2021-08-23 14:15:38 +02:00
Dimitri Schoolwerth
b4aaaeae1e Remove some stray settings from minimal sample's Xcode projects
Delete a few settings that are either undesired or already set through
Xcode configuration files.
2021-08-23 00:51:19 +02:00
Vadim Zeitlin
a90dd434f7 Remove misleading word from the listctrl sample log message
It was surprising to see "right double click" for a right click.
2021-08-23 00:21:21 +02:00
Vadim Zeitlin
9205209099 Demonstrate the thousands separator in internat sample too
Use a number > 1000 to show the difference between the locales.
2021-08-20 23:37:28 +02:00