Commit Graph

18343 Commits

Author SHA1 Message Date
Robin Dunn
7c33d3f969 Gradients can have matrix transforms too. Updates for Cairo. 2019-09-04 14:19:23 -07:00
Robin Dunn
e297b5ded9 Deindent inline code blocks 2019-09-04 14:19:23 -07:00
Robin Dunn
7367f1803d Reorder classes a bit to resolve ordering conflicts 2019-09-04 14:19:23 -07:00
Robin Dunn
0265312297 Update include/wx/graphics.h
fix style

Co-Authored-By: VZ <vadim@wxwidgets.org>
2019-09-04 14:19:23 -07:00
Robin Dunn
06bf8e0d41 Update include/wx/graphics.h
fix opening brace style

Co-Authored-By: VZ <vadim@wxwidgets.org>
2019-09-04 14:19:23 -07:00
Robin Dunn
59ce48924a Add gradient pen support for Cairo 2019-09-04 14:19:23 -07:00
Robin Dunn
4708d2539e Add gradient-related attributes to wxGraphicsPenInfo 2019-09-04 14:19:23 -07:00
Paul Cornett
92cbb02e9f Fix erroneous header click event after double click
See #18490
2019-09-04 11:41:28 -07:00
Vadim Zeitlin
417eff2bf8 Add missing wxUSE_MENUS checks to generic MDI classes
Make mdig.cpp compile with wxUSE_MENUS==0, as it already had many
wxUSE_MENUS checks and only missed a few more of them.

See #9626.
2019-08-28 20:11:23 +02:00
Paul Cornett
df450566dd Avoid including X11 headers from <wx/glcanvas.h>
It's generally wxWidgets policy not to include platform-specific headers from our own
to avoid namespace pollution issues, in this case with names like "None" and "Window".
2019-08-28 09:37:49 -07:00
Vadim Zeitlin
20b9964007 Avoid warnings about deprecated wxPG_XXX when building wx itself
Getting the warnings about deprecated macros when building the library
itself is not useful, as it must continue to use them as long as
WXWIN_COMPATIBILITY_3_0 exists.

Closes https://github.com/wxWidgets/wxWidgets/pull/1510
2019-08-27 22:21:01 +02:00
Vadim Zeitlin
6596f5a98d Merge branch 'accel_key_compat' of https://github.com/imciner2/wxWidgets
Give warnings for accelerator keys not supported by GTK under all
platforms instead of using asserts fin wxGTK only.

See https://github.com/wxWidgets/wxWidgets/pull/1505
2019-08-27 13:11:07 +02:00
Vadim Zeitlin
5873ee7e4a Merge branch 'tlw-layout'
Make wxTLW::Layout() do the right thing and resize the only child to fit
the entire TLW client area.

See https://github.com/wxWidgets/wxWidgets/pull/1496
2019-08-27 13:08:47 +02:00
Vadim Zeitlin
b225d78187 Merge branch 'per-monitor-dpi-aware-framework' of https://github.com/MaartenBent/wxWidgets
Add preliminary support for per-monitor DPI awareness to wxMSW.

Individual controls still need to be fixed, so this support is still
experimental/unfinished for now.

See https://github.com/wxWidgets/wxWidgets/pull/1499
2019-08-27 12:59:56 +02:00
Paul Cornett
536025791a Avoid converting empty strings to NULL pointers in non-Unicode build
...when using utf8_str() or wxGTK_CONV as argument to const char* function parameter
2019-08-25 23:08:59 -07:00
Paul Cornett
fca4ef0458 Use wxDC rather than wxClientDC for parameter type 2019-08-25 20:53:33 -07:00
Paul Cornett
3b54720b3a Move wxKeyEvent assignment operator out of header
It causes a warning with MSVC code analysis:
"warning C26437: Do not slice (es.63)"
It's unclear if this function even needs to exist, but at least
move it out of line so the warning does not occur for user code.
2019-08-25 18:11:01 -07:00
Maarten Bent
219fa3fa89 Add function to get font pointSize from lfHeight at specific DPI 2019-08-25 22:01:33 +02:00
Vadim Zeitlin
e563d4858a Adjust the font size when DPI of window changes 2019-08-25 22:01:14 +02:00
Maarten Bent
e3d3a0b7e8 Generate wxDPIChangedEvent when DPI changes 2019-08-25 22:01:11 +02:00
Ian McInerney
e961307043 Add compatibility warning for invalid GTK accelerator keys 2019-08-25 15:26:13 +02:00
Tomay
050ca4ce3a Add wxRegEx::QuoteMeta() helper
Quote all characters special for wxRegEx in the given string: this can
be useful when searching for a literal string using wxRegEx.

