Commit Graph

985 Commits

Author SHA1 Message Date
Vadim Zeitlin
326077d574 Increase DOT_GRAPH_MAX_NODES Doxygen option for wxObject
There are more than 50 nodes in wxObject inheritance graph, so increase
this option value to allow generating it and avoid a warning about it.
2022-03-28 00:23:30 +02:00
Vadim Zeitlin
f8438dc4be Remove Doxygen options obsolete in 1.9.1
We don't use any of these options anyhow, so just remove them to avoid
warnings about them being obsolete now.
2022-03-28 00:22:40 +02:00
Vadim Zeitlin
6bc00ecc5d Remove top level directories from the paths in Doxygen log
Removing "docs/doxygen" and "interface" was both ambiguous (because it
wasn't immediately clear which file the message was referring to) and
insufficient because there are now Markdown files in the other other
directories used as Doxygen input too, and they still appeared with the
full paths.

Fix both problems by removing just the top level directory from all
paths and keeping all the rest.
2022-03-28 00:20:44 +02:00
Vadim Zeitlin
652d37ea61 Add "pressed" and "current" wxBitmapButton XRC properties
New names are consistent with the names of the preferred SetBitmapXXX()
functions.

Document them and show using one of them in the sample.
2022-02-20 18:06:09 +01:00
Vadim Zeitlin
74424cbeb2 Rename wxBitmap::CreateWithLogicalSize() to CreateWithDIPSize()
The new name, recently introduced in 94716fd801 (Add
wxBitmap::CreateWithLogicalSize(), 2022-01-22), was perhaps more clear,
but also misleading and confusing because the postcondition

	CreateWithLogicalSize(size, 2).GetLogicalSize() == size

was not satisfied under MSW, so rename it once again, and hopefully
finally, because the new name is consistent with GetDIPSize() returning
the same size.

Also try to improve the documentation a bit more.
2022-02-11 17:30:57 +00:00
oneeyeman1
995c6e6df5 Add wxSpinCtrl::SetIncrement() and implement it for all ports
SetIncrement() was already available in wxSpinCtrlDouble and GTK version
of wxSpinCtrl, now implement support for it in wxMSW and wxOSX as well.

In fact, in wxMSW, implement it at wxSpinButton level, so that both this
class and wxSpinCtrl inheriting from it (in wxMSW only) support setting
custom increment now.

Also add support for it to XRC, show it in the sample and add a unit
test verifying that it works.

Closes #2597.
2022-02-04 02:16:06 +01:00
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
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
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
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
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
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
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
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
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
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
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
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