Commit Graph

60719 Commits

Author SHA1 Message Date
Artur Wieczorek
7ddb522ec2 Extend benchmarks of drawing bitmaps on wxMemoryDC
Extended tests to determine speed of drawing RGB/ARGB bitmaps on target
bitmaps with different colour depths (RGB/0RGB/ARGB/system default).

See #16766.
2015-12-06 17:24:37 +01:00
Vadim Zeitlin
3fa5d92bc2 Build graphics benchmark too
Added the graphics benchmark to the bakefile, which didn't build it before,
for some reason.
2015-12-06 17:24:35 +01:00
Vadim Zeitlin
332dc81167 Fix case of <shlwapi.h> includes
Don't use upper-case file names, while MSW itself is case-insensitive, wxMSW
can be also cross-compiled and then the wrong case results in compilation
errors.

Closes #17279.
2015-12-06 03:43:28 +01:00
Vadim Zeitlin
be38f5a051 Don't mention DEFINE_EVENT_TYPE() in the documentation
This old macro is not documented, only wxDEFINE_EVENT_TYPE() is, so link to
the latter rather than the former.
2015-12-06 03:43:27 +01:00
Vadim Zeitlin
7b90ac6a65 Use GetPartialTextExtents() in wxHTML under all platforms
Call wxDC::GetPartialTextExtents() once instead of calling GetTextExtent() for
each letter in a loop in wxHtmlWordCell code. This is more efficient and more
precise and was done for wxOSX since 89e94a4bff
10+ years ago, but for some reason wasn't done for the other platforms.
2015-12-06 03:43:27 +01:00
Maarten Bent
5f2ccde269 Fix AppVeyor mingw build with USE_GUI=1
Closes #142
2015-12-05 16:00:29 -07:00
Paul Cornett
9cf8232ba8 check for macro '__sun' rather than 'sun', see #17258 2015-12-03 21:37:32 -08:00
Maarten
cb159db8bf Show continuous integration results in readme.
Show Travis and AppVeyor build results of the master branch in the
readme (and project page). Use images from shields.io so shields
look the same and a label can be added.

Closes #140
2015-12-03 21:38:00 -07:00
Catalin
f61627fc7e Remove obsolete symbols from the samples
Mostly don't mention OS/2 in the comments about the icons.

Also replace a couple of occurrences of "wxWindows" with "wxWidgets".

Closes https://github.com/wxWidgets/wxWidgets/pull/138
2015-12-03 22:11:04 +01:00
Catalin
71ad2d64ef Remove obsolete symbols and platforms from the documentation
Don't mention pre-XP Windows versions and other obsolete platforms such as
OS/2 and the symbols which were only useful for them.

Closes https://github.com/wxWidgets/wxWidgets/pull/137
2015-12-03 22:05:55 +01:00
Cătălin Răceanu
c43fa10c74 Fix drop down combobox flags in the widgets sample
Combine, not replace, combobox option flags when creating a drop down one,
otherwise all the others flags were simply ignored.

Closes https://github.com/wxWidgets/wxWidgets/pull/136
2015-12-03 21:30:04 +01:00
Catalin
2c84f37054 Remove obsolete symbols from overviews and install notes
Don't mention Windows 95, OS/2 and SGI.

Closes https://github.com/wxWidgets/wxWidgets/pull/135
2015-12-03 21:26:31 +01:00
Wacek Gocki
4e49638a6c Handle wxELLIPSIZE_NONE gracefully in wxControl::Ellipsize()
Since 44bcc3a723 wxRendererGeneric::DrawItemText()
could call Ellipsize() with wxELLIPSIZE_NONE mode, resulting in an assert.

Fix this by just not doing anything in this case.

Closes #125.
2015-12-03 17:10:25 +01:00
JulianSmart
1bb714b9df Added dcprint.h include 2015-12-03 11:20:28 +00:00
Vadim Zeitlin
9bcafd02f4 Revert "Optimize drawing of small bitmaps with alpha in wxMSW"
This reverts commit d04e256993 because it
results in crashes due to writing out of bounds of the bitmap: nothing
guarantees that the entire (x, y, dstWidth, dstHeight) rectangle fits in the
destination bitmap and so the code of this commit could merrily overflow it
and did it as could be seen e.g. in the HTML test sample after scrolling
around a little.

See #16766.
2015-12-03 03:41:25 +01:00
Kinaou Hervé
d3931ea660 Add support for CSS "color", "size" and "font" to wxHTML <font>
Simply map them to the existing HTML parameters, just as we already do for a
few other styles.

