Commit Graph

66583 Commits

Author SHA1 Message Date
PB
60a09f55e0 Slightly improve wx(Sorted)ArrayString documentation
Correct the signature of wxArrayString::Insert():
the first parameter is "const wxString&", not "wxString".

Mention wxSortedArrayString in wxArrayString documentation.

The rest are just minor edits improving language, consistency, and formatting.
2019-08-08 11:32:04 +02:00
Paul Cornett
b2d1343fbc Update various GNU configuration scripts to latest versions
See #18459
2019-08-07 09:00:09 -07:00
Stefan Csomor
4c94ad69d8 addin iOS icons and plist 2019-08-07 14:52:20 +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
Vadim Zeitlin
75134c752e Prettify the changes of the previous commit
Use switch over enum value instead of consecutive ifs.

Don't duplicate wxGetListCtrlSubItemRect() code, just call it instead.

See https://github.com/wxWidgets/wxWidgets/pull/1461
2019-08-06 00:05:06 +02:00
oneeyeman1
da524ebacb Fix retrieving the size of item label in native MSW wxListCtrl
Closes https://github.com/wxWidgets/wxWidgets/pull/1461

Closes #11355.
2019-08-06 00:01:07 +02:00
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
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
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
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
Vadim Zeitlin
aba9c119fa Don't crash in wx{File,Dir}PickerCtrl::GetTextCtrlValue()
If there is no text field, assert and return empty string instead of
just crashing.

Closes #14078.
2019-07-25 21:43:00 +02:00
Vadim Zeitlin
f9e80841dd Use safe wxStrlcpy() instead of strncpy()
This probably doesn't change much in practice, as it's unlikely that
SDL_GetCurrentAudioDriver() returns a 255 character long stting, but is
still safer and avoid gcc 8 warnings about passing exactly the buffer
size to strncpy().
2019-07-25 20:26:22 +02:00
Paul Cornett
b717d0c8d5 Add GTK-specific implementation of wxDisplay::GetFromWindow()
The generic implementation indirectly uses ClientToScreen(), which won't work
with Wayland, and causes debug warnings when used before window is realized.
2019-07-25 10:35:12 -07:00
Andreas Falkenhahn
79724b1710 Allow opening ToC and index in wxCHMHelpController
Use special values of DisplaySection() and KeywordSearch() parameters to
open the table of contents (if section is -1) or search page (if the
keyword to search for is empty) when using CHM help controller.

This is less discoverable than having separate Display{TOC,Search}()
methods, but avoids introducing special API that couldn't be implemented
in the other wxHelpController implementations.

Closes #18445.
2019-07-24 11:29:06 +02:00
Artur Wieczorek
9eb4c8ee2b Don't mention deprecated event type constants in the documentation
Several wxEVT_COMMAND_xxx constants were replaced with alternative (shorter) names in ce7fe42e84 and since 2.9.5 they are actually deprecated and shouldn't be mentioned in the documentation.
2019-07-22 21:11:45 +02:00
Artur Wieczorek
66b798692e Fix deleting "embedded" toolbar from its own event handler
When we create a toolbar from within the event handler of another toolbar several times (so we have a chain of embedded toolbars) and the last toolbar is destroyed, gs_liveToolbar variable is reset in its dtor what prevents from executing the part of code in MSWCommand() for other existing toolbars if they are still in their event handlers too (still executing OnLeftClick() function). This may happen when toolbars are created in the chain of modal dialog boxes.
To prevent this interference between the toolbars from occurring we have to keep track of all of active toolbars in the chain instead of keeping track of only the last one.

Closes #18309.
2019-07-22 18:57:49 +02:00
Vadim Zeitlin
acac868c60 Merge branch 'combo-event'
Fix bug with string field not being set in wxOwnerDrawnComboBox events.

See https://github.com/wxWidgets/wxWidgets/pull/1436
2019-07-22 18:48:20 +02:00
Maarten Bent
37f806f1d6 Release the HDC in wxGetSystemMetrics and wxSystemParametersInfo
Use WindowHDC instead of calling ::GetDC() manually and never calling
::ReleaseDC() on it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1437
2019-07-22 18:47:53 +02:00
Vadim Zeitlin
366233e400 Add a TODO comment for wxVListBox refactoring
Just note that it would be better to avoid duplicating the code already
existing in another place in wxVListBoxComboPopup::SendComboBoxEvent().
2019-07-21 21:38:59 +02:00
Vadim Zeitlin
cd8dade23c Set event string field for wxOwnerDrawnComboBox events
Call wxCommandEvent::SetString() for consistency with the native
wxComboBox.
2019-07-21 21:37:05 +02:00
Vadim Zeitlin
6caba72637 Remove redundant wxCommandEvent::SetEventObject() call
No real changes, just don't call SetEventObject() already called from
InitCommandEventWithItems() (via InitCommandEvent()).
2019-07-21 21:32:16 +02:00
Vadim Zeitlin
e8a7bae0a7 Alternative clang on Windows link fix
Remove WXDLLIMPEXP_BASE from wxObjectEventFunctor declaration: this
class only has inline methods and so doesn't define any functions that
would need to be exported from the DLL.

This reverts commit c0f2f38011.
2019-07-21 21:22:55 +02:00