Commit Graph

66795 Commits

Author SHA1 Message Date
Igor Korot
32d8b5954a Wrap label if necessary in wxInfoBar in wxGTK
Also update the sample to test showing an overlong message in wxInfoBar.

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

See #14121.
2019-08-05 13:50:11 +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
Olly Betts
76bc795737 Avoid multiple PFNGLXCREATECONTEXTATTRIBSARBPROC typedefs
Move the compatibility typedef of PFNGLXCREATECONTEXTATTRIBSARBPROC
back inside the conditional it is in for 3.0.x.

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

Closes #18324.
2019-08-05 13:14:11 +02:00
Ian McInerney
585302a69b Convert new menu unit test to C++98 style 2019-08-05 09:14:03 +02:00
Vadim Zeitlin
848f5e78a6 Use the actual brush for clearing wxDC in wxMSW
Instead of creating a temporary brush with the same colour as the
background brush, just use the background brush itself directly.

This allows clearing the window with non-solid brushes too, including
transparent ones -- even though the latter doesn't make much sense (as
it simply does nothing), it should still behave in the same way under
MSW as under the other platforms, while previously it cleared the window
using the solid black brush instead.

Closes #10273.
2019-08-05 02:44:16 +02:00
Ian McInerney
942fd47ae8 Minor formatting fix 2019-08-05 01:18:50 +02:00
Ian McInerney
ef59628376 Fix CI errors in the unit tests 2019-08-05 01:16:16 +02:00
Maarten Bent
b5dcee2e35 Use fractional point size for font in wxSVGFileDC output 2019-08-04 22:37:56 +02:00
Maarten Bent
8d25f0afa8 Improve wxSVGFileDC text background colour
Draw the background rectangle per line, instead of one big rectangle.

When there are multiple lines and one line is shorter, the area behind that
line should not get a background colour.
2019-08-04 22:37:56 +02:00
Maarten Bent
ae875842c1 Fix wxSVGFileDC text size when using non-default screen DPI
The text in a wxDC is adjusted to the screen DPI, but text in a SVG file is DPI
independent. Scale the text attribute so it has the same size as in the wxDC.

Scaling will modify the position of the attribute, correct this with translate.
2019-08-04 22:37:55 +02:00
Maarten Bent
b677c8d1b2 Add replacement for deprecated white-space tag in wxSVGFileDC output 2019-08-04 22:37:55 +02:00
Maarten Bent
c34f04b758 Refactor wxSVGFileDCImpl::DoDrawRotatedText
Create the style string outside the loop, it can determined once and used for
each line.
2019-08-04 22:37:55 +02:00
Ian McInerney
d82351ffa3 Add invalid keys to documentation 2019-08-04 21:49:33 +02:00
Ian McInerney
1eea919f13 Mark more keys as being invalid for GTK accelerator keys 2019-08-04 21:46:27 +02:00
Ian McInerney
a8af0c27af Add validity check before doing accelerator key creation 2019-08-04 21:45:59 +02:00
Ian McInerney
4d582eda57 Updated documentation to reflect invalid GTK keycodes 2019-08-04 21:25:49 +02:00
Ian McInerney
f3edad2761 Remove invalid GTK accelerator keys 2019-08-04 21:17:10 +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
Artur Wieczorek
c623d9cfc5 Remove references to unused internal flags 2019-08-04 20:20:48 +02:00
Artur Wieczorek
b06a9d227f Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
2019-08-04 20:20:19 +02:00
Igor Korot
c525784f77 Allow disabling saving wxFileConfig data when it is destroyed
This can be useful to avoid saving the changes performed by the user if
this turns out to be undesirable, for whatever reason.

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

