Commit Graph

64272 Commits

Author SHA1 Message Date
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
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
Vadim Zeitlin
356c93dc3c Merge branch 'staging' of https://github.com/stahta01/wxWidgets_PR
Better documentation for __WXGTKXXX__ constants.

Closes https://github.com/wxWidgets/wxWidgets/pull/825
2018-06-01 18:20:27 +02:00
Tim S
f295dfdd0c Add (2.6) to "GTK+ 2.0 or higher" 2018-06-01 09:03:39 -04:00
Tim S
60b7bc037f Replace use of __WXGTK24__ with __WXGTK20__
Corrected the change to WXGTK by using WXGTK20 instead
2018-06-01 08:49:48 -04: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
Tim S
e3a9643d2a Replace use of __WXGTK24__ with __WXGTK__ 2018-05-31 19:30:53 -04:00
Tim S
cce9fc7f15 Update wxGTK defines to match code 2018-05-31 19:30:53 -04: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
5f7a6bd15b Replace Connect() with Bind() in all samples and utils too
Still use Connect() in unit tests which were written explicitly for it
and in EventConnector, which can't use Bind() as it uses a variable for
the event type.

No real changes, just use the newer and more convenient function.
2018-05-31 16:19:23 +02: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
e11a187f7b Merge branch 'msvc-setup_h-monolithic'
Add support for auto-linking monolithic library when using MSVC too.

Closes https://github.com/wxWidgets/wxWidgets/pull/806
2018-05-31 01:23:59 +02:00
Vadim Zeitlin
30c2bbf081 Factor out WXUSINGDLL check in MSVC-specific wx/setup.h
Don't repeat the same check for !defined(WXUSINGDLL) many times.

No real changes, this is just a simplification (which should be viewed
with "git diff -w --color-words" to see how little has really changed).
2018-05-31 01:21:20 +02:00
PB
46ba9ca2f9 Fix automatic linking with MSVC for monolithic builds
MSVC users can simplify their projects by prepending
$(WXWIN)\include\msvc to the compiler include directories, which results
in automatic including the build-specific setup.h and linking all
required wxWidgets and system libraries.

This worked only for the default multilib builds but not for monolithic
builds where wxWidgets libraries are created and named differently.

This patch allows the users (by defining wxMONOLITHIC=1 in their
project) to use it also for monolithic builds.
2018-05-31 01:13:16 +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
424f64f27d Fix invalid cast in wxMSW AutoHANDLE::InvalidHandle()
Somehow this compiled with the previous gcc versions (as well as MSVS),
but a static_cast from an integer wxUIntPtr type to a pointer HANDLE
type is obviously invalid and a reinterpret_cast is needed here.

This fixes compilation with g++ 8.
2018-05-27 22:56:05 +02:00
Jouk
81750e5b88 Add libxinerama to the link option files for OpenVMS 2018-05-24 08:19:27 +02:00
Jouk
896e2d472c set wxUSE_DISPLAY=1 for OpenVMS 2018-05-24 08:11:46 +02:00
Vadim Zeitlin
935d6f939b Fix compilation of generic wxNotebook used by wxMotif
This should have been part of bee28c2730
2018-05-23 17:20:39 +02:00
Vadim Zeitlin
6121b08b67 Compilation fix for wxGUIEventLoop in wxDFB
Rename YieldFor() to DoYieldFor() in the header too.

This was broken by f740cc3881
2018-05-23 17:20:39 +02:00
Vadim Zeitlin
9b4855ea5e Fix compilation of wxDFB wxApp::Initialize()
Use wxCmdLineArgsArray::Init() instead of assignment operator in Unicode
build.

This was broken by 70a499f635.
2018-05-23 17:20:39 +02:00
Maarten Bent
802c77b964 Fix building without precompiled headers on Windows 2018-05-22 17:04:42 +02:00
Vadim Zeitlin
7eef4a4549 Fix build with GTK+ < 2.20 due to undefined key code constants
Include gdk/gdkkeysyms.h from wx/gtk/private/gtk2-compat.h as it must be
included before it for the compatibility header to define the new names
for the key constants even when using old GTK+ versions.
2018-05-22 17:01:07 +02:00
Frédéric Bron
a195bf86a2 Make compilation with mingw-w64 possible with -std=c++17.
The definition of macros min and max in include/wx/msw/wrapgdip.h
b/include/wx/msw/wrapgdip.h was clashing with the new bessel functions
that use std::numeric_limits<T>::min/max.

So #include <cmath> before #include <gdiplus.h> and use using
declarations of std::min and max instead of macros.
2018-05-22 16:10:11 +02:00
Vadim Zeitlin
c0b0562533 Avoid many -Wparentheses warnings from gtk/gtk.h with gcc8
Add wx/gtk/private/wrapgtk.h wrapping gtk/gtk.h in pragmas disabling
these warnings and include it everywhere instead of directly including
gtk/gtk.h.

Also include wx/gtk/private/gtk2-compat.h from this wrapper header as it
was included by 90% of the files including gtk/gtk.h itself and it seems
to be better and simpler to just always include it.
2018-05-21 12:34:04 +02:00
Vadim Zeitlin
e54ec6c191 Add wxTarHeaderBlock::Clear() method encapsulating memset()
Using memset() with objects of (non-trivial) class type results in a
-Wclass-memaccess warning with g++ 8, so avoid doing this.

