Commit Graph

58409 Commits

Author SHA1 Message Date
Vadim Zeitlin
8d808db43f Put a __cplusplus guard around C++-specific tests in wx/defs.h.
This avoids the warning about __cplusplus being undefined in the recently
added wxOVERRIDE logic and make the existing wx_xxx_cast<>s definitions
simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 19:52:45 +00:00
Vadim Zeitlin
6cd13bc22d Mark some deprecated wxGrid methods as deprecated in the documentation.
Point people to the new names of the deprecated methods.

Closes #16103.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 19:45:53 +00:00
Vadim Zeitlin
d1c6d8baf9 Use Doxygen @deprecated tags for deprecated methods.
Instead of just mentioning that the methods are deprecated in the
documentation text, use the @deprecated tag for them to make it possible to
detect it in documentation-processing tools too.

Closes #16102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 19:45:48 +00:00
Vadim Zeitlin
78de4fe291 Remove configure test for override keyword.
Detect its support in the code by testing __cplusplus value and using specific
checks for MSVC and Clang as configure detects it as being available when
using recent g++ versions in non-C++11 mode, which do support this keyword but
warn when it is used without -std={gnu,c}++11 option, which makes actually
using it a bad idea in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 15:49:07 +00:00
Vadim Zeitlin
33ad33d447 Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.

Closes #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:28 +00:00
Vadim Zeitlin
34e4f66d6a Compilation fix in wchar_t build after r76171.
Don't concatenate narrow wxLongLongFmtSpec with wide strings, just don't use
wxT() at all.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:01 +00:00
Vadim Zeitlin
8c4b1dcbd0 Add wxInt64 support to wxText{Input,Output}Stream.
Add explicit Read64[S]() and Write64() methods.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 22:57:44 +00:00
Vadim Zeitlin
89bf39314f Use "virtual" keyword with overridden methods.
No real changes, just make the code more clear by explicitly using "virtual".

Closes #16097.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 18:06:29 +00:00
Vadim Zeitlin
7f48a077ab Remove more unnecessary headers from drawing test.
Don't include GUI headers in non-GUI code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 18:01:15 +00:00
Vadim Zeitlin
b9a09f5e87 Fix WX_ASSERT_SAME_AS_FILE() definition in the new drawing test.
This macro should use AreFilesContentsEqual(), not
AreImagesFilesContentsEqual(), used by WX_ASSERT_SAME_AS_IMAGE_FILE().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 17:59:32 +00:00
Vadim Zeitlin
3f29a21d3e Don't include apparently unnecessary headers in drawing test.
wx/window.h shouldn't be needed in this non-GUI test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 20:12:32 +00:00
Vadim Zeitlin
7e049a9692 Remove redundant forward declaration of wxCursor from wx/window.h.
We include wx/cursor.h from wx/window.h anyhow (and can't avoid it as we have
a member of wxCursor type in wxWindowBase).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 20:10:11 +00:00
Vadim Zeitlin
a4568e7c85 Add a new test checking wxGraphicsContext implementation correctness.
This test verifies that the output of wxGraphicsContext on the current system
matches the pregenerated reference output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:31:21 +00:00
Vadim Zeitlin
1eb17f24f0 Include the individual headers that we really need instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:28:50 +00:00
Vadim Zeitlin
8b777c1aa8 Don't include wx/dc.h from wx/graphics.h.
This is not necessary and prevents compilation of this header in wxUSE_GUI=0
case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:28:47 +00:00
Vadim Zeitlin
ce47b38a84 Don't include wx/cursor.h from wx/dc.h.
This is simply not needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:28:41 +00:00
Vadim Zeitlin
399371921f Add font colour support to wxFontPickerCtrl.
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.

Closes #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:13 +00:00
Vadim Zeitlin
9e7dbef726 Use helper GetPickerWidget() function in wxFontPickerCtrl.
No real changes, just use a helper function instead of an ugly M_PICKER macro.

See #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:06 +00:00
Vadim Zeitlin
2d39af0bbe Use "MultiProcessorCompilation" instead of explicit /MP in MSVS projects.
Use the user-visible option instead of the command line option which is now
hidden in the IDE.

Closes #16093.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:08:16 +00:00
Vadim Zeitlin
09eebae182 Add margin to the right of the message in wxGenericProgressDialog.
For some reason the border was used only on the left side but not on the right
one, resulting in the ugly looking label flush to the right dialog border if
it was long enough.

Closes #16094.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 14:21:51 +00:00
Julian Smart
b4d02eafa3 Improved calculation of spanning column widths.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 09:14:42 +00:00
Paul Cornett
0236c59057 update for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-16 16:39:20 +00:00
Vadim Zeitlin
a489001977 Disable the use of new style wxDirDialog under Vista.
IFileDialog-based dialog has a bug making it return a wrong path sometimes
under Vista, disable its use there to avoid it.

Closes #16005.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-16 13:05:47 +00:00
Paul Cornett
5e6dd2fcb4 build fixes for wxUniversal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 19:34:31 +00:00
Paul Cornett
d2e4b3520b for GTK+ 3.6 and later, invalidate cached best size when GTK's style cache is updated, see #16088
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 18:44:02 +00:00
Vadim Zeitlin
f9b4d6b18c Fix showing of 32bpp bitmaps without alpha in wxMSW wxStaticBitmap.
The native control doesn't make a secret copy of the image in this case (0RGB
bitmap, i.e. 32bpp ARGB bitmap with all alpha values set to 0) and just shows
the bitmap we assigned to it directly, so we must not delete it in this case,
otherwise nothing is shown at all.