Closes https://github.com/wxWidgets/wxWidgets/pull/1489
2019-08-25 12:32:51 +02:00
oneeyeman1
14bcf09924 Move URL<->filename conversion functions to wxFileName
This ensures that they are always available and can be used in
wxLaunchDefaultBrowser() in all build variants, whereas before this
function didn't handle file:// URLs correctly when the library was built
with wxUSE_FILESYSTEM==0.

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

Closes #10414.
2019-08-25 00:48:39 +02:00
oneeyeman1
5e7b515349 Avoid showing 2 tooltips simultaneously in wxMSW wxListCtrl
Only show the built-in control tooltips if we're not showing any custom
ones.

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

Closes #10492.
2019-08-25 00:40:08 +02:00
Maarten Bent
137713e0c8 Add framework for Per-Monitor DPI Awareness on Windows
React to the WM_DPICHANGED event and update the size of the  child windows and
the top-level window. Scale the minimum and maximum window size to the new DPI.

Only react to WM_DPICHANGED when DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 is
used.
2019-08-24 22:30:11 +02:00
Artur Wieczorek
70e9dbd756 Make wxComboCtrl a wxCompositeWindow
wxComboCtrl consists of several controls (text entry, button, popup) and therefore should be implemented as a wxCompositeWindow to prevent problems with generating spurious events when e.g. focus is transferred between the sub-controls.

Closes #18394.
2019-08-23 22:55:05 +02:00
Vadim Zeitlin
773f8f86e3 Merge branch 'svg-misc' of https://github.com/MaartenBent/wxWidgets
Miscellaneous improvements to wxSVGFileDC, notably add gradient fill
support and shape rendering mode.

See https://github.com/wxWidgets/wxWidgets/pull/1493
2019-08-22 17:21:00 +02:00
Vadim Zeitlin
3241e7a850 Make wxTopLevelWindow::Layout() do the expected thing
It makes sense for explicit calls to Layout() to use the same logic as
is implicitly used when a TLW is resized, so override it to use
TLW-specific logic instead of using a separate DoLayout() for this.

Note that DoLayout() still has to be preserved because Debian code
search finds at least a couple of examples of its use outside the
library, meaning that there are probably quite a few more of them in the
wild.

Also, wxTopLevelWindow still needs its own wxEVT_SIZE handler because
the base class only calls Layout() if GetAutoLayout() is true, while we
want it to be always called. This might be worked around by just calling
SetAutoLayout(true) in wxTopLevelWindow ctor, but it seems safer, from
compatibility point of view, to keep wxTopLevelWindow::OnSize() instead.

See #18472.
2019-08-22 14:01:34 +02:00
Vadim Zeitlin
ea965327eb Add wxString::shrink_to_fit() as synonym for Shrink()
Provide C++11 std::string-compatible method name too.
2019-08-22 00:01:36 +02:00
Vadim Zeitlin
2dbdbe1927 Merge branch 'mac-opengl-resize'
Really fix Mac wxGLCanvas resize under macOS 10.14.5.

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

Closes #18402.
2019-08-21 23:53:27 +02:00
Maarten Bent
bee6168076 Make wxSVGFileDC function parameter names consistent with wxDC 2019-08-21 22:33:36 +02:00
Maarten Bent
0b728d1bea Use base version of DrawCheckMark directly in wxSVGFileDC 2019-08-21 22:33:36 +02:00
Maarten Bent
75486529e3 Process review comments in wxSVGFileDC 2019-08-21 22:33:35 +02:00
Maarten Bent
9c193e1774 Add wxWindow::GetDPI()
This is simpler to use than wxDisplay(window).GetPPI() which was used
instead of it so far in all ports and can be implemented more
efficiently for wxMSW.

