Commit graph

703 commits

Author SHA1 Message Date
Vadim Zeitlin
b03ce7711b Merge branch 'gtk-enter-leave-window'
Fixes for wxGTK enter/leave window events.

Closes #11848.

See #24339.
2024-02-29 03:01:38 +01:00
Vadim Zeitlin
9a27e206ce Rebake after adding 32-bit ARM support for MSVC
This should have been done in 99bc43cefe (Introduce minimal MSW ARM
support, 2024-01-15).

See #24222.
2024-02-24 20:50:38 +01:00
Vadim Zeitlin
c14c652238 Rebake after wxWebViewChromium merge
No real changes, just rebake all the makefiles after the addition of
wxwin.extraLdflags, which results in an extra space even when these
flags are empty in webview-chromium branch.

This should have been done in f37401dde3 (Merge branch
'webview-chromium', 2024-01-19)
2024-02-24 20:46:51 +01:00
Vadim Zeitlin
a8b4753d1d Reconnect events to the widget after recreating it in the sample
This ensures that the expected events are given even after the widget is
recreated due to a change of some controls on its page (and not because
it's recreated by one of the menu commands in the parent frame).

We also don't need to connect to these events from WidgetsFrame any
longer (and, in fact, doing it would be wrong as we'd connect twice),
which simplifies its code.
2024-02-19 00:40:30 +01:00
Vadim Zeitlin
828b7ee844 Move widget event handlers to WidgetsApp in the widgets sample
No real changes, just move the function connecting to the widget events
from WidgetsFrame to WidgetsApp to allow reusing it from outside
WidgetsFrame in the next commit.
2024-02-18 19:01:44 +01:00
Vadim Zeitlin
b93422535d Show window enter/leave events in the widgets sample
This allows to easily check if these events are generated correctly for
all the controls shown in this sample.
2024-02-18 17:35:36 +01:00
Vadim Zeitlin
486865b446 Add wxFileConfig::MigrateLocalFile()
This can be useful for the existing applications switching to using
XDG-compliant config files location as they can just call this function
on startup to keep using the existing file.
2024-01-04 03:23:37 +01:00
Vadim Zeitlin
27585bf2c3 Hardcode minimal widget sample notebook size
Not doing this resulted in the window being tiny by default, so it's
better than nothing, even if it's clearly still not ideal.

See #24154.
2023-12-22 17:40:00 +01:00
ali kettab
7c592ba361 Make WidgetsPage pages scrollable in the widgets sample
Because some pages in the sample contain too much content to fit entirely
in the visible area of the page. Under wxQt port, this is true regardless
of the state of the window (whether it is maximized or not) some content
remains hidden and inaccessible.

Closes #24154.
2023-12-22 12:29:45 +01:00
Blake-Madden
a059061eb7 Replace wxDECLARE_NO_COPY_CLASS with deleted functions in samples
Use standard C++11 way of making classes non-copyable instead of
wx-specific macro.

Closes #24150.
2023-12-22 12:21:54 +01:00
PB
220031c0da Fix buttons missing in widgets sample after recent changes
The Clear log and Exit buttons were not shown after the changes
in a69fabe (Fix using wxStaticBoxSizer in samples, 2023-10-22).

Fix this by creating them with the proper parent.

Closes #24005.

Closes #24007.
2023-10-29 02:47:46 +02:00
PB
a69fabecb1 Fix using wxStaticBoxSizer in samples
If a control is contained in a wxStaticBoxSizer or its child sizer,
wxStaticBoxSizer::GetStaticBox() should be used as the control's parent.

However, widgets and dialogs samples did not do that, which resulted in
flooding the message log in widgets sample with warnings about this; in
dialogs sample the warnings were shown in the debug output.

Fix this by always using the static box as the control's parent when the
control is contained (directly or indirectly) in a wxStaticBoxSizer.

Closes #23967.
2023-10-22 01:27:55 +02:00
Vadim Zeitlin
ec4777bbbf Rebake after the previous commit
This just separates the automatically-generated changes from the manual
ones in the parent commit.
2023-07-29 18:13:29 +02:00
Vadim Zeitlin
0ab31edc17 Use flags required for using GTK in widgets sample
As we use GTK directly in this sample, we need to use the appropriate
compiler and link flags, so add them depending on the port in the
makefile.
2023-07-11 13:40:23 +02:00
Vadim Zeitlin
2e22666db8 Compile Cocoa control example in Unix "widgets" sample makefile
Previously this was never done, as we couldn't determine if we were
using Cocoa or not at generation time, but we can determine it in the
makefile itself.
2023-07-11 13:40:21 +02:00
Vadim Zeitlin
e802eaa44d Suppress a warning for g_object_ref_sink() use in widgets sample
The glib macro always triggers this warning when -Wextra is on, so we
have no choice but to suppress it.
2023-07-04 02:19:14 +02:00
Vadim Zeitlin
cd65c312d3 Merge branch 'use-std-in-samples'
Use standard containers in samples.

See #23490.
2023-04-28 15:32:34 +02:00
Vadim Zeitlin
9257d36af6 Stop using legacy wxSTD macro in the library code
Just use "std::" directly instead.

No real changes.
2023-04-28 15:26:46 +02:00
Vadim Zeitlin
ac854d3718 Use std::vector<> instead of wxArray in widgets sample
No real changes, just use the standard container instead of macro-based
array.
2023-04-24 22:47:18 +01:00
Vadim Zeitlin
d161905856 Remove unnecessary includes of wx/dynarray.h from the samples
No changes at all, just prune the unnecessary header.
2023-04-24 22:47:18 +01:00
Maarten Bent
b0385e498c
Rebake after bakefile changes 2023-02-14 22:52:26 +01:00
Vadim Zeitlin
b7f24a65d8 Rebake after the copyright year update
This should have been part of f5daf28932 (Update copyright years to
2023, 2023-01-03).
2023-01-03 18:39:06 +01:00
Vadim Zeitlin
c5f613c941 Revert "Remove wxStaticBox custom drawing code entirely"
This reverts commit 616586f301 because it
turns out that using WS_EX_TRANSPARENT is incompatible with using
WS_EX_COMPOSITED (see parent commit).

Reintroducing all this code is painful, but there doesn't seem to be any
way of avoiding to have it as long as we use WS_EX_COMPOSITED. If we
stop using this style, we could revert this commit, this re-applying the
original change.

Closes #22982.
2022-11-28 19:04:59 +00:00
Vadim Zeitlin
616586f301 Remove wxStaticBox custom drawing code entirely
Get rid of a big amount of non-trivial drawing code at the price of
having to switch to using a control label if the foreground colour is
changed, as we can't change the label colour otherwise now.

The only known drawback of this change is that the box will flicker now
if doubler buffering is disabled. But as long as we do use double
buffering, it shouldn't be a problem.
2022-11-09 15:50:43 +00:00
Vadim Zeitlin
c78b0d652b Remove UNICODE build option, hardcode its value as 1
Also hardcode "u" suffix for the library names -- it doesn't make sense
any longer, but we need to keep it for compatibility.
2022-10-27 19:43:59 +02:00
Vadim Zeitlin
6e8290a9ce Stop defining _UNICODE in makefiles
This shouldn't be necessary any longer, so don't do it.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
5c49448c75 Remove bakefile UNICODE_DEFINE variable, always define _UNICODE
It might be unnecessary to define it on command line at all, as it's
done in wx/setup.h, but keep doing it for now.

However stop using a variable for this, as setting wxUSE_UNICODE to 0 is
not supported any longer.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
2022-10-18 01:25:25 +02:00
Vadim Zeitlin
fb4f0b590c Remove wxGTK1 port and GPE support
Remove the port files and references to it from the common headers and
elsewhere.

Also remove GPE (GNOME PDA Environment) support as libgpewidget is
unmaintained since 2006 or so and has never been really used.

Use __WXGTK__ to test for any version of wxGTK now. Still define
__WXGTK20__ for compatibility, but always define it now and don't test
for it in the library code.
2022-10-16 22:01:02 +02:00
Vadim Zeitlin
0ef1cdcc21 Remove support for wxMotif
This port hasn't been updated for ages and is not used by anybody any
longer, so remove its code to facilitate maintenance.

Also remove references to this port from the documentation and most of
the other places (VMS-specific descrip.vms files still check for it
because it's not clear how to update them all), including configure.

Regenerate the latter and rebake all makefiles.

Finally document that this port is not available any longer.
2022-10-16 16:39:56 +02:00
PB
88d526660f Replace wxOVERRIDE and wxNOEXCEPT with override and noexcept
Don't use deprecated macros in wxWidgets itself.
2022-10-15 18:10:45 +02:00
Vadim Zeitlin
1cf49f9909 Remove MSVS 2005 and 2008 project files
These compilers are not supported any longer.

Also disable their regeneration in Bakefiles.bkgen.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
a818e505c4 Add "Process Enter" checkbox to bitmap combo widgets sample page
Allow toggling wxTE_PROCESS_ENTER and even set it by default -- and turn
off wxCB_READONLY which was set by default for some reason.
2022-10-05 19:44:09 +01:00
Vadim Zeitlin
af4ad43824 Rebake and rerun autoconf after the version update 2022-07-17 17:03:39 +02:00
Vadim Zeitlin
2a2308d5ed Update version to 3.2.0 and rebake and rerun autoconf
Update all make/project files to use 3.2.0.
2022-06-21 00:54:26 +02:00
Vadim Zeitlin
5d5591816d Update to bakefile 0.2.13 to fix DLL directory creation
Fix the bug introduced in ec0734f96f (Install DLLs in bindir, not
libdir, when using MSW toolchains, 2021-01-09): the directory where the
DLLs were installed wasn't created any more, resulting in errors if it
didn't exist.

Update to latest bakefile version adding the missing mkdir command to
fix this and also use a released bakefile version for the wx makefiles.

Regenerate configure to match the new version.

See #14601.
2022-04-23 23:11:31 +02:00
Vadim Zeitlin
19e3a47d98 Update version to 3.1.7 and rebake the makefiles
Make it possible to distinguish the latest master from 3.1.6 before
making any changes.

Closes #22282.
2022-04-07 17:40:13 +02:00
Vadim Zeitlin
ce1d350f41 Add logging of context menu events to the widgets sample
Show when (and if) they are generated.
2022-03-30 01:07:38 +02:00
Alexander Koshelev
8f43e103e9 Use wxBitmapBundle in wxHeaderColumn in samples 2022-03-04 03:37:20 +01: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
Vadim Zeitlin
ee330d73a7 Rebake after the year change
The year is now included in the copyright string used in the makefiles
and so they need to be regenerated every time the year changes (which
happens surprisingly frequently).

It would be better to define a single variable with the year number to
avoid having to do this in the future.
2022-01-14 22:51:24 +01:00
PB
0f8ab824a3 Fix using const char* and wxString in ternary operator
Using a const char* and a wxString in the two branches of the ternary
operator resulted in compile-time errors since the result type of the
conditional expression was ambiguous, so add explicit conversions to fix
it.

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

See #19355.
2022-01-03 21:20:23 +01:00
Vadim Zeitlin
559ea66e55 Use DPI aware manifests for MSVS 2022 too 2021-12-18 13:22:59 +01:00
Vadim Zeitlin
5d6b2f6704 Rebake after parent commit changes 2021-12-17 21:29:49 +01:00
Vadim Zeitlin
0df49f0a54 Add wxWithImages::GetImageCount() and HasImages() helpers
These functions allow avoiding using wxImageList explicitly in a couple
of places.

No real changes, this just prepares for adding new API not based on
wxImageList.
2021-10-31 17:34:44 +01: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
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
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
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