Commit Graph

40430 Commits

Author SHA1 Message Date
Paul Cornett
91bb265e90 Fix build with wxNO_RTTI
wxWidgets RTTI can be used instead
2021-03-21 12:16:12 -07:00
Paul Cornett
ef5076f852 Fix build with wxUSE_PALETTE==0 2021-03-21 12:16:01 -07:00
Artur Wieczorek
dc11bb18cf Use new CoreGraphics API to reset clipping region
Since 10.13 there is available a dedicated CGContextResetClip()
API to reset a clipping region so we don't need to use current
workaround anymore.
2021-03-21 18:44:06 +01:00
Stefan Csomor
d1c0d3b18c keeping the OSX specific use of origin for non-native borders
fixes #19108
2021-03-20 22:09:31 +01:00
Vadim Zeitlin
362012ab9c Merge branch 'cmake_warnings' of https://github.com/TcT2k/wxWidgets
Enable more warnings for GCC/Clang with CMake.

See https://github.com/wxWidgets/wxWidgets/pull/2281
2021-03-19 22:41:01 +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
Pierluigi Passaro
b824ed8fe6 Support Wayland in wxGTK wxMediaCtrl
For GTK, the current implementation assumes X11 is the only window option.
Introduce runtime checks to manage Wayland too.

Signed-off-by: Pierluigi Passaro <pierluigi.p@variscite.com>

Closes https://github.com/wxWidgets/wxWidgets/pull/2257
2021-03-19 22:36:59 +01:00
Tobias Taschner
2487a48b66 Implement user agent access for Edge 2021-03-17 22:01:46 +01:00
Paul Cornett
e375a68371 Restrict linkage of local functions 2021-03-17 10:26:18 -07:00
Paul Cornett
5154780bbf Avoid some -Wcast-qual warnings 2021-03-17 10:16:32 -07:00
Paul Cornett
b5d4c6068e Make some member functions const 2021-03-17 09:44:48 -07:00
Tobias Taschner
41a0da1187 Fix unused parameter warning 2021-03-17 12:58:17 +01:00
Tobias Taschner
3d568c7105 Create wxWebViewEdge implementation in constructor
This helps with various potential error when using two step creation
2021-03-17 09:42:01 +01:00
Tobias Taschner
7f7191066b Implement user agent access for GTK 2021-03-17 09:42:01 +01:00
Tobias Taschner
18f5b01cc6 Implement user agent access for macOS 2021-03-17 09:42:01 +01:00
Paul Cornett
34473971bb Fix wxNotebook HitTest with GTK3
Avoid invisible tabs. See 19103
2021-03-16 20:22:02 -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
Stefan Csomor
eff81745ba guarding implementation against compilation under iOS SDK < 13 2021-03-15 11:35:48 +01:00
Stefan Csomor
4455b6e784 using specialized native view for OpenGL as in osx 2021-03-15 10:17:20 +01:00
Stefan Csomor
a087998d96 cleanup and support for drawRect without a valid graphics context 2021-03-15 08:45:02 +01:00
Artur Wieczorek
04020e4509 Fix wxButon layout with right- and bottom-aligned images (wxMSW)
It looks only left- and top-aligned images stored in the image list
(BUTTON_IMAGELIST) are drawn with proper margins (with BCM_SETIMAGELIST).
For some reasons (bug in Win API?) margins for right- and bottom-aligned
images are applied only on one side of the image so the image drawn in
the button is misplaced in relation to the label.
It seems the only possible workaround for such images is to switch to
the owner-drawn mode and to draw the image manually in the proper location.