Add a Clear() method allowing to do the same thing without breaking
encapsulation.
2018-05-21 12:27:26 +02:00
Vadim Zeitlin
d8200f1096 Remove unused wxTarHeaderBlock copy ctor
These objects are never copied, and if they were, the default
(compiler-generated) copy ctor would do the same thing this explicitly
defined copy ctor did, so just remove it.
2018-05-20 17:59:20 +02:00
Vadim Zeitlin
58e6355695 Rename wxTarEntryPtr_ to wxTarEntryPtr
Remove the unusual underscore at the end of the type and use a single
wxDEFINE_SCOPED_PTR_TYPE() macro instead of 2 of them to simplify code.
2018-05-20 17:58:09 +02:00
Vadim Zeitlin
d9d5e1d5f7 Remove unused wxDEFINE_SCOPED_PTR_TYPE(wxTarHeaderBlock)
wxTarHeaderBlockPtr defined by this macro was never used, so just remove
it.
2018-05-20 17:57:17 +02:00
Vadim Zeitlin
8401d3fec9 Fix coordinates adjustment for wxGenericListCtrl mouse events
wxListHeaderWindow event coordinates don't need to be adjusted, as it's
positioned at (0, 0) of its parent window anyhow, but wxListMainWindow
events do need to be adjusted to use the parent window coordinates, as
it's the only window that should be seen by the outside code -- and also
for consistency with the native MSW version.

This corrects the changes originally done in
651d7a1ff8

See #18133.
2018-05-19 15:06:35 +02:00
VZ
57f620e7e1
Merge pull request #811 from MaartenBent/cmake-and-more
CMake and sample improvements: notably, allow more samples to find their
files.
2018-05-19 15:02:22 +02:00
VZ
d48a9baf6c
Merge pull request #812 from jbfove/master
Build fixes for CMake monolithic build.

Also fix building with wxUSE_{DISPLAY,PALETTE}==0.
2018-05-19 14:56:55 +02:00
Jeff Bland
fbf319641e Fix monolithic build in cmake (wxBUILD_MONOLITHIC)
- Functions that set wxMONO_* vars need to set them in parent scope, from macros instead of functions (functions would need grandparent scope)
- Fix a conflict with xml library linking Mono which made core include the wrong png headers
- Fix setting of NOPCH on windows to go through the wx_lib_compile_definitions instead of target_compile_definitions so it carries to monolithic build
- Allow use of precompiled header in MSVC via calling wx_finalize_lib(mono)
- Introduce wxMONO_NONCOMPILED_CPP_FILES to deal with set_source_files_properties only applying within the current CMakeLists file
- Fix demos building against monolithic library by using wx_exe_link_libraries instead of target_link_libraries (similar to what the tests already do)

Closes #18074
2018-05-18 19:52:42 -06:00
Jeff Bland
ffb44a2f38 Fix use of RECT in wxClientDisplayRect without including windows headers 2018-05-18 18:49:05 -06:00
Jeff Bland
8b18bbb9c7 Fix uses of wxPalette without check for wxUSE_PALETTE 2018-05-18 18:49:05 -06:00
Jeff Bland
26715a1fe0 Fix warning with missing override 2018-05-18 18:49:00 -06:00
Jeff Bland
a3363cbbfb Fix use of wxDateTime without check for wxUSE_DATETIME 2018-05-18 06:51:40 -06:00
Jeff Bland
0445b3eddd Fix extraneous parens warning 2018-05-18 06:50:58 -06:00
Maarten Bent
e99af740d9 Make wxArtProvider icon size hints DPI aware 2018-05-17 20:20:06 +02:00
Maarten Bent
bfe44c719b Do not let wxHeaderCtrl determine the minimum width
The minimum width will always be equal to the current size of the parent window (from wxGetClientRect).
As a result, controls using wxHeaderCtrl can never be shrunk (e.g. using SetSizeHints).
Problem is visible when a wxDataViewCtrl gets a lower DPI. The new minimum size is equal to the current size.
2018-05-17 20:20:05 +02:00
Maarten Bent
c97963fce0 Fix size glitch of WidgetsBookCtrl in widgets sample
The entire control is hidden until the dialog is resized.
This seems to be caused by (recent changes in) the wxPersistentManager.
This is fixed by populating the frame before restoring persistence.
(as is described in docs/doxygen/overviews/persistence.h.)
2018-05-17 20:20:05 +02:00
Maarten Bent
5758832a6e Fix invalid image size in wxBitmapComboBox widgets sample
When the wxBitmapComboBox is empty, GetBitmapSize() returns size -1,-1.
Images can not be scaled to this invalid size. Use the size of the imagelist
instead.
2018-05-17 20:20:05 +02:00
Maarten Bent
e581b72955 Look in multiple paths when searching for resource files of samples
When using an out of source build, the files are not in the default wxWidgets directories.
Also search in the current directory, parent directory and sample sub-directories.

Closes https://trac.wxwidgets.org/ticket/18118
2018-05-17 20:20:04 +02:00
Maarten Bent
de4e20ee93 CMake: copy missing files for widgets sample 2018-05-17 19:34:34 +02:00
Maarten Bent
df6b47bc6d CMake: Correct header for debug builds in MinGW compiler 2018-05-17 19:33:19 +02:00