Commit Graph

7648 Commits

Author SHA1 Message Date
Alexander Koshelev
612c37f706 XRC: add GetBitmapBundle function
The function creates wxBitmapBundle from <bitmaps> xrc tag.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2022-01-11 17:04:27 +03:00
David Connet
83886bf18f Update install notes with instructions for building using Xcode
Notable document the special incantation needed by Xcode to use the
inherited environment variables.

Closes https://github.com/wxWidgets/wxWidgets/pull/2603
2021-12-01 23:28:38 +01:00
Vadim Zeitlin
a65e5f4c1d Explain better how to add data files to a sample
Also don't duplicate this information in both how-to-add-new-sample.md
and how-to-add-files-to-build-system.md, just reference the former in
the latter instead.

Also fix some Markdown markup.
2021-11-29 13:58:52 +01:00
Vadim Zeitlin
94f10eba4e Merge branch 'extra_accels' of https://github.com/vadz/wxWidgets
Allow defining additional accelerators for the menu items.

See https://github.com/wxWidgets/wxWidgets/pull/2588
2021-11-18 15:29:56 +01:00
Vadim Zeitlin
e6686373ec Add instructions for building the samples
Document various ways of building the samples.
2021-11-18 15:28:32 +01:00
Alexander Koshelev
0cd898975c Allow to add extra accelerators to wxMenuItem
These accelerators are not shown in wxMenuItem label, but still will
work.

Implement support for them in all major ports and XRC.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-11-16 17:26:39 +01:00
Maarten Bent
e917c8c6a7 Also explain how to build the tests using CMake 2021-11-12 16:53:30 +01:00
Vadim Zeitlin
46973762ba Explain how to build the tests
It may not be obvious how to build the tests, so add a section
explaining this to the existing file containing the instructions about
writing the tests and add a README to the tests directory itself to
increase chances that this file will be found -- hopefully anybody
interested in the tests will look at the README in the directory
containing them.
2021-11-12 14:21:41 +01:00
PB
d7e33a5291 Extend wxMSW contributor guide
List useful wrapper classes for Windows API provided by wxWidgets.

Closes https://github.com/wxWidgets/wxWidgets/pull/2578
2021-11-05 13:56:10 +01:00
Vadim Zeitlin
5773a8736c Define wxICON_IS_BITMAP when this is indeed the case
This symbol is useful for testing if wxIcon can be just converted to
wxBitmap, as is the case in all ports except for wxMSW currently.
2021-10-25 13:40:18 +01:00
Vadim Zeitlin
2c1f4c002d Add wxBitmap::SetScaleFactor()
We need to be able to change the scale factor of the bitmaps returned by
wxBitmapBundle::GetBitmap(), so add a function allowing to do this.

Also add wxHAS_BITMAP_SCALE_FACTOR allowing to check whether this
function actually does something non-trivial and explain in the docs
that GetScaleFactor() always returns 1 on the platforms where this
symbol is not defined.
2021-10-24 19:04:51 +02:00
Vadim Zeitlin
af1069374e Merge branch 'bitmap-bundle'
Add wxBitmapBundle and use it in wxToolBar.

See https://github.com/wxWidgets/wxWidgets/pull/2535
2021-10-05 18:58:18 +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
Alexander Koshelev
e2aca9cbd5 Add wxStyledTextCtrl XRC handler
Closes https://github.com/wxWidgets/wxWidgets/pull/2530

Co-authored-by: VZ <vz-github@zeitlins.org>
2021-09-28 15:39:20 +02:00
Vadim Zeitlin
46314bd6b1 Merge branch 'toolbar-high-dpi'
Show how to use bitmaps appropriate for the current DPI in the toolbar
sample using the current API.

See https://github.com/wxWidgets/wxWidgets/pull/2520
2021-09-23 16:31:20 +02: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
549e0a59b1 Fix handling of single letter shares in UNC paths in wxFileName
This comes at the price of breaking compatibility and returning
"\\share" rather than just "share" from wxFileName::GetVolume() for the
UNC paths. This breakage seems justified because it is required in order
to allow application code to distinguish between paths "x:\foo" and
"\\x\foo", which was previously impossible as GetVolume() returned just
"x" in both cases.

Document this change, adjust the existing checks for the new GetVolume()
semantics and add a new test which passes now, but didn't pass before.

Closes #19255.

This commit is best viewed ignoring whitespace-only changes.
2021-09-15 01:51:35 +01:00
Vadim Zeitlin
bba9aa7122 Merge branch 'gtk-install-docs'
Improve wxGTK install docs: document prerequisites, improve formatting,
remove obsolete parts.