Closes #16773.
2015-12-02 23:53:00 +01:00
Vadim Zeitlin
0ed580f451 Fix modifying file type associations under MSW as non-admin
The existing code tried writing to HKEY_CLASSES_ROOT which doesn't work, in
general, for normal, i.e. non administrator, users, under any post-XP versions
of Windows.

Fix it to write to HKEY_CURRENT_USER\Software\Classes, which is the part of
HKEY_CLASSES_ROOT for the current user and to which we do have write access,
and only continue to use HKEY_CLASSES_ROOT itself for reading.
2015-12-02 23:15:25 +01:00
Vadim Zeitlin
058e35c0ec Remove commented out code from wxMSW wxMimeTypesManager
Just clean up; we don't need all this old and unused code in this file.
2015-12-02 23:01:06 +01:00
Vadim Zeitlin
09e7dc290c Fix Cygwin build with wxUSE_STL==1
Use explicit c_str() when calling Cygwin functions taking char* or void*
instead of relying on implicit conversions.
2015-12-02 16:58:39 +01:00
JulianSmart
d0dc318b9d Set the default back to using the native progress dialog 2015-12-01 20:25:10 +00:00
Armel Asselin
271fbce876 Handle VK_OEM_8 key in wxMSW too
This key is not present on all keyboards but we do need to handle on those
where it is used.

