Commit Graph

36729 Commits

Author SHA1 Message Date
Vadim Zeitlin
abce91f967 Remove dynarray.cpp source file
After the recent dynamic array macros refactoring, there was no
implementation of wxBaseArray any more and only wxArrayString-related
code remained in this file, so just move the latter to arrstr.cpp, where
it should have been put from the beginning (except that this code
probably predates arrstr.cpp addition), and remove the old file
entirely.
2018-06-20 13:59:03 +02:00
Stefan Csomor
c58d7755a1 Dark Mode for non native toolbar
see #18146
2018-06-19 21:50:34 +02:00
Stefan Csomor
dcd012184a Dark Mode for wxPropertyGrid
see #18146, thanks to dkulp
2018-06-19 21:49:15 +02:00
Tobias Taschner
778bccbf12 Include macOS 10.14 name in wxGetOsDescription() 2018-06-19 18:15:40 +02:00
Stefan Csomor
805db8baa8 Dark Mode for wxRenderer for HeaderButtons and Sashes
see #18146
2018-06-17 18:39:01 +02:00
Stefan Csomor
d2aafff4a2 Second part of support for Dark Mode for wxRibbon, use flat appearance starting from 10.10
see #18146
2018-06-17 17:32:11 +02:00
Stefan Csomor
12f8e4b5c3 First part of support for Dark Mode for wxRibbon
see #18146
2018-06-16 10:44:27 +02:00
Stefan Csomor
60c1a4be8b Fixing implementation of wxSYS_COLOUR_INACTIVECAPTIONTEXT 2018-06-16 10:36:46 +02:00
Vadim Zeitlin
7da13b273c Fix wxOSX compilation problem due to missing wx/settings.h
Include the header required by the code using wxSystemSettings added in
5091d87825