Closes #13788.
2019-08-04 19:15:39 +02:00
Ian McInerney
891053792f Cleanup the GTK accelerator key creation
* Remove the accelerator text if the key is not created
* Fix naming of some GTK keycodes
2019-08-04 18:53:01 +02:00
Ian McInerney
17e8e9c015 Fix several accelerator key issues from unit tests
* Bad parsing of "Num " keys
* No parsing of NUMPAD_F keys
* Missing multiply key
* No case preservation on non-modifier accelerators
* No parsing of F13-24 keys
2019-08-04 18:48:50 +02:00
Ian McInerney
2cb96c16ff Add unit test for menu accelerator assignment 2019-08-04 18:41:06 +02:00
Ian McInerney
bdc301946f Upgrade accelerator entry unit tests
* Convert to the Catch framework
* Add a test for proper display name parsing
2019-08-04 18:24:16 +02:00
Ian McInerney
daae25753e Allow the use of the display name when creating accelerator keys 2019-08-04 18:22:55 +02:00
Maarten Bent
b0152155c0 Implement GetContentScaleFactor for wxMSWDCImpl 2019-08-04 14:16:53 +02:00
Maarten Bent
e31938c314 Revert "Temporarily switch to using previous AppVeyor MSW image"
This reverts commit 235972bc6e.
2019-08-03 21:09:22 +02:00
Maarten Bent
054cb35b39 Workaround for a crash with gcc 9.1 from MSYS2 MinGW 32bit 2019-08-03 21:08:10 +02:00
Vadim Zeitlin
235972bc6e Temporarily switch to using previous AppVeyor MSW image
The latest image uses msys2 gcc 9.1 which crashes while compiling our
tests, see e.g.

https://ci.appveyor.com/project/wxWidgets/wxwidgets/builds/26445788/job/ovajab6v4ltp5h70
2019-08-03 13:50:24 +02:00
Kvaz1r
a2f37a9ed5 Fix client coordinates mapping for wxSpinCtrl in wxMSW
Add MSWDoClientToScreen() and MSWDoScreenToClient() helpers and use them
with the correct HWND in DoClientToScreen() and DoScreenToClient()
overridden in wxSpinCtrl, i.e. the HWND of the "buddy" text control and
not the spin button, which is the main HWND of this control.

This notably fixes wxSpinCtrl::GetScreenPosition() which returned the
position of the spin button.

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

Closes #18455.
2019-08-03 13:26:56 +02:00
Tim Stahlhut
92b5f10840 Add message wxJoystick requires wxThread under MSW 2019-08-03 01:13:22 -04:00
Tim Stahlhut
f941b50c6b Use cygwin native timeval
__ms_timeval does not exist unless winsock.h or winsock2.h is included.
So, test for __WINDOWS__ before using __ms_timeval.

Fixes #18456
2019-08-02 17:44:21 -04:00
Tim Stahlhut
04cf2038e9 Ensure visibility of needed Cygwin declarations
Dl_info requires __GNU_VISIBLE be defined; and,
pthread_setconcurrency requires  __XSI_VISIBLE >= 500.
Defining _GNU_SOURCE satifies both of the above needs.
2019-08-02 17:32:51 -04:00
ousnius
2a2fa8c5af Allow expanding environment variables in XRC file paths
Add a new flag wxXRC_USE_ENVVARS for wxXmlResourceFlags that triggers a
call to wxExpandEnvVars() for bitmap, icon and animation paths.

This flag is not set by default to avoid silently changing the behaviour
of existing applications.

Closes https://github.com/wxWidgets/wxWidgets/pull/1445
2019-07-31 23:57:40 +02:00
Robin Dunn
cd2e3dd2cf Various interface corrections 2019-07-31 12:18:55 -07:00
Igor Korot
a6b92cb313 Don't send EXPANDED in generic wxTreeCtrl if not really expanded
On demand expandable items can fail to be actually expanded when the
user attempts to expand them, but the generic version of wxTreeCtrl
still sent an EXPANDED event in this case, which wasn't useful and
differed from the native MSW version.

Fix this and only send the event if the item was really expanded.

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

Closes #13886.
2019-07-31 01:05:48 +02:00
Vadim Zeitlin
47d58db2fb Restore, but deprecate, LOGFONT conversion functions in wxMSW
Even though these functions were declared in a header called private.h,
some code outside the library still used them, notably the popular
wxPdfDocument library.