Remove wxGetWinTLW, GetDPI already tries to get the top window.
2019-08-21 19:30:07 +02:00
Maarten Bent
dfe76430cc Implement GradientFillLinear and GradientFillConcentric for wxSVGFileDC 2019-08-20 20:21:05 +02:00
Maarten Bent
26b273bef9 Fix RTTI class declarations of wxSVGFileDC
wxIMPLEMENT_DYNAMIC_CLASS requires a default constructor (no filename). Check
if m_outfile is initialized with a valid filename before using it.
2019-08-20 20:21:05 +02:00
Maarten Bent
a41a8ded79 Allow to set wxSVGFileDC shape rendering mode 2019-08-20 20:21:05 +02:00
Vadim Zeitlin
4b227835ac Merge branch 'svg-drawtext' of https://github.com/MaartenBent/wxWidgets
Fixes and improvements to wxSVGFileDC::Draw[Rotated]Text().

See https://github.com/wxWidgets/wxWidgets/pull/1466
2019-08-20 13:27:26 +02:00
Vadim Zeitlin
ffd424debb Merge branch 'mswdc-draw-point-checkbox' of https://github.com/MaartenBent/wxWidgets
Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.

Also fix wxGCDC::DrawPoint() to use the default one point wide pen.

See https://github.com/wxWidgets/wxWidgets/pull/1471
2019-08-20 13:25:28 +02:00
Vadim Zeitlin
c2e6b86786 Add WX_IS_MACOS_AVAILABLE_FULL availability check macro
We could change WX_IS_MACOS_AVAILABLE itself to be a variadic macro, but
this would be significantly more complex and doesn't seem warranted.
2019-08-20 11:14:10 +02:00
Vadim Zeitlin
1d63c8b11d Fix typo in a comment
No real changes.
2019-08-20 11:10:57 +02:00
Paul Cornett
b200c661ed Fix wxPropertyGrid headers so they can be compiled independently
See #18465
2019-08-15 17:27:07 -07:00
Maarten Bent
2874dab7f0 Add DrawCheckMark and GetCheckMarkSize to wxRendererNative
Show its use in the render sample. Also use the recently added GetExpanderSize
for the size of DrawTreeItemButton.
2019-08-10 13:42:04 +02:00
georgp24
8e41677989 Fix wxX11 build with --disable-graphics_ctx build option.
Add missing #if wxUSE_CAIRO checks.

Closes https://github.com/wxWidgets/wxWidgets/pull/1472
2019-08-10 00:00:18 +02:00
Maarten Bent
cdc004a941 Use generic DrawCheckMark in MSW wxDC
Use the generic implementation, so it looks like the check marks on all other
platforms and graphics contexts and not like a Windows control.
2019-08-07 21:21:29 +02:00
Stefan Csomor
0044bf4a7a macos 10.15 build
adapt to removed headers, add version defines
2019-08-07 12:05:13 +02:00
Kvaz1r
88f04f551e Fix changing colours of wxSpinCtrl in wxMSW
Ensure that the new colours are actually shown after Refresh() is called
by refreshing the text part of the control as well, and not just the
spin button.

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

Closes #12382.
2019-08-06 00:08:19 +02:00
oneeyeman1
43c519e04f Add wxListCtrl::IsVisible()
Allow checking if the given item is (at least partially) visible on
screen.

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

Closes #9949.
2019-08-05 13:46:15 +02:00
Vadim Zeitlin
3bb74df215 Merge branch 'staging' of https://github.com/stahta01/wxWidgets_PR
Fix Cygwin 64 bit build issues for wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/1460
2019-08-05 13:25:03 +02:00
Artur Wieczorek
eca1e857fe Remove unnecessary headers from wxPropertyGrid files
Currently there are included plenty of headers which are apparently not necessary.
2019-08-04 20:20:48 +02:00