See https://github.com/wxWidgets/wxWidgets/pull/2510
2021-09-07 19:25:45 +02:00
Vadim Zeitlin
c777a39650 Fix appearance of "%" in wxMSW install instructions
Te changes of 74c51eaff2 (Fix formatting of wxMSW build instructions,
2021-07-13) broke the rendered output of "%WXWIN%", for some reason the
leading percent sign needs to be double to appear correctly inside the
backticks, so do it to fix this.

Closes #19260.
2021-09-05 17:44:57 +02:00
Vadim Zeitlin
e38e089525 Update configure --enable-debug[_flag] options description
Don't say that the application needs to be compiled with the same
__WXDEBUG__ value, as this is not true since 3.0 days.

Also link the debugging overview.
2021-09-05 16:04:56 +02:00
Vadim Zeitlin
91923dc3f1 Reformat configure options description
No changes in contents, just use a list for configure options rather
than preformatted text block.
2021-09-05 16:04:56 +02:00
Vadim Zeitlin
45f7ec9bdb Add "prerequisites" section to GTK installation instructions
List the required packages in Debian/Ubuntu and Fedora/CentOS.
2021-09-05 16:04:56 +02:00
Vadim Zeitlin
c489cd9398 Fix formatting and slightly update wxGTK install instructions
The only real change is that the part about building wxGTK under Cygwin
was removed, it wasn't very useful and shouldn't distract from other,
more important, information here.
2021-09-04 17:17:27 +01:00
Vadim Zeitlin
0f79f69d88 Return empty bitmaps from wxButton if not explicitly set in wxMSW
Do this for consistency with the other ports and because this seems more
useful anyhow.

Update the documentation to make this behaviour more clear and document
this change as a (minor) incompatibility in wxMSW.

Also add more unit tests to check for this behaviour. Note this also
fixes the problem with the unit test added in the grandparent commit
under MSW.
2021-09-03 21:22:05 +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
5a6109fdce Mention support for MSVS 2022 in the documentation
Note that this support is still incomplete, notably we don't have
*_vc17.sln files yet and the official build scripts haven't been updated
to build MSVS 2022 binaries neither.
2021-08-26 00:04:28 +02:00
Dimitri Schoolwerth
0b9176874e Fix wxOSX build with Xcode 10 and later
Update target architectures to support building with the whole range of
supported Xcode versions by not targeting i386 by default, as well as
adding an arm64 target. Targeting i386 results in a deprecation
error starting with Xcode 10:

error: The i386 architecture is deprecated. You should update your ARCHS
build setting to remove the i386 architecture.
2021-08-23 00:51:19 +02:00
Blake-Madden
03abc1e685 Fix typo in wxMSW installation instructions
Closes https://github.com/wxWidgets/wxWidgets/pull/2477
2021-08-21 17:49:35 +02:00
Vadim Zeitlin
1f7cd9c7a4 Merge branch 'generic-initial-state-fixes'
Fixes for the initial state of generic wx{List,Spin}Ctrl.

See https://github.com/wxWidgets/wxWidgets/pull/2469
2021-08-20 21:28:35 +02:00
Vadim Zeitlin
96d36383bd Use sensible default column width in generic wxListCtrl too
Set width of the new columns to wxLIST_DEFAULT_COL_WIDTH and not 0 in
the generic version: this is more compatible with the MSW version and
more useful.

Document that omitting list column width in XRC results in columns of
default, rather than null, as previously, width.
2021-08-17 23:41:07 +02:00
Vadim Zeitlin
bb767e0ebc Remove apparently unused Info.plist in docview sample
Only Info.plist.in is used by configure and it doesn't hardcode the
version, so there is no need to update it there.
2021-08-15 16:56:24 +02:00
Vadim Zeitlin
ef21046c2c Document more incompatibilities between PCRE and old wxRegEx
Also try to make the reference to this documentation in the change log
more clear.
2021-08-04 01:36:46 +02:00
Vadim Zeitlin
62c776c17c Merge branch 'regex-pcre'
Implement wxRegEx using PCRE2.

See https://github.com/wxWidgets/wxWidgets/pull/2438
2021-07-27 17:47:31 +02:00
Vadim Zeitlin
cf91a8d9a2 Merge branch 'border-size-functions'
Replace DoGetBorderSize() with GetWindowBorderSize() to avoid having 2
different functions doing (almost) the same thing.

See https://github.com/wxWidgets/wxWidgets/pull/2445
2021-07-26 13:59:41 +02:00
Vadim Zeitlin
27d0e7804c Replace DoGetBorderSize() with GetWindowBorderSize()
We accidentally ended up with two functions doing the same thing, since
DoGetBorderSize() was added in 743b426605 (Added DoGetClientBestSize()
and use it for a couple of controls in wxMSW., 2009-06-22), as we
already had GetWindowBorderSize() added even earlier in 333d70525c
(added wxWindow::GetWindowBorderSize(), 2006-11-25), so remove the
redundant non-public function and use GetWindowBorderSize() everywhere.