See #18146.
2018-06-14 22:33:53 +02:00
Stefan Csomor
56d125041f Use built-in conversion to CGColorRef where available 2018-06-14 20:11:26 +02:00
Stefan Csomor
5091d87825 Support Dark Mode for Status Bar
see #18146
2018-06-14 20:09:37 +02:00
Paul Cornett
016a506eee add GtkWidgetPath wrapper class 2018-06-14 10:41:27 -07:00
Naser Buhamad
1adc3ba4ee Fix menu bar background colour in wxQt
wxMenuBar is a native, not generic, window, so pass "false" to
PostCreation() to use the correct colours for it.
2018-06-13 23:53:58 +02:00
Stefan Csomor
9cef8282ab Supporting Appearance Mode change under macOS 10.14
The system color functions depend on the current appearance, this is not automatically set to the effective appearance (that can be changed during runtime via the system preferences), added a helper class to make sure the correct version is used for retrieval.
2018-06-13 23:02:50 +02:00
Stefan Csomor
2acda98337 Fixing NSColor value for wxSYS_COLOUR_WINDOW
controlBackgroundColor should be used as a background for large controls like lists etc. this corresponds to the usage of wxSYS_COLOUR_WINDOW, thanks to dkulp
2018-06-12 23:14:44 +02:00
Václav Slavík
cd02c548f4 Implement wxEVT_SYS_COLOUR_CHANGED in wxOSX (#832)
Starting with macOS 10.14 Mojave, system colors can change dynamically
when the user switches between light and dark modes. Detect this by
observing the effectiveAppearance property and emit
wxSysColourChangedEvent accordingly.

See #18146.
2018-06-12 20:27:50 +02:00
Stefan Csomor
71bb680a93 Using NSColor System Colours
Removing the old HITheme Constants for the last two wx system colours, first step for Dark Mode support, see https://trac.wxwidgets.org/ticket/18146
2018-06-11 22:38:05 +02:00
Vadim Zeitlin
6294511a4e Merge branch 'gcc8-msw-warns'
Fix tons of warnings given by default by gcc 8, potentially fixing some
real problems in Win64 build in the process.

See https://github.com/wxWidgets/wxWidgets/pull/822
2018-06-10 23:41:05 +02:00
Vadim Zeitlin
0d176db96d Merge branch 'array-less-macros'
Use templates to implement the legacy dynamic array classes as much as
possible instead of doing it in macros.

This makes the code much more maintainable and readable as well as
easier to debug.

It also allows to avoid casts between function pointers of incompatible
types, which triggered many -Wcast-function-type warnings from g++ 8.
2018-06-10 22:56:03 +02:00
Vadim Zeitlin
96d9616201 Merge branch 'html-print-cleanup'
Simplify wxHTML pagination code and make it easier to reuse from
applications.

See https://github.com/wxWidgets/wxWidgets/pull/817
2018-06-10 14:56:33 +02:00
Vadim Zeitlin
64fc4dc6cd Merge branch 'aui-docview'
Make it possible to easily use AUI classes instead of the standard MDI
docview frames.

Also fix a few old and dirty hacks in AUI code.

See https://github.com/wxWidgets/wxWidgets/pull/808
2018-06-10 14:53:39 +02:00
Maarten
ce903da798 Fix glitch in AUI frame with standard wxToolbar
When the height of the AUI toolbar pane is higher than the wxToolbar, the extra
area shows a glitch. This happens because the paint handler never draws on this
area. Clearing the DC of the frame with the AUI background colour fixes this.

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

Closes #18138
2018-06-08 19:17:22 +02:00
Paul Cornett
b839388c82 Avoid GLib warning "couldn't find weak ref" with wxBitmapComboBox
Should have been part of c391cfd617
2018-06-06 09:09:12 -07:00
Paul Cornett
102be6a3cc Add GtkStyleContext helper class
Manages ownership of GtkStyleContext and GtkWidgetPath, provides functions
for creating and querying style contexts.
2018-06-05 09:21:25 -07:00
Vadim Zeitlin
c8f563f269 Merge branch 'master' of https://github.com/mmmaisel/wxWidgets
Make wxRibbonButtonBar buttons more customizable.

See https://github.com/wxWidgets/wxWidgets/pull/762
2018-06-04 23:03:24 +02:00
Tim S
bc92ed9d85 Replace wxUSE_GENERICDATAVIEWCTRL with wxHAS_GENERIC_DATAVIEWCTRL
The former symbol is inconsistent with all the other wxUSE_XXX ones and
hence confusing and kept only for compatibility reasons.

Closes https://github.com/wxWidgets/wxWidgets/pull/827
2018-06-04 18:26:34 +02:00
Vadim Zeitlin
1abdac6566 Work around gcc 8 -Wcast-function-type in wxMSW wxGLContext
Casts between incompatible function types seem to be unavoidable here,
as wglGetProcAddress() always returns generic PROC type, so just
suppress the warnings temporarily.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
a17a8f667f Use wxZeroMemory() rather than memset() for clearing struct fields
This does the same thing but avoids gcc 8 -Wclass-memaccess warning
(harmless in this case, but potentially useful elsewhere, so it seems
better to work around rather than disable it).
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
2ec97b7bc6 Remove useless border style check from wxVListBox::Create()
The comparison could never be true as wxDEFAULT is not one of
wxBORDER_XXX values and so is not included in wxBORDER_MASK and so was
useless -- and just results in -Wtautological-compare from gcc 8.

Simply remove this check, a047aff270 added
it apparently to use themed border by default for wxVListBox, but this
was done in a better way in 28319afe55.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
f75bee21ec Use correct function type pointers in wxQTMediaBackend code
This avoids gcc 8 -Wcast-function-type warnings while not being
obviously less (nor more...) correct than the old version.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
ef26c969cb Use correct DLGPROC callback signature in Win64 build
The callback used with CreateDialogIndirect() must return INT_PTR, which
is 64 bits under Win64, not LONG, which is still 32 bits.

This fixes a gcc8 -Wcast-function-type warning and might fix a real bug
in Win64 build too.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
4d1145787b Fix wxKeyboardHook() callback signature in Win64 build
The callback must return LRESULT, which is 64 bits under Win64, not
int, which is still 32 bits.

This fixes a gcc8 -Wcast-function-type warning and might fix a real bug
in Win64 build too.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
4230cb24de Add WXWNDPROC typedef and use it in wxMSW instead of WXFARPROC
WNDPROC and FARPROC are not the same thing in MSW and it's wrong to use
WXFARPROC as the type of different window procedures we use.

Introduce WXWNDPROC which is more clear and correct and use it instead.

Also get rid of a few casts which are not necessary any longer.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
7624e31a95 Stop passing WNDPROC argument to wxCheckWindowWndProc()
This parameter wasn't used anyhow and casting wxWndProc or m_oldWndProc
to WXFARPROC just resulted in gcc8 -Wcast-function-type warnings.

Get rid of them by not passing the window proc to this function at all.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
004af0b963 Use correct DDE callback signature in Win64 build
Don't use the deprecated since Win16 (!) and doing nothing
MakeProcInstance() and fix the signature of DDECallback() which was
actually wrong in Win64 build but the problem was hidden due to the
casts done inside and outside MakeProcInstance() before.

Remove this macro and fix the signature to actually conform to the real
callback one.

This also fixes another gcc8 -Wcast-function-type warning.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
b0d6b11ebe Always use wxVector<> for dynamic arrays implementation
Dramatically simplify dynamic array macros by keeping only the
implementation previously used in wxUSE_STD_CONTAINERS case and dropping
the other one, as we can use the std::vector-based implementation on top
of our own wxVector<>, which is available whether wxUSE_STD_CONTAINERS
is 0 or 1.

This allows to get rid of tons of ugly macro-based code without breaking
compatibility.
2018-06-02 13:56:06 +02:00
Vadim Zeitlin
950b1a9d51 Merge branch 'replace-connect-bind'
Replace almost all occurrences of wxEvtHandler::Connect() with Bind().

See https://github.com/wxWidgets/wxWidgets/pull/820
2018-06-01 18:31:59 +02:00
Václav Slavík
dcac98d7e8 Fix cursor flicker after popup menu in rich wxTextCtrl
After bd650ec and cad2b9c, showing a popup menu in wxTextCtrl with
wxTE_RICH2 and then dismissing it without choosing a command would
result in the cursor flickering between arrow and beam cursors until
another context menu was shown.

See https://github.com/vslavik/poedit/issues/483

Fixed by checking if the popup menu is still valid (and so shown) in
the cursor handling code.
2018-06-01 10:10:43 +02:00
Paul Cornett
74904281e4 Free widget path, should have been part of 900752b152 2018-05-31 11:11:21 -07:00
Paul Cornett
900752b152 Implement wxSYS_VSCROLL_X/wxSYS_HSCROLL_Y metric for wxGTK 2018-05-31 10:08:20 -07:00
Vadim Zeitlin
3d9d46b754 Don't send "page changed" events from wxNotebook dtor with GTK+ 3
These events are unexpected and inconsistent with the other platforms,
including GTK+ 2, so make sure we don't send them during the
destruction.

Closes https://github.com/wxWidgets/wxWidgets/pull/821
2018-05-31 11:42:11 +02:00
Vadim Zeitlin
a69cbd3d0c Merge branch 'wrap-gtk.h'
Add a wrapper for gtk/gtk.h allowing to avoid gcc 8 warnings when
including the GTK+ header directly.

See https://github.com/wxWidgets/wxWidgets/pull/814
2018-05-31 01:28:40 +02:00
Vadim Zeitlin
d4f380e16e Use Bind() instead of Connect() in wxWidgets code
Use more modern function which allows to avoid wxXXXEventHandler()
macros use.

No real changes.
2018-05-30 13:06:20 +02:00
Vadim Zeitlin
8c8ff2c24d Merge branch 'tar-memset-warn'
Fix a bunch of -Wclass-memaccess in tar streams code.

See https://github.com/wxWidgets/wxWidgets/pull/813
2018-05-27 23:10:46 +02:00
Vadim Zeitlin
adfde70054 Remove redundant wxHtmlDCRenderer::m_NumPages
The actual number of pages is given by the number of elements in
m_PageBreaks vector after CountPages() is shown and is unknown until
then, so m_NumPages is completely unnecessary and can be just removed.
2018-05-25 01:35:34 +02:00
Vadim Zeitlin
8d7601295b Make wxHtmlDCRenderer::FindNextPageBreak() const
It doesn't modify the renderer.
2018-05-25 01:31:54 +02:00
Vadim Zeitlin
c5bb583cdf Replace wxList used in wxHtmlPrintout with wxVector<> too
Prefer the use of the standard-like template class to macro-based list.

It also makes more sense to use a vector rather than a linked list here,
as the elements are never removed from or inserted into m_Filters, so
there is no reason to prefer the list structure.
2018-05-25 01:22:29 +02:00
Vadim Zeitlin
edeca4d9d6 Use wxVector<int> instead of wxArrayInt in wxHtmlDCRenderer
No real changes, just prefer standard-like template class to the legacy
wx one.
2018-05-25 01:19:01 +02:00
Vadim Zeitlin
b9b6ccb804 Remove "known_pagebreaks" from wxHtmlCell::AdjustPagebreak()
This parameter is not actually needed for any reasonable page breaking
algorithm, as it shouldn't care about any previous page breaks except
for the last one, which is already known as "*pagebreak - pageHeight" in
this function.

Removing it will allow to stop using wxArrayInt in the code using this
method and switch to an std::vector<int> instead.

This is not a backwards compatible change, but it seems that there is
very little code actually overriding this function (none could be found
in any open source repositories) and updating it should be as simple as
removing the now unneeded argument.
2018-05-24 18:12:40 +02:00
Vadim Zeitlin
c58d81d32d Simplify wxHtmlPageBreakCell::AdjustPagebreak()
There is no need to look in the known page breaks array for a page break
at the position of this cell, all we care about is whether this cell is
on the current page or not: we must insert a page break if, and only if,
it is.

No real changes in behaviour, but the code is now much simpler to
understand and this change paves way for removing "known_pagebreaks"
entirely, as it was only added for the use in this function (see
f2034f1b6e from 15 years ago), which
doesn't even actually need it.

It should also make pagination code somewhat faster.
2018-05-24 18:12:41 +02:00