Maarten Bent
40d57a33de
Remove remnants of OS/2 from build system
2018-09-30 17:23:57 +02:00
Maarten Bent
959b677786
Remove non-existing WXQT headers from build system
2018-09-30 17:23:57 +02:00
Vadim Zeitlin
c98d504b6d
Implement wxDisplay::GetClientArea() for wxQt too
...
This is as simple as implementing GetGeometry(), so just do it.
2018-09-30 17:07:14 +02:00
Vadim Zeitlin
771e01cc73
Remove unnecessary trivial wxDisplayFactoryQt default ctor
...
No real changes, just remove useless lines.
2018-09-30 17:03:22 +02:00
Vadim Zeitlin
6883cd4b96
Fix harmless variable shadowing warning in the display sample
...
Use different names to avoid warning C4456 given by MSVC 14.
2018-09-30 15:37:46 +02:00
Vadim Zeitlin
58a1ee1633
Show the result of wxDisplay::IsPrimary() in the sample too
...
Just add a quick test of this function.
2018-09-30 15:36:40 +02:00
Vadim Zeitlin
1d40b629a2
Remove the unused msw.display.directdraw system option
...
This should have been part of 16e4586527
which removed the code this option pertained to.
See #12387 .
2018-09-30 15:30:53 +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
d6793893c0
Add a simple benchmark of wxDisplaySize() and related functions
...
This benchmark shows that wxGetDisplaySize() has only minimal overhead
compared to wxDisplaySize(), but wxDisplay().GetGeometry() is almost 3
times slower (under wxGTK).
2018-09-30 00:38:27 +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
9619950721
Use wxOVERRIDE for wxDisplay-related classes in wxQt
...
No real changes.
2018-09-30 00:38:27 +02:00
Vadim Zeitlin
9f37d91498
Fix wrong comment before wxDisplayFactorySingle::CreateDisplay()
...
This method is not static.
2018-09-30 00:38:26 +02:00
Vadim Zeitlin
77e33d9e1b
Micro optimization in wxDisplay ctor
...
Don't check for the index validity if it's 0, which is the most common
case, as index 0 is always valid and so we can avoid calling GetCount(),
which might have a non-trivial cost, completely.
2018-09-30 00:38:26 +02:00
Vadim Zeitlin
141d7b826d
Fix weird indentation in X11 display code
...
No real changes.
2018-09-30 00:38:26 +02:00
Vadim Zeitlin
587a510028
Remove unnecessary wxUSE_DISPLAY preprocessor checks
...
Most of the methods of wxDisplay are always available, they just only
support primary display when wxUSE_DISPLAY==0, so there is no need to
check for wxUSE_DISPLAY before using them as they already contain the
only possible fallback anyhow and such checks are useless.
This incidentally closes #18115 , due to removing "#if wxUSE_DISPLAY"
around wx/display.h inclusion.
2018-09-30 00:38:26 +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
6db5b54fc7
Fix wxHTML benchmarks compilation
...
wx/crt.h must be included to use wxSscanf().
2018-09-30 00:32:21 +02:00
Vadim Zeitlin
21a5314c52
Another graphics benchmark compilation fix for non-MSW
...
Use GraphicsRenderer name for the enum in all ports.
See 573cb961cb
2018-09-30 00:31:41 +02:00
Vadim Zeitlin
a8ac1e3240
Graphics benchmark compilation fix under Unix
...
Only use wxMSW-specific wxBitmap::UseAlpha() when using this port.
See 7ddb522ec2
2018-09-30 00:30:53 +02:00
Lauri Nurmi
829f181ccd
Get preferred UI languages from the LANGUAGE variable on *nix
...
Obey the LANGUAGE environment variable (if set), which is GNU
gettext's primary way of determining language preference. Apparently
ignored by wx until now, even though wx attempts to be a
reimplementation of GNU gettext.
The LANGUAGE variable may contain a list of preferred languages,
so use that list to find the best translation.
GNU gettext has supported multiple preferred languages since forever
(at least 15 years), and therefore it is odd that this wasn't already
implemented in 01f953efb2
. Instead,
it was implied that Unix does not support such. (Even if GNU is not
Unix, nothing stops a wxWidgets app supporting such nevertheless.)
Closes https://github.com/wxWidgets/wxWidgets/pull/948
2018-09-29 18:14:20 +02:00
Vadim Zeitlin
ec5aacd270
Define canonical email address for Blake Eryx
2018-09-29 17:16:45 +02:00
Blake Eryx
b70ed2d8c8
Remove more wxT() macros from samples
...
Also use wxString instead of wxChar* strings.
Closes https://github.com/wxWidgets/wxWidgets/pull/950
2018-09-29 17:16:12 +02:00
Vadim Zeitlin
480047ee9a
Merge branch 'pgchoices-wxstring'
...
Make it more convenient to use wxPGChoices with wxString arrays.
2018-09-29 17:13:50 +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
d2e072db3c
Don't use unclear ValArrItem typedef in wxPGChoices documentation
...
All the other methods use just "long", so use it in Add() documentation
as well instead of the rather cryptic ValArrItem.
2018-09-29 16:59:32 +02:00
Vadim Zeitlin
8bb5cb1d6e
Improve wxPGChoices::Set() documentation too
...
Refer to Add() and use @overload rather than duplicating the
description.
2018-09-29 16:57:10 +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
Artur Wieczorek
f96c37eacc
Preserve wxGraphicsContext settings while resetting the clipping
...
To reset the clipping there is necessary
to restore all CGContext settings so we need
to set them back to the previous values based
on the stored wxGraphicsContext attributes.
2018-09-27 22:57:41 +02:00
Artur Wieczorek
875c095e87
Normalize wxRegion rectangle if it has a negative size
...
For compatibility with wxMSW and wxGTK rectangle
defining wxRegion needs to be in the canonical
form with (x,y) pointing to the top-left corner
and width and height >= 0.
2018-09-27 22:57:05 +02:00
Stefan Csomor
3b1551a714
Fixing builds with Xcode
2018-09-27 14:46:33 +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
imReker
2ed7ed6f39
Fix wxMSW build error when wxUSE_ENH_METAFILE=0
...
Don't include wx/msw/enhmeta.h when wxUSE_ENH_METAFILE is set to 0.
Closes https://github.com/wxWidgets/wxWidgets/pull/951
2018-09-26 14:43:54 +02:00
Stefan Csomor
bc2c58bd39
fixing include statement
2018-09-25 16:47:51 +02:00
Stefan Csomor
494581c542
macOS wxStaticBitmap missing commit
2018-09-25 15:59:50 +02:00
Stefan Csomor
d44974789c
docs update for macOS static bitmap
2018-09-25 15:29:39 +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
Stefan Csomor
13a96c586f
macOS bitmap change info
2018-09-25 15:20:37 +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
Vadim Zeitlin
6bc086747e
Merge branch 'osx-no-iconref'
...
Switch to using CGBitmapContext instead of IconRef for wxBitmap
implementation in wxOSX.
Closes https://github.com/wxWidgets/wxWidgets/pull/925
2018-09-24 00:14:28 +02:00
Stefan Csomor
9bfa4c6da3
further cleanup
2018-09-24 00:12:33 +02:00
Stefan Csomor
37ba39f19d
makefile change using generic instead of osx icon file
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
7254515c54
emoving non-native bitmap code, using common code for iOS and macOS
...
second part, sources were missing
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
bca583234e
use direct NSImage drawing commands
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
34716b18a6
new ICNS Handler
2018-09-24 00:11:31 +02:00
Stefan Csomor
0a812865cf
switching to generic icon for macOS
2018-09-24 00:11:31 +02:00