Commit Graph

64687 Commits

Author SHA1 Message Date
Stefan Csomor
f6bec4f2ee Using more precise ignore statements for Xcode 2018-08-26 11:33:29 +02:00
Vadim Zeitlin
f9f82714db Document wxTR_LINES_AT_ROOT peculiar behaviour under MSW
Without this style, expander button is not shown for the tree item
neither by the native control, so recommend always using it.

Closes #18201.
2018-08-25 22:33:57 +02:00
Vadim Zeitlin
3b75bce245 Fix annoying assertion failure in the treectrl sample
Don't pass invalid item to wxTreeCtrl::SelectItem(), just don't select
anything if there is no current item.
2018-08-25 22:30:46 +02:00
Vadim Zeitlin
de33f6715d Fix behaviour of menu items for wxTR_NO_LINES in the sample
It was getting wrongly updated because the menu item corresponded to the
absence of the style rather than its presence.

Fix this by inverting the menu item meaning, even if it's not very
natural, it should be good enough for the sample and preferable to
complicating its code.
2018-08-25 22:28:43 +02:00
Vadim Zeitlin
d09a7180e7 Make wxHtmlContainerCell ctor explicit
No real changes, just make it more difficult to misuse it accidentally.
2018-08-25 21:19:33 +02:00
Vadim Zeitlin
a59f5932df Add wxHtmlContainerCell::Detach()
This allows manipulating the HTML DOM from the outside, e.g. to detach
a header element in order to be able to repeat it on all pages.
2018-08-25 21:16:55 +02:00
Vadim Zeitlin
2895e5c4a1 Document that wxHtmlContainerCell::InsertCell() takes ownership
This might have been already clear, but it doesn't hurt to specify it
explicitly.
2018-08-25 21:14:40 +02:00
Vadim Zeitlin
869fb4f2bc Remove CppUnit compatibility macros from wxHtmlParser test
There was just a single test there, so remove all CppUnit boilerplate
which accounted for more than 50% of the file before adding more tests.
2018-08-25 21:00:11 +02:00
Vadim Zeitlin
012baf1ff2 Remove unnecessary heap allocations in wxHtmlDCRenderer
Make m_Parser and m_FS simple objects instead of pointers as it's
completely unnecessary to allocate them on the heap here.

Note that both wxHtmlWinParser (by explicitly including its header) and
wxFileSystem (which is implicitly included via wx/html/htmlpars.h) are
fully declared in the header, so using pointers doesn't even help with
reducing compilation dependencies.

No real changes.
2018-08-25 14:29:25 +02:00
Vadim Zeitlin
9db0234abc Allow passing already parsed HTML to wxHtmlDCRenderer
This is more efficient when the same HTML is reused multiple times, e.g.
for measuring it first and then rendering it.

The new function also makes it simpler to parse HTML and manipulate it
in some way before measuring and rendering it.
2018-08-25 02:37:55 +02:00
Vadim Zeitlin
de5ba70203 Fix handling events from their items in submenu itself
This previously worked in wxGTK, but not in wxMSW and even under wxGTK
it could be surprising that the submenu got the event, but its parent
menu did not.

Make things consistent between the platforms and send the event to the
menu directly containing it first, but then also to its parent menu(s).

Document the new behaviour and verify that it works as intended with a
new unit test.

Closes #18202.
2018-08-25 02:36:45 +02:00
Maarten Bent
5b2c905fb9 Log MSBuild AppVeyor messages
Provide better integration for the AppVeyor CI builds.

Closes https://github.com/wxWidgets/wxWidgets/pull/895
2018-08-24 20:08:51 +02:00
PB
b01f4ef8e7 Add more references to wxIconBundle to documentation
Add wxIconBundle to the list in the Overview of Available Classes /
Image and bitmap classes as well as to the documentation page for
wxIcon.

Closes https://github.com/wxWidgets/wxWidgets/pull/898
2018-08-24 20:07:38 +02:00
PB
4915f3b5a6 Correct list formatting in "Bitmaps and Icons" overview
Remove whitespace preceding @li tags which prevented doxygen from
formatting the text as a list. Add a period after the last item in the
lists where it was missing.

Closes https://github.com/wxWidgets/wxWidgets/pull/897
2018-08-24 20:06:52 +02:00
Vadim Zeitlin
418cf57a96 Fix drawing of static box with empty label under MSW
The top part of the box border was not drawn after the changes of
900c6d5d75 which decreased the top border
size too much in the case of empty label.