Closes #16084.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 19:22:31 +00:00
Vadim Zeitlin
6b296279ba Also free internal handlers when wxMSW wxStaticBitmap is destroyed.
r76142 fixed the resource leak when wxStaticBitmap image was replaced by
another one but the leak still happened at the end, when the wxStaticBitmap
was destroyed.

Fix it there as well in the same way.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 19:22:26 +00:00
Vadim Zeitlin
c8a35a6f17 Fix recently introduced compilation error in wxUSE_PALETTE==0 build.
Add missing "#if wxUSE_PALETTE" tests.

Closes #16083.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 19:22:16 +00:00
Vadim Zeitlin
371928415a Add support for loading old V1 bitmap files to wxBMPHandler.
Such files are apparently still seen in the wild, even though this format has
been superseded since Windows 3.0 (!).

Closes #3433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 01:36:54 +00:00
Stefan Csomor
ffeba70599 adding 10.5 compatibility again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 17:09:00 +00:00
Vadim Zeitlin
8fa2694395 Fix resource leak in wxMSW wxStaticBitmap when using RGBA icons.
Release the old handle if it wasn't freed by STM_SETIMAGE itself.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:20:08 +00:00
Vadim Zeitlin
c2ac6643cc Avoid unused variable warning in wxUSE_VALIDATORS==0 build.
Closes #16076.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:17:15 +00:00
Vadim Zeitlin
9be89b48db Install wx/preferences.h and wx/testing.h in "make install".
These headers were accidentally forgotten in files.bkl, add them there and
rebake.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:15:28 +00:00
Vadim Zeitlin
1e832755cf Use wxScopedXXX<> instead of explicit memory management in wxBMPHandler.
Make the code simpler and ensure there are no memory leaks in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:32 +00:00
Vadim Zeitlin
01f0a544c9 No changes, just use properly const variable in wxBMPHandler code.
Initialize "data" pointer consistently with "alpha".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:29 +00:00
Vadim Zeitlin
64deeb94b9 Add support for saving 32bpp icons too.
Save in 32bpp format if alpha channel is present in the image being saved in
ICO format.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:24 +00:00
Vadim Zeitlin
818e5f3a48 Allow saving 24 bpp ICO file in wxImage.
Create ICO files with 24bpp if the image being saved contains more than 256
colours.

Also use smaller values (4 bpp or monochrome) if the image uses fewer colours.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:19 +00:00
Vadim Zeitlin
7e64a29edb Add support for saving 256*256 ICOs in PNG format.
Allow saving icons larger than 127*127 pixels (up to 256*256 which is the
maximal size supported by the ICO format) and save large icons with the item
data in PNG format, as it is normally done for these sizes.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:14 +00:00
Vadim Zeitlin
184b9b49d3 Add support for loading icons in PNG format to wxImage.
ICO files can contain data in PNG, as well as BMP, format in recent (i.e. from
this millennium) versions of Windows, so check for this case in wxICOHandler
and load such data using wxPNGHandler.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:09 +00:00
Vadim Zeitlin
6c83e5cf8f Handle verbosity correctly in wxICOHandler loading code.
Pass on the "verbose" argument to LoadDib() function instead of always being
verbose in it.

Also remove the unused IsBmp variable.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:05 +00:00
Vadim Zeitlin
10c3830624 Allow loading icons of width 256 from ICO files.
Account for the tweak of ICO file format which uses 0 if the width is 256.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:00 +00:00
Vadim Zeitlin
d8090867aa Fix possible memory leak in wxICOHandler loading code.
Use wxScopedArray<> instead of a raw pointer to ensure that the memory is
always freed, even in case of error return.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:03:55 +00:00
Vadim Zeitlin
2c64172825 Reset the system last error value before checking it in wxLog test.
Explicitly set the last error indicator to 0 before checking that
wxLogSysError() logs it correctly as it wasn't always set to 0 otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 22:20:50 +00:00
Vadim Zeitlin
54da844960 Update the version string in manually managed VC11 project files.
Use "31", not "30".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 16:02:43 +00:00
Vadim Zeitlin
d6ace87b61 Upgrade included Scintilla to version 3.3.9.
Closes #15742.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 13:23:54 +00:00
Vadim Zeitlin
b356d1d3c7 Add wxFont::GetBaseFont().
This can be used to "undo" the result of Bold() ,Underlined() or Italic()
methods and returns an unadorned version of the font.

Closes #11815.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:20 +00:00
Vadim Zeitlin
8b5d2687db Remove unnecessarily overridden methods from wxToggleButtonBase.
These methods already do exactly the same thing in the base wxAnyButton class,
there is no need to override them again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:16 +00:00
Vadim Zeitlin
a6bf247ee6 No changes, just fix typos in my own name ("Zeitlin").
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:13 +00:00
Vadim Zeitlin
61e323ad37 Add wxEnhMetaFile::Detach().
Allow getting the handle from this class, this is useful if it needs to be
passed to some other library, for example.

Closes #15706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:22 +00:00
Vadim Zeitlin
9a61ced717 Correct wxThread::SetPriority() under Unix to hopefully work.
The old implementation was completely broken, the new should hopefully work if
pthread_setschedparam() behaviour really corresponds to its documentation.

Mapping of our priorities in 0..100 range to pthread 1..99 range remains ugly
but this seems to be unavoidable, unfortunately.

Closes #14985.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:17 +00:00