Commit Graph

6468 Commits

Author SHA1 Message Date
Vadim Zeitlin
3ed930c736 Use wxCompositeWindow for generic wxDataViewCtrl implementation
This makes several methods that didn't have any effect before work
correctly, including SetToolTip(), whose effect is now shown in the
sample, but also SetCursor() and SetLayoutDirection().

Some methods would now actually work too well: SetForegroundColour() and
SetBackgroundColour() implementations in wxCompositeWindow apply to all
sub-windows, but in wxDataViewCtrl they are only supposed to affect the
items, but not the header, so we need to override them to prevent the
base class version from being used. It is still preferable to explicitly
disable these two methods and inherit all the other ones (including any
possibly added in the future) from wxCompositeWindow to implementing all
the methods manually in wxDataViewCtrl itself.
2021-05-24 14:24:24 +01:00
PB
da581ccc1a Remove BCC makefiles (again)
All BCC makefiles were removed as a part of "Remove support for Borland
C++ compiler" PR; however, a few of them sneaked back as a part of the
newly introduced wxWebRequest.

Remove them for good.
2021-05-01 18:40:38 +02:00
Tomay
0e39566b3a Add wxImage Change{Saturation,Brightness,HSV,Lightness}()
Add more functions for manipulating wxImage colours.

Show using them in the same and add new unit tests for them.

This is a squashed commit of branch 'tomay3000/image-lightness'.

Closes https://github.com/wxWidgets/wxWidgets/pull/2310
2021-05-01 14:03:04 +02:00
Vadim Zeitlin
1e4f0a370f Merge branch 'drop-vc7'
Remove MSVS 2003 support.

See https://github.com/wxWidgets/wxWidgets/pull/2351

Closes #18821.
2021-04-27 14:10:06 +02:00
Vadim Zeitlin
17e0f23cd0 Merge branch 'listctrl-fixes'
Various generic wxListCtrl fixes and improvements.

Closes https://github.com/wxWidgets/wxWidgets/pull/2340
2021-04-27 14:08:38 +02:00
Ian McInerney
f556a34086 Remove the mentions of the native OSX wxListCtrl control
This control was removed during the Carbon code removal in commit
5ba67c67e4, so the system option
does nothing now (and was only mentioned in the documentation
and the sample).
2021-04-27 14:07:46 +02:00
Vadim Zeitlin
8b854d2f92 Remove MSVC 7 project files and support for generating them
This compiler is not supported any longer.
2021-04-26 16:24:02 +02:00
Vadim Zeitlin
86d1a25624 Merge branch 'winsock-2'
Use WinSock 2 rather than 1.1 by default and also enable IPv6 support,
requiring WinSock 2, by default now that it can be done.

See https://github.com/wxWidgets/wxWidgets/pull/2335

Closes #15562.
2021-04-26 15:07:13 +01:00
PB
31b983bad1 Make menu sample build when using precompiled headers
Headers wx/filehistory.h and wx/filename.h were included only
when WX_PRECOMP was not defined.

However, these two files are not included in wx/wxprec.h,
so they must be always included directly.

Closes https://github.com/wxWidgets/wxWidgets/pull/2344
2021-04-24 13:34:54 +02:00
Dummy
f64da1eb36 Allow clearing spin controls in the widgets sample
Calling wxSpinCtrl::SetValue("") is always valid.

See #19140.
2021-04-20 00:59:22 +02:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Paul Cornett
4faf7d45de Avoid assert failure in shaped sample
wxBG_STYLE_TRANSPARENT cannot be changed after creation
2021-04-07 09:07:42 -07:00
Vadim Zeitlin
b67bd4c3cb Merge branch 'file-history-styles'
Allow finer control over showing or hiding paths in wxFileHistory menus.