Fix this and also try to improve the code a little bit by introducing
another symbolic constant in MSW code and not using the constant from
the base class code, as like this we can at least keep all the related
constants together -- even if they're still as magic as ever.

Closes #18191.
2018-08-23 15:25:27 +02:00
Anil
ad4296fef4 Fix handling mouse events on scrolled wxHeaderCtrl
Fix confusion with the coordinates kind in FindColumnAtPoint(): it was
sometimes passed physical mouse coordinates and sometimes logical ones.
Make it clear now that it expects physical coordinates and adjust its
code accordingly.

Also remove a redundant call to FindColumnAtPoint().

Closes https://github.com/wxWidgets/wxWidgets/pull/889
2018-08-23 15:23:21 +02:00
VZ
d2462ff1cd
Fix missing enum in webview code for MinGW
This notably fixes building wxWebView with MinGW version used by AppVeyor.

See https://github.com/wxWidgets/wxWidgets/pull/894
2018-08-23 14:58:50 +02:00
Maarten Bent
190cb0e025 Remove trailing spaces in webview code 2018-08-22 20:02:42 +02:00
Maarten Bent
bfafb74761 Fix missing enum in MinGW 2018-08-22 20:01:02 +02:00
Paul Cornett
86ab6de0c1 Use clear() instead of assignment to wxEmptyString 2018-08-22 09:45:20 -07:00
Paul Cornett
f4bcb12709 Remove useless initializations
wxObject-derived types and wxString are null/empty by default.
2018-08-22 09:19:15 -07:00
Paul Cornett
41d534ac0d Use more accurate color conversion in DoGetPixel() 2018-08-22 08:39:13 -07:00
Paul Cornett
7c44f807ad Avoid GCC 8 warning "cast between incompatible function types" with -Wextra 2018-08-22 08:29:35 -07:00
Paul Cornett
d200f19c02 Fix non-unicode build after 82881d6b03
wxChar overload of wxTmemcpy() is not defined. Just use memcpy() directly
as wxStrlcpy() does not use wxChar.
2018-08-22 08:12:11 -07:00
Paul Cornett
1f8481eabc Fix restoring locale in SetArguments()
The string returned by setlocale() can be overwritten by subsequent calls,
so make a copy of it. See #18203
2018-08-22 00:00:43 -07:00
Vadim Zeitlin
14c121b469 Merge branch 'grid-mouse'
Improve mouse event handling in wxGrid during drag operations.

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

Closes #18186.
2018-08-21 13:03:09 +02:00
Steven Lamerton
b61123cd7d Allow distinguishing user- from script-opened wxWebView windows
Add wxWebViewEvent::GetNavigationAction() returning a value that can be
either wxWEBVIEW_NAV_ACTION_USER for the links opened by the user, or
wxWEBVIEW_NAV_ACTION_OTHER for the other ones (e.g. opened from
JavaScript code on the page).