So partially revert 72a225924d and these
functions back, and just mark them as deprecated for now.
2019-07-31 00:55:50 +02:00
Lauri Nurmi
4739b9dedd Add C++20-style starts_with()/ends_with() functions to wxString
C++20 introduces these two functions, along with some overloads, to
std::string. Add similar functions to wxString, which simply call the
already existing StartsWith() and EndsWith().

Closes https://github.com/wxWidgets/wxWidgets/pull/1452
2019-07-31 00:52:29 +02:00
oneeyeman1
a8c4cbee09 Fix new button appearance in already shown generic wxInfoBar
If the info bar is already shown, newly added buttons have to be relaid
out to appear correctly, so just add a call to Layout() in this case.

This makes the generic version work as the native GTK one, which already
handled this use case correctly.

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

Closes #14120.
2019-07-29 14:47:42 +02:00
Maarten Bent
36ef28c8f3 Use wxPen pattern when drawing shapes in wxSVGFileDC
Fix drawing a rectangle with a dotted line, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/1446
2019-07-29 14:39:10 +02:00
Stefan Csomor
b0a173a460
Changed the Mac font implementation to use full font names instead of (#1416)
* Switch to using PostScriptNames internally, keeping font family name on public API

* solving roundTrip Problem of wxNativeFontInfo only
2019-07-28 14:41:55 +02:00
Daniel Kulp
b9d668e8f1 Fix recently introduced crash during wxGrid initialization
CellToGridWindow(), added by frozen rows/columns patch, returned NULL
when called with invalid row/col arguments and this could happen if any
of several methods using m_currentCellCoords were called during wxGrid
initialization, while m_currentCellCoords was still (-1, -1).

Fix this by testing for this case explicitly and returning the main grid
window, which is never NULL, instead.

Closes #18454.
2019-07-28 01:53:52 +02:00
Vadim Zeitlin
bcf604b5cb Disable wxTE_PROCESS_ENTER unit tests under wxGTK
wxUIActionSimulator doesn't work reliably there and doesn't work at all
when using Xvfb.
2019-07-26 19:29:00 +02:00
oneeyeman1
ab7ba98dbc Implement support for wxCB_SORT in wxOSX wxComboBox
Insert the item at the correct location when this style is specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1438
2019-07-26 18:19:47 +02:00
Vadim Zeitlin
fb2c17c193 Merge remote-tracking branch 'sunset/process-enter'
Fix wxTE_PROCESS_ENTER logic for wxMSW and wxGTK too.

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

Closes #18273.
2019-07-26 18:02:08 +02:00
Vadim Zeitlin
9d92ba185c Fix truncating CJK mnemonics in control labels
13068d3603 introduced code for stripping
CJK mnemonics (i.e. trailing " (&X)") from the menu items, but due to
the use of wxStripMenuCodes() in wxControl::GetLabelText(), it also
applied to the control labels, resulting in wrongly measuring their size
(because the text used for measurement didn't include the "(&X)" part)
and truncating them in display.

Fix this by adding an explicit wxStrip_CJKMnemonics and using it only in
the code dealing with the menu item labels. This requires more changes
than just modifying GetLabelText() to use some wxStrip_NoCJKMnemonics
flag, but is more compatible as it's not impossible that some existing
code using wxStripMenuCodes() could be broken by this change too, while
now the existing behaviour is preserved.

Also improve wxStrip_XXX documentation.

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

See #16736.

Closes #18452.
2019-07-26 17:59:47 +02:00
Vadim Zeitlin
8ea46e70c5 Merge branch 'clang-link-error-and-semicolon-warnings' of https://github.com/MaartenBent/wxWidgets
Fix clang warnings about extra semicolons and a link error.

See https://github.com/wxWidgets/wxWidgets/pull/1434
2019-07-26 17:58:27 +02:00
Vadim Zeitlin
d97c2ed9e3 Merge branch 'grid-frozen'
Add support for freezing wxGrid columns and/or rows.

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

See https://github.com/wxWidgets/wxWidgets/pull/952
2019-07-26 17:57:23 +02:00