See https://github.com/wxWidgets/wxWidgets/pull/2282
2021-04-07 12:37:06 +02:00
Ilya Sinitsyn
8b6d01c798 Fix grid demo stars drawing to use correct colours and font
Just add a call to SetTextColoursAndFont() now that it is present in
this renderer base class (see the parent commit) to ensure that the
correct, i.e. corresponding to the column attribute, colour is used for
the stars.
2021-04-06 22:51:12 +02:00
Vadim Zeitlin
a77f390ae3 Fix wxFileHistory memory leak in the sample
We need to delete the object we allocate.
2021-04-05 16:32:34 +02:00
Vadim Zeitlin
f8f0b8b50c Remove public wxFileHistory::RefreshLabels()
Replace it with a private DoRefreshLabels() and call it ourselves from
SetMenuPathStyle() to make the class simpler (and less error-prone, as
it's now impossible to forget to call RefreshLabels() any more) to use.
2021-04-05 16:20:02 +02:00
Vadim Zeitlin
c89921d26d Rename wxFileHistoryMenuPathStyle values too
Use common wxFH_PATH_ prefix for consistency and try to make the values
more clear.
2021-04-05 16:15:49 +02:00
Vadim Zeitlin
036e35bf28 Rename wxFileHistoryMenuLabelStyle to wxFileHistoryMenuPathStyle
It seems useful to have the word "Path" in the name of this enum to
indicate that it applies to the paths shown in the menu labels.

Also rename the methods using this enum.
2021-04-05 16:09:34 +02:00
Vadim Zeitlin
0f1d1d2ae9 Update wxSearchCtrl popup menu state after showing it
Fix the state of the check/radio items in the menu by updating the
template used by macOS to create the actual menu after showing it and
possibly changing the items state.

This is not ideal because changing the state from the program, e.g.
using wxMenuItem::Check(), still doesn't work correctly, i.e. isn't
reflected in the menu when it's shown, but better than nothing until a
better solution (which ideally would update the menu just before showing
it, but it's not clear how exactly can we do it, knowing that we don't
get wxEVT_MENU_OPEN for this menu neither) can be found.
2021-04-04 14:21:27 +02:00
Vadim Zeitlin
7112582f18 Show events from wxSearchCtrl menu in the widgets sample
Verify that we get the expected events from the menu items.
2021-04-04 13:48:37 +02:00
Vadim Zeitlin
e442d90b0d Merge branch 'webrequest-build-fixes' of https://github.com/MaartenBent/wxWidgets
wxWebRequest-related build fixes for MinGW.

See https://github.com/wxWidgets/wxWidgets/pull/2283
2021-03-23 14:16:07 +01:00
Vadim Zeitlin
5d6525ccf1 Merge branch 'webview_useragent' of https://github.com/TcT2k/wxWidgets
Add support for custom user agent to wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/2280
2021-03-19 22:39:00 +01:00
Maarten Bent
5bdd5e1432 Check if wxUSE_WEBREQUEST is defined 2021-03-18 20:49:57 +01:00
Ian McInerney
71c26ec4da Add different menu label styles to wxFileHistory menus
These styles allow the program to choose to display file paths
in the menu or not
2021-03-18 02:11:33 +00:00
Ian McInerney
05685b5faa Add a file history menu to the menu sample 2021-03-18 01:11:14 +00:00
Paul Cornett
5154780bbf Avoid some -Wcast-qual warnings 2021-03-17 10:16:32 -07:00
Tobias Taschner
97e469c255
Add access to user agent for wxWebView
Allow setting a custom user agent for a webview.
Also allow access to the current user agent.
2021-03-16 22:53:00 +01:00
Artur Wieczorek
02af9b0295 Add option to demonstrate disabled wxPropertyGrid in propgrid sample 2021-03-12 20:35:06 +01:00
Paul Cornett
679c3ef714 Avoid setting layout direction to wxLayout_Default in widgets sample
wxMSW doesn't support setting wxLayout_Default
2021-03-11 08:49:59 -08:00
Vadim Zeitlin
bf8be6c58d Merge branch 'mac-filedlg-improvements' of https://github.com/discnl/wxWidgets
macOS wxFileDialog improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2234
2021-03-06 12:18:43 +01:00
Vadim Zeitlin
3701baecde Merge branch 'webview_script_message' of https://github.com/TcT2k/wxWidgets
Add WebView script message and user scripts.

See https://github.com/wxWidgets/wxWidgets/pull/2237
2021-03-05 18:44:46 +01:00
Artur Wieczorek
1c57699e92 Add ability to set bitmap margins for wxButton in widgets sample
This is to demonstrate the margins between the bitmap and the text
of the button.
2021-03-02 22:47:37 +01:00
Artur Wieczorek
ae5593bd23 Fix wxButton page in widgets sample
Enable image alignment radio box only if button with text and image
is active because it is applicable only in this case.
2021-03-02 22:34:44 +01:00
Tobias Taschner
80c04e3941
Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
PB
a75aa78263 Fix dragging file in DnD sample
At least on Microsoft Windows, it is possible to start dragging an unselected
wxTreeCtrl item. Therefore, in wxEVT_TREE_BEGIN_DRAG handler do not use the
path that is currently selected in the control but the one that is actually
being dragged.

Closes https://github.com/wxWidgets/wxWidgets/pull/2258
2021-03-01 00:03:21 +01:00
Tobias Taschner
166d7e2c83
Fix unused warning in sample 2021-02-28 20:06:59 +01:00
Tobias Taschner
2a16638e2a
Fix EOL issues 2021-02-28 20:03:31 +01:00
Tobias Taschner
29bfcdfd5e
Add common web message identifier 2021-02-27 11:55:50 +01:00
Tobias Taschner
6f7ac6a934
Add wxWebView::AddUserScript()
This allows to inject javascript code across multiple pages
2021-02-26 23:41:39 +01:00
Tobias Taschner
140e9825b7
Log error if script handler cannot be added 2021-02-26 21:41:02 +01:00
Tobias Taschner
3f23273f46
Fix typo in sample 2021-02-26 16:59:57 +01:00
Tobias Taschner
c3d0d7d000
Identify script handler in message event 2021-02-26 16:59:56 +01:00
Tobias Taschner
c78147b267
Add script command handler to sample 2021-02-26 16:59:56 +01:00
Tobias Taschner
a7ff7a8012
Implement script message for WKWebView backend 2021-02-26 16:59:56 +01:00
Dimitri Schoolwerth
84c989626d Make slowness of attribute lookups more apparent in grid sample
Multiply the number of rows in the grid sample by a factor of 10. This
demonstrates the slowness with attribute lookups better when using
checkered (Ctrl+Shift+K) or coloured (Ctrl+Shift+L) cells, as filling
the grid is slowed down by way more than a factor of 10. Scrolling also
becomes less responsive the further away from the home cell the view is.

As a result of increasing the row count also move the cells positioned
near the end of the grid there again, and don't use fixed coords for
them.
2021-02-15 12:36:03 +01:00
Dimitri Schoolwerth
823d79ce06 Demonstrate intensive attribute usage in grid sample
Add options to fill grid either half (checkered cells) or fully (all
cells coloured) with attributes. Available from Grid > "Toggle Checkered
Cells" and "Toggle Coloured Cells".
2021-02-15 12:36:03 +01:00
Dimitri Schoolwerth
25f981bfad Demonstrate wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES in dialogs sample
Add a menu option (Ctrl+Cmd+S) to toggle showing of the filter choice
with file types in open dialogs on macOS.
2021-02-15 00:37:45 +01:00
Vadim Zeitlin
d2c3c6a35b Merge branch 'msw_webview_edge4' of https://github.com/TcT2k/wxWidgets
Fix missing events for in-document navigation with wxWebViewEdge,
implement Find() for it and add wxEVT_WEBVIEW_FULLSCREEN_CHANGED for it
and wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/2227
2021-02-14 19:37:44 +01:00
Maarten Bent
dbcfe56ae5 Make wxPenStyleComboBox in Combo sample DPI aware 2021-02-13 01:59:24 +01:00