Commit Graph

17923 Commits

Author SHA1 Message Date
Tim Stahlhut
caa6e5de2f Add message "wxStyledTextCtrl requires wxUSE_SCROLLBAR" 2018-10-21 22:01:49 -04:00
Tim Stahlhut
71a2fc0706 Forward declare wxQt template class 2018-10-21 22:01:49 -04:00
Artur Wieczorek
5fb9d8d244 Use dedicated function to change flag 2018-10-13 23:33:21 +02:00
Vadim Zeitlin
bc974910ec Implement setting bitmaps for the menu item for wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/975
2018-10-11 14:40:20 +02:00
Vadim Zeitlin
8e1c4e9238 Avoid harmless signed/unsigned warning in g++ 5.4 wxGTK build
Change GTKGetEntryTextLength() to return a signed value, as it's always
either assigned to or compared with the signed variables anyhow.

This avoids a couple of -Wsign-compare warnings when building with g++
5.4 from Ubuntu 16.04.
2018-10-11 01:05:43 +02:00
Vadim Zeitlin
b0c025e9fd Build fix for wxUSE_CONSOLE_EVENTLOOP==0 under Unix
Don't declare GetEventLoopSourcesManager() in Unix wxAppTraits if
console event loops are not used.

See https://github.com/wxWidgets/wxWidgets/pull/953
2018-10-10 19:07:28 +02:00
Vadim Zeitlin
e9ecc6728f Always include X11 headers from the private X11 display header
Commit 28ab24cd55 excluded too much in
wxUSE_DISPLAY==0 case, we still need X11 headers when not using
wxUSE_DISPLAY.
2018-10-10 14:14:48 +02:00
Paul Cornett
4ad6f67147 Fix build with wxUSE_PALETTE==0 2018-10-09 22:24:58 -07:00
Vadim Zeitlin
54ef52fbd9 Merge branch 'display-funcs'
Implement all global functions in terms of wxDisplay and add
wxDisplay::GetPPI().

See https://github.com/wxWidgets/wxWidgets/pull/963
2018-10-09 16:31:54 +02:00
Vadim Zeitlin
28ab24cd55 Add missing wxUSE_DISPLAY check to X11 display header
Don't define functions dealing with video modes etc when
wxUSE_DISPLAY==0.
2018-10-09 15:28:28 +02:00
Vadim Zeitlin
818d69f113 Make wxDataViewCtrl::FromGTKColumn() public and rename
This function has to be called from a GTK+ callback, so make it public
and also rename to GTKColumnToWX() to conform to the naming convention
mandating the use of "GTK" prefix for the public methods which are not
part of the public API.
2018-10-09 15:12:42 +02:00
Vadim Zeitlin
ded2894b78 Add wxDisplay::GetPPI() to use instead of wxGetDisplayPPI()
While this is not done for all the ports yet, the new API allows
returning different PPI values for different monitors, unlike the old
(and still existing, but implemented in terms of the new one) global
function.
2018-10-08 13:04:38 +02:00
Vadim Zeitlin
309f942aa6 Merge branch 'qt-build'
Minor wxQt API fixes and simplifications.

See https://github.com/wxWidgets/wxWidgets/pull/962
2018-10-07 19:55:37 +02:00
Vadim Zeitlin
24b5e256df Add wxDisplay::GetDepth() and use it for wxDisplayDepth()
Allow getting the depth of any display, not just the primary one, even
though this is not implemented for Unix ports currently.

Mostly do this for consistency with the other display-related functions.
2018-10-07 00:30:12 +02:00
Scott Furry
f8c14d1176 Define more wxToolBar::SetToolXXX() methods in wxQt
Provide a stub for SetToolShortHelp() and really implement
SetTool{Normal,Disabled}Bitmap().
2018-10-06 14:07:02 +02:00
Scott Furry
2ea9548ffb Add default argument values to wxToolBar::CreateTool() in wxQt
Make the API consistent with the other ports.
2018-10-06 14:06:55 +02:00
Vadim Zeitlin
e0ba727dec Extract X11 functions used by wxGTK in a separate header
This makes src/unix/displayx11.cpp almost readable as it's not littered
by "#ifndef __WXGTK20__" checks everywhere any more -- instead this file
is just not compiled as part of wxGTK2 at all any longer (it is still
included in wxGTK1 as well as wxX11 itself and wxMotif).