Closes #17272.
2015-12-01 01:21:02 +01:00
JulianSmart
075ef6551e Made the generic progress dialog the default for wxMSW until we have corrected two kinds of seizure-inducing flicker 2015-11-30 23:07:34 +00:00
JulianSmart
125f09f495 Add test for wxUSE_IMAGE 2015-11-30 21:53:25 +00:00
JulianSmart
1d9903456c Save reallocating a bitmap object 2015-11-30 15:30:34 +00:00
Vadim Zeitlin
6cd37dd3c8 Don't eat ampersands in wxDataViewCtrl and similar controls items
Fix the call to wxControl::Ellipsize() inside DrawItemText() added in
b7a89f8746 (see #16414) which removed all
ampersands from the string with the default flags to not do it.

Closes #17269.
2015-11-30 00:08:06 +01:00
JulianSmart
f8bc9abfc4 Work around poor image scaling on WIN32, especially on HiDPI displays where all images without size specification will be scaled 2015-11-29 20:01:10 +00:00
JulianSmart
c3ae2fc54a Use content scale factor to make wxHTML DPI-aware 2015-11-29 19:36:14 +00:00
JulianSmart
78fe0ac3d8 Fix for breakage with multiple books 2015-11-29 19:29:04 +00:00
Gavs64
ab95207c78 Fix message boxes with wxYES_NO|wxCANCEL style in wxMSW
Windows CE code removal in 8282c1be0f (see
https://github.com/wxWidgets/wxWidgets/pull/81) broke message boxes showing
"Yes", "No" and "Cancel" buttons at once, add accidentally removed code back.

Closes https://github.com/wxWidgets/wxWidgets/pull/139
2015-11-29 16:22:16 +01:00
Artur Wieczorek
2db2db7044 Merge pull request #134 from a-wi/pg_draw_colours_alpha_fix
Fix build failures on some platforms after 7be75892.
2015-11-29 13:54:36 +01:00
Artur Wieczorek
0d30db33e1 Fix build failures on some platforms after 7be75892.
Add header files to have full declarations of wxMemoryDC and wxMetafileDC which are apparently necessary on some platforms for wxDynamicCast.
2015-11-29 09:25:19 +01:00
Artur Wieczorek
7be75892a3 Fixed drawing colours with alpha in wxSystemColourProperty (wxPG).
For systems which don't support drawing with alpha on standard DC (like e.g. Win, GTK2) there is necessary to use graphics context for this purposes.
2015-11-27 21:36:21 +01:00
Vadim Zeitlin
9990959c99 Get rid of unnecessary wxColour::InitFromComponents() in wxOSX
This method was confusing and dangerous as it didn't actually initialize the
wxColour object because it didn't set its m_cgColour and so attempting to use
wxColour "initialized" using this method resulted in a crash whenever its
GetPixel(), GetCGColor() or CreateCGColor() methods were called.

Just merge this function with InitCGColorRef() which is the only remaining
place where it's used after rewriting wxColour(NSColor) ctor.
2015-11-27 00:19:37 +01:00
Vadim Zeitlin
10162b79fc Handle pattern colours in wxColour ctor from NSColor
Some colours returned in wxSystemSettingsNative::GetColour() can't be
represented in RGBA color space as they use patterns, which explained why the
compilation fix for 10.7 SDK in 56ebe6dfac
resulted in run-time crashes.

Add code to support converting such NSColor objects to CGColorRef via
NSImage, CGImageRef and CGPatternRef to make things really work.

See #17141
2015-11-27 00:06:25 +01:00
Vadim Zeitlin
3fc74d5a0f Fix wxColour(NSColor) ctor and use it in wxOSX code
wxColour ctor from NSColor added in b478f24288
didn't work correctly as it didn't initialize wxColour::m_cgColour and so any
attempts to use the colour created by it resulted in an immediate crash (so
the code added in 16671f229a likely didn't work
neither).

It also assumed that the NSColor given to it was always in the RGBA colorspace
and crashed if it wasn't (so 56ebe6dfac fixed
compilation at the price of making the code crash at run-time). Now explicitly
request the RGBA colorspace and leave the colour uninitialized, which is
better than crashing, if it can't be obtained.

After making this ctor safe to use, there is no reason to reproduce its logic
in wxColourDialog and wxFontDialog, so just use it from there.

Also make the ctor explicit as it's a non-trivial operation which shouldn't be
performed implicitly and document that it doesn't take ownership of NSColor,
unlike the similar ctor from CGColorRef.
2015-11-26 23:57:29 +01:00
Vadim Zeitlin
bcd16394df Use wxColour::OSXGetNSColor() instead of reproducing it
No real changes, just simplify wxOSX code by using the existing
wxColour::OSXGetNSColor() method instead of reproducing it in many places.
2015-11-26 23:54:28 +01:00
Vadim Zeitlin
200f24301c Merge changes adding missing FromDIP() calls and ToDIP()
Use DIP instead of physical pixels and add ToDIP(), symmetric to FromDIP(), to
convert from the latter to the former.
2015-11-25 20:02:56 +01:00
Vadim Zeitlin
3195ba7fb4 Simplify code by using wxCHECK instead of a test and wxFAIL
Make the code shorter and arguably more clear.
2015-11-25 20:02:56 +01:00
Vadim Zeitlin
56ebe6dfac Use wxColour ctor from NSColor directly
This makes the code simpler and fixes compilation with 10.7 SDK which doesn't
have CGColor property in NSColor.
2015-11-25 20:02:56 +01:00
Steve Browne
8f92be3c6b Improved readability of font changes to wxRendererMSW::GetCheckBoxSize and no longer force the window to redraw. 2015-11-24 19:44:26 -05:00
Steve Browne
8ede2351cc Fixed indentation in ToDIP to make it consistent with FromDIP. 2015-11-24 19:42:14 -05:00
JulianSmart
0185d61a2c Ensure toolbar fits controls that are taller than the buttons in wxMSW toolbar 2015-11-24 21:28:09 +00:00
Steve Browne
1af2cdd200 Updated interface file to document wxWindow::ToDIP. 2015-11-24 13:16:20 -05:00
Steve Browne
bbb6dbea1b Added wxWindow::ToDIP functionality. 2015-11-24 12:47:31 -05:00
Steve Browne
633d04ca92 Changed several places using hard-coded size values to use FromDIP instead. 2015-11-24 12:21:43 -05:00
Troels Knakkergaard
ed4dbc024d Print selected pages when "Selection" is chosen in MSW print dialog
Really print the selected pages and not the pages explicitly listed in the
"Pages" text entry field in the MSW native print dialog when "Selection" radio
button is checked.

Closes #17266, #17200.
2015-11-24 18:20:54 +01:00
Vadim Zeitlin
6d38fb81dc Merge wxOVERRIDE additions branch
Add even more wxOVERRIDEs to avoid clang warnings under OS X.

Closes https://github.com/wxWidgets/wxWidgets/pull/130
2015-11-22 15:22:23 +01:00
Artur Wieczorek
fc5033afde Fix passing alpha channel to/from colour dialog for GTK+ 2.
Pass to/from GtkColorSelection widget also alpha component of the selected colour.
2015-11-22 10:55:15 +01:00
Hartwig
474461601f Addition of overrides in diverse headers 2015-11-22 10:16:01 +01:00
Hartwig
308de8b69d Addition of overrides in anybutton.h, collpaneg.h, notebook.h, spinctlg.h, srchctrl.h and radiobox.h 2015-11-22 10:15:41 +01:00