This does change the behaviour of GetWindowBorderSize() in wxMSW, wxGTK
and wxUniv, as it now does what DoGetBorderSize() used to do, but this
should be an improvement, as DoGetBorderSize() implementation was more
precise.
2021-07-24 21:18:45 +02:00
Vadim Zeitlin
d50a707b0f Disable use of liblzma by default in configure too
Make configure behaviour consistent with CMake the default value of 0
for wxUSE_LIBLZMA in setup.h under MSW.

This also means that dependency on the system liblzma is not picked up
by default when --disable-sys-libs configure option is used, as this was
rather unexpected.
2021-07-24 20:51:08 +02:00
Vadim Zeitlin
dbe0950384 Drop WX_NO_REGEX_ADVANCED and always define wxHAS_REGEX_ADVANCED
Using non-PCRE system regex library, which was the only build variant
when wxHAS_REGEX_ADVANCED was not defined, is not supported any more, so
simplify the code by not testing for it.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
3d8438619d Use PCRE as built-in regex library
Replace the use of Henry Spencer's regex library with PCRE at the build
level and enable wxUSE_PCRE in wxRegEx code to switch to PCRE-based
implementation there.

Note that this has to be done unconditionally because there is no simple
way to select between the previously used regex library and PCRE at the
makefiles level.

We could still keep the possibility to use the system regex library
under Unix, but this doesn't seem to be worth doing, as we don't support
Unicode REs properly when using it (and never did), so drop support for
this too.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
4186292e11 Improve wxIMPLEMENT_APP() documentation
Explain that this macro defines the application entry point.

Also document wxIMPLEMENT_WXWIN_MAIN which wasn't documented at all
previously.
2021-07-24 17:21:39 +01:00
Vadim Zeitlin
760f327c24 Update MinGW build instructions
Don't mention Cygwin any more, except as a build environment.

Do mention MSYS2 and WSL.
2021-07-13 14:59:07 +02:00
Vadim Zeitlin
39b6e9ffd1 Link to the section describing makefile parameters
Also rename it to "Make Parameters" to make it more clear that it only
applies when using make.
2021-07-13 14:59:07 +02:00
Vadim Zeitlin
10e8c4404a Move vcpkg instructions under MSVC section
It seems more logical to have it here rather than in its own top-level
section.
2021-07-13 14:59:07 +02:00
Vadim Zeitlin
d4c95abe4c More formatting fixes in wxMSW build instructions
Use `%WXWIN%` instead of \%WXWIN\% and other similar fixes.
2021-07-13 14:59:07 +02:00
Vadim Zeitlin
e999dc46c8 Remove obsolete note about having to use -std=gnu++11
This shouldn't be true any longer, i.e. wxWidgets should (and does)
build with just -std=c++NN.
2021-07-13 14:52:23 +02:00
Vadim Zeitlin
74c51eaff2 Fix formatting of wxMSW build instructions
Using numbered lists with multiline items doesn't work in Markdown, so
remove it.

Also put the "IDE" part of the instructions before the "command line"
one, as it is probably use much more commonly.

No real changes to contents.
2021-07-13 14:30:54 +02:00
Vadim Zeitlin
7a8f2dffbd Use standard [[deprecated]] attribute if available
Add yet another wxDEPRECATED_XXX macro, this one simply expanding to
C++14 [[deprecated]] attribute if it's available and nothing otherwise.

It's a bit ridiculous to have so many different macros for deprecating
things, but the new one is useful because the standard attribute can be
used to deprecated enum elements, which is impossible with MSVC-specific
__declspec(deprecated).
2021-07-11 14:47:47 +02:00
Vadim Zeitlin
f31a745909 Remove unnecessary c_str() from wx var arg functions arguments
Using c_str() for arguments to wxString::Printf(), Format() and
wxLogXXX() is useless since wx 2.9 days, so simply remove them.

No real changes, this is just a (long due) cleanup.
2021-07-04 15:08:13 +01:00
Artur Wieczorek
6bd396b38a Update wxDC::DrawSpline() documentation
Mention that drawn spline is not an interpolating curve.
2021-07-03 17:18:04 +02:00
Vadim Zeitlin
6f9826ea69 Merge branch 'library-naming' of https://github.com/MaartenBent/wxWidgets
Update the library naming convention document and make CMake build
system follow it.

See https://github.com/wxWidgets/wxWidgets/pull/2358
2021-06-24 14:46:01 +01:00
Maarten Bent
c85a6bc4e4 Mention CMake in library naming convention documentation 2021-06-22 21:42:03 +02:00