wxGTK code also can just include the new wx/unix/private/displayx11.h
instead of having to declare all the X11 functions it uses manually.

There should be no changes in behaviour, this is just a clean up.
2018-10-04 17:07:11 +02:00
Vadim Zeitlin
9cc1424b84 Return empty string from wxDisplayImpl::GetName() by default
Simplify the code by not making this function pure virtual as all the
ports except MSW had to override it just to return an empty string.

Instead, just return empty string by default as it's not critical to
force the derived classes to override this function.
2018-10-04 16:37:12 +02:00
Maarten Bent
32d32f8172 Revert "Fix missing wxOwnerDrawn functions in WXQT wxMenuItem"
This reverts commit 4e23b3e7f4.
wxOwnerDrawn is only used with wxMSW toolkit.
2018-10-01 21:47:33 +02:00
Vadim Zeitlin
761f9f74fc Merge branch 'simplify-display'
Centralize all display-related code in wxDisplay class and avoid
duplicating or reimplementing it in wxDisplaySize() and
wxClientDisplayRect() functions.

See https://github.com/wxWidgets/wxWidgets/pull/955
2018-10-01 13:52:07 +02:00
Stefan Csomor
00197d0c75 removing the menu from the public API of wxChoice on osx
on iOS pickers are having data sources that are not implemented using a menu, therefore the implementation API had to be changed
2018-10-01 08:28:41 +02:00
Stefan Csomor
ca6cae20e8 Adding more osx types as opaque public types 2018-10-01 08:12:03 +02:00
Stefan Csomor
c2ab36a2da add implicit conversion to NSArray* 2018-10-01 08:10:13 +02:00
Stefan Csomor
ef48d7f184 set wxOSX_USE_ICONREF to 0 if not defined 2018-10-01 07:21:49 +02:00
Vadim Zeitlin
ddc88b74b6 Remove unnecessary DLL export declarations for private classes
wxDisplayFactory and wxDisplayImpl don't have to be exported from the
wxWidgets shared libraries and, in fact, shouldn't be.
2018-09-30 23:08:43 +02:00
Vadim Zeitlin
c2162792cf Implement wxDisplaySize() and wxClientDisplayRect() via wxDisplay
Instead of forwarding to these functions from wxDisplay implementation
in wxUSE_DISPLAY==0 case, make the functions themselves wrappers around
wxDisplay, which may, or not, depending on the platform, have a simpler
implementation in wxUSE_DISPLAY==0 case, but is always available in any
case.

As part of this change, only use src/osx/core/display.cpp in macOS
builds, not iOS ones and update the Xcode project accordingly too.

This cuts down on code duplication, especially in wxGTK, and facilitates
further additions to wxDisplay API.
2018-09-30 23:07:45 +02:00
Maarten Bent
7f0d7ef520 Fix several build errors in WXQT
Move declaration of wxOwnerDrawnBase::ms_defaultMargin to correct file.
Do not include headers when wxUSE_UIACTIONSIMULATOR is disabled.
Add guards for wxUSE_DRAG_AND_DROP.
Use a different wxFont constructor in printing sample, which is also available in WXQT.
2018-09-30 17:23:58 +02:00
Maarten Bent
4e23b3e7f4 Fix missing wxOwnerDrawn functions in WXQT wxMenuItem 2018-09-30 17:23:58 +02:00
Maarten Bent
bb82470640 Fix missing gl functions in WXQT 2018-09-30 17:23:58 +02:00
Maarten Bent
8f017509f6 Remove wxConsoleEventLoop from WXQT
The console event loop in the wxBase library is GUI toolkit independent.
2018-09-30 17:23:58 +02:00
Vadim Zeitlin
990c8bfd73 Cache wxDisplayImpl object for faster access
Avoid a heap allocation on every wxDisplay creation by caching the
wxDisplayImpl objects once they're created.

Currently we never invalidate the cache, but we should add a way to do
it in the future.