Closes #13130.
2021-03-14 12:57:09 +01:00
Artur Wieczorek
99983325d6 Use proper data structure describing image of owner-drawn wxButton (wxMSW)
When wxButton is switched to owner-drawn mode we need to store its image
data in the dedicated wxODButtonImageData structure. We shouldn't use
in this case wxXPButtonImageData structure because it is dedicated for
native buttons and every time it's updated a BCM_SETIMAGELIST message is
sent to the button what is unnecessary action.
2021-03-14 12:40:39 +01:00
Artur Wieczorek
2af825c6a6 Fix setting image margin in wxButton (wxMSW)
When button images are stored in the image list (BUTTON_IMAGELIST)
their margins should be set with BCM_SETIMAGELIST message.
BCM_SETTEXTMARGIN sets the margins around the text label
and not the image.

See #13130.
2021-03-13 22:50:33 +01:00
Vadim Zeitlin
f6194cb797 Merge branch 'config-size_t'
Add support for 64-bit numbers and size_t to wxConfig.

See https://github.com/wxWidgets/wxWidgets/pull/2272
2021-03-13 22:35:01 +01:00
Vadim Zeitlin
0c837e5310 Add support for size_t to wxConfig
Allow writing and reading size_t values directly too, there were not
previously accepted unlike all the other arithmetic types.

Closes #19091.
2021-03-13 15:15:37 +01:00
Vadim Zeitlin
fce8780297 Add 64-bit integers support to wxConfig
Serialize them to strings in wxFileConfig, just as we always did for
long, but use wxRegKey support for storing them directly to the registry
in wxRegConfig.
2021-03-13 15:14:58 +01:00
Vadim Zeitlin
12d191823a Merge branch 'stc-typo-fixes'
Fix minor typos in STC docs.

