Commit Graph

7676 Commits

Author SHA1 Message Date
Lauri Nurmi
1a10199575 Document installing vcpkg packages for x64, too
Vcpkg defaults to installing packages for x86-windows, and from the
perspective of x64 builds, the packages installed just cannot be
found -- and the reason is not very obvious.

Having an example with commands that will install both x86 and x64 is
probably the right thing to do in this day and age -- and if somebody
only wants one and not the other, seeing a package name with architecture
specified helps with guessing how to achieve that.

Closes #22075.
2022-01-30 23:03:17 +01:00
Alexander Koshelev
b2629a97e5 Add wxBitmapBundle::GetPreferredLogicalSizeFor()
We often need the logical bitmap size when using it in size computations
involving window size, so add a function returning it directly to
wxBitmapBundle, similarly to wxBitmap::GetLogicalSize(), to avoid using
FromPhys() everywhere.

Also rename the existing wxBitmapBundle::GetPreferredSizeFor() to
GetPreferredBitmapSizeFor() to make it more clear that this is similar
to wxBitmap::GetSize() and so returns the size in physical units.

Closes #22056.
2022-01-27 14:29:25 +01:00
Alexander Koshelev
df1504dd8f XRC: add GetBitmapBundle function
The function creates wxBitmapBundle from <bitmaps> xrc tag.

Co-authored-by: VZ <vz-github@zeitlins.org>
2022-01-24 17:26:42 +03:00
Vadim Zeitlin
c1d91d5566 Document functions not using logical pixels in high DPI overview
Any other exceptions to the general rule saying that wx API works with
logical pixels should be added to the list here.
2022-01-22 22:44:00 +00:00
Vadim Zeitlin
65bb454311 Add wxBitmap::GetLogical{Width,Height,Size}()
These functions have better names than the existing GetScaledXXX() ones,
so add them to be able to use them in the new code, even if we still
keep the old ones for compatibility.
2022-01-22 18:56:21 +00:00
Vadim Zeitlin
ab94485efa Really fix example of creating wxBitmapBundle in hight DPI docs
Co-Authored-By: PB <PBfordev@gmail.com>
2022-01-19 16:45:41 +01:00
Vadim Zeitlin
4a43ea8827 Fix wrong example and wording in high DPI docs
Co-Authored-By: PB <PBfordev@gmail.com>
2022-01-18 19:08:50 +01:00
Vadim Zeitlin
94b4f738d4 Merge branch 'dpi-docs-improve'
Improve high DPI support documentation.

Closes #18889, #22011.
2022-01-17 17:44:06 +01:00
Vadim Zeitlin
ead3e95bf4 Add a note about rounding the logical pixels up when converting
This might be unexpected, so explicitly warn about possibly not getting
back exactly the same value after a round-trip.
2022-01-17 17:43:51 +01:00
Vadim Zeitlin
74e1404a5a Document using wxWindow::{From,To}Phys() for LP<->PP conversions
This is simpler and more clear than dividing or multiplying by
GetContentScaleFactor().
2022-01-17 17:43:51 +01:00
Vadim Zeitlin
b4f0ddd81e Add wxBitmapBundle section to high DPI overview
Explain how it can be created and used.
2022-01-17 17:43:51 +01:00
Vadim Zeitlin
c1532c8d3c Fix table of contents generation for high DPI overview
Add the required anchors, just the headers are not taken into account
for TOC generation.
2022-01-17 17:42:32 +01:00
Vadim Zeitlin
caec339bc1 Improve documentation of various pixel types
Also add a diagram showing the functions to use to convert between them,
perhaps this can be more clear than textual description.

Co-Authored-By: Stefan Csomor <csomor@advancedconcepts.ch>
2022-01-17 17:42:01 +01:00
Vadim Zeitlin
2064526e3d Revert "Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets"
This reverts commit a34ab31453, reversing
changes made to 783df59e66.

Undo the addition of wxBitmapBundle support to XRC, as it is finally
going to be done in a different way soon -- but for now just remove it
to ensure that nobody starts using it before it's finalized.

See #2633.

Closes #22014.
2022-01-16 23:40:31 +01:00
Vadim Zeitlin
1f401475f3 Merge branch 'art-scalefactor'
Fix confusion between different kinds of coordinates in wxAUI code,
restoring correct behaviour in high DPI on all platforms.

See #2620.

Closes #19331.
2022-01-13 17:51:00 +00:00
Vadim Zeitlin
03cf1f4359 Remove wxHAS_BITMAP_SCALE_FACTOR
Now wxMSW also stores the scale factor, even if it doesn't use it in its
GetScaledXXX(), so it doesn't seem useful to have this symbol for
distinguishing the platforms with and without bitmap scale factor
support, when we can just use wxHAS_DPI_INDEPENDENT_PIXELS instead in
the only place where this was used.

And as this symbol was added quite recently, in 2c1f4c002d (Add
wxBitmap::SetScaleFactor(), 2021-10-23), we can hopefully just remove it
without breaking any existing code, if we do it right now.
2022-01-13 17:34:49 +00:00
Vadim Zeitlin
2945278334 Rename wxHAVE_DPI_INDEPENDENT_PIXELS to wxHAS_XXX and document it
Using wxHAS_ prefix is more consistent with all the other similar
symbols, using wxHAVE_ was a mistake, that we have to pay for by
preserving the old name now (as it is actually already used in some code
outside of the library).

The fact that it's used also shows that it's better to document this
symbol, even if just to explain that it normally shouldn't be used, as
we can't really hide it anyhow.
2022-01-13 17:34:49 +00:00
Vadim Zeitlin
2f0bce2979 Replace old Trac links with GitHub ones
Also update a couple of links to SF.
2022-01-13 16:52:58 +01:00
Vadim Zeitlin
42bdf924b1 Fix code snippets markup in Doxygen overviews
Markdown ``` doesn't work here, Doxygen-specific ~~~ needs to be used.
2022-01-13 00:52:40 +01:00
Vadim Zeitlin
a34ab31453 Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets
Add wxBitmapBundle support to wxXmlResource and start adding it to XRC
handlers.

See https://github.com/wxWidgets/wxWidgets/pull/2633
2022-01-11 15:35:54 +01:00
Alexander Koshelev
3907657995 XRC: ability to create wxToolBar with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
4b3233e493 XRC: ability to create wxCommandLinkButton with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
7a13979f5a XRC: ability to create wxButton with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
96f5258df5 XRC: ability to create wxStaticBitmap with wxBitmapBundle 2022-01-11 17:05:14 +03:00
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
Vadim Zeitlin
3bc0f44163 Update copyright years to 2021
Just run misc/scripts/inc_year and commit the results.

Closes #18690.
2022-01-02 13:32:23 +01:00
PB
afb4870f9d Add MSVS 2022 solutions for the library and minimal sample
Closes https://github.com/wxWidgets/wxWidgets/pull/2625
2021-12-18 20:16:59 +01:00
Vadim Zeitlin
64ad6933b5 Document that bakefiles need to be updated for a new MSVS version 2021-12-18 20:14:09 +01:00
PB
77d8926126 Simplify Windows application manifests
In section "dependency" use "*" in processorArchitecture instead of specifying
the concrete architecture such as "amd64" or "x86". This allows to have just one
manifest for all architectures instead of having them for all supported architectures
individually differing in just processorArchitecture.
2021-12-17 16:57:45 +01: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