Closes #15402.
2018-08-19 22:27:34 +02:00
Stefan Csomor
91aa6ba36e
OSX using ref data for colour and NSColor native support (#878)
* First attempt using ref data for colour and spliting implementation for CGColorRef and NSColor

* correcting SDK dependency

* Implementing feedback suggestions
2018-08-19 18:02:06 +02:00
Igor Korot
36d21ce6c8 Implement strike-through support for wxDataViewCtrl in wxGTK too
Previously it was supported in the generic version only, see #18180 and
the changes of 09124932eb

Closes https://github.com/wxWidgets/wxWidgets/pull/892
2018-08-19 12:06:32 +02:00
Vadim Zeitlin
617a15d418 Improve wxNotebook themed background drawing
Use GetThemeBackgroundContentRect() to properly draw the themed notebook
background in all configurations.

Closes #18156.
2018-08-18 15:44:43 +02:00
Vadim Zeitlin
151309b2e4 Improve wxDataViewModel::HasDefaultCompare() documentation
Document that returning true from it means that Compare() can (and will)
be called with -1 as the column index when the default sort order is
being used.

Closes #18190.
2018-08-18 15:28:16 +02:00
Vadim Zeitlin
2a3e3bb533 Merge branch 'clang-msw' of https://github.com/MaartenBent/wxWidgets
Fixes for clang under MSW and support in CMake build system.

See https://github.com/wxWidgets/wxWidgets/pull/887
2018-08-18 15:17:48 +02:00
Vadim Zeitlin
48da21619e Merge branch 'treectrl-delete-events'
See https://github.com/wxWidgets/wxWidgets/pull/881
2018-08-18 15:07:37 +02:00
Vadim Zeitlin
fc324fd9bf Merge branch '18189-progdlg-modality'
See https://github.com/wxWidgets/wxWidgets/pull/886
2018-08-18 15:06:27 +02:00
Vadim Zeitlin
5442edbbe9 Fix wrong udata type in wxFileSystemWatcher code under NetBSD
NetBSD kqueue struct uses "intptr_t" as type of the user data pointer
and not "void*" as all the other platforms using kqueue, so account for
it in this code.

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

Closes #18199.
2018-08-18 15:05:58 +02:00
Vadim Zeitlin
65eb827c18 Merge branch '18195-sched-prio-other'
See https://github.com/wxWidgets/wxWidgets/pull/882
2018-08-18 15:04:40 +02:00
Vadim Zeitlin
6132ce85a8 Do use compiler TLS support under NetBSD
It didn't work when support for using compiler-provided TLS was added in
7beff712f0 back in 2009 but is reported to
work since 2011, so it should be safe to use unconditionally now.

Closes #18200.
2018-08-18 15:01:41 +02:00
Vadim Zeitlin
bdbd316ef1 Improve ID documentation and add more links to it
Better describe various kinds of IDs and advise not to use hard-coded
values of them.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
8dc3024514 Add wxID_{LOWEST,HIGHEST} descriptions to the documentation
Make it more clear what do these ones actually stand for.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
bb00501e77 Fix mouse event handling while dragging in wxGrid
Ignore all the mouse events other than "left up" while dragging to avoid
releasing the mouse and ending the dragging operation too soon.

This required non-trivial refactoring of the code which hopefully should
also make it slightly more clear by centralizing high level logic in
ProcessGridCellMouseEvent() itself and calling various helper functions
from it instead of spreading this logic over the entire call tree.

The code still remains pretty confusing and rewriting it to use
wxMouseEventsManager (which would need to be generalized first to become
a template class using arbitrary item type instead of just "int", as
now) would undoubtedly do it a lot of good.

Closes #18186.
2018-08-18 14:45:55 +02:00
Vadim Zeitlin
53972b17ee Add helper wxGrid::DoAfterDraggingEnd() function
No real changes, just refactor the code to extract the part of
CancelMouseCapture() which can be useful not only when the mouse capture
is lost unexpectedly, but also when we release it of our own volition,
into a separate function.
2018-08-18 14:40:48 +02:00
Vadim Zeitlin
44efb4e3a4 Fix badly formatted Doxygen references in wxStandardID
@ref label argument must be on the same line.
2018-08-18 11:11:31 +02:00
Vadim Zeitlin
ad224330c0 Improve wxID_AUTO_{LOWEST,HIGHEST} description
Explain that the values of these constants are not 0 and 1, as could be
misconstrued by just looking at the enum declaration.
2018-08-18 11:08:14 +02:00
Maarten Bent
ef7d203bf4 Fix building taskbarbutton sample with precompiled headers 2018-08-17 20:00:48 +02:00
Maarten Bent
0bf459de92 Fix typos and whitespace in CMake files. 2018-08-17 20:00:47 +02:00
Maarten Bent
61500907ee CMake: Improve precompiled headers for wxscintilla
The auto-generated header causes undefined members and identifiers in the
standard c++ headers when using clang on macOS or Windows.
Do not disable precompiled headers entirely but use the main Scintilla
header as prefix header so there is at least a small speedup.
2018-08-17 20:00:47 +02:00
Maarten Bent
41d6bc579a Enable precompiled headers for samples 2018-08-17 19:56:10 +02:00
Vadim Zeitlin
a8448b084c Remove duplicate wxGrid::m_winCapture initialization
No real changes, just remove one of 2 duplicate assignments.
2018-08-17 00:26:42 +02:00
Maarten Bent
ceda6f6815 Support clang compiler on Windows when using CMake 2018-08-16 21:18:44 +02:00
Maarten Bent
8d72f3c5f4 Fix multiple definition error when using clang on Windows 2018-08-16 21:18:43 +02:00