See https://github.com/wxWidgets/wxWidgets/pull/2276
2021-03-13 13:35:28 +01:00
Vadim Zeitlin
5a623d3a4e Regenerate STC files after the typo fixes
Rerun src/stc/gen_iface.py.
2021-03-13 13:35:14 +01:00
Blake Madden
1b701bf340 Fix my incorrect wording. 2021-03-13 07:30:10 -05:00
Vadim Zeitlin
38f8c200dd Merge branch 'stc-simplify-width' of https://github.com/MaartenBent/wxWidgets
Remove some recently added unneeded code for wxSTC auto-complete listbox
(see https://github.com/wxWidgets/wxWidgets/pull/2250).

See https://github.com/wxWidgets/wxWidgets/pull/2277
2021-03-13 13:28:28 +01:00
Vadim Zeitlin
cc97e69346 Apply Scintilla doc fixes to the correct files
Back-propagate the fixes of 28d705424b (Fix double words and article
mismatches in docs., 2021-03-10) to interface/wx/stc/stc.h to the files
that this header is generated from to avoid losing these changes when
it's regenerated the next time.

See https://github.com/wxWidgets/wxWidgets/pull/2273
2021-03-13 13:17:51 +01:00
Vadim Zeitlin
1830128cbd Merge branch 'ownerdrawn-checkbox-dpi' of https://github.com/MaartenBent/wxWidgets
Fix size of owner-drawn checkbox at non-standard DPI.

See https://github.com/wxWidgets/wxWidgets/pull/2274
2021-03-13 12:50:25 +01:00
Artur Wieczorek
2a536c359c Fix visual state of enabled/disabled wxPropertyGrid
wxPropertyGrid needs to be refreshed while enabling/disabling to display
proper visual states of all wxPGProperty items.
2021-03-12 21:41:40 +01:00
Maarten Bent
7f278b7ff9 Remove unused function declaration in wxSTC ListBoxImpl
The implementation was already removed in de0992ea3d (Implement wxSTCListBox
using wxVListBox, 2019-03-19).
2021-03-11 22:31:03 +01:00
Maarten Bent
5e6000a1ee Simplify maximum width of wxSTC auto-complete listbox 2021-03-11 22:31:03 +01:00
Artur Wieczorek
c175155bad Fix higlighting properties in wxPropertyGrid without focus
When wxPropertyGrid lost the focus all selected properties (not only
the first one) should be redrawn to present their non-focused state.

Closes #19094.
2021-03-11 20:20:54 +01:00
Blake Madden
42d11b7b5a Remove extra article, hyphenate. 2021-03-11 05:49:16 -05:00
Blake Madden
b20d6c6e18 Fix minor typos in STC docs. 2021-03-11 05:39:48 -05:00
Maarten Bent
47047a608a Fix drawing undetermined state of owner-drawn checkbox 2021-03-10 23:54:12 +01:00
Maarten Bent
3a1576f74c Fix size of owner-drawn checkbox at non-standard DPI
Get the correct size from wxRendererNative instead of wxGetSystemMetrics.
Simplify positioning the button and label rectangles.

Closes #19095
2021-03-10 23:54:11 +01:00
Vadim Zeitlin
18edbe93f2 Merge branch 'webview_macos_missing' of https://github.com/TcT2k/wxWidgets
Implement various WebView macOS missing features.

See https://github.com/wxWidgets/wxWidgets/pull/2271
2021-03-09 21:45:19 +01:00
Vadim Zeitlin
3f2c84d4a9 Add 64-bit numbers support to wxRegKey
This uses the native registry support for 64-bit values available since
Windows XP.

Note that SetValue64() can't be just called SetValue() as this would
introduce ambiguities when writing an int or an enum to the registry.
This could be avoided by providing overloads for all the arithmetic
types, but it's arguably better to be more clear about what exactly is
being written to the registry in this low-level class and using a
different name is definitely simpler.
2021-03-09 21:09:42 +01:00
Vadim Zeitlin
eb33447c39 Use template function to avoid code duplication in wxRegConfig
Don't repeat exactly the same code for 3 different types, just use a
template function instead.

Change the existing TryGetValue() helpers to take all output parameters
consistently by pointer, rather than taking only long by pointer and the
other by reference. This allows to isolate the inconsistency of the type
of wxRegKey::QueryValue() parameter in a single place here, hiding it
from the rest of wxRegConfig code.

Add an extra unit test for writing/reading longs to/from wxRegConfig.
2021-03-09 19:15:03 +01:00
Václav Slavík
7228dbf50c Merge branch 'fix-macos-listbox-looks'
Fix visual issues in wxCheckListBox on macOS.

Closes https://github.com/wxWidgets/wxWidgets/pull/2267
2021-03-09 18:46:42 +01:00
Václav Slavík
9e0a2c04a8 Don't truncate item text in wxCheckListBox on macOS
wxListBox's width adjustment code appears to have been written before
wxCheckListBox's existence, and still assumed there's only one column, at
index 0, in some places.

In wxCheckListBox, however, there are two columns, and column 0 is the
non-resizable checkbox one. We need to use column 1 (aka the last
column) for automatic width updates, because that's where the text is.
2021-03-09 18:38:59 +01:00
Tobias Taschner
4ab9ee32a8 macOS: Implement access to dev tools for wxWebView 2021-03-08 12:32:53 +01:00
Tobias Taschner
57fa1c52b7 macOS: Implement wxWebView fullscreen API 2021-03-08 12:32:48 +01:00
Tobias Taschner
3caf48b04c macOS: Implement window.print() in wxWebView
A WKUIDelegate method has to be implemented to make
a javascript calling window.print() working.
2021-03-08 11:36:19 +01:00
Vadim Zeitlin
5ddf57c150 Add wxModule::AreInitialized()
This internal function will be useful to check if the modules are
already initialized, i.e. if the library is in the "steady state"
between the end of the initialization and the beginning of the cleanup
phases.
2021-03-07 20:39:09 +01:00
Vadim Zeitlin
e10e721120 Get rid of wxList and wxArray in wxModule code
Simply use wxVector instead, this shouldn't be less efficient (we rarely
remove the modules from the list and iterating over a vector should
actually be faster, as well as consuming less memory), but it avoids
ugly macros, is simpler to use and to debug and will be trivial to
replace with std::vector<> in the future.

No real changes, this is just pure cleanup.
2021-03-07 20:39:09 +01:00