This speeds up wxDisplay::GetGeometry() benchmark by a factor of 4.
2018-09-30 00:53:59 +02:00
Vadim Zeitlin
b4aaa10032 Fix wx/display.h compilation when it's the first included header
Include wx/defs.h to ensure that wxUSE_DISPLAY is defined before it is
checked for.
2018-09-30 00:38:27 +02:00
Vadim Zeitlin
bac28b95cd Move wx/display_impl.h to wx/private/display.h
This shows more clearly that this header is private to wxWidgets and
can't be included by user code.

No real changes.
2018-09-30 00:38:26 +02:00
Vadim Zeitlin
96ecfd8c77 Provide wxPGChoices ctor, Add(), Set() overloads taking wxStrings
Allow passing an array of wxStrings in addition to an array of wxChar*
strings.
2018-09-29 17:13:00 +02:00
Vadim Zeitlin
b624064659 Call Add(), not Set(), from wxPGChoices ctors
There is no need to call Free() on a newly constructed object and Set()
is just Free() followed by Add().

No real changes.
2018-09-29 17:01:17 +02:00
Vadim Zeitlin
378f62bd08 Improve documentation of wxPGChoices ctor and Add() methods
Mention that the "labels" array must be NULL-terminated and that
"values" must have at least as many items, if they're provided at all.
2018-09-29 16:55:16 +02:00
Vadim Zeitlin
713a7ab895 Move wxUSE_ENH_METAFILE check inside wx/msw/enhmeta.h itself
This is more consistent with the other headers, which are safe to
include even when the corresponding feature is turned off.

Also remove the now redundant wxUSE_ENH_METAFILE checks in the source
code including this header.

See https://github.com/wxWidgets/wxWidgets/pull/951
2018-09-26 14:47:45 +02:00
Stefan Csomor
494581c542 macOS wxStaticBitmap missing commit 2018-09-25 15:59:50 +02:00
Stefan Csomor
19c4d8cf3e macOS, iOS native implementation for wxStaticBitmap
templated native images are not drawing correctly using the low-level drawing calls, therefore use the native Image Views
2018-09-25 15:22:56 +02:00
Vadim Zeitlin
a02ed536e6 Add support for more than 4 joystick buttons under MSW
Use polling thread instead of relying on MM_JOYXXX events to allow
receiving events from all the supported buttons.

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

Closes #1142.
2018-09-25 01:03:58 +02:00
Paul Cornett
7872b9fd38 Deprecate Set{Height,Width,Depth} for other platforms as well
Fixes GTK build with --disable-compat30
See https://github.com/wxWidgets/wxWidgets/pull/925
2018-09-23 20:02:21 -07:00
Stefan Csomor
9bfa4c6da3 further cleanup 2018-09-24 00:12:33 +02:00
Stefan Csomor
f29faa0217 optimize handling of high-res native images 2018-09-24 00:12:33 +02:00
Stefan Csomor
266f32493e Removing non-native bitmap code, using common code for iOS and macOS 2018-09-24 00:11:31 +02:00
Stefan Csomor
0bdd7e5f48 forgotten commit of header change for generic icon 2018-09-24 00:11:31 +02:00
Stefan Csomor
3370b76318 Direct NSImage drawing 2018-09-24 00:11:31 +02:00
Stefan Csomor
148732993a only use native NSImage dimension 2018-09-24 00:11:31 +02:00
Stefan Csomor
84f68aa764 Fixes and Cleanup 2018-09-24 00:11:31 +02:00
Stefan Csomor
e7d21f6638 Initial Commit of full native bitmap macOS implementation
Right now, to better test regressions, with dual implementation
2018-09-24 00:11:31 +02:00
Vadim Zeitlin
1833c3d8e4 Add wxBitmap::operator=(wxImage) to wxMSW to resolve amboguities
Code doing "bitmap = image" compiled in the other ports, but not in
wxMSW with WXWIN_COMPATIBILITY_3_0==1 as there was an ambiguity between
converting wxImage to wxBitmap, as intended, or converting wxImage to
wxCursor and then assigning it to wxBitmap using operator=(wxCursor)
overload.

Resolve this ambiguity by providing operator=() overload taking wxImage
directly.

This fixes widgets sample compilation under MSW after the changes of
455a45f5a8

See https://github.com/wxWidgets/wxWidgets/pull/946
2018-09-23 15:51